In the previous video we discussed block ciphers and
how we can use padding and modes of
operation to encrypt data of arbitrary length.
This video will Deep dive into the
widely used block Cipher a yes and
look at its specification.
Is the specification for the encryption method
established by the US National Institute of
Standards and Technology East in 2001?
Yes was chosen using a selection process that lasted
from 1997 to
2000.
The selection of Alias was more open and transparent
than its predecessor the data
encryption standard this.
For a selection 15 designs were submitted
from several cryptographers coming from
different countries.
The designs were studied and assessed by
cryptographers not only for security
but also on performance in
a variety of settings.
So not only for PCs but also for Hardware
implementations.
And also on their feasibility in limited environments like
smart cards or fpgas.
The design invented by the two Belgian
cryptographers, Vincent Richmond and
Juan Damon.
Was the winner and it was adapted for the AES
standard.
That's why if you look at documentation or Publications about
as you also
find the name region dial block Cipher.
Region dial was the original name used by
the inventors during the competition.
The name merging the L refers to the family names
of the two cryptographers.
AES uses a block of 128 bits
for the plain text and the ciphertext
a yes is an iterative block Cipher.
With encryption or decryption algorithms are composed
of iterations.
In each iteration a sequence of operations is executed.
Will also use the name round to refer
to the iteration.
As allows keys of different sizes.
128 192 and 256
obviously the larger the key the harder it
is to break the system.
but even for the least secure mode
as 128
It is quite secure and it's
considered to be unbreakable with today's Computing
capabilities.
There is a link between the key length and the number of
routes.
in fact on each round of areas
We use a round key derived from the main key.
So the longer the main key is the more
round Keys we can derive.
and the more rounds we get the
block Cipher can have
That's why for a yes 192.
The key length is 192 bits. We can
have 12 routes.
while for AES 128
We can only have 10 Rounds.
and for a yes 256 with
a key length of
256 we can have 14 rounds.
In terms of security AES was extensively studied
and today no vulnerability
have been discovered.
Let's see how AES works.
the 128-bit plain text
block
is arranged as four by four array of
bytes.
As you can see in the right side of the slide.
So 128 by a bit correspond to
16 bytes.
We call this array the state.
the state is modified in place in
each round of as
we mentioned in the previous slide. We do
not directly use the original main key.
But rather round Keys derived from
the main key.
On each route. We use one round key except on
the last round we use two round keys.
That's why if R represents the number
of rounds we have.
Then we derive R plus 1.
Round keys from the original key.
So for example for as 128.
We have 10 rounds and thus 11
round keys while for as 192.
We have 12 rounds and
13 round keys.
for a yes 256
we have 14 rounds and 15
round keys.
Each round key has the same length as the state.
And it is also represented as a 4
by 4 array of bytes like you see
on the right side of the slide.
each a yes round consists of four steps
subbytes
shift rows
mixed columns
and add round key.
In the first three steps only the state
is transformed.
on the last step at Round key
as its name suggests
the bytes of the state are mixed with the bytes of
the round key.
Let's now see which type of operations we have
in each of these steps.
in some bite step
each byte of the array
Is replaced again according to
lookup table represented by the letter s
in the slide.
This lookup table has 256 entries which
correspond to the 256 possible
values that byte can have.
for example for the byte 00
is corresponding value in the lookup table is
the byte 63
while for the value
zero one is corresponding value.
Is the byte 7?
C
Wine all the way to the last value FF
Who score spending value in the vocab table is
the byte 16.
Sub bytes lookup table is public and
it was chosen by the Alias
inventors.
However, they described how this lookup
table was constructed.
And they specified the process to construct a new
lookup table if you are worried if there is
a trapdoor in this lookup table.
Obviously if we change the lookup table, we completely changed the
cipher.
and it will be equivalent to obtaining new
as
However, this new areas should have the same security
as the original is.
Let's now return to our Ace.
So we explained subbytes.
So bytes is just a simple operation of changing the
value of each byte based on lookup table.
This operation acts on each byte separately.
In next step is shiftro.
shift rows as its name suggests
shifts each row using a certain number of positions
In the figure, you can see the state before and
after applying shift rows.
Let's look at the rows one by one.
For the first row.
We didn't do any shift.
As you see all the bytes P1 p2p3p4
stayed in the same position.
For the second row.
We shifted with one position
to the left.
You can look at the byte P6,
for example that was shifted by one
position to the left.
For the third row.
We shift with two positions.
You can see that for the byte P11 that
now arrives to the first column.
And for the last row the shift
is with three positions to the left.
That's why the byte p16 is now at
the first column.
So to summarize shift rows
is an operation that acts on
one row at a time.
now mix column steps
mix columns combines the bytes of every
column
the four bytes of the colon are multiplied by
fixed four by four Matrix of
bytes.
As Illustrated below for the first
column.
p15 P9 p13
we multiply them with this Matrix that
you see.
To obtain the new column P1
Prime P5 Prime P9 prime p13
prime.
By the way, we use the same Matrix for all the columns.
This multiplication might look ambiguous to
you. That's fine.
in the next video we'll discuss the mathematics uses
used in as
And will clarify what does it mean to multiply a
colon of bytes by metrics
of bytes?
Okay, so while subtites acts on
a byte at a time and shift rows acts on
row at a time mixed columns processes one
column at a time.
The last step is probably the most
straightforward to understand.
We exhort each byte of the state with
a byte of the round key.
So we use these operator the sum
operator in a circle to denote
the xor operation.
So similar to some bytes.
At Round key acts on one byte at
a time.
In this video we described as and
the steps that compose its route.
Steps involve some arithmetic that we
did not explain yet.
So see you in the next video to understand
how aesrithmetic works.