The word en­cryp­tion refers to a method by which plain text is converted into an in­com­pre­hens­ible sequence using a key. In the best case scenario, the content of the encrypted text is only ac­cess­ible to the user who has the key to read it. The terms “plaintext” and “cipher­text” have his­tor­ic­ally been used when talking about en­cryp­tion. In addition to text messages, modern en­cryp­tion methods can also be applied to other elec­tron­ic­ally trans­mit­ted in­form­a­tion such as voice messages, image files, or programme code.

En­cryp­tion is used to protect files, drives, or dir­ect­or­ies from unwanted access or to transmit data con­fid­en­tially. In ancient times, simple en­cryp­tion methods were used which were primarily re­stric­ted to coding the in­form­a­tion that was to be protected. In­di­vidu­al char­ac­ters of plaintext, words, or entire sentences within the message are re­arranged (trans­pos­i­tion) or replaced by al­tern­at­ive character com­bin­a­tions (sub­sti­tu­tion).

To be able to decode such an encrypted text, the recipient needs to know the rule used to encrypt it. Per­muta­tions in the context of trans­pos­i­tion methods are usually carried out using a matrix. To rewrite a trans­posed cipher­text into plaintext, you have to either know or re­con­struct the trans­pos­i­tion matrix. Sub­sti­tu­tion methods are based on a tabular as­sign­ment of plaintext char­ac­ters and ciphers in the form of a secret code book.

One of the first and easiest en­cryp­tion methods of this type goes all the way back to Julius Caesar. The so-called Caesar cipher is based on monoal­pha­bet­ic sub­sti­tu­tion. To protect his military cor­res­pond­ence from enemy spies, the emperor shifted the letters of each word by three steps in the alphabet. The resulting en­cryp­tion code went as follows:

The number of steps by which the char­ac­ters are moved counts as the key in this type of en­cryp­tion. This isn’t given as a number, but instead as the cor­res­pond­ing letter in the alphabet. A shift by three digits uses “C” as its key.

While the principle behind the Caesar cipher is re­l­at­ively simple, today’s ciphers are based on much a more complex math­em­at­ic­al process, called an algorithm, several of which combine together various different sub­sti­tu­tions and trans­mu­ta­tions using keys in the form of passwords or binary codes as their para­met­ers. These methods are much more difficult for crypto-analysts (code-crackers) to decipher. Many es­tab­lished cryptosys­tems created using modern means are con­sidered un­crack­able.

How does en­cryp­tion work?

An en­cryp­tion method is formed from two basic com­pon­ents: a cryp­to­graph­ic algorithm and at least one cipher key. While the algorithm describes the en­cryp­tion method (for example, “move each letter along the order of the alphabet”), the key provide the para­met­ers (“C = Three steps”). An en­cryp­tion can therefore be described as a method by which plaintext and a key are passed through a cryp­to­graph­ic algorithm, and a secret text is produced.

Digital keys

Modern cipher methods use digital keys in the form of bit sequences. An essential criteria for the security of the en­cryp­tion is the key length in bits. This specifies the log­ar­ithmic units for the number of possible key com­bin­a­tions. It is also referred to in such as case as key space. The bigger the key space, the more resilient the en­cryp­tion will be against brute force attacks – a cracking method based on testing all possible com­bin­a­tions.

To explain brute force attacks, we’ll use the Caesar cipher as an example. Its key space is 25 – which cor­res­ponds to a key length of less than 5 bits. A code-cracker only needs to try 25 com­bin­a­tions in order to decipher the plaintext, so en­cryp­tion using the Caesar cipher doesn’t con­sti­tute a serious obstacle. Modern en­cryp­tion methods, on the other hand, use keys which can provide sig­ni­fic­antly more defense. The Advanced En­cryp­tion Standard (AES), for example, offers the pos­sib­il­ity to select key lengths of either 128, 192, or 256 bits. The key length of this method is ac­cord­ingly large, as a result.

Even with 128-bit en­cryp­tion, 2128 con­di­tions can be mapped. These cor­res­pond to more than 240 sex­til­lion possible key com­bin­a­tions. If AES works with 256 bits, the number of possible key is more than 115 quat­tuor­vi­gin­til­lion (or 1075). Even with the ap­pro­pri­ate technical equipment, it would take an eternity to try out all of the possible com­bin­a­tions. With today’s tech­no­logy, brute force attacks on the AES key length are simply not practical. According to the EE Times, it would take a su­per­com­puter 1 billion billion years to crack a 128-bit AES key, which is more than the age of the universe.

