Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Block cipher
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Type of cipher}} {{More citations needed|date=April 2012}} In [[cryptography]], a '''block cipher''' is a [[deterministic algorithm]] that operates on fixed-length groups of [[bit]]s, called ''blocks''. Block ciphers are the elementary [[cryptographic primitive|building blocks]] of many [[cryptographic protocol]]s. They are ubiquitous in the storage and exchange of data, where such data is secured and authenticated via [[encryption]]. A block cipher uses blocks as an unvarying transformation. Even a secure block cipher is suitable for the encryption of only a single block of data at a time, using a fixed key. A multitude of [[block cipher modes of operation|modes of operation]] have been designed to allow their repeated use in a secure way to achieve the security goals of confidentiality and [[authentication|authenticity]]. However, block ciphers may also feature as building blocks in other cryptographic protocols, such as [[universal hash function]]s and [[pseudorandom number generator]]s. ==Definition== [[File:Block Cipher-en.svg|thumb|Block diagram of cipher block showing its inputs, outputs and components.]] A block cipher consists of two paired [[algorithm]]s, one for encryption, {{var serif|E}}, and the other for decryption, {{var serif|D}}.<ref>{{cite book|last1=Cusick |first1=Thomas W. |last2=Stanica |first2=Pantelimon|title=Cryptographic Boolean functions and applications|publisher=Academic Press|year=2009|isbn=9780123748904|pages=158–159|url=https://books.google.com/books?id=OAkhkLSxxxMC&pg=PA158}}</ref> Both algorithms accept two inputs: an input block of size {{var serif|n}} bits and a [[key (cryptography)|key]] of size {{var serif|k}} bits; and both yield an {{var serif|n}}-bit output block. The decryption algorithm {{var serif|D}} is defined to be the [[inverse function]] of encryption, i.e., {{math|1={{var serif|D}} = {{var serif|E}}<sup>−1</sup>}}. More formally,<ref name="HAC">{{cite book|first1=Alfred J.|last1=Menezes|first2=Paul C.|last2=van Oorschot|first3=Scott A.|last3=Vanstone|title=Handbook of Applied Cryptography|publisher=CRC Press|year=1996|chapter=Chapter 7: Block Ciphers|isbn=0-8493-8523-7|url=http://cacr.uwaterloo.ca/hac/|access-date=2012-07-15|archive-date=2021-02-03|archive-url=https://web.archive.org/web/20210203194011/https://cacr.uwaterloo.ca/hac/|url-status=dead}}</ref><ref name="modern-crypto">{{citation|first1=Mihir|last1=Bellare|first2=Phillip|last2=Rogaway|title=Introduction to Modern Cryptography|format = Lecture notes|date=11 May 2005|url=http://www.cs.ucdavis.edu/~rogaway/classes/227/spring05/book/main.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.cs.ucdavis.edu/~rogaway/classes/227/spring05/book/main.pdf |archive-date=2022-10-09 |url-status=live}}, chapter 3.</ref> a block cipher is specified by an encryption function :<math>E_K(P) := E(K,P): \{0,1\}^k \times \{0,1\}^n \rightarrow \{0,1\}^n,</math> which takes as input a key {{var serif|K}}, of bit length {{var serif|k}} (called the ''key size''), and a bit string {{var serif|P}}, of length {{var serif|n}} (called the ''block size''), and returns a string {{var serif|C}} of {{var serif|n}} bits. {{var serif|P}} is called the [[plaintext]], and {{var serif|C}} is termed the [[ciphertext]]. For each {{var serif|K}}, the function {{var serif|E}}<sub>{{var serif|K}}</sub>({{var serif|P}}) is required to be an invertible mapping on {{math|{0,1}<sup>{{var serif|n}}</sup>}}. The inverse for {{var serif|E}} is defined as a function :<math>E_K^{-1}(C) := D_K(C) = D(K,C): \{0,1\}^k \times \{0,1\}^n \rightarrow \{0,1\}^n,</math> taking a key {{var serif|K}} and a ciphertext {{var serif|C}} to return a plaintext value {{var serif|P}}, such that :<math>\forall P: D_K(E_K(P)) = P.</math> 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.<ref>{{cite book|last1=Chakraborty |first1=D. |last2=Rodriguez-Henriquez |first2=F.|chapter=Block Cipher Modes of Operation from a Hardware Implementation Perspective|editor-last=Koç |editor-first=Çetin K.|title=Cryptographic Engineering |publisher=Springer |year=2008 |isbn=9780387718163 |page=321 |chapter-url=https://books.google.com/books?id=nErZY4vYHIoC&pg=PA321}}</ref> For each key ''K'', ''E<sub>K</sub>'' is a [[permutation]] (a [[bijective]] mapping) over the set of input blocks. Each key selects one permutation from the set of <math>(2^n)!</math> possible permutations.{{sfn|Menezes|van Oorschot|Vanstone|1996|loc=section 7.2}} ==History== 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 [[substitution cipher|substitution]]s and [[transposition cipher|permutation]]s.<ref name="shannon">{{cite journal|last1= Shannon|first1= Claude|title= Communication Theory of Secrecy Systems|journal= [[Bell System Technical Journal]]|volume= 28|issue= 4|pages= 656–715|year= 1949|doi= 10.1002/j.1538-7305.1949.tb00928.x|url= http://netlab.cs.ucla.edu/wiki/files/shannon1949.pdf|access-date= 2012-04-09|archive-date= 2007-06-05|archive-url= https://web.archive.org/web/20070605092733/http://netlab.cs.ucla.edu/wiki/files/shannon1949.pdf|url-status= dead}}</ref> Iterated product ciphers carry out encryption in multiple [[Round (cryptography)|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 [[Data Encryption Standard|DES]] cipher.<ref name="tilborg">{{cite book|editor1-last= van Tilborg|editor1-first= Henk C. A.|editor2-last= Jajodia|editor2-first= Sushil|title= Encyclopedia of Cryptography and Security|publisher= Springer|year= 2011|isbn= 978-1-4419-5905-8|url= https://books.google.com/books?id=UuNKmgv70lMC&pg=PA455}}, p. 455.</ref> Many other realizations of block ciphers, such as the [[Advanced Encryption Standard|AES]], are classified as [[substitution–permutation network]]s.{{sfn|van Tilborg|Jajodia|2011|p=1268}} The root of all [[cryptographic]] block formats used within the [[Payment Card Industry Data Security Standard]] (PCI DSS) and [[American National Standards Institute]] (ANSI) standards lies with the [[Atalla Key Block]] (AKB), which was a key innovation of the [[Atalla Box]], the first [[hardware security module]] (HSM). It was developed in 1972 by [[Mohamed M. Atalla]], founder of [[Atalla Corporation]] (now [[Utimaco Atalla]]), and released in 1973. The AKB was a key block, which is required to securely interchange [[Symmetric-key algorithm|symmetric keys]] or [[Personal identification number|PINs]] with other actors in the [[banking industry]]. This secure interchange is performed using the AKB format.<ref>{{cite web |last1=Rupp |first1=Martin |title=The Benefits of the Atalla Key Block |url=https://content.hsm.utimaco.com/blog/the-benefits-of-atalla-key-block |website=[[Utimaco]] |date=16 August 2019 |access-date=10 September 2019 |archive-date=17 October 2020 |archive-url=https://web.archive.org/web/20201017215047/https://content.hsm.utimaco.com/blog/the-benefits-of-atalla-key-block |url-status=dead }}</ref> The Atalla Box protected over 90% of all [[Automated teller machine|ATM]] networks in operation as of 1998,<ref>{{cite web |last1=Hamscher |first1=Walter |year=1998 |title=Electronic Business without Fear: The Tristrata Security Architecture |url=http://www.standardadvantage.com/docs/fear.pdf |archive-url=https://web.archive.org/web/20050529185702/http://www.standardadvantage.com/docs/fear.pdf |archive-date=29 May 2005 |citeseerx=10.1.1.123.2371 }}{{self-published inline|date=January 2022}}</ref> and Atalla products still secure the majority of the world's ATM transactions as of 2014.<ref name="Stiennon">{{cite web |last1=Stiennon |first1=Richard |title=Key Management a Fast Growing Space |url=https://securitycurrent.com/key-management-a-fast-growing-space/ |website=SecurityCurrent |publisher=IT-Harvest |access-date=21 August 2019 |date=17 June 2014}}</ref> 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 [[cryptanalysis|cryptanalytic attack]]s. Both [[differential cryptanalysis|differential]] and [[linear cryptanalysis]] arose out of studies on 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 attack]]s. ==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 identically sized blocks of [[ciphertext]], via the repeated application of an invertible transformation known as the ''round function'', with each iteration referred to as a ''round''.<ref>{{cite book|author1=Junod, Pascal |author2=Canteaut, Anne|author2-link=Anne Canteaut |name-list-style=amp |title=Advanced Linear Cryptanalysis of Block and Stream Ciphers|publisher=IOS Press|year=2011|isbn=9781607508441|page=2|url=https://books.google.com/books?id=pMnRhjStTZoC&pg=PA2}}</ref> Usually, the round function ''R'' takes different ''round keys'' ''K<sub>i</sub>'' as a second input, which is derived from the original key:<ref>{{cite book | first1 = Jean-Philippe | last1 = Aumasson | date = 6 November 2017 | title = Serious Cryptography: A Practical Introduction to Modern Encryption | publisher = No Starch Press | pages = 56 | isbn = 978-1-59327-826-7 | oclc = 1012843116 | url = https://books.google.com/books?id=W1v6DwAAQBAJ&pg=PA56}}</ref> :<math>M_i = R_{K_i}(M_{i-1})</math> where <math>M_0</math> is the plaintext and <math>M_r</math> 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 [[Exclusive or|XOR]]): :<math> M_0 = M \oplus K_0 </math> :<math>M_i = R_{K_i}(M_{i-1})\; ; \; i = 1 \dots r</math> :<math>C = M_r \oplus K_{r+1}</math> 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 branch prediction and 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. ===Substitution–permutation networks=== [[Image:SubstitutionPermutationNetwork-en.svg|thumb|200px|right|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<sub>i</sub>'', the P-boxes are the same ''P'', and the round keys are the ''K<sub>i</sub>''.]] {{Main|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 box|substitution stage]] followed by a [[Permutation box|permutation stage]]—to produce each block of ciphertext output.<ref>{{cite book|last=Keliher|first=Liam|chapter=Modeling Linear Characteristics of Substitution–Permutation Networks|editor-last1=Hays|editor-first1=Howard |editor-last2=Carlisle|editor-first2=Adam|title=Selected areas in cryptography: 6th annual international workshop, SAC'99, Kingston, Ontario, Canada, August 9–10, 1999 : proceedings|publisher=Springer|year=2000|isbn=9783540671855|page=[https://archive.org/details/springer_10.1007-3-540-46513-8/page/n87 79]|url=https://archive.org/details/springer_10.1007-3-540-46513-8|display-authors=etal}}</ref> The non-linear substitution stage mixes the key bits with those of the plaintext, creating Shannon's ''[[confusion (cryptography)|confusion]]''. The linear permutation stage then dissipates redundancies, creating ''[[diffusion (cryptography)|diffusion]]''.<ref>{{cite book|last1=Baigneres|first1=Thomas|last2=Finiasz|first2=Matthieu|chapter=Dial 'C' for Cipher|editor-last1=Biham|editor-first1=Eli |editor-last2=Yousseff|editor-first2=Amr|title=Selected areas in cryptography: 13th international workshop, SAC 2006, Montreal, Canada, August 17–18, 2006 : revised selected papers|publisher=Springer|year=2007|isbn=9783540744610|page=77|chapter-url=https://books.google.com/books?id=yb99g5G7FS4C&pg=PA77}}</ref><ref>{{cite book|last1=Cusick|first1=Thomas W.|last2=Stanica|first2=Pantelimon|title=Cryptographic Boolean functions and applications|publisher=Academic Press|year=2009|isbn=9780123748904|page=164|url=https://books.google.com/books?id=OAkhkLSxxxMC&pg=PA164}}</ref> A ''[[substitution box]] (S-box)'' substitutes a small block of input bits with another block of output bits. This substitution must be [[Bijection|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.<ref>{{cite book|last1=Katz|first1=Jonathan|last2=Lindell|first2=Yehuda|title=Introduction to modern cryptography|publisher=CRC Press|year=2008|isbn=9781584885511|url=https://archive.org/details/Introduction_to_Modern_Cryptography|page=[https://archive.org/details/Introduction_to_Modern_Cryptography/page/n184 166]}}, pages 166–167.</ref> 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.<ref>{{cite book | chapter-url=https://ieeexplore.ieee.org/document/6575944 | doi=10.1109/AICERA-ICMiCR.2013.6575944 | chapter=Key based S-box selection and key expansion algorithm for substitution-permutation network cryptography | title=2013 Annual International Conference on Emerging Research Areas and 2013 International Conference on Microelectronics, Communications and Renewable Energy | date=2013 | last1=Nayaka | first1=Raja Jitendra | last2=Biradar | first2=R. C. | pages=1–6 | isbn=978-1-4673-5149-2 }}</ref> 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]].{{citation needed|date=April 2012}} [[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).<ref>{{cite book | title=Block Cipher Cryptanalysis: An Overview | publisher=Indian Statistical Institute | author=Subhabrata Samajder | year=2017 | location=Kolkata | pages=5/52}}</ref> ===Feistel ciphers=== [[File:Feistel cipher diagram en.svg|thumb|right|265px|Many block ciphers, such as DES and Blowfish utilize structures known as ''[[Feistel cipher]]s'']] {{Main|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.{{sfn|Katz|Lindell|2008|pp=170–172}} Let <math>{\rm F}</math> be the round function and let <math>K_0,K_1,\ldots,K_{n}</math> be the sub-keys for the rounds <math>0,1,\ldots,n</math> respectively. Then the basic operation is as follows:{{sfn|Katz|Lindell|2008|pp=170–172}} Split the plaintext block into two equal pieces, (<math>L_0</math>, <math>R_0</math>) For each round <math>i =0,1,\dots,n</math>, compute :<math>L_{i+1} = R_i\,</math> :<math>R_{i+1}= L_i \oplus {\rm F}(R_i, K_i)</math>. Then the ciphertext is <math>(R_{n+1}, L_{n+1})</math>. The decryption of a ciphertext <math>(R_{n+1}, L_{n+1})</math> is accomplished by computing for <math>i=n,n-1,\ldots,0</math> :<math>R_{i} = L_{i+1}\,</math> :<math>L_{i} = R_{i+1} \oplus {\rm F}(L_{i+1}, K_{i})</math>. Then <math>(L_0,R_0)</math> is the plaintext again. One advantage of the Feistel model compared to a [[substitution–permutation network]] is that the round function <math>{\rm F}</math> does not have to be invertible.{{sfn|Katz|Lindell|2008|p=171}} ===Lai–Massey ciphers=== [[File:Lai Massey scheme diagram en.svg|thumb|right|265px|The Lai–Massey scheme. The archetypical cipher utilizing it is [[International Data Encryption Algorithm|IDEA]].]] {{main|Lai–Massey scheme}} The Lai–Massey scheme offers security properties similar to those of the [[Feistel structure]]. It also shares the advantage that the round function <math>\mathrm F</math> does not have to be invertible. Another similarity is that it 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 <math>\mathrm F</math> be the round function and <math>\mathrm H</math> a half-round function and let <math>K_0,K_1,\ldots,K_n</math> be the sub-keys for the rounds <math>0,1,\ldots,n</math> respectively. Then the basic operation is as follows: Split the plaintext block into two equal pieces, (<math>L_0</math>, <math>R_0</math>) For each round <math>i =0,1,\dots,n</math>, compute :<math>(L_{i+1}',R_{i+1}') = \mathrm H(L_i' + T_i,R_i' + T_i),</math> where <math>T_i = \mathrm F(L_i' - R_i', K_i)</math> and <math>(L_0',R_0') = \mathrm H(L_0,R_0)</math> Then the ciphertext is <math>(L_{n+1}, R_{n+1}) = (L_{n+1}',R_{n+1}')</math>. The decryption of a ciphertext <math>(L_{n+1}, R_{n+1})</math> is accomplished by computing for <math>i=n,n-1,\ldots,0</math> :<math>(L_i',R_i') = \mathrm H^{-1}(L_{i+1}' - T_i, R_{i+1}' - T_i)</math> where <math>T_i = \mathrm F(L_{i+1}' - R_{i+1}',K_i)</math> and <math>(L_{n+1}',R_{n+1}')=\mathrm H^{-1}(L_{n+1},R_{n+1})</math> Then <math>(L_0,R_0) = (L_0',R_0')</math> 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: (A) modular addition, (R) [[circular shift|rotation]] with fixed rotation amounts, and (X) [[exclusive or|XOR]]. Examples include [[ChaCha20]], [[Speck (cipher)|Speck]], [[XXTEA]], and [[BLAKE (hash function)|BLAKE]]. Many authors draw an ARX network, a kind of [[data flow diagram]], to illustrate such a round function.<ref>{{cite book |last1=Aumasson |first1=Jean-Philippe |last2=Bernstein |first2=Daniel J. |author-link2=Daniel J. Bernstein |chapter=SipHash: a fast short-input PRF |doi=10.1007/978-3-642-34931-7_28 |chapter-url=https://131002.net/siphash/siphash.pdf |editor1-last=Galbraith |editor1-first=Steven |editor2-last=Nandi |editor2-first=Mridul |title=Progress in cryptology-- INDOCRYPT 2012 : 13th International Conference on Cryptology in India, Kolkata, India, December 9-12, 2012, proceedings |date=2012 |publisher=Springer |location=Berlin |isbn=978-3-642-34931-7 |page=494|archive-url=https://web.archive.org/web/20200312053222/https://131002.net/siphash/siphash.pdf |archive-date=2020-03-12 }}</ref> These ARX operations are popular because they are relatively fast and cheap in hardware and software, their implementation can be made extremely simple, and also because they run in constant time, and therefore are immune to [[timing attack]]s. 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 (cipher)|IDEA]]. ==Modes of operation== {{Main|Block cipher mode of operation}} [[File:Tux ecb.jpg|thumb|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 [[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 (cryptography)|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.{{sfn|Menezes|van Oorschot|Vanstone|1996|loc=Chapter 7|pp=228–230}} To overcome this limitation, several so-called [[block cipher modes of operation]] have been designed<ref name="NIST-modes">{{cite web|title=Block Cipher Modes|date=4 January 2017|publisher=[[NIST]] Computer Security Resource Center|url=http://csrc.nist.gov/groups/ST/toolkit/BCM/index.html}}</ref>{{sfn|Menezes|van Oorschot|Vanstone|1996|pp=228–233}} and specified in national recommendations such as NIST 800-38A<ref name="nist800-38a">{{citation|url=http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf |archive-date=2022-10-09 |url-status=live|author=Morris Dworkin|title=Recommendation for Block Cipher Modes of Operation – Methods and Techniques|journal=Special Publication 800-38A|publisher=National Institute of Standards and Technology (NIST)|date=December 2001|doi=10.6028/NIST.SP.800-38A}}</ref> and [[Bundesamt für Sicherheit in der Informationstechnik|BSI]] TR-02102<ref name="BSI-rec">{{citation|title=Kryptographische Verfahren: Empfehlungen und Schlüssellängen|journal=Bsi Tr-02102|type = Technische Richtlinie|issue=Version 1.0|date=June 20, 2008}}</ref> and international standards such as [[ISO/IEC 10116]].<ref>{{cite web| url = http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=38761| title = ISO/IEC 10116:2006 ''Information technology — Security techniques — Modes of operation for an n-bit block cipher''}}</ref> 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]].{{sfn|Bellare|Rogaway|2005|loc=section 5.3|p=101}} In the popular [[cipher block chaining]] (CBC) mode, for encryption to be [[semantic security|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|exclusive-or]] manner to the first plaintext block before it is 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 [[stream cipher#Self-synchronizing stream ciphers|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 [[Stream cipher#Synchronous stream ciphers|synchronous stream cipher]]. The newer [[counter mode|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.<ref name="nist800-38a"/> From a [[provable security|security-theoretic]] point of view, modes of operation must provide what is known as [[semantic security]].{{sfn|Bellare|Rogaway|2005|loc=section 5.6}} Informally, it means that given some ciphertext under an unknown key one cannot 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 attack]]s. ==Padding== {{Main|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 number of padding bits. More importantly, such a simple solution gives rise to very efficient [[padding oracle attack]]s.<ref name="padding-attack">{{cite book|author=Serge Vaudenay|title=Advances in Cryptology — EUROCRYPT 2002 |chapter=Security Flaws Induced by CBC Padding — Applications to SSL, IPSEC, WTLS |series=Lecture Notes in Computer Science |volume=2332 |issue=2332|pages=534–545|publisher=Springer Verlag|year=2002 |doi=10.1007/3-540-46035-7_35 |isbn=978-3-540-43553-2 }}</ref> A suitable [[padding (cryptography)|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,<ref name="padding-attack"/><ref name="oz-pad">{{cite book|author1=Kenneth G. Paterson|author2=Gaven J. Watson|title=Security and Cryptography for Networks |chapter=Immunising CBC Mode Against Padding Oracle Attacks: A Formal Security Treatment |series=Lecture Notes in Computer Science |volume=5229|issue=5229|pages=340–357|publisher=Springer Verlag|year=2008|doi=10.1007/978-3-540-85855-3_23|isbn=978-3-540-85854-6 }}</ref> a solution that adds a one-bit and then extends the last block with zero-bits, standardized as "padding method 2" in ISO/IEC 9797-1,<ref name="iso-iec 9797-1">{{citation|title=ISO/IEC 9797-1: Information technology – Security techniques – Message Authentication Codes (MACs) – Part 1: Mechanisms using a block cipher|publisher=ISO/IEC|year=2011|url=http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=50375}}</ref> has been proven secure against these attacks.<ref name="oz-pad"/> ==Cryptanalysis== {{expand section|1=Introduction of attack models may be needed for the cryptanalysis techniques: ciphertext only, known plaintext, chosen plaintext, chosen ciphertext, etc.|date=April 2012}} ===Brute-force attacks=== {{expand section|1=Impact of key size and block size, discuss time–m to the [[birthday attack]].|date=January 2019}} 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.<ref>{{cite book|author=Martin, Keith M.|title=Everyday Cryptography: Fundamental Principles and Applications|publisher=Oxford University Press|year=2012|isbn=9780199695591|page=114|url=https://books.google.com/books?id=5DZ_vv-gl4oC&pg=PA114}}</ref> Earlier block ciphers such as the [[Data Encryption Standard|DES]] have typically selected a 64-bit block size, while newer designs such as the [[Advanced Encryption Standard|AES]] support block sizes of 128 bits or more, with some ciphers supporting a range of different block sizes.<ref>{{cite book|last=Paar|first=Christof|title=Understanding Cryptography: A Textbook for Students and Practitioners|publisher=Springer|year=2010|isbn=9783642041006|page=30|url=https://books.google.com/books?id=f24wFELSzkoC&pg=PA30|display-authors=etal}}</ref> ===Differential cryptanalysis=== {{Main|Differential cryptanalysis}} {{expand section|date=April 2012}} ===Linear cryptanalysis=== {{Main|Linear cryptanalysis}} ''[[Linear cryptanalysis|A linear cryptanalysis]]'' is a form of cryptanalysis based on finding [[affine transformation|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]].<ref>{{Cite journal|last=Matsui|first=Mitsuru|title=Linear Cryptanalysis of DES Cipher|url=http://ftp.esat.kuleuven.ac.be/pub/cosic/rijmen/misc/lin_cr.ps|journal=Mitsubishi Electric Corporation|volume=1|issue=3|pages=43|via=Computer & Information Systems Laboratory}}</ref> The discovery is attributed to [[Mitsuru Matsui]], who first applied the technique to the [[FEAL]] cipher (Matsui and Yamagishi, 1992).<ref name="FEAL_linear">{{cite conference |author1=Matsui, M. |author2=Yamagishi, A. |name-list-style=amp | title = A new method for known plaintext attack of FEAL cipher | book-title = Advances in Cryptology – [[EUROCRYPT]] 1992 }}</ref> ===Integral cryptanalysis=== {{Main|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 between pairs of texts and the sums of larger sets of texts inspired the name "integral cryptanalysis", borrowing the terminology of calculus.{{citation needed|date=April 2012}} ===Other techniques=== [[File:Attaque boomerang.png|thumb|right|200px|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 attack]]s, [[boomerang attack]]s, 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.<ref>{{Citation |last=Wu |first=Shengbao |title=Security Evaluation against Differential Cryptanalysis for Block Cipher Structures |date=2011 |url=https://eprint.iacr.org/2011/551 |access-date=2025-01-01 |last2=Wang |first2=Mingsheng}}</ref> ==Provable security== When a block cipher is used in a given [[Block cipher mode of operation|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 | Ciphertext indistinguishability }} Informally, a block cipher is secure in the standard model if an attacker cannot 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''<sub>''K''</sub>. #* If the coin lands on tails, he chooses a random permutation {{pi}} on the set of ''n''-bit strings and defines the function ''f'' = {{pi}}. # 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 (cryptography)|adversary]]''. The function ''f'' (which the adversary was able to query) is called an ''[[Oracle machine|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''<sub>''E''</sub>(''A'') denote the probability that adversary ''A'' wins this game against ''E'', and define the ''advantage'' of ''A'' as 2(''P''<sub>''E''</sub>(''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''<sup>−1</sup>(''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 (complexity)|reduction argument]]) that the probability of an adversary winning this new game is not much more than ''P''<sub>''E''</sub>(''A'') for some ''A''. (The reduction typically provides limits on ''q'' and the running time of ''A''.) Equivalently, if ''P''<sub>''E''</sub>(''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=== {{expand section|date=April 2012}} ==Practical evaluation== Block ciphers may be evaluated according to multiple criteria in practice. Common factors include:{{sfn|Menezes|van Oorschot|Vanstone|1996|p=227}}<ref name="AESr2report">{{citation|author1=James Nechvatal |author2=Elaine Barker |author3=Lawrence Bassham |author4=William Burr |author5=Morris Dworkin |author6=James Foti |author7=Edward Roback |title=Report on the Development of the Advanced Encryption Standard (AES)|publisher=National Institute of Standards and Technology (NIST)|date=October 2000|url=http://csrc.nist.gov/archive/aes/round2/r2report.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://csrc.nist.gov/archive/aes/round2/r2report.pdf |archive-date=2022-10-09 |url-status=live}}</ref> * 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<ref>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.</ref> attacks. * The cipher's ''complexity'' and its suitability for implementation in [[electronic hardware|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 [[computer memory|memory]] requirements. * The ''cost'' of the cipher refers to licensing requirements that may apply due to [[intellectual property right]]s. * The ''flexibility'' of the cipher includes its ability to support multiple key sizes and block lengths. ==Notable block ciphers== ===Lucifer / DES=== {{main|Lucifer (cipher)|Data Encryption Standard}} [[Lucifer (cipher)|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).<ref>[http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf FIPS PUB 46-3 ''Data Encryption Standard (DES)''] (This is the third edition, 1999, but includes historical information in the preliminary section 12.)</ref> It was chosen by the U.S. National Bureau of Standards (NBS) after a public invitation for submissions and some internal changes by [[National Institute of Standards and Technology|NBS]] (and, potentially, the [[NSA]]). DES was publicly released in 1976 and has been widely used.{{citation needed|date=April 2012}} 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.{{citation needed|date=April 2012}} 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{{who|date=April 2012}} 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 [[EFF DES cracker|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.<ref name="NIST_SP_800-57">[http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57-Part1-revised2_Mar08-2007.pdf NIST Special Publication 800-57 ''Recommendation for Key Management — Part 1: General (Revised)'', March, 2007] {{webarchive|url=https://web.archive.org/web/20140606050814/http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57-Part1-revised2_Mar08-2007.pdf|date=June 6, 2014}}.</ref> ===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 [[block size (cryptography)|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 [[group (mathematics)|groups]] – [[modular arithmetic|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 cryptanalysis|linear]] or algebraic weaknesses have been reported. {{As of|2012}}, the best attack which applies to all keys can break a full 8.5-round IDEA using a narrow-bicliques attack about four times faster than brute force. ===RC5=== [[File:RC5 InfoBox Diagram.svg|thumb|160px|right|One round (two half-rounds) of the RC5 block cipher]] {{Main|RC5}} RC5 is a block cipher designed by [[Ron Rivest|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 a number of rounds (0 to 255). The original suggested choice of parameters was 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 arithmetic|modular]] additions and XORs. The general structure of the algorithm is a [[Feistel cipher|Feistel]]-like a 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 (mathematical constant)|e]] and the [[golden ratio]] as sources of "[[nothing up my sleeve number]]s". The tantalizing 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 cryptanalysis|differential attack]] using 2<sup>44</sup> chosen plaintexts.<ref name="Biryukov">Biryukov A. and Kushilevitz E. (1998). Improved Cryptanalysis of RC5. EUROCRYPT 1998.</ref> 18–20 rounds are suggested as sufficient protection. ===Rijndael / AES=== {{Main|Advanced Encryption Standard}} The ''Rijndael'' cipher developed by Belgian cryptographers, [[Joan Daemen]] and [[Vincent Rijmen]] was one of the competing designs to replace DES. It won the [[Advanced Encryption Standard process|5-year public competition]] to become the AES (Advanced Encryption Standard). Adopted by NIST in 2001, 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 block size has a maximum of 256 bits, but the key size 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|Blowfish (cipher)}} ''[[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.<ref name=blowfish-paper>{{cite journal |author=Bruce Schneier |author-link=Bruce Schneier |year=1994 |title=Description of a New Variable-Length Key, 64-Bit Block Cipher (Blowfish) |url=http://www.schneier.com/paper-blowfish-fse.html |journal=Dr. Dobb's Journal |volume=19 |issue=4 |pages=38–40}}</ref> It is a 16-round [[Feistel cipher]] and uses large key-dependent [[Substitution box|S-boxes]]. Notable features of the design include the key-dependent [[S-box]]es and a highly complex [[key schedule]]. It was designed as a general-purpose algorithm, intended as an alternative to the aging 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 [[patent]]s, 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." The same applies to [[Twofish]], a successor algorithm from Schneier. ==Generalizations== ===Tweakable block ciphers=== {{Expand section|date=June 2008}} M. Liskov, R. Rivest, and D. Wagner have described a generalized version of block ciphers called "tweakable" block ciphers.<ref name="tweak">{{cite journal|first1=M.|last1=Liskov|first2=R.|last2=Rivest|first3=D.|last3=Wagner|title=Tweakable Block Ciphers|journal=Crypto 2002|url=http://www.cs.colorado.edu/~jrblack/class/csci7000/f03/papers/tweak-crypto02.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.cs.colorado.edu/~jrblack/class/csci7000/f03/papers/tweak-crypto02.pdf |archive-date=2022-10-09 |url-status=live}}</ref> 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|Format-preserving encryption}} Block ciphers traditionally work over a binary [[Alphabet (computer science)|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 [[Formal language|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 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 cipher]]s 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 function]]s can be built using block ciphers.<ref>{{cite web| url = http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=44737| title = ISO/IEC 10118-2:2010 ''Information technology — Security techniques — Hash-functions — Part 2: Hash-functions using an n-bit block cipher''}}</ref>{{sfn|Menezes|van Oorschot|Vanstone|1996|loc=Chapter 9: Hash Functions and Data Integrity}} See the [[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 generator]]s (CSPRNGs) can be built using block ciphers.<ref>{{cite journal| url = http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf | title = NIST Special Publication 800-90A ''Recommendation for Random Number Generation Using Deterministic Random Bit Generators''| year = 2012| doi = 10.6028/NIST.SP.800-90A| last1 = Barker| first1 = E. B.| last2 = Kelsey| first2 = J. M.}}</ref>{{sfn|Menezes|van Oorschot|Vanstone|1996|loc=Chapter 5: Pseudorandom Bits and Sequences}} * Secure [[pseudorandom permutation]]s of arbitrarily sized finite sets can be constructed with block ciphers; see [[Format-Preserving Encryption]]. * A publicly known [[unpredictable permutation]] combined with key whitening is enough to construct a block cipher -- such as the single-key [[Even–Mansour cipher]], perhaps the simplest possible provably secure block cipher.<ref name="DKS"> [[Orr Dunkelman]], [[Nathan Keller]], and [[Adi Shamir]]. [http://eprint.iacr.org/2011/541.pdf "Minimalism in Cryptography: The Even–Mansour Scheme Revisited"]. </ref> * [[Message authentication code]]s (MACs) are often built from block ciphers. [[CBC-MAC]], [[One-key MAC|OMAC]], and [[PMAC (cryptography)|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 mode|CCM]], [[EAX mode|EAX]], [[Galois/Counter Mode|GCM]], and [[OCB mode|OCB]] are such authenticated encryption modes. Just as block ciphers can be used to build hash functions, like SHA-1 and SHA-2 are based on block ciphers which are also used independently as [[SHACAL]], hash functions can be used to build block ciphers. Examples of such block ciphers are [[BEAR and LION ciphers|BEAR and LION]]. ==See also== * [[Cipher security summary]] * [[Topics in cryptography]] * [[XOR cipher]] ==References== {{Reflist|30em}} ==Further reading== * {{cite book|first1=Lars R. |last1=Knudsen |first2=Matthew |last2=Robshaw |title=The Block Cipher Companion|publisher=Springer|year=2011|isbn=9783642173417|url=https://books.google.com/books?id=YiZKt_FcmYQC}} ==External links== * [http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html A list of many symmetric algorithms, the majority of which are block ciphers.] * [http://www.mat.dtu.dk/people/Lars.R.Knudsen/bc.html The block cipher lounge] * [https://web.archive.org/web/20070306055504/http://www.rsa.com/rsalabs/node.asp?id=2168 What is a block cipher?] from RSA [[FAQ]] * [https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8746274 Block Cipher based on Gold Sequences and Chaotic Logistic Tent System] {{Cryptography navbox|block}} {{DEFAULTSORT:Block Cipher}} [[Category:Block ciphers|*]] [[Category:Cryptographic primitives]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:As of
(
edit
)
Template:Citation
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Cryptography navbox
(
edit
)
Template:Expand section
(
edit
)
Template:Main
(
edit
)
Template:Math
(
edit
)
Template:More citations needed
(
edit
)
Template:Pi
(
edit
)
Template:Reflist
(
edit
)
Template:Self-published inline
(
edit
)
Template:Sfn
(
edit
)
Template:Short description
(
edit
)
Template:Var serif
(
edit
)
Template:Webarchive
(
edit
)
Template:Who
(
edit
)