In the previous video we discussed our first
family of symmetry key cryptociphers, which
are the stream Cyprus.
In this video would introduce the second family
of symmetric key cryptociphers, which are
the block ciphers.
We have seen in the previous video that stream ciphers applying
encryption mechanisms over bits bytes
or characters.
Blocks, I first have rather large granularity the
encrypt larger block of bits. For example,
a block of 64 or 128 bits.
While stream ciphers process the bits or
bytes independently block ciphers combine all
the bits of the block.
This approach is very interesting from security point of view.
As the information from one plain text
bit is diffused into several ciphertext bits.
This makes the work of an attacker who is trying to
break the system much harder.
This property is called diffusion.
Block ciphers have other advantages compared with
stream ciphers.
In addition to the confidentiality service that we expect from
an encryption method.
Block ciphers can be used to provide Integrity service.
when it comes to implementation, even that the
involve some complex operations, they are
less difficult to implement correctly and less prone
to weaknesses because they don't need the key stream
setup that stream ciphers have
let's see their limitations.
Because they involve more complex operations compared with
the stream ciphers their encryption and decryption
methods are slow.
Another limitation is somehow the downside of
the diffusion.
Block ciphers are more susceptible to noise because the
bits of single block are processed together
a narrow in one bit corrupts the entire
block.
because of their advantages and their security
most symmetric key cryptociphers are
block ciphers.
We have in particular this triple disc
and AES.
In our focus in our course, we'll focus
on as because that's a more recent Cipher
compared to this.
It is more used and has better security.
Let's return to our setting with Alice
and Bob.
This time I listen Bob would like to use a block
Cipher that has some block sites.
Let's refer to that size as B.
example if Alice and verb use
this
B is equal to 64 bits
if they go with a yes B is
equal to 128 bits.
We'll use the notation e to refer to the encryption algorithm
that at least applies.
And D refer to the description algorithm that
Bob applies.
We said that block Cipher works on units of fixed size.
But messages come in a variety of
lamps.
If Alice has a plain text that is strictly
shorter than the block size. How can she use the
block Cipher?
She has to rely on padding.
So she adds additional bytes to make
it the length of her plain text equal to B.
quite simple
Several padding schemes exist the simplest is
to add rule bytes to her plane
text.
What happens if the length of airplane text is strictly larger than
b.
In that case she has to add the additional bytes
to the last block.
To make the total length of her plain text a
multiple of the block size.
In the previous slide, we will discussing what a
list has to do to make her plain text fit exactly
in a certain number of blocks. Let's say n
blocks.
The next question is how is she
going to apply the block operation on the different blocks?
She will use what we call mode of operation.
The most straightforward model of operation is called
electronic code book ECB.
With ECB Alice applies the block
operation represented in e in parallel and
independently on her plain text blocks.
similarly purpose has to apply the decryption
operation d
independently on the ciphertext blocks
don't be surprised that the key disappeared from the figure.
I omit to represent it to keep the slide neat
but obviously the key is still there
and it is the same for all the block operations.
for encryption or decryption
ECB mode of operation is quite simple to implement.
It also provides high level of parallelism, which
is excellent to have high throughput.
However, It suffers from some security issues.
If Alice has two plain text blocks that
are equal.
Then the two corresponding ciphertext blocks.
Are also equal.
an adversary that intercepts the ciphertext blocks
We'll see that the plain text blocks were equal.
In real life applications. It is possible to have
some redundancy in the plaintext.
We will see an interesting example in the next slide.
Another problem of this mode of operation is
that there is no cross block diffusion.
Many in the middle can intercept the ciphertext blocks.
permute two blocks
and send them to to Bob.
Bob will decrypt the message correctly and obtain
a plain text with two
permuted blocks.
Bob has no way to detect that the men
in the middle.
Did some changes to the plaintext?
Of course unless there is some external Integrity mechanism.
Not only permutation is possible the men in
the middle can delete a block or replace it with
another one.
So ECB does not guarantee any integrity.
Generally ECB is not recommended to
be used in real world applications.
However, it is really a good mode of operation
for educational purposes.
And to understand what are the
security values of the other modes of operation?
Now, let's look at the better mode of operation.
In this example of an encrypted image you can
visualize how in the second image
ECB can leave the plain
text patterns in the ciphertext.
So while the color of each pixel
was encrypted we can clearly discern the
penguin in the second image.
Because the pattern of the identically colored pixels in the
plaintext image remains in the ciphertext image.
The third image is when we use.
another secure mode of operation
in this case
The encrypted image is undistinguishable from
random noise, which is what we expect from
encryption method.
The next mode of operation is CBC mode
CBC stands for Cipher blockchaining.
In CBC model operation each block of
the plaintext is exalt with the
previous ciphertext block before being encrypted.
This way each ciphertext block
depends on all plaintext blocks processed
up to that point.
As the first block does not have the previous block. We will
use what we call initialization Vector IV.
Al
Starts by applying the xor operation
followed by the encryption operation
while Bob has to do the inverse.
It starts with the decryption operation then applies
the xor.
CBC solves the issue that information that
ECB
was suffering from which is the information leakage.
CBC mode ensures that if the block of
the plaintext is repeated in the original message. It
will produce a different ciphertext for
corresponding blocks.
From security point of view there is no need to
protect the secrecy of IV unlikely.
Because we use the IV just to instantiate the
chaining so it can be for example sent
with a ciphertext.
However, it is recommended to change the IV each
time.
Because they could be some information leakage.
You can stop the video and take the time to
think why.
The answer is that we can have a similar
information leakage.
Like we had with ECB.
If for two different plaintexts the
first blocks P1 are the
same.
And the IV was fixed we reused IV.
Then the adversary can still notice the quality of
these blocks on the ciphertext.
That's why we prefer to have a random ID.
CBC has been the most commonly used
motive operation.
Its main drawback is that the encryption is sequential?
It cannot be parallelized so we cannot achieve High
throughputs using CPC.
We reach the end of our video about block ciphers and
the useful modes of operation.
We have seen ECB and CBC modes.
There are many others.
We see them again in this course, for example,
when we will discuss message authentication codes.
At the time you will discover how a block Cipher that
was invented to provide confidentiality can
also provide integrity and
Authentication.
In the next video we will see more detail.
the most deployed block Cipher AES
So see you in the next video.