Ker­ck­hoffs’ principle

Because of the long key lengths, brute force attacks against modern en­cryp­tion methods are no longer a threat. Instead, code-crackers look for weak­nesses in the algorithm that make it possible to reduce the com­pu­ta­tion time for de­crypt­ing the encrypted data. Another approach is focused on so-called side channel attacks that target the im­ple­ment­a­tion of a cryptosys­tem in a device or software. The secrecy of an en­cryp­tion process is rather coun­ter­pro­duct­ive for its security.

According to Ker­ck­hoffs’ principle, the security of a cryptosys­tem is not based on the secrecy of the algorithm, but on the key. As early as 1883, Auguste Ker­ck­hoffs for­mu­lated one of the prin­ciples of modern cryp­to­graphy: To encrypt a plaintext reliably, all you really need is to do is provide a well-known math­em­at­ic­al method with secret para­met­ers. This theory remains basically unchanged today.

Like many other areas of software en­gin­eer­ing, the de­vel­op­ment of en­cryp­tion mech­an­isms is based on the as­sump­tion that open source doesn’t com­prom­ise the security. Instead, by con­sist­ently applying Ker­ck­hoffs’ principle, errors in the cryp­to­graph­ic algorithm can be dis­covered quickly, since methods which hope to be adequate have to hold their own in the critical eyes of the pro­fes­sion­al world.

Key expansion: From password to key

Users who want to encrypt or unencrypt files generally don’t come into contact with keys, but instead use a more man­age­able sequence: a password. Secure passwords have between 8 and 12 char­ac­ters, use a com­bin­a­tion of letters, numbers, and special char­ac­ters, and have a decisive advantage over bit sequences: People can remember passwords without requiring much effort.

As a key, though, passwords aren’t suitable for en­cryp­tion because of their short length. Many en­cryp­tion methods then include an in­ter­me­di­ate step where passwords of any length are converted into a fixed bit sequence cor­res­pond­ing to the cryptosys­tem in use. There are also methods that randomly generate keys within the scope of the technical pos­sib­il­it­ies.

A popular method of creating keys from passwords is PBKDF2 (Password- Based Key De­riv­a­tion Function 2). In this method, passwords are sup­ple­men­ted by a pseudo-random string, called the salt value, and then mapped to a bit sequence of the desired length using cryp­to­graph­ic hash functions.

Hash functions are collision-proof one-way functions – cal­cu­la­tions which are re­l­at­ively easy to carry out, but take a con­sid­er­able effort to be reversed. In cryp­to­graphy, a method is con­sidered secure when different hashes are assigned to different documents. Passwords that are converted into keys using a one-way function can only be re­con­struc­ted with con­sid­er­able com­pu­ta­tion­al effort. This is similar to searching in a phone book: While it’s easy to search for the phone number matching a given name, searching for a name using only a telephone number can be an im­possible attempt.

In the framework of PBKDF2, the math­em­at­ic­al cal­cu­la­tion is carried out in several it­er­a­tions (re­pe­ti­tions) in order to protect the key that’s been generated against brute force attacks. The salt value increases the re­con­struc­tion effort of a password on the basis of rainbow tables. A rainbow table is an attack pattern used by code-crackers to close out stored hash values to an unknown password.

Other password hashing methods are scrypt, bcrypt, and LM-Hash, however the latter is con­sidered outdated and unsafe.

The problem with key dis­tri­bu­tion

A central problem of crypto­logy is the question of how in­form­a­tion can be encrypted in one place and decrypted in another. Even Julius Caesar was faced with the problem of key dis­tri­bu­tion. If he wanted to send an encrypted message from Rome to the Germanic front, he had to make sure that whoever was going to receive it would be able to decipher the secret message. The only solution: The messenger had to transmit not only the secret message, but also the key. But how to transfer the key without running the risk of it falling into the wrong hands?

The same question keeps crypto­lo­gists busy today as they try to transfer encrypted data over the internet. Suggested solutions are in­cor­por­ated in the de­vel­op­ment of various cryptosys­tems and key exchange protocols. The key dis­tri­bu­tion problem of symmetric cryptosys­tems can be regarded as the main mo­tiv­a­tion for the de­vel­op­ment of asym­met­ric en­cryp­tion methods.

