معيار التعمية المتقدم

(تم التحويل من Advanced Encryption Standard)
Advanced Encryption Standard
(Rijndael)
Visualization of the AES round function
عام
المصممونJoan Daemen, Vincent Rijmen
أول نشر1998
مشتق منSquare
اللاحقونAnubis, Grand Cru, Kalyna
الترخيصAES winner, CRYPTREC, NESSIE, NSA
تفاصيل الشفرة
حجم المفاتيح128, 192 or 256 bits[note 1]
أحجام الكتل128 bits[note 2]
البنيةSubstitution–permutation network
الدورات10, 12 or 14 (depending on key size)
أفضل تحليل تعموي عمومي
Attacks have been published that are computationally faster than a full brute-force attack, though none as of 2023 are computationally feasible.[1]

For AES-128, the key can be recovered with a computational complexity of 2126.1 using the biclique attack. For biclique attacks on AES-192 and AES-256, the computational complexities of 2189.7 and 2254.4 respectively apply. Related-key attacks can break AES-192 and AES-256 with complexities 299.5 and 2176 in both time and data, respectively.[2]

Another attack was blogged[3] and released as a preprint[4] in 2009. This attack is against AES-256 that uses only two related keys and 239 time to recover the complete 256-bit key of a 9-round version, or 245 time for a 10-round version with a stronger type of related subkey attack, or 270 time for an 11-round version.

The Advanced Encryption Standard (AES), also known by its original name Rijndael (هولندية pronunciation: [ˈrɛindaːl], RAIN-dahl),[5] is a specification for the encryption of electronic data established by the US National Institute of Standards and Technology (NIST) in 2001.[6]

AES is a variant of the Rijndael block cipher[5] developed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen, who submitted a proposal[7] to NIST during the AES selection process.[8] Rijndael is a family of ciphers with different key and block sizes. For AES, NIST selected three members of the Rijndael family, each with a block size of 128 bits, but three different key lengths: 128, 192 and 256 bits.

AES has been adopted by the US government. It supersedes the Data Encryption Standard (DES),[9] which was published in 1977. The algorithm described by AES is a symmetric-key algorithm, meaning the same key is used for both encrypting and decrypting the data.

In the United States, AES was announced by the NIST as the US FIPS PUB 197 (FIPS 197) standard on November 26, 2001.[6] This announcement followed a five-year standardization process in which fifteen competing designs were presented and evaluated, before the Rijndael cipher was selected as the most suitable.

AES is included in the ISO/IEC 18033-3 standard. AES became effective as a US federal government standard on May 26, 2002, after approval by US secretary of commerce Donald Evans. AES is available in many different encryption packages, and is the first (and only) publicly accessible cipher approved by the US National Security Agency (NSA) for top secret information when used in an NSA approved cryptographic module.[note 3]

Definitive standards

The Advanced Encryption Standard (AES) is defined in these standards:

  • FIPS PUB 197: Advanced Encryption Standard (AES)[6]
  • ISO/IEC 18033-3: Block ciphers[10]

Description of the ciphers

AES is based on a design principle known as a substitution–permutation network, and is efficient in both software and hardware.[11] Unlike its predecessor DES, AES does not use a Feistel network. AES is a variant of Rijndael, with a fixed block size of 128 bits, and a key size of 128, 192, or 256 bits. By contrast, Rijndael per se is specified with block and key sizes that may be any multiple of 32 bits, with a minimum of 128 and a maximum of 256 bits. Most AES calculations are done in a particular finite field.

AES operates on a 4 × 4 column-major order array of 16 bytes b0, b1, ..., b15 termed the state:[note 4] [b0b4b8b12b1b5b9b13b2b6b10b14b3b7b11b15]

The key size used for an AES cipher specifies the number of transformation rounds that convert the input, called the plaintext, into the final output, called the ciphertext. The number of rounds are as follows:

  • 10 rounds for 128-bit keys;
  • 12 rounds for 192-bit keys;
  • 14 rounds for 256-bit keys.

Each round consists of several processing steps, including one that depends on the encryption key itself. A set of reverse rounds are applied to transform ciphertext back into the original plaintext using the same encryption key.

High-level description of the algorithm

  1. KeyExpansion – round keys are derived from the cipher key using the AES key schedule. AES requires a separate 128-bit round key block for each round, plus one more.
  2. Initial round key addition:
    1. AddRoundKey – each byte of the state is combined with a byte of the round key using the bitwise exclusive or.
  3. 9, 11 or 13 rounds:
    1. SubBytes – a non-linear substitution step where each byte is replaced with another according to a lookup table.
    2. ShiftRows – a transposition step where the last three rows of the state are shifted cyclically a certain number of steps.
    3. MixColumns – a linear mixing operation which operates on the columns of the state, combining the four bytes in each column.
    4. AddRoundKey
  4. Final round (making 10, 12 or 14 rounds in total):
    1. SubBytes
    2. ShiftRows
    3. AddRoundKey

The SubBytes step

