welcome to section 2 we will cover
symmetric key cryptography part 1
In the first video, we will discuss how we
can achieve confidentiality using symmetric key
cryptographic algorithms.
because either two parties Alice and
Bob
Alison Bob would like to have confidential Communications over
a non-secure channel a channel
where messages can be intercepted by in adversary.
We assume that prior to this setting the parties
had had some setup fees
with the exchanged some key k.
One of them let's say Alice generated randomly
the key K and distributed its
value through a confidential channel to
Bob.
How can we have such confidential Channel?
For example, Alice and Bob met physically.
And Alice told Bob the value of K.
Now that the key was already distributed the parties
do not need to rely anymore on a
confidential channel to have secure Communications.
Using encryption they can transform a non-confidential
channel into a confidential Channel.
Let's see how they do that.
We do not by P. The plain text that Alice would
like to send to Bob.
Alice applies an algorithm called encrypt that
takes the plaintext p
and the TK and outputs a ciphertext
c
Ali sends the ciphertext C to bulb.
That applies an algorithm called decrypt.
That takes the ciphertext C.
and the key k
and outputs the original plane text
B.
Functionally what we expect from encrypt and
decrypt algorithms is when we apply the Crypt
over ciphertext and we
use the same key.
We obtain the original plain text.
What we can also Express mathematically using this
equation.
From security point of view we expect that
an adversary that intercepts is ciphertext cannot
retrieve P or get any
partial information about P. This
is the confidentiality guarity.
The symmetric aspect comes from the fact that the same key was
used for encryption and decryption.
This will not be always the case with cryptographic algorithms
that we will see in this course.
Is now see some concrete examples of this algorithms
encrypt and decrypt.
This is our first symmetric crypto algorithm
their namesipher.
The terms Cipher just refers to an algorithm for
encryption and decryption.
Vernon encrypt and decrypt use the
operation xor exclusive or
that we can have on bits or bit strings.
Those who are not familiar with this operation. Can't stop
the video and take the time to look at the yellow box below.
to encrypt at least exorce the
plaint XP with the key k
to decrypt Bob exhores the ciphertext C
with a key case
The functionality aspect is guaranteed by
the following property of excel operation.
When we exalt with the same value twice, it is canceled. So
when Bob exorces with K,
he obtains the original plain text B.
the security comes from the fact
that an adversary that does not know the value K
and intercepts p x
or k is unable to compute p
Let's see Vernon Cipher in action on a
given example.
Alice wants to encrypt the message. Hello, using the
key enigma.
Before encryption at least must apply some encoding.
She has to change the representation of her message. Hello
to format that is compatible with the
cipher.
Let's converts each character of her message
to its as key code represented in
hexadecimal.
Example the uppercase H is
encoded to 48 the lowercase e
is encoded to 65 Etc.
And it has also to include the key Enigma as
you see the uppercase E was
encoded to the value of 45 the lowercase
n to the value 6E Etc.
You might have noticed that the key Enigma contains six
characters while our plane text hello
contains only five characters that's not
an issue. We will only use five characters of
the key and will not consider the last
character of the key.
Now the encryption algorithm is applied by xoring the
plaintext with the encoded key to obtain
the ciphertext, which is the sequence 0 d
0b0502.
And this value is sent to Bob Bob applies the
decryption algorithm and obtains the sequence
48.
65 60 60 6f
this was exactly the encoded representation of
hello.
Obviously when Bob further applies the decoding he
obtains the message. Hello.
Just remark keep in mind that the encoding and
decoding do not provide any security.
They are just here to change to a representation that is
compatible with the cipher.
Let's now see the advantages and limitation
of Vernon Cipher from security point of
view term Cipher is a secure Cipher.
It provides perfect secrecy as each
plain text character is encrypted using its own
key.
From implementation point of view Vernon is very fast as
xor operations are very efficient.
And it requires little memory because the
encrypt decrypt algorithms process a
single character at a time.
An important warning is that the key
cannot be used more than once?
If we use the same key K with two plain,
text P1 and P2.
The adversary that encrypts the their corresponding server
texts C1 and C2.
Can exhort this effortex to obtain the xor of
the plaintext?
So evenly that the adversary did not fully retrieve the
plain text P1 and P2.
She obtained some partial information about this
plaintext.
So instead of single key the two parties required to
have a key stream generator.
For example, if we go back to our to
Alice and pop if Alice wants to send the
message. Hello meteor at 5 pm.
Then she needs to use different keys
for every word of message.
For illustrative purposes. We are using meaningful words
for the key like here in Enigma was
German Cipher.
But in real systems we can use non meaningful
Keys. Any combination of characters is fine.
It's even better from security point of view
as such keys will have high entropy.
Means the number of possible Keys is higher if
we don't have a constraint of meaning.
In general then I'm safer is convenient for
applications with the amount
of data is unknown or continuous like in
network streams.
Vietnam Cypher is part of the family of stream
ciphers.
Stream ciphers are based on generating in infinite
keystring and use that to
encrypt one bit one byte or one character at a
time.
Deciphers are generally very efficient, but come with a requirement
of the stream setup, which is not possible in
many applications and can be subject to vulnerabilities. If
it is not implemented correctly in the
next video. We look at another family of ciphers the
block ciphers.
deciphers work on larger chunks of
data at a time
Even that the involve more complex operations, they
are quite versatile and can be used for different use
cases to encrypt files or within
a request response protocols such as
https and in many more applications.
So see you in the next video.