Clas­si­fy­ing en­cryp­tion methods

In modern crypto­logy, a dis­tinc­tion is made between symmetric and asym­met­ric en­cryp­tion methods. This clas­si­fic­a­tion is based on key handling.

With symmetric cryptosys­tems, the same key is used both for the en­cryp­tion and the de­cryp­tion of coded data. If two com­mu­nic­at­ing parties want to exchange encrypted data, they also need to find a way to secretly transmit the shared key. With asym­met­ric cryptosys­tems on the other hand, every partner in the com­mu­nic­a­tion generates their own pair of key: a public key and a private key.

When symmetric and asym­met­ric en­cryp­tion methods are used in com­bin­a­tion, it’s called a hybrid method.

Symmetric en­cryp­tion methods

Since the 1970s, en­cryp­tions of in­form­a­tion have been based on symmetric cryptosys­tems whose origins lie in ancient methods like the Caesar cipher. The main principle of symmetric en­cryp­tion is that en­cryp­tion and de­cryp­tion are done using the same key. If two parties want to com­mu­nic­ate via en­cryp­tion, both the sender and the receiver need to have copies of the same key. To protect encrypted in­form­a­tion from being accessed by third parties, the symmetric key is kept secret. This is referred to as a private key method.

While classic symmetric en­cryp­tion methods work on the letter level to rewrite the plaintext into its secret version, ciphering is carried out on computer-supported cryptosys­tems at the bit level. So a dis­tinc­tion is made here between stream ciphers and block ciphers.

  • Stream ciphers: Each character or bit of the plaintext is linked to a character or bit of the keystream that is trans­lated into a ciphered output character.
  • Block ciphers: The char­ac­ters or bits to be encrypted are combined into fixed-length blocks and mapped to a fixed-length cipher.

Popular en­cryp­tion methods for symmetric cryptosys­tems are re­l­at­ively simple op­er­a­tions such as sub­sti­tu­tion and trans­pos­i­tion that are combined in modern methods and applied to the plaintext in several suc­cess­ive rounds (it­er­a­tions). Additions, mul­ti­plic­a­tions, modular arith­met­ic, and XOR op­er­a­tions are also in­cor­por­ated into modern symmetric en­cryp­tion al­gorithms.

Well-known symmetric en­cryp­tion methods include the now-outdated Data En­cryp­tion Standard (DES) and its successor, the Advanced En­cryp­tion Standard (AES).

Data En­cryp­tion Standard (DES)

DES is a symmetric en­cryp­tion method that was developed by IBM in the 1970s and stand­ard­ised in 1977 by the US National Institute of Standards and Tech­no­logy (NIST). By the standards of the time, DES was a secure, computer-assisted en­cryp­tion method and formed the basis for modern cryp­to­graphy. The standard is not patented, but due to the re­l­at­ively low key length of 64 bits (ef­fect­ively only 56 bits), it’s basically obsolete for use today. As early as 1994, the cryptosys­tem was cracked with only twelve HP-9735 work­sta­tions and a 50-day computing effort. With today’s tech­no­logy, a DES key can be cracked in just a few hours using brute force attacks.

The symmetric algorithm of a block en­cryp­tion works at the bit level. The plaintext is broken down into blocks of 64 bits, which are then in­di­vidu­ally encrypted with a 64-bit key. In this way, the 64-bit plaintext is trans­lated into 64-bit secret text. Since each eighth bit of the key acts as a parity bit (or check bit), only 56 bits are available for en­cryp­tion.

The DES en­cryp­tion algorithm is a so-called Feistel network and is based on a com­bin­a­tion of sub­sti­tu­tions and trans­pos­i­tions performed in 16 it­er­a­tions. The process, named after the IBM employee Horst Feistel, can be described in four steps:

1. Initial per­muta­tion: The included 64-bit plaintext block is subjected to an input per­muta­tion, which changes the order of the bits. The result of this per­muta­tion is written into two 32-bit registers. This results in a left block half (L) and a right block half (R).

2. Key per­muta­tion: The 56 bits of the key that are relevant for the en­cryp­tion are also subjected to a per­muta­tion, and then divided into two 28-bit blocks (C and D). For every 16 it­er­a­tions, a round key is generated from both key blocks C and D. To do this, the bits of both block halves are shifted cyc­lic­ally to the left by 1 or 2 bits, re­spect­ively. This should ensure that in every en­cryp­tion round, a different round key is included. Afterward, the two half blocks C and D are mapped onto a 48-bit round key.

