Block cipher - wikipedia Block cipher This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. ( April 2012 ) In cryptography, a block cipher is a deterministic algorithm operating on fixed - length groups of bits, called a block, with an unvarying transformation that is specified by a symmetric key. Block ciphers operate as important elementary components in the design of many cryptographic protocols, and are widely used to implement encryption of bulk data. The modern design of block ciphers is based on the concept of an iterated product cipher. In his seminal 1949 publication, Communication Theory of Secrecy Systems, Claude Shannon analyzed product ciphers and suggested them as a means of effectively improving security by combining simple operations such as substitutions and permutations. Iterated product ciphers carry out encryption in multiple rounds, each of which uses a different subkey derived from the original key. One widespread implementation of such ciphers, named a Feistel network after Horst Feistel, is notably implemented in the DES cipher. Many other realizations of block ciphers, such as the AES, are classified as substitution -- permutation networks. The publication of the DES cipher by the United States National Bureau of Standards ( subsequently the U.S. National Institute of Standards and Technology, NIST ) in 1977 was fundamental in the public understanding of modern block cipher design. It also influenced the academic development of cryptanalytic attacks. Both differential and linear cryptanalysis arose out of studies on the DES design. As of 2016 there is a palette of attack techniques against which a block cipher must be secure, in addition to being robust against brute - force attacks. Even a secure block cipher is suitable only for the encryption of a single block under a fixed key. A multitude of modes of operation have been designed to allow their repeated use in a secure way, commonly to achieve the security goals of confidentiality and authenticity. However, block ciphers may also feature as building blocks in other cryptographic protocols, such as universal hash functions and pseudo-random number generators. Contents 1 Definition 2 Design 2.1 Iterated block ciphers 2.2 Substitution -- permutation networks 2.3 Feistel ciphers 2.4 Lai -- Massey ciphers 2.5 Operations 2.5. 1 ARX ( add -- rotate -- xor ) 2.5. 2 Other operations 3 Modes of operation 4 Padding 5 Cryptanalysis 5.1 Brute - force attacks 5.2 Differential cryptanalysis 5.3 Linear cryptanalysis 5.4 Integral cryptanalysis 5.5 Other techniques 6 Provable security 6.1 Standard model 6.2 Ideal cipher model 7 Practical evaluation 8 Notable block ciphers 8.1 Lucifer / DES 8.2 IDEA 8.3 RC5 8.4 Rijndael / AES 8.5 Blowfish 9 Generalizations 9.1 Tweakable block ciphers 9.2 Format - preserving encryption 10 Relation to other cryptographic primitives 11 See also 12 References 13 Further reading 14 External links Definition A block cipher consists of two paired algorithms, one for encryption, E, and the other for decryption, D. Both algorithms accept two inputs : an input block of size n bits and a key of size k bits ; and both yield an n - bit output block. The decryption algorithm D is defined to be the inverse function of encryption, i.e., D = E. More formally, a block cipher is specified by an encryption function E K ( P ) : = E ( K, P ) : ( 0, 1 ) k × ( 0, 1 ) n → ( 0, 1 ) n, ( displaystyle E_ ( K ) ( P ) : = E ( K, P ) : ( 0, 1 ) ^ ( k ) \times ( 0, 1 ) ^ ( n ) \rightarrow ( 0, 1 ) ^ ( n ), ) which takes as input a key K of bit length k, called the key size, and a bit string P of length n, called the block size, and returns a string C of n bits. P is called the plaintext, and C is termed the ciphertext. For each K, the function E ( P ) is required to be an invertible mapping on ( 0, 1 ). The inverse for E is defined as a function E K − 1 ( C ) : = D K ( C ) = D ( K, C ) : ( 0, 1 ) k × ( 0, 1 ) n → ( 0, 1 ) n, ( displaystyle E_ ( K ) ^ ( - 1 ) ( C ) : = D_ ( K ) ( C ) = D ( K, C ) : ( 0, 1 ) ^ ( k ) \times ( 0, 1 ) ^ ( n ) \rightarrow ( 0, 1 ) ^ ( n ), ) taking a key K and a ciphertext C to return a plaintext value P, such that ∀ K : D K ( E K ( P ) ) = P. ( displaystyle \forall K : D_ ( K ) ( E_ ( K ) ( P ) ) = P. ) For example, a block cipher encryption algorithm might take a 128 - bit block of plaintext as input, and output a corresponding 128 - bit block of ciphertext. The exact transformation is controlled using a second input -- the secret key. Decryption is similar : the decryption algorithm takes, in this example, a 128 - bit block of ciphertext together with the secret key, and yields the original 128 - bit block of plain text. For each key K, E is a permutation ( a bijective mapping ) over the set of input blocks. Each key selects one permutation from the set of ( 2 n ) ! ( displaystyle ( 2 ^ ( n ) ) ! ) possible permutations. Design Iterated block ciphers Most block cipher algorithms are classified as iterated block ciphers which means that they transform fixed - size blocks of plaintext into identical size blocks of ciphertext, via the repeated application of an invertible transformation known as the round function, with each iteration referred to as a round. Usually, the round function R takes different round keys K as second input, which are derived from the original key : M i = R K i ( M i − 1 ) ( displaystyle M_ ( i ) = R_ ( K_ ( i ) ) ( M_ ( i - 1 ) ) ) where M 0 ( displaystyle M_ ( 0 ) ) is the plaintext and M r ( displaystyle M_ ( r ) ) the ciphertext, with r being the number of rounds. Frequently, key whitening is used in addition to this. At the beginning and the end, the data is modified with key material ( often with XOR, but simple arithmetic operations like adding and subtracting are also used ) : M 0 = M ⊕ K 0 ( displaystyle M_ ( 0 ) = M oplus K_ ( 0 ) ) M i = R K i ( M i − 1 ) ; i = 1... r ( displaystyle M_ ( i ) = R_ ( K_ ( i ) ) ( M_ ( i - 1 ) ) ; ; ; i = 1 dots r ) C = M r ⊕ K r + 1 ( displaystyle C = M_ ( r ) oplus K_ ( r + 1 ) ) Given one of the standard iterated block cipher design schemes, it is fairly easy to construct a block cipher that is cryptographically secure, simply by using a large number of rounds. However, this will make the cipher inefficient. Thus, efficiency is the most important additional design criterion for professional ciphers. Further, a good block cipher is designed to avoid side - channel attacks, such as input - dependent memory accesses that might leak secret data via the cache state or the execution time. In addition, the cipher should be concise, for small hardware and software implementations. Finally, the cipher should be easily cryptanalyzable, such that it can be shown how many rounds the cipher needs to be reduced to, so that the existing cryptographic attacks would work -- and, conversely, that it can be shown that the number of actual rounds is large enough to protect against them. Substitution -- permutation networks A sketch of a substitution -- permutation network with 3 rounds, encrypting a plaintext block of 16 bits into a ciphertext block of 16 bits. The S - boxes are the S, the P - boxes are the same P, and the round keys are the K. Main article : Substitution -- permutation network One important type of iterated block cipher known as a substitution -- permutation network ( SPN ) takes a block of the plaintext and the key as inputs, and applies several alternating rounds consisting of a substitution stage followed by a permutation stage -- to produce each block of ciphertext output. The non-linear substitution stage mixes the key bits with those of the plaintext, creating Shannon 's confusion. The linear permutation stage then dissipates redundancies, creating diffusion. A substitution box ( S - box ) substitutes a small block of input bits with another block of output bits. This substitution must be one - to - one, to ensure invertibility ( hence decryption ). A secure S - box will have the property that changing one input bit will change about half of the output bits on average, exhibiting what is known as the avalanche effect -- i.e. it has the property that each output bit will depend on every input bit. A permutation box ( P - box ) is a permutation of all the bits : it takes the outputs of all the S - boxes of one round, permutes the bits, and feeds them into the S - boxes of the next round. A good P - box has the property that the output bits of any S - box are distributed to as many S - box inputs as possible. At each round, the round key ( obtained from the key with some simple operations, for instance, using S - boxes and P - boxes ) is combined using some group operation, typically XOR. Decryption is done by simply reversing the process ( using the inverses of the S - boxes and P - boxes and applying the round keys in reversed order ). Feistel ciphers Many block ciphers, such as DES and Blowfish utilize structures known as Feistel ciphers Main article : Feistel cipher In a Feistel cipher, the block of plain text to be encrypted is split into two equal - sized halves. The round function is applied to one half, using a subkey, and then the output is XORed with the other half. The two halves are then swapped. Let F ( displaystyle ( \rm ( F ) ) ) be the round function and let K 0, K 1,..., K n ( displaystyle K_ ( 0 ), K_ ( 1 ), ldots, K_ ( n ) ) be the sub-keys for the rounds 0, 1,..., n ( displaystyle 0, 1, ldots, n ) respectively. Then the basic operation is as follows : Split the plaintext block into two equal pieces, ( L 0 ( displaystyle L_ ( 0 ) ), R 0 ( displaystyle R_ ( 0 ) ) ) For each round i = 0, 1,..., n ( displaystyle i = 0, 1, dots, n ), compute L i + 1 = R i ( displaystyle L_ ( i + 1 ) = R_ ( i ) , ) R i + 1 = L i ⊕ F ( R i, K i ) ( displaystyle R_ ( i + 1 ) = L_ ( i ) oplus ( \rm ( F ) ) ( R_ ( i ), K_ ( i ) ) ). Then the ciphertext is ( R n + 1, L n + 1 ) ( displaystyle ( R_ ( n + 1 ), L_ ( n + 1 ) ) ). Decryption of a ciphertext ( R n + 1, L n + 1 ) ( displaystyle ( R_ ( n + 1 ), L_ ( n + 1 ) ) ) is accomplished by computing for i = n, n − 1,..., 0 ( displaystyle i = n, n - 1, ldots, 0 ) R i = L i + 1 ( displaystyle R_ ( i ) = L_ ( i + 1 ) , ) L i = R i + 1 ⊕ F ( L i + 1, K i ) ( displaystyle L_ ( i ) = R_ ( i + 1 ) oplus ( \rm ( F ) ) ( L_ ( i + 1 ), K_ ( i ) ) ). Then ( L 0, R 0 ) ( displaystyle ( L_ ( 0 ), R_ ( 0 ) ) ) is the plaintext again. One advantage of the Feistel model compared to a substitution -- permutation network is that the round function F ( displaystyle ( \rm ( F ) ) ) does not have to be invertible. Lai -- Massey ciphers The Lai -- Massey scheme. The archetypical cipher utilizing it is IDEA. Main article : Lai -- Massey scheme The Lai -- Massey scheme offers security properties similar to those of the Feistel structure. It also shares its advantage that the round function F ( displaystyle mathrm ( F ) ) does not have to be invertible. Another similarity is that is also splits the input block into two equal pieces. However, the round function is applied to the difference between the two, and the result is then added to both half blocks. Let F ( displaystyle mathrm ( F ) ) be the round function and H ( displaystyle mathrm ( H ) ) a half - round function and let K 0, K 1,..., K n ( displaystyle K_ ( 0 ), K_ ( 1 ), ldots, K_ ( n ) ) be the sub-keys for the rounds 0, 1,..., n ( displaystyle 0, 1, ldots, n ) respectively. Then the basic operation is as follows : Split the plaintext block into two equal pieces, ( L 0 ( displaystyle L_ ( 0 ) ), R 0 ( displaystyle R_ ( 0 ) ) ) For each round i = 0, 1,..., n ( displaystyle i = 0, 1, dots, n ), compute ( L i + 1 ′, R i + 1 ′ ) = H ( L i ′ + T i, R i ′ + T i ) ( displaystyle ( L_ ( i + 1 ) ', R_ ( i + 1 ) ' ) = mathrm ( H ) ( L_ ( i ) ' + T_ ( i ), R_ ( i ) ' + T_ ( i ) ) ) where T i = F ( L i ′ − R i ′, K i ) ( displaystyle T_ ( i ) = mathrm ( F ) ( L_ ( i ) ' - R_ ( i ) ', K_ ( i ) ) ) and ( L 0 ′, R 0 ′ ) = H ( L 0, R 0 ) ( displaystyle ( L_ ( 0 ) ', R_ ( 0 ) ' ) = mathrm ( H ) ( L_ ( 0 ), R_ ( 0 ) ) ) Then the ciphertext is ( L n + 1, R n + 1 ) = ( L n + 1 ′, R n + 1 ′ ) ( displaystyle ( L_ ( n + 1 ), R_ ( n + 1 ) ) = ( L_ ( n + 1 ) ', R_ ( n + 1 ) ' ) ). Decryption of a ciphertext ( L n + 1, R n + 1 ) ( displaystyle ( L_ ( n + 1 ), R_ ( n + 1 ) ) ) is accomplished by computing for i = n, n − 1,..., 0 ( displaystyle i = n, n - 1, ldots, 0 ) ( L i ′, R i ′ ) = H − 1 ( L i + 1 ′ − T i, R i + 1 ′ − T i ) ( displaystyle ( L_ ( i ) ', R_ ( i ) ' ) = mathrm ( H ) ^ ( - 1 ) ( L_ ( i + 1 ) ' - T_ ( i ), R_ ( i + 1 ) ' - T_ ( i ) ) ) where T i = F ( L i + 1 ′ − R i + 1 ′, K i ) ( displaystyle T_ ( i ) = mathrm ( F ) ( L_ ( i + 1 ) ' - R_ ( i + 1 ) ', K_ ( i ) ) ) and ( L n + 1 ′, R n + 1 ′ ) = H − 1 ( L n + 1, R n + 1 ) ( displaystyle ( L_ ( n + 1 ) ', R_ ( n + 1 ) ' ) = mathrm ( H ) ^ ( - 1 ) ( L_ ( n + 1 ), R_ ( n + 1 ) ) ) Then ( L 0, R 0 ) = ( L 0 ′, R 0 ′ ) ( displaystyle ( L_ ( 0 ), R_ ( 0 ) ) = ( L_ ( 0 ) ', R_ ( 0 ) ' ) ) is the plaintext again. Operations ARX ( add -- rotate -- XOR ) Many modern block ciphers and hashes are ARX algorithms -- their round function involves only three operations : modular addition, rotation with fixed rotation amounts, and XOR ( ARX ). Examples include Salsa20, Speck, XXTEA, and BLAKE. Many authors draw an ARX network, a kind of data flow diagram, to illustrate such a round function. These ARX operations are popular because they are relatively fast and cheap in hardware and software, and also because they run in constant time, and are therefore immune to timing attacks. The rotational cryptanalysis technique attempts to attack such round functions. Other operations Other operations often used in block ciphers include data - dependent rotations as in RC5 and RC6, a substitution box implemented as a lookup table as in Data Encryption Standard and Advanced Encryption Standard, a permutation box, and multiplication as in IDEA. Modes of operation Main article : Block cipher modes of operation Insecure encryption of an image as a result of Electronic Codebook ( ECB ) mode encoding. A block cipher by itself allows encryption only of a single data block of the cipher 's block length. For a variable - length message, the data must first be partitioned into separate cipher blocks. In the simplest case, known as the Electronic Codebook ( ECB ) mode, a message is first split into separate blocks of the cipher 's block size ( possibly extending the last block with padding bits ), and then each block is encrypted and decrypted independently. However, such a naive method is generally insecure because equal plaintext blocks will always generate equal ciphertext blocks ( for the same key ), so patterns in the plaintext message become evident in the ciphertext output. To overcome this limitation, several so - called block cipher modes of operation have been designed and specified in national recommendations such as NIST 800 - 38A and BSI TR - 02102 and international standards such as ISO / IEC 10116. The general concept is to use randomization of the plaintext data based on an additional input value, frequently called an initialization vector, to create what is termed probabilistic encryption. In the popular cipher block chaining ( CBC ) mode, for encryption to be secure the initialization vector passed along with the plaintext message must be a random or pseudo-random value, which is added in an exclusive - or manner to the first plaintext block before it is being encrypted. The resultant ciphertext block is then used as the new initialization vector for the next plaintext block. In the cipher feedback ( CFB ) mode, which emulates a self - synchronizing stream cipher, the initialization vector is first encrypted and then added to the plaintext block. The output feedback ( OFB ) mode repeatedly encrypts the initialization vector to create a key stream for the emulation of a synchronous stream cipher. The newer counter ( CTR ) mode similarly creates a key stream, but has the advantage of only needing unique and not ( pseudo - ) random values as initialization vectors ; the needed randomness is derived internally by using the initialization vector as a block counter and encrypting this counter for each block. From a security - theoretic point of view, modes of operation must provide what is known as semantic security. Informally, it means that given some ciphertext under an unknown key one can not practically derive any information from the ciphertext ( other than the length of the message ) over what one would have known without seeing the ciphertext. It has been shown that all of the modes discussed above, with the exception of the ECB mode, provide this property under so - called chosen plaintext attacks. Padding Main article : Padding ( cryptography ) Some modes such as the CBC mode only operate on complete plaintext blocks. Simply extending the last block of a message with zero - bits is insufficient since it does not allow a receiver to easily distinguish messages that differ only in the amount of padding bits. More importantly, such a simple solution gives rise to very efficient padding oracle attacks. A suitable padding scheme is therefore needed to extend the last plaintext block to the cipher 's block size. While many popular schemes described in standards and in the literature have been shown to be vulnerable to padding oracle attacks, a solution which adds a one - bit and then extends the last block with zero - bits, standardized as `` padding method 2 '' in ISO / IEC 9797 - 1, has been proven secure against these attacks. Cryptanalysis This section needs expansion with : Introduction of attack models may be needed for the cryptanalysis techniques : ciphertext only, known plaintext, chosen plaintext, chosen ciphertext, etc... You can help by adding to it. ( April 2012 ) Brute - force attacks This section needs expansion with : Impact of key size and block size, discuss time -- memory -- data trade - offs... You can help by adding to it. ( April 2012 ) Due to a block cipher 's characteristic as an invertible function, its output becomes distinguishable from a truly random output string over time due to the birthday attack. This property results in the cipher 's security degrading quadratically, and needs to be taken into account when selecting a block size. There is a trade - off though as large block sizes can result in the algorithm becoming inefficient to operate. Earlier block ciphers such as the DES have typically selected a 64 - bit block size, while newer designs such as the AES support block sizes of 128 bits or more, with some ciphers supporting a range of different block sizes. Differential cryptanalysis Main article : Differential cryptanalysis This section needs expansion. You can help by adding to it. ( April 2012 ) Linear cryptanalysis Main article : Linear cryptanalysis Linear cryptanalysis is a form of cryptanalysis based on finding affine approximations to the action of a cipher. Linear cryptanalysis is one of the two most widely used attacks on block ciphers ; the other being differential cryptanalysis. The discovery is attributed to Mitsuru Matsui, who first applied the technique to the FEAL cipher ( Matsui and Yamagishi, 1992 ). Integral cryptanalysis Main article : Integral cryptanalysis Integral cryptanalysis is a cryptanalytic attack that is particularly applicable to block ciphers based on substitution -- permutation networks. Unlike differential cryptanalysis, which uses pairs of chosen plaintexts with a fixed XOR difference, integral cryptanalysis uses sets or even multisets of chosen plaintexts of which part is held constant and another part varies through all possibilities. For example, an attack might use 256 chosen plaintexts that have all but 8 of their bits the same, but all differ in those 8 bits. Such a set necessarily has an XOR sum of 0, and the XOR sums of the corresponding sets of ciphertexts provide information about the cipher 's operation. This contrast between the differences of pairs of texts and the sums of larger sets of texts inspired the name `` integral cryptanalysis '', borrowing the terminology of calculus. Other techniques The development of the boomerang attack enabled differential cryptanalysis techniques to be applied to many ciphers that had previously been deemed secure against differential attacks In addition to linear and differential cryptanalysis, there is a growing catalog of attacks : truncated differential cryptanalysis, partial differential cryptanalysis, integral cryptanalysis, which encompasses square and integral attacks, slide attacks, boomerang attacks, the XSL attack, impossible differential cryptanalysis and algebraic attacks. For a new block cipher design to have any credibility, it must demonstrate evidence of security against known attacks. Provable security When a block cipher is used in a given mode of operation, the resulting algorithm should ideally be about as secure as the block cipher itself. ECB ( discussed above ) emphatically lacks this property : regardless of how secure the underlying block cipher is, ECB mode can easily be attacked. On the other hand, CBC mode can be proven to be secure under the assumption that the underlying block cipher is likewise secure. Note, however, that making statements like this requires formal mathematical definitions for what it means for an encryption algorithm or a block cipher to `` be secure ''. This section describes two common notions for what properties a block cipher should have. Each corresponds to a mathematical model that can be used to prove properties of higher level algorithms, such as CBC. This general approach to cryptography -- proving higher - level algorithms ( such as CBC ) are secure under explicitly stated assumptions regarding their components ( such as a block cipher ) -- is known as provable security. Standard model Main article : Ciphertext indistinguishability Informally, a block cipher is secure in the standard model if an attacker can not tell the difference between the block cipher ( equipped with a random key ) and a random permutation. To be a bit more precise, let E be an n - bit block cipher. We imagine the following game : The person running the game flips a coin. If the coin lands on heads, he chooses a random key K and defines the function f = E. If the coin lands on tails, he chooses a random permutation π on the set of n - bit strings, and defines the function f = π. The attacker chooses an n - bit string X, and the person running the game tells him the value of f ( X ). Step 2 is repeated a total of q times. ( Each of these q interactions is a query. ) The attacker guesses how the coin landed. He wins if his guess is correct. The attacker, which we can model as an algorithm, is called an adversary. The function f ( which the adversary was able to query ) is called an oracle. Note that an adversary can trivially ensure a 50 % chance of winning simply by guessing at random ( or even by, for example, always guessing `` heads '' ). Therefore, let P ( A ) denote the probability that the adversary A wins this game against E, and define the advantage of A as 2 ( P ( A ) − 1 / 2 ). It follows that if A guesses randomly, its advantage will be 0 ; on the other hand, if A always wins, then its advantage is 1. The block cipher E is a pseudo-random permutation ( PRP ) if no adversary has an advantage significantly greater than 0, given specified restrictions on q and the adversary 's running time. If in Step 2 above adversaries have the option of learning f ( X ) instead of f ( X ) ( but still have only small advantages ) then E is a strong PRP ( SPRP ). An adversary is non-adaptive if it chooses all q values for X before the game begins ( that is, it does not use any information gleaned from previous queries to choose each X as it goes ). These definitions have proven useful for analyzing various modes of operation. For example, one can define a similar game for measuring the security of a block cipher - based encryption algorithm, and then try to show ( through a reduction argument ) that the probability of an adversary winning this new game is not much more than P ( A ) for some A. ( The reduction typically provides limits on q and the running time of A. ) Equivalently, if P ( A ) is small for all relevant A, then no attacker has a significant probability of winning the new game. This formalizes the idea that the higher - level algorithm inherits the block cipher 's security. Ideal cipher model This section needs expansion. You can help by adding to it. ( April 2012 ) Practical evaluation Block ciphers may be evaluated according to multiple criteria in practice. Common factors include : Key parameters, such as its key size and block size, both of which provide an upper bound on the security of the cipher. The estimated security level, which is based on the confidence gained in the block cipher design after it has largely withstood major efforts in cryptanalysis over time, the design 's mathematical soundness, and the existence of practical or certificational attacks. The cipher 's complexity and its suitability for implementation in hardware or software. Hardware implementations may measure the complexity in terms of gate count or energy consumption, which are important parameters for resource - constrained devices. The cipher 's performance in terms of processing throughput on various platforms, including its memory requirements. The cost of the cipher, which refers to licensing requirements that may apply due to intellectual property rights. The flexibility of the cipher, which includes its ability to support multiple key sizes and block lengths. Notable block ciphers Lucifer / DES Main articles : Lucifer ( cipher ) and Data Encryption Standard Lucifer is generally considered to be the first civilian block cipher, developed at IBM in the 1970s based on work done by Horst Feistel. A revised version of the algorithm was adopted as a U.S. government Federal Information Processing Standard : FIPS PUB 46 Data Encryption Standard ( DES ). It was chosen by the U.S. National Bureau of Standards ( NBS ) after a public invitation for submissions and some internal changes by NBS ( and, potentially, the NSA ). DES was publicly released in 1976 and has been widely used. DES was designed to, among other things, resist a certain cryptanalytic attack known to the NSA and rediscovered by IBM, though unknown publicly until rediscovered again and published by Eli Biham and Adi Shamir in the late 1980s. The technique is called differential cryptanalysis and remains one of the few general attacks against block ciphers ; linear cryptanalysis is another, but may have been unknown even to the NSA, prior to its publication by Mitsuru Matsui. DES prompted a large amount of other work and publications in cryptography and cryptanalysis in the open community and it inspired many new cipher designs. DES has a block size of 64 bits and a key size of 56 bits. 64 - bit blocks became common in block cipher designs after DES. Key length depended on several factors, including government regulation. Many observers in the 1970s commented that the 56 - bit key length used for DES was too short. As time went on, its inadequacy became apparent, especially after a special purpose machine designed to break DES was demonstrated in 1998 by the Electronic Frontier Foundation. An extension to DES, Triple DES, triple - encrypts each block with either two independent keys ( 112 - bit key and 80 - bit security ) or three independent keys ( 168 - bit key and 112 - bit security ). It was widely adopted as a replacement. As of 2011, the three - key version is still considered secure, though the National Institute of Standards and Technology ( NIST ) standards no longer permit the use of the two - key version in new applications, due to its 80 - bit security level. IDEA The International Data Encryption Algorithm ( IDEA ) is a block cipher designed by James Massey of ETH Zurich and Xuejia Lai ; it was first described in 1991, as an intended replacement for DES. IDEA operates on 64 - bit blocks using a 128 - bit key, and consists of a series of eight identical transformations ( a round ) and an output transformation ( the half - round ). The processes for encryption and decryption are similar. IDEA derives much of its security by interleaving operations from different groups -- modular addition and multiplication, and bitwise exclusive or ( XOR ) -- which are algebraically `` incompatible '' in some sense. The designers analysed IDEA to measure its strength against differential cryptanalysis and concluded that it is immune under certain assumptions. No successful linear or algebraic weaknesses have been reported. As of 2012, the best attack which applies to all keys can break full 8.5 - round IDEA using a narrow - bicliques attack about four times faster than brute force. RC5 One round ( two half - rounds ) of the RC5 block cipher Main article : RC5 RC5 is a block cipher designed by Ronald Rivest in 1994 which, unlike many other ciphers, has a variable block size ( 32, 64 or 128 bits ), key size ( 0 to 2040 bits ) and number of rounds ( 0 to 255 ). The original suggested choice of parameters were a block size of 64 bits, a 128 - bit key and 12 rounds. A key feature of RC5 is the use of data - dependent rotations ; one of the goals of RC5 was to prompt the study and evaluation of such operations as a cryptographic primitive. RC5 also consists of a number of modular additions and XORs. The general structure of the algorithm is a Feistel - like network. The encryption and decryption routines can be specified in a few lines of code. The key schedule, however, is more complex, expanding the key using an essentially one - way function with the binary expansions of both e and the golden ratio as sources of `` nothing up my sleeve numbers ''. The tantalising simplicity of the algorithm together with the novelty of the data - dependent rotations has made RC5 an attractive object of study for cryptanalysts. 12 - round RC5 ( with 64 - bit blocks ) is susceptible to a differential attack using 2 chosen plaintexts. 18 -- 20 rounds are suggested as sufficient protection. Rijndael / AES Main article : Advanced Encryption Standard DES has been superseded as a United States Federal Standard by the AES, adopted by NIST in 2001 after a 5 - year public competition. The cipher was developed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen, and submitted under the name Rijndael. AES has a fixed block size of 128 bits and a key size of 128, 192, or 256 bits, whereas Rijndael can be specified with block and key sizes in any multiple of 32 bits, with a minimum of 128 bits. The blocksize has a maximum of 256 bits, but the keysize has no theoretical maximum. AES operates on a 4 × 4 column - major order matrix of bytes, termed the state ( versions of Rijndael with a larger block size have additional columns in the state ). Blowfish Main article : Blowfish ( cipher ) Blowfish is a block cipher, designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. Blowfish has a 64 - bit block size and a variable key length from 1 bit up to 448 bits. It is a 16 - round Feistel cipher and uses large key - dependent S - boxes. Notable features of the design include the key - dependent S - boxes and a highly complex key schedule. Schneier designed Blowfish as a general - purpose algorithm, intended as an alternative to the ageing DES and free of the problems and constraints associated with other algorithms. At the time Blowfish was released, many other designs were proprietary, encumbered by patents or were commercial / government secrets. Schneier has stated that, `` Blowfish is unpatented, and will remain so in all countries. The algorithm is hereby placed in the public domain, and can be freely used by anyone. '' Blowfish provides a good encryption rate in software and no effective cryptanalysis of the full - round version has been found to date. Generalizations Tweakable block ciphers This section needs expansion. You can help by adding to it. ( June 2008 ) M. Liskov, R. Rivest, and D. Wagner have described a generalized version of block ciphers called `` tweakable '' block ciphers. A tweakable block cipher accepts a second input called the tweak along with its usual plaintext or ciphertext input. The tweak, along with the key, selects the permutation computed by the cipher. If changing tweaks is sufficiently lightweight ( compared with a usually fairly expensive key setup operation ), then some interesting new operation modes become possible. The disk encryption theory article describes some of these modes. Format - preserving encryption Main article : Format - preserving encryption Block ciphers traditionally work over a binary alphabet. That is, both the input and the output are binary strings, consisting of n zeroes and ones. In some situations, however, one may wish to have a block cipher that works over some other alphabet ; for example, encrypting 16 - digit credit card numbers in such a way that the ciphertext is also a 16 - digit number might facilitate adding an encryption layer to legacy software. This is an example of format - preserving encryption. More generally, format - preserving encryption requires a keyed permutation on some finite language. This makes format - preserving encryption schemes a natural generalization of ( tweakable ) block ciphers. In contrast, traditional encryption schemes, such as CBC, are not permutations because the same plaintext can encrypt to multiple different ciphertexts, even when using a fixed key. Relation to other cryptographic primitives Block ciphers can be used to build other cryptographic primitives, such as those below. For these other primitives to be cryptographically secure, care has to be taken to build them the right way. Stream ciphers can be built using block ciphers. OFB - mode and CTR mode are block modes that turn a block cipher into a stream cipher. Cryptographic hash functions can be built using block ciphers. See one - way compression function for descriptions of several such methods. The methods resemble the block cipher modes of operation usually used for encryption. Cryptographically secure pseudorandom number generators ( CSPRNGs ) can be built using block ciphers. Secure pseudorandom permutations of arbitrarily sized finite sets can be constructed with block ciphers ; see Format - Preserving Encryption. Message authentication codes ( MACs ) are often built from block ciphers. CBC - MAC, OMAC and PMAC are such MACs. Authenticated encryption is also built from block ciphers. It means to both encrypt and MAC at the same time. That is to both provide confidentiality and authentication. CCM, EAX, GCM and OCB are such authenticated encryption modes. Just as block ciphers can be used to build hash functions, hash functions can be used to build block ciphers. Examples of such block ciphers are SHACAL, BEAR and LION. See also Cryptography portal Cipher security summary Topics in cryptography References Jump up ^ Shannon, Claude ( 1949 ). `` Communication Theory of Secrecy Systems '' ( PDF ). Bell System Technical Journal. 28 ( 4 ) : 656 -- 715. Jump up ^ van Tilborg, Henk C.A. ; Jajodia, Sushil, eds. ( 2011 ). Encyclopedia of Cryptography and Security. Springer. ISBN 978 - 1 - 4419 - 5905 - 8., p. 455. Jump up ^ van Tilborg & Jajodia 2011, p. 1268. Jump up ^ Cusick, Thomas W. & Stanica, Pantelimon ( 2009 ). Cryptographic Boolean functions and applications. Academic Press. pp. 158 -- 159. ISBN 9780123748904. CS1 maint : Uses authors parameter ( link ) Jump up ^ Menezes, Alfred J. ; van Oorschot, Paul C. ; Vanstone, Scott A. ( 1996 ). `` Chapter 7 : Block Ciphers ''. Handbook of Applied Cryptography. CRC Press. ISBN 0 - 8493 - 8523 - 7. Jump up ^ Bellare, Mihir ; Rogaway, Phillip ( 11 May 2005 ), Introduction to Modern Cryptography ( Lecture notes ), chapter 3. Jump up ^ Chakraborty, D. & Rodriguez - Henriquez F. ( 2008 ). `` Block Cipher Modes of Operation from a Hardware Implementation Perspective ''. In Koç, Çetin K. Cryptographic Engineering. Springer. p. 321. ISBN 9780387718163. CS1 maint : Uses authors parameter ( link ) Jump up ^ Menezes, van Oorschot & Vanstone 1996, section 7.2. Jump up ^ Junod, Pascal & Canteaut, Anne ( 2011 ). Advanced Linear Cryptanalysis of Block and Stream Ciphers. IOS Press. p. 2. ISBN 9781607508441. Jump up ^ Keliher, Liam et al. ( 2000 ). `` Modeling Linear Characteristics of Substitution -- Permutation Networks ''. In Hays, Howard & Carlisle, Adam. Selected areas in cryptography : 6th annual international workshop, SAC'99, Kingston, Ontario, Canada, August 9 -- 10, 1999 : proceedings. Springer. p. 79. ISBN 9783540671855. CS1 maint : Uses authors parameter ( link ) CS1 maint : Uses editors parameter ( link ) Jump up ^ Baigneres, Thomas & Finiasz, Matthieu ( 2007 ). `` Dial ' C ' for Cipher ''. In Biham, Eli & Yousseff, Amr. Selected areas in cryptography : 13th international workshop, SAC 2006, Montreal, Canada, August 17 -- 18, 2006 : revised selected papers. Springer. p. 77. ISBN 9783540744610. CS1 maint : Uses authors parameter ( link ) CS1 maint : Uses editors parameter ( link ) Jump up ^ Cusick, Thomas W. & Stanica, Pantelimon ( 2009 ). Cryptographic Boolean functions and applications. Academic Press. p. 164. ISBN 9780123748904. CS1 maint : Uses authors parameter ( link ) Jump up ^ Katz, Jonathan ; Lindell, Yehuda ( 2008 ). Introduction to modern cryptography. CRC Press. ISBN 9781584885511., pages 166 -- 167. ^ Jump up to : Katz & Lindell 2008, pp. 170 -- 172. Jump up ^ Katz & Lindell 2008, p. 171. Jump up ^ Aumasson, Jean - Philippe ; Bernstein, Daniel J. ( 2012 - 09 - 18 ). `` SipHash : a fast short - input PRF '' ( PDF ) : 5. Jump up ^ Menezes, Oorschot & Vanstone 1996, pp. 228 -- 230, Chapter 7. Jump up ^ `` Block Cipher Modes ''. NIST Computer Security Resource Center. Jump up ^ Menezes, van Oorschot & Vanstone 1996, pp. 228 -- 233. ^ Jump up to : Morris Dworkin ( December 2001 ), `` Recommendation for Block Cipher Modes of Operation -- Methods and Techniques '' ( PDF ), Special Publication 800 - 38A, National Institute of Standards and Technology ( NIST ) Jump up ^ `` Kryptographische Verfahren : Empfehlungen und Schlüssellängen '', BSI TR - 02102 ( Technische Richtlinie ) ( Version 1.0 ), June 20, 2008 Jump up ^ ISO / IEC 10116 : 2006 Information technology -- Security techniques -- Modes of operation for an n - bit block cipher Jump up ^ Bellare & Rogaway 2005, p. 101, section 5.3. Jump up ^ Bellare & Rogaway 2005, section 5.6. ^ Jump up to : Serge Vaudenay ( 2002 ). `` Security Flaws Induced by CBC Padding Applications to SSL, IPSEC, WTLS... ''. Advances in Cryptology -- EUROCRYPT 2002, Proc. International Conference on the Theory and Applications of Cryptographic Techniques. Springer Verlag ( 2332 ) : 534 -- 545. ^ Jump up to : Kenneth G. Paterson ; Gaven J. Watson ( 2008 ). `` Immunising CBC Mode Against Padding Oracle Attacks : A Formal Security Treatment ''. Security and Cryptography for Networks -- SCN 2008, Lecture Notes in Computer Science. Springer Verlag ( 5229 ) : 340 -- 357. Jump up ^ ISO / IEC 9797 - 1 : Information technology -- Security techniques -- Message Authentication Codes ( MACs ) -- Part 1 : Mechanisms using a block cipher, ISO / IEC, 2011 Jump up ^ Martin, Keith M. ( 2012 ). Everyday Cryptography : Fundamental Principles and Applications. Oxford University Press. p. 114. ISBN 9780199695591. Jump up ^ Paar, Cristof et al. ( 2010 ). Understanding Cryptography : A Textbook for Students and Practitioners. Springer. p. 30. ISBN 9783642041006. CS1 maint : Uses authors parameter ( link ) Jump up ^ Matsui, Mitsuru. `` Linear Cryptanalysis of DES Cipher ''. Mitsubishi Electric Corporation. 1.03 : 43 -- via Computer & Information Systems Laboratory. Jump up ^ Matsui, M. & Yamagishi, A. `` A new method for known plaintext attack of FEAL cipher ''. Advances in Cryptology -- EUROCRYPT 1992. Jump up ^ Menezes, van Oorschot & Vanstone 1996, p. 227. Jump up ^ James Nechvatal ; Elaine Barker ; Lawrence Bassham ; William Burr ; Morris Dworkin ; James Foti ; Edward Roback ( October 2000 ), Report on the Development of the Advanced Encryption Standard ( AES ) ( PDF ), National Institute of Standards and Technology ( NIST ) Jump up ^ Attacks that show that the cipher does not perform as advertised ( i.e., the level of difficulty involved in breaking it is lower than claimed ), which are nevertheless of high enough complexity so that they are not practically achievable. Jump up ^ FIPS PUB 46 - 3 Data Encryption Standard ( DES ) ( This is the third edition, 1999, but includes historical information in the preliminary section 12. ) Jump up ^ NIST Special Publication 800 - 57 Recommendation for Key Management -- Part 1 : General ( Revised ), March, 2007 Archived June 6, 2014, at the Wayback Machine. Jump up ^ Biryukov A. and Kushilevitz E. ( 1998 ). Improved Cryptanalysis of RC5. EUROCRYPT 1998. Jump up ^ Bruce Schneier ( 1993 ). `` Description of a New Variable - Length Key, 64 - Bit Block Cipher ( Blowfish ) ''. Jump up ^ M. Liskov, R. Rivest, and D. Wagner. `` Tweakable Block Ciphers '' ( PDF ). Crypto 2002. CS1 maint : Uses authors parameter ( link ) Jump up ^ ISO / IEC 10118 - 2 : 2010 Information technology -- Security techniques -- Hash - functions -- Part 2 : Hash - functions using an n - bit block cipher Jump up ^ Menezes, van Oorschot & Vanstone 1996, Chapter 9 : Hash Functions and Data Integrity. Jump up ^ NIST Special Publication 800 - 90A Recommendation for Random Number Generation Using Deterministic Random Bit Generators Jump up ^ Menezes, van Oorschot & Vanstone 1996, Chapter 5 : Pseudorandom Bits and Sequences. Further reading Knudsen, Lars R. ; Robshaw, Matthew ( 2011 ). The Block Cipher Companion. Springer. ISBN 9783642173417. External links A list of many symmetric algorithms, the majority of which are block ciphers. The block cipher lounge What is a block cipher ? from RSA FAQ Block ciphers ( security summary ) Common algorithms AES Blowfish DES ( Internal Mechanics, Triple DES ) Serpent Twofish Less common algorithms Camellia CAST - 128 IDEA RC2 RC5 RC6 SEED ARIA Skipjack TEA XTEA Other algorithms 3 - Way Akelarre Anubis BaseKing BassOmatic BATON BEAR and LION CAST - 256 Chiasmus CIKS - 1 CIPHERUNICORN - A CIPHERUNICORN - E CLEFIA CMEA Cobra COCONUT98 Crab Cryptomeria / C2 CRYPTON CS - Cipher DEAL DES - X DFC E2 FEAL FEA - M FROG G - DES GOST Grand Cru Hasty Pudding cipher Hierocrypt ICE IDEA NXT Intel Cascade Cipher Iraqi Kalyna KASUMI KeeLoq KHAZAD Khufu and Khafre KN - Cipher Kuznyechik Ladder - DES Libelle LOKI ( 97, 89 / 91 ) Lucifer M6 M8 MacGuffin Madryga MAGENTA MARS Mercy MESH MISTY1 MMB MULTI2 MultiSwap New Data Seal NewDES Nimbus NOEKEON NUSH PRESENT Prince Q RC6 REDOC Red Pike S - 1 SAFER SAVILLE SC2000 SHACAL SHARK Simon SM4 Speck Spectr - H64 Square SXAL / MBAL Threefish Treyfer UES Xenon xmx XXTEA Zodiac Design Feistel network Key schedule Lai -- Massey scheme Product cipher S - box P - box SPN Avalanche effect Block size Key size Key whitening ( Whitening transformation ) Attack ( cryptanalysis ) Brute - force ( EFF DES cracker ) MITM Biclique attack 3 - subset MITM attack Linear ( Piling - up lemma ) Differential Impossible Truncated Higher - order Differential - linear Distinguishing ( Known - key ) Integral / Square Boomerang Mod n Related - key Slide Rotational Side - channel Timing Power - monitoring Electromagnetic Acoustic Differential - fault XSL Interpolation Partitioning Rubber - hose Black - bag Davies Rebound Weak key Tau Chi - square Time / memory / data tradeoff Standardization AES process CRYPTREC NESSIE Utilization Initialization vector Mode of operation Padding Cryptography History of cryptography Cryptanalysis Outline of cryptography Symmetric - key algorithm Block cipher Stream cipher Public - key cryptography Cryptographic hash function Message authentication code Random numbers Steganography Crypto - shredding Portal WikiProject Retrieved from `` https://en.wikipedia.org/w/index.php?title=Block_cipher&oldid=807666216 '' Categories : Block ciphers Cryptographic primitives Hidden categories : CS1 maint : Uses authors parameter CS1 maint : Uses editors parameter Webarchive template wayback links Articles needing additional references from April 2012 All articles needing additional references Articles containing potentially dated statements from 2016 All articles containing potentially dated statements All articles with unsourced statements Articles with unsourced statements from April 2012 Articles with unsourced statements from October 2017 Articles to be expanded from April 2012 All articles to be expanded Articles using small message boxes All articles with specifically marked weasel - worded phrases Articles with specifically marked weasel - worded phrases from April 2012 Articles containing potentially dated statements from 2012 Articles with unsourced statements from January 2016 Articles to be expanded from June 2008 Talk Contents About Wikipedia Azərbaycanca Català Čeština Deutsch Español فارسی Français 한국어 Italiano עברית Nederlands 日本 語 Norsk Polski Português Română Русский Simple English Svenska Türkçe Українська Tiếng Việt 中文 Edit links This page was last edited on 29 October 2017, at 12 : 00. Text is available under the Creative Commons Attribution - ShareAlike License ; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia ® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. About Wikipedia

Question: what is the primary weakness of the des block cipher
Answer: 64-bit block size, while newer designs such as the AES support block sizes of 128 bits or more