AES Presentation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Advanced Encryption Standard (AES)

Course Title: Information SECURITY


Course Code: CSE 717

Submitted BY
Id-18701013
Id-18701015
Id-18701019
Id-18701021
Id-18701029

Department
Computer Science & Engineering
Advanced Encryption Standard (AES) July 1, 2022 1 / 28
Introduction
University of Chittagong

Encryption is a way of scrambling data so that only authorized parties


can understand the information. Encryption helps prevent data breaches,
whether the data is in transit or at rest. This prevents attackers, ad
networks, Internet service providers, and in some cases governments from
intercepting and reading sensitive data.
An encryption algorithm is the method used to transform data into ciphertext.
An algorithm will use the encryption key in order to alter the data in a
predictable way, so that even though the encrypted data will appear random, it
can be turned back into plaintext by using the decryption key.

Advanced Encryption Standard (AES) July 1, 2022 2 / 28


Introduction
University of Chittagong

The more popular and widely adopted symmetric encryption algorithm likely to
be encountered nowadays is the Advanced Encryption Standard (AES). AES is
an iterative rather than Feistel cipher. It is based on ‘substitution–permutation
network’. It comprises of a series of linked operations, some of which involve
replacing inputs by specific outputs (substitutions) and others involve shuffling
bits around (permutations).

Advanced Encryption Standard (AES) July 1, 2022 3 / 28


Features
University of Chittagong

▶ Block encryption implementation


▶ 128-bit group encryption with 128, 192 and 256-bit key lengths
▶ Symmetric algorithm requiring only one encryption and decryption
key
▶ Data security for 20-30 years
▶ Worldwide access
▶ Easy overall implementation

Advanced Encryption Standard (AES) July 1, 2022 4 / 28


Structure of AES
University of Chittagong

AES includes three block ciphers:


▶ AES-128 uses a 128-bit key length to encrypt and decrypt a block of
messages.
▶ AES-192 uses a 192-bit key length to encrypt and decrypt a block of
messages.
▶ AES-256 uses a 256-bit key length to encrypt and decrypt a block of
messages.

Advanced Encryption Standard (AES) July 1, 2022 5 / 28


Structure of AES
University of Chittagong

AES is an iterative rather than Feistel cipher. AES performs all its
computations on bytes rather than bits. Hence, AES treats the 128 bits of a
plaintext block as 16 bytes. These 16 bytes are arranged in four columns and
four rows for processing as a matrix .

Advanced Encryption Standard (AES) July 1, 2022 6 / 28


Structure
University of Chittagong

Unlike DES, the number of rounds in AES is variable and depends on the
length of the key. AES uses 10 rounds for 128-bit keys, 12 rounds for 192-bit
keys and 14 rounds for 256-bit keys. Each of these rounds uses a different
128-bit round key, which is calculated from the original AES key.

Advanced Encryption Standard (AES) July 1, 2022 7 / 28


Encryption Process
University of Chittagong

Here, we restrict to description of a typical round of AES encryption.


Each round comprise of four sub-processes. The first round process is
depicted below

Advanced Encryption Standard (AES) July 1, 2022 8 / 28


AES Transformation Function
University of Chittagong

▶ Substitute Bytes Transformation


▶ Shift Rows Transformation
▶ Mix Columns Transformation
▶ Add Round Key Transformation

Advanced Encryption Standard (AES) July 1, 2022 9 / 28


Byte Substitution
University of Chittagong

▶ This step implements the substitution.


▶ In this step each byte is substituted by another byte.
• Its performed using a lookup table also called the S-box.
• This substitution is done in a way that a byte is never substituted by
itself and also not substituted by another byte which is a compliment
of the current byte.
▶ The result of this step is a 16 byte (4 x 4 ) matrix like before.
The next two steps implement the permutation.

Advanced Encryption Standard (AES) July 1, 2022 10 / 28


Shiftrows Transformation
University of Chittagong

This step is just as it sounds. Each row is shifted a particular number of


times.
▶ The first row is not shifted
▶ The second row is shifted once to the left.
▶ The third row is shifted twice to the left.
▶ The fourth row is shifted thrice to the left.
(A left circular shift is performed.)

b0 b1 b2 b3 b0 b1 b2 b3

b4 b5 b6 B7 b5 b6 b7 b4

b8 b9 b10 B11 b10 b11 b8 b9

b12 b13 b14 b15 b15 b12 b13 b14

Advanced Encryption Standard (AES) July 1, 2022 11 / 28


MixColums Transformation
University of Chittagong

This step is basically a matrix multiplication. Each column is multiplied


with a specific matrix and thus the position of each byte in the column is
changed as a result.
This step is skipped in the last round.

c0 2 3 1 1 b0

c1 1 2 3 1 b1
=
c2 1 1 2 3 b2

c3 3 1 1 2 b3