3. En­cryp­tion round: Every en­cryp­tion round includes the steps a) through d). For each loop, a half block R and a round key are inserted in the en­cryp­tion. The half block L initially remains outside.

  • Expansion: The half block R is extended to a 48-bit block using expansion. For this, the 32 bits of the half block are divided into 4-bit groups as part of the expansion, and then are partially du­plic­ated and permuted according to the following scheme:
  • XOR-link of data block and round key: In every en­cryp­tion round, a 48-bit expanded block R is linked with a 48-bit round key using an XOR operation. The result of the XOR-link is in turn a 48-bit block.
  • S-boxes (sub­sti­tu­tion boxes): Following the XOR operation, the 48-bit block is split into eight 6-bit blocks, sub­sti­tuted by eight 4-bit blocks using S-boxes, and then combined into a 32-bit block. The result of the sub­sti­tu­tion boxes is again subjected to a per­muta­tion.
  • XOR-link of R block and L block: After every en­cryp­tion round, the result of the S-boxes is linked with the as-yet unused L blocks via XOR. The result is a 32-bit block that then enters the second en­cryp­tion phase as a new R block. The R block of the first round serves as the L block of the second round.

4. Final per­muta­tion: If all 16 en­cryp­tion sessions have been completed, the L and R blocks are combined into a 64-bit block and subjected to an inverse output per­muta­tion for the final per­muta­tion. The plaintext is encrypted.

The following graphic shows a schematic rep­res­ent­a­tion of the DES algorithm. The XOR-links are marked as red circles with white crosses.

The de­ci­pher­ing of DES encrypted secret texts follows the same scheme, but in the reverse order.

A major criticism of DES is the small key length of 56 bits results in com­par­at­ively small key space. This length can no longer withstand the brute force attacks that are available with today’s computing power. The method of key per­muta­tion, which generates 16 nearly identical round key, is con­sidered too weak.

A variant of DES was developed with Triple-DES (3DES), where the en­cryp­tion method runs in three suc­cess­ive rounds. But the effective key length of 3DES is still only 112 bits, which remains below today’s minimum standard of 128 bits. Ad­di­tion­ally, 3DES is also more computer-intensive than DES.

The Data En­cryp­tion Standard has therefore largely been replaced. The Advanced En­cryp­tion Standard algorithm has taken over as its successor, and is also a symmetric en­cryp­tion.

Advanced En­cryp­tion Standard (AES)

In the 1990s, it became apparent that DES, the most commonly used en­cryp­tion standard, was no longer tech­no­lo­gic­ally up to date. A new en­cryp­tion standard was needed. As its re­place­ment, de­velopers Vincent Rijmen and Joan Daemen es­tab­lished the Rijndael Algorithm (pro­nounced “Rain-dahl”) – a method that, due to its security, flex­ib­il­ity, and per­form­ance, was im­ple­men­ted as a public tender and certified by NIST as the Advanced En­cryp­tion Standard (AES) at the end of 2000. AES also divides the encrypted plaintext into blocks, so the system is based on block en­cryp­tion just like DES. The standard supports 128, 192, and 256 bit keys. But instead of 64-bit blocks, AES uses sig­ni­fic­antly larger 128-bit blocks, which are encrypted using a sub­sti­tu­tion per­muta­tion network (SPN) in several suc­cess­ive rounds. The DES-successor also uses a new round key for each en­cryp­tion round, which is derived re­curs­ively from the output key and is linked with the data block to be encrypted using XOR. The en­cryp­tion process is divided into roughly four steps: 1. Key expansion: AES, like DES, uses a new round key for every en­cryp­tion loop. This is derived from the output key via recursion. In the process, the length of the output key is also expanded to make it possible to map the required number of 128-bit round keys. Every round key is based on a partial section of the expanded output key. The number of required round keys is equal to the number of rounds (R), including the key round, plus a round key for the pre­lim­in­ary round (number of keys = R + 1). 2. Pre­lim­in­ary round: In the pre­lim­in­ary round, the 128-bit input block is trans­ferred to a two-di­men­sion­al table (Array) and linked to the first round key using XOR (Key­Ad­di­tion). The table is made up of four rows and four columns. Each cell contains one byte (8 bits) of the block to be encrypted. 3. En­cryp­tion rounds: The number of en­cryp­tion rounds depends on the key length used: 10 rounds for AES128, 12 rounds for AES192, and 14 rounds for AES256. Each en­cryp­tion round uses the following op­er­a­tions:

  • SubBytes: SubBytes is a monoal­pha­bet­ic sub­sti­tu­tion. Each byte in the block to be encrypted is replaced by an equi­val­ent using an S-box.
  • ShiftRows: In the ShiftRow trans­form­a­tion, bytes in the array cells (see pre­lim­in­ary round) are shifted con­tinu­ally to the left.
  • Mix­Columns: With Mix­Columns, the AES algorithm uses a trans­form­a­tion whereby the data is mixed within the array columns. This step is based on a re­cal­cu­la­tion of each in­di­vidu­al cell. To do this, the columns of the array are subjected to a matrix mul­ti­plic­a­tion and the results are linked using XOR.
  • Key­Ad­di­tion: At the end of each en­cryp­tion round, another Key­Ad­di­tion takes place. This, just like the pre­lim­in­ary round, is based on an XOR link of the data block with the current round key.

