0% found this document useful (0 votes)
5 views

Advanced Encryption Standard

Uploaded by

damrudadakijay
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Advanced Encryption Standard

Uploaded by

damrudadakijay
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Advanced Encryption

Standard
Overall Block
Diagram
Internal Block Diagram
How the Key for each round is
obtained?
How the Key for
each round is
obtained?
How the Key for each round is
obtained?
Operations in a
Single AES
Round
Detailed AES Round
Four different stages are used, one of permutation and three of
substitution:
1. Substitute bytes: Uses an S-box to perform a byte-by-byte substitution of
the block
2. ShiftRows: A simple permutation
3. MixColumus: A substitution that makes use of arithmetic over GF (2^8)
4. AddRoundKey: A simple bitwise XOR of the current block with a portion of
the expanded key
Detailed AES Round
• The structure is quite simple. For both encryption and decryption, the cipher begins with an
AddRoundKey stage, followed by nine rounds that each includes all four stages, followed by a tenth
round of three stages.
• Each stage is easily reversible. For the Substitute Byte, ShiftRows, and MixColumns stages, an
inverse function is used in the decryption algorithm.
• For the AddRoundKey stage, the inverse is achieved by XORing the same round key to the block.
• As with most block ciphers, the decryption algorithm makes use of the expanded key in reverse
order
1. Substitute Bytes
• The forward substitute byte transformation,
called SubBytes, is a simple table lookup. AES
defines a 16 * 16 matrix of byte values, called an
S-box, that contains a permutation of all possible
256 8-bit values.
• Each individual byte of State is mapped into a
new byte in the following way: The leftmost 4 bits
of the byte are used as a row value and the
rightmost 4 bits are used as a column value.
• These row and column values serve as indexes
into the S-box to select a unique 8-bit output
value.
• For example, the hexadecimal value {95}
references row 9, column 5 of the S-box, which
contains the value {2A}. Accordingly, the value
{95} is mapped into the value {2A3.
2. Shift Rows
• The first row of State is not altered. For the second row, a 1-byte circular left shift is performed.
• For the third row, a 2-byte circular left shift is performed.
• For the fourth row, a 3-byte circular left shift is performed. The following is an example of ShiftRows.
• The inverse shift row transformation, called InvShiftRows, performs the circular shifts in the opposite
direction for each of the last three rows, with a 1-byte circular right shift for the second row, and so
on.
3. Mix Column Transformation
The forward mix column transformation, called MixColumns, operates on
each column individually. Each byte of a column is mapped into a new
value that is a function of all four bytes in that column. The
transformation can be defined by the following matrix multiplication on
State
3. Mix Column Transformation
Each element in the product matrix is the sum of products of elements of
one row and one column. In this case, the individual additions and
multiplications are performed in GF (2^8). The MixColumns
transformation on a single column of State can be expressed as
3. Mix Column Transformation
• The multiplication mentioned above is performed over a
Galois Field. Let us see how the multiplication is performed
with the help of lookup tables E- Table and L- Table.
• For example, if the two hex values being multiplied are AF
*8, we first look up L(AF) index which returns B7 then
lookup L(08) which returns 4B. We then simply add these 2
numbers, B7 and 4B to obtain 102.
• Hex(102) =258 which is greater than FF i.e 255 so we
subtract 255 from it and get the result as 03 in hex.
• Now lookup 03 in the E table. i.e E(03) gives OF. Therefore
the result of multiplying AF*8 over a Galois Field 2^8 is OF.
4. Add Round Key
• In the forward add round key transformation, called AddRoundKey, the 128 bits of
State are bitwise XORed with the 128 bits of the round key.
• The first matrix is State, and the second matrix is the round key. The inverse add
round key transformation is identical to the forward add round key transformation,
because the XOR operation is its own inverse.
Conclusion

• The Mix Column transformation stage


happens till the (N-1)th Round. It is not
performed in the Nth Round.

• The output of the Nth Round is the final


Ciphertext.

You might also like