Advanced Encryption Standard (AES) July 1, 2022 12 / 28


AddRound Key Transformation
University of Chittagong

Now the resultant output of the previous stage is XOR-ed with the
corresponding round key. Here, the 16 bytes is not considered as a grid
but just as 128 bits of data.

PlainText

SubBytes SubBytes

Cipher Text
ShiftRows
Roundi Last Round SubBytes
MixColumns
AddRoundKey
AddRoundKey

CipherKey

Advanced Encryption Standard (AES) July 1, 2022 13 / 28


Key Expansion Algorithm
University of Chittagong

▶ The AES key expansion technique generates a 44-word linear array


from a four-word (16-byte) input key (176 bytes). The enlarged key’s
first four words contain a copy of the key. Four words are added to
the expanded key’s remaining space at a time. Each new word, w[i],
is dependent on the words that come before it, w[i - 1], and those
that come after it, w[i - 4]. A straightforward XOR is employed in
three out of four instances. A more complicated function is
employed for words whose position in the w array is a multiple of 4.

Advanced Encryption Standard (AES) July 1, 2022 14 / 28


Key Expansion Algorithm
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 15 / 28


Key Expansion Algorithm
University of Chittagong

▶ RotWord left shifts a word by one byte in a circular motion. This


results in the transformation of the input word [B0, B1, B2, B3] into
[B1, B2, B3, B0]. Each byte of the input word is subjected to a byte
replacement by SubWord utilizing the S-box. A round constant,
Rcon[j], is XORed with the outcome of mentioned steps.
▶ The round constant is a word in which the three rightmost bytes are
always 0. Thus, the effect of an XOR of a word with Rcon is to only
perform an XOR on the left- most byte of the word. The round
constant is different for each round and is defined as Rcon[j] =
(RC[j], 0, 0, 0), with RC[1] = 1, RC[j] = 2 RC[j -1] and with
multiplica- tion defined over the field GF(28 ).

Advanced Encryption Standard (AES) July 1, 2022 16 / 28


An example of AES
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 17 / 28


An example of AES
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 18 / 28


An example of AES
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 19 / 28


An example of AES
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 20 / 28


Avalanche Effect in AES
University of Chittagong

The avalanche effect is a desirable characteristic of cryptographic


algorithms, most frequently block ciphers and cryptographic hash
functions. The avalanche effect is present when, after a little input
change (such as flipping a single bit), a large output change results (e.g.,
half the output bits flip). Avalanche Effect is computed by changing one
bit of plaintext while maintaining the key and by changing one bit of the
encryption key while maintaining the key.

Advanced Encryption Standard (AES) July 1, 2022 21 / 28


AES Implementation
University of Chittagong

▶ The AES encryption and decryption ciphers differ from one


another, the structure of the key schedules for encryption and
decryption is the same, the order of transformations for decryption is
different.
▶ The drawback is applications need both encryption and decryption
require two different software or firmware modules, decryption
method exists, shares the same basic structure as the encryption
algorithm.
▶ The encryption algorithm’s series of modifications are present in the
analogous version with transformations replaced by their
inverses, modification to the key schedule is required to achieve this
equivalency.

Advanced Encryption Standard (AES) July 1, 2022 22 / 28


Equivalent Inverse Cipher
University of Chittagong

▶ INTERCHANGING INVSHIFTROWS AND INVSUBBYTES:


InvShiftRows alters the order of bytes in State, not change and not
rely on the contents of the bytes to carry out its transformation, the
contents of bytes within State are affected by InvSubBytes, the byte
sequence is unaffected, these two operations can be switched
between.
▶ INTERCHANGING ADDROUNDKEY AND INVMIXCOLUMNS:
The order of bytes in State is unaltered by the transformations Add-
RoundKey and InvMixColumns, AddRoundKey and InvMixColumns
act on State one column at a time on the key as a list of words, in
respect of column input, these two operations are linear.

Advanced Encryption Standard (AES) July 1, 2022 23 / 28


Equivalent Inverse Cipher
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 24 / 28


Implementation Aspects
University of Chittagong

▶ 8-BIT PROCESSOR: On an 8-bit processor, AES is very effectively


implemented, bytewise XOR operation used in AddRoundKey,
a straightforward byte-shifting operation is ShiftRows. SubBytes
simply needs a table of 256 bytes to work at the byte level, matrix
multiplication is required for the transformation MixColumns in the
field GF(28), all operations are done on bytes.
▶ 32-BIT PROCESSOR: If operations are defined on 32-bit words, a
more effective implementation for a 32-bit processor can be
attained, first define the four transformations of a round in algebraic
form to demonstrate this.

Advanced Encryption Standard (AES) July 1, 2022 25 / 28


Implementation Aspects
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 26 / 28


Applications of AES
University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 27 / 28


University of Chittagong

Advanced Encryption Standard (AES) July 1, 2022 28 / 28

You might also like