4. Key round: The key round is the last en­cryp­tion round. Unlike the previous rounds, it doesn’t include MixColumn trans­form­a­tions, and so only includes the SubBytes, ShiftRows, and Key­Ad­di­tion op­er­a­tions. The result of the final round is the cipher­text. The en­cryp­tion of AES-ciphered data is based on the in­vest­ment of the en­cryp­tion algorithm. This refers to not only the sequence of the steps, but also the op­er­a­tions ShiftRow, Mix­Columns, and SubBytes, whose dir­ec­tions are reversed as well. AES is certified for providing a high level of  security as a result of its algorithm. Even today, there have been no known practical relevance attacks. Brute force attacks are in­ef­fi­cient against the key length of at least 128 bits. Op­er­a­tions such as ShiftRows and Mix­Columns also ensure optimal mixing of the bits: As a result, each bit depends on a key. The cryptosys­tem is re­as­sur­ing not just because of these measures, but also due to its simple im­ple­ment­a­tion and high level of secrecy. AES is used, among other things, as an en­cryp­tion standard for WPA2, SSH, and IPSec. The algorithm is also used to encrypt com­pressed file archives such as 7-Zip or RAR. AES-encrypted data is safe from third-party access, but only so long as the key remains a secret. Since the same key is used for en­cryp­tion and de­cryp­tion, the cryptosys­tem is affected by the key dis­tri­bu­tion problem just like any other symmetric method. The secure use of AES is re­stric­ted to ap­plic­a­tion fields that either don’t require a key exchange or allow the exchange to happen via a secure channel. But ciphered com­mu­nic­a­tion over the internet requires that the data can be encrypted on one computer and decrypted on another. This is where asym­met­ric­al cryptosys­tems have been im­ple­men­ted, which enable a secure exchange of sym­met­ric­al keys or work without the exchange of a common key. Available al­tern­at­ives to AES are the symmetric cryptosys­tems MARS, RC6, Serpent, and Twofish, which are also based on a block en­cryp­tion and were among the finalists of the AES tender alongside Rjindael. Blowfish, the pre­de­cessor to Twofish, is also still in use. Salsa20, which was developed by Daniel J. Bernstein in 2005, is one of the finalists of the European eSTREAM Project.

Asym­met­ric en­cryp­tion methods

While for symmetric cryptosys­tems, the same key is used on both sides of the encrypted com­mu­nic­a­tion, the two parties of an asym­met­ric­ally encrypted com­mu­nic­ated generate a key pair for each page. Each par­ti­cipant in the com­mu­nic­a­tion has two keys at their disposal: one public key and one private. To be able to encrypt in­form­a­tion, each party has to declare their public key. This generally happens over a key server and is referred to as a public key method. The private key stays a secret. This is the strength of the asym­met­ric cryptosys­tem:  As opposed to in a symmetric en­cryp­tion method, the secret key never leaves its owner’s sight.

Public keys are used for en­cryp­tion in an asym­met­ric en­cryp­tion. They allow for digital sig­na­tures to be tested and users to be verified. Private keys, on the other hand, are used for de­cryp­tion and enable the gen­er­a­tion of digital sig­na­tures or their au­then­tic­a­tion against other users.