In the SubBytes step, each byte in the state is replaced with its entry in a fixed 8-bit lookup table, S; bij = S(aij).

In the SubBytes step, each byte ai,j in the state array is replaced with a SubByte S(ai,j) using an 8-bit substitution box. Before round 0, the state array is simply the plaintext/input. This operation provides the non-linearity in the cipher. The S-box used is derived from the multiplicative inverse over GF(28), known to have good non-linearity properties. To avoid attacks based on simple algebraic properties, the S-box is constructed by combining the inverse function with an invertible affine transformation. The S-box is also chosen to avoid any fixed points (and so is a derangement), i.e., S(ai,j) ≠ ai,j, and also any opposite fixed points, i.e., S(ai,j) ⊕ ai,j ≠ FF16. While performing the decryption, the InvSubBytes step (the inverse of SubBytes) is used, which requires first taking the inverse of the affine transformation and then finding the multiplicative inverse.

The ShiftRows step

In the ShiftRows step, bytes in each row of the state are shifted cyclically to the left. The number of places each byte is shifted differs incrementally for each row.

The ShiftRows step operates on the rows of the state; it cyclically shifts the bytes in each row by a certain offset. For AES, the first row is left unchanged. Each byte of the second row is shifted one to the left. Similarly, the third and fourth rows are shifted by offsets of two and three respectively.[note 5] In this way, each column of the output state of the ShiftRows step is composed of bytes from each column of the input state. The importance of this step is to avoid the columns being encrypted independently, in which case AES would degenerate into four independent block ciphers.

The MixColumns step

In the MixColumns step, each column of the state is multiplied with a fixed polynomial c(x).

In the MixColumns step, the four bytes of each column of the state are combined using an invertible linear transformation. The MixColumns function takes four bytes as input and outputs four bytes, where each input byte affects all four output bytes. Together with ShiftRows, MixColumns provides diffusion in the cipher.

During this operation, each column is transformed using a fixed matrix (matrix left-multiplied by column gives new value of column in the state): [b0,jb1,jb2,jb3,j]=[2311123111233112][a0,ja1,ja2,ja3,j]0j3

Matrix multiplication is composed of multiplication and addition of the entries. Entries are bytes treated as coefficients of polynomial of order x7. Addition is simply XOR. Multiplication is modulo irreducible polynomial x8 + x4 + x3 + x + 1. If processed bit by bit, then, after shifting, a conditional XOR with 1B16 should be performed if the shifted value is larger than FF16 (overflow must be corrected by subtraction of generating polynomial). These are special cases of the usual multiplication in GF(28).

In more general sense, each column is treated as a polynomial over GF(28) and is then multiplied modulo 0116z4+0116 with a fixed polynomial c(z)=0316z3+0116z2+0116z+0216. The coefficients are displayed in their hexadecimal equivalent of the binary representation of bit polynomials from GF(28)[x]. The MixColumns step can also be viewed as a multiplication by the shown particular MDS matrix in the finite field GF(28). This process is described further in the article Rijndael MixColumns.

The AddRoundKey Step

In the AddRoundKey step, each byte of the state is combined with a byte of the round subkey using the XOR operation (⊕).

In the AddRoundKey step, the subkey is combined with the state. For each round, a subkey is derived from the main key using Rijndael's key schedule; each subkey is the same size as the state. The subkey is added by combining of the state with the corresponding byte of the subkey using bitwise XOR.

Optimization of the cipher

On systems with 32-bit or larger words, it is possible to speed up execution of this cipher by combining the SubBytes and ShiftRows steps with the MixColumns step by transforming them into a sequence of table lookups. This requires four 256-entry 32-bit tables (together occupying 4096 bytes). A round can then be performed with 16 table lookup operations and 12 32-bit exclusive-or operations, followed by four 32-bit exclusive-or operations in the AddRoundKey step.[12] Alternatively, the table lookup operation can be performed with a single 256-entry 32-bit table (occupying 1024 bytes) followed by circular rotation operations.

Using a byte-oriented approach, it is possible to combine the SubBytes, ShiftRows, and MixColumns steps into a single round operation.[13]

Security

The National Security Agency (NSA) reviewed all the AES finalists, including Rijndael, and stated that all of them were secure enough for US Government non-classified data. In June 2003, the US Government announced that AES could be used to protect classified information:

The design and strength of all key lengths of the AES algorithm (i.e., 128, 192 and 256) are sufficient to protect classified information up to the SECRET level. TOP SECRET information will require use of either the 192 or 256 key lengths. The implementation of AES in products intended to protect national security systems and/or information must be reviewed and certified by NSA prior to their acquisition and use.[14]

AES has 10 rounds for 128-bit keys, 12 rounds for 192-bit keys, and 14 rounds for 256-bit keys.

More recent guidance from the NSA, however, only allows classified information to be encrypted with 256-bit key lengths. 128-bit and 192-bits is no longer sufficient for the encryption of classified information.[15]

Known attacks

For cryptographers, a cryptographic "break" is anything faster than a brute-force attack – i.e., performing one trial decryption for each possible key in sequence