An example:

User A would like to send user B an encrypted message. For this, A needs the public key of B. The public key of B allows A to encrypt a message that only the private key of B is able to decrypt. Except for B, nobody is capable of reading the message. Even A has no way to decrypt the en­cryp­tion.

The advantage of asym­met­ric en­cryp­tion is the principle that anyone can use the public key of user B to encrypt messages, which can then only be de­ciphered by B using its secret key. Since only the public key is exchanged, there is no need to create a tamper-proof, secure channel.

The dis­ad­vant­age of this en­cryp­tion method is that B can’t be sure that the encrypted message actually comes from A. The­or­et­ic­ally, a third user (C) could use the public key of B to encrypt a message – for example, to spread malware. In addition, A can’t be sure that the public key really belongs to B. A public key could have been created by C and given as the key of B to intercept message from A to B. For asym­met­ric en­cryp­tions, a mechanism is needed so that users can test the au­then­tic­a­tion of their com­mu­nic­a­tion partners.

Digital cer­ti­fic­ates and sig­na­tures are solutions to this problem.

  • Digital cer­ti­fic­ates: To secure asym­met­ric en­cryp­tion methods, com­mu­nic­a­tion partners can have the au­then­ti­city of their public keys confirmed by an official cer­ti­fic­a­tion body. A popular standard for public key cer­ti­fic­a­tion is X.509. This is used, for example, in TLS/SSL encrypted data trans­mis­sion via HTTPS or as part of the e-mail en­cryp­tion via S/MIME.
  • Digital sig­na­tures: While digital cer­ti­fic­ates can be used to verify public keys, digital sig­na­tures are used to identify the sender of an encrypted message beyond a doubt. A private key is used to generate a signature. The receiver then verifies this signature using the public key of the sender. The au­then­ti­city of the digital signature is secured through a hier­arch­ic­ally struc­tured public key in­fra­struc­ture (PKI). A de­cent­ral­ized al­tern­at­ive to the hier­arch­ic­al PKI is the so-called Web of Trust (WoT), a network in which users can directly and in­dir­ectly verify each other. The first sci­entif­ic pub­lic­a­tion of asym­met­ric en­cryp­tion methods was made in 1977 by the math­em­aticians Rivest, Shamir, and Adleman. The RSA method, which is named after the inventors, is based on one-way functions with a trapdoor and can be used for en­crypt­ing data and also as a signature method.

Rivest, Shamir, Adleman (RSA)

RSA is one of the safest and best-described public key methods. The idea of en­cryp­tion using a public en­cryp­tion key and a secret de­cryp­tion key can be traced back to the crypto­lo­gists Whitfield Diffie and Martin Hellman. This method was published in 1976 as the Diffie-Hellman key exchange, which enables two com­mu­nic­a­tion partners to agree on a secret key over an unsecure channel. The re­search­ers focused on Merkle’s puzzles, developed by Ralph Merkle, so it is sometimes also called the Diffie-Hellman-Merkle key exchange (DHM).

The crypto­lo­gists used math­em­at­ic­al one-way functions, which are easy to implement, but can only be reversed with con­sid­er­able com­pu­ta­tion­al effort. Even today, the key exchanged named after them is used to ne­go­ti­ated secret keys within symmetric cryptosys­tems. Another merit of the duo’s research is the concept of the trapdoor. In the Diffie-Hellman key exchange pub­lic­a­tion, the hidden ab­bre­vi­ations are already addressed which are intended to make it possible to speed up the inversion of a one-way function. Diffie and Hellman didn’t provide concrete proof, but their theory of the trapdoor encourage various crypto­lo­gists to carry out their own in­vest­ig­a­tions.

Rivest, Shamir, and Adleman also searched for one-way function ab­bre­vi­ations – ori­gin­ally with the intention of refuting the trapdoor theory. But their research ended up taking another direction, and instead resulted in the en­cryp­tion process even­tu­ally named after them. Today, RSA is the first sci­en­tific­ally published algorithm that allows for the transfer of encrypted data without the use of a secret key.

The RSA uses an algorithm that is based on the mul­ti­plic­a­tion of large prime numbers. While there generally aren’t any problems with mul­tiply­ing two primes by 100, 200, or 300 digits, there is still no efficient algorithm that can reverse the result of such a com­pu­ta­tion into its prime factors. Prime fac­tor­isa­tion can be explained by this example:

If you multiply the prime number 14,629 and 30,491 you’ll get the product 446,052,839. This has only four possible divisors: One is itself, and two others are the original prime numbers that have been mul­ti­plied. If you divide the first two divisors you’ll get the initial values of 14,629 and 30,491, since each number is divisible by 1 and by itself.

This theme is the basis of the RSA key gen­er­a­tion. Both the public and the private key represent two pairs of numbers:

                Public key: (e, N)

                Private key: (d, N)

N is the so-called RSA module. This is contained in both keys and results from the product of two randomly selected, very large primes p and q (N = p x q).

To generate the public key, you need e, a number that is randomly selected according to certain re­stric­tions. Come N and e to get the public key which is given in plaintext to each com­mu­nic­a­tion partner.

To generate the private key, you need N as well as d as they contain the value resulting from the randomly generated primes p and q, as well as the random number e, which is computed based on Euler’s phi function (ϕ).

Which prime numbers go into the com­pu­ta­tion of the private key has to remain secret to guarantee the security of the RSA en­cryp­tion. The product of both prime numbers, however, can be used in the public key in plaintext, since it’s assumed that today there’s no efficient algorithm that can reverse the product into its prime factor numbers in an ap­pro­pri­ate amount of time. It’s also not possible to computer p and q from N, unless the cal­cu­la­tion can be ab­bre­vi­ated. This trapdoor rep­res­ents the value d, which is known only to the owner of the private key.

The security of the RSA algorithm is highly dependent on technical progress. Computing power doubles about every two years, and so it’s not out of the realm of pos­sib­il­ity that an efficient method for primary factor de­com­pos­i­tion will be available in the fore­see­able future to match the methods that are available today. In this case, RSA offers the pos­sib­il­ity to adapt the algorithm to keep up with this technical progress by using even higher prime numbers in the com­pu­ta­tion of the key.

For a secure operation of the RSA process, re­com­mend­a­tions are provided by NIST that specifies the number of bits and suggested N values for different levels of security as well as different key lengths.

ID-based public key method

The central dif­fi­culty with asym­met­ric­al en­cryp­tion methods is the user au­then­tic­a­tion. In classic public key methods, the public key is not as­so­ci­ated at all with the identity of its user. If a third party is able to use the public key by pre­tend­ing to be one of the parties involved in the encrypted data transfer, then the whole cryptosys­tem can be removed without having to directly attack the algorithm or a private de­cryp­tion key. In 1984, Adi Shamir, one of the de­velopers of RSA, proposed an ID-based cryptosys­tem that is based on the asym­met­ric approach but attempts to overcome its weakness. In identity-based en­cryp­tion (IBE), the public key of a com­mu­nic­a­tion partner is not generated with any de­pend­ence on the private key, but instead from a unique ID. Depending on the context, for example, an e-mail address or domain could be used. This elim­in­ates the need to au­then­tic­ate public keys through official cer­ti­fic­a­tion bodies. Instead, the private key generator (PKG) takes its place. This is a central algorithm, with which the recipient of an encrypted message can issue a de­cryp­tion key belonging to their identity. The theory of ID-based en­cryp­tion solves a basic problem of the asym­met­ric­al cryptosys­tem, and in­tro­duces two other security gaps instead: a central point of criticism is the question of how the private de­cryp­tion key is trans­ferred from the PKG to the recipient of the encrypted message. Here the familiar key problem arises again. Another downside to the ID-based method is the cir­cum­stance where there’s another entity next to the recipient of a ciphered message who then also finds out the de­cryp­tion key from the PKG. The key is then, by defin­i­tion, no longer private and can be misused. The­or­et­ic­ally, the PKG is able to decrypt all un­au­thor­ised messages. This can be done by gen­er­at­ing the key pair using open source software on your own computer. The most popular ID-based method can be traced back to Dan Boneh and Matthew K. Franklin.

Hybrid methods

Hybrid en­cryp­tion is the joining of symmetric and asym­met­ric cryptosys­tems in the context of data trans­mis­sion on the internet. The goal of this com­bin­a­tion is to com­pensate for the weak­nesses of one system using the strengths of the other.

Symmetric cryptosys­tems like AES (Advanced En­cryp­tion Standard) are regarded as safe by today’s technical standards and enable large amounts of data to be processed quickly and ef­fi­ciently. The design of the algorithm is based on a shared private key that must be exchanged between the receiver and the sender of the ciphered message. But users of symmetric methods are faced with the problem of key dis­tri­bu­tion. This can be solved through asym­met­ric cryptosys­tems. Methods like RSA depend on a strict sep­ar­a­tion of public and private keys that enables the transfer of a private key.

But RSA only provides reliable pro­tec­tion again crypt­ana­lys­is with a suf­fi­ciently large key length, which must be at least 1,976 bits. This results in long computing op­er­a­tions that dis­qual­i­fy the algorithm for the en­cryp­tion and de­cryp­tion of large amounts of data. In addition, the secret text to be trans­mit­ted is sig­ni­fic­antly larger than the original plaintext after going through an RSA cipher.

In hybrid en­cryp­tion methods, asym­met­ric al­gorithms aren’t used to encrypt useful data, but instead to secure the trans­mis­sion of a symmetric session key over an un­pro­tec­ted public channel. This in turn makes it possible to decrypt a cipher­text with the help of symmetric al­gorithms.

The process of a hybrid en­cryp­tion can be describe in three steps:

1. Key man­age­ment: With hybrid methods, the sym­met­ric­al en­cryp­tion of a message is framed by an asym­met­ric­al en­cryp­tion method, so an asym­met­ric (a) as well as a symmetric (b) key must be generated.

  • Before the encrypted data transfer occurs, both com­mu­nic­a­tion partners first must generate an asym­met­ric key pair: a public key and a private key. Af­ter­wards the exchange of the public keys takes place – in the best case, secured through an au­then­tic­a­tion mechanism. The asym­met­ric key pair serves to both cipher and decipher a symmetric session key, and so is generally used multiple times.
  • The en­cryp­tion and de­cryp­tion of the plaintext is performed using the sym­met­ric­al session key. This is generated anew by the message sender for each en­cryp­tion process.

2. En­cryp­tion: If an extensive message is to be trans­mit­ted securely over the internet, the sender must first generate a sym­met­ric­al session key with which the user data can be encrypted. When this is done, the recipient’s public key is then used for the asym­met­ric­al ciphering of the session key. Both the user data and the symmetric key are then available in a ciphered form and can safely be sent.

3. De­cryp­tion: The encrypted text is sent to the recipient together with the encrypted session key, who needs their private key in order to asym­met­ric­ally decrypt the session key. This decrypted key is then used to decrypt the sym­met­ric­ally ciphered user data.

According to this formula, an efficient en­cryp­tion method can be im­ple­men­ted with which it’s possible to safely encrypt and decrypt an even large amount of user data at a higher speed. Since only a short session key is asym­met­ric­ally encrypted, the com­par­at­ively long cal­cu­la­tion times of asym­met­ric al­gorithms in hybrid en­cryp­tion are not important. The key dis­tri­bu­tion problem of the symmetric en­cryp­tion method is reduced through the asym­met­ric en­cryp­tion of session keys to simply be a problem of user au­then­tic­a­tion. This is solved in asym­met­ric cryptosys­tems through digital sig­na­tures and cer­ti­fic­ates.

Hybrid en­cryp­tion methods are used in the form of IPSec, with the secured com­mu­nic­a­tion taking place over unsecured IP networks. The Hypertext Transfer Protocol Secure (HTTPS) also uses TLS/SSL to create a hybrid en­cryp­tion protocol that combines symmetric and asym­met­ric cryptosys­tems. The im­ple­ment­a­tion of hybrid methods is the basis for en­cryp­tion standards such as Pretty Good Privacy (PGP), GnuPG, and S/MIME that are used in the context of e-mail en­cryp­tion.

A popular com­bin­a­tion for hybrid en­cryp­tion methods is the symmetric en­cryp­tion of user data via AES and the sub­sequent asym­met­ric en­cryp­tion of the session key by means of RSA. Al­tern­at­ively, the session key is arranged according to the Diffie-Hellman method. This can serve as Ephemeral Diffie-Hellman Forward Secrecy, but is prone to man-in-the-middle attacks. A re­place­ment for the RSA algorithm is the Elgamal cryptosys­tem. In 1985, Taher Elgamal developed the public key method, which is also based on the idea of the Diffie-Hellman key exchange and is used in the current version of the PGP en­cryp­tion programme.

Go to Main Menu