In the last lecture, we talked about the different types of encryption, let us get started with the
different types of ciphers.
Well, the first is the classical cipher.
And in this and there are modern ciphers.
So classical ciphers were used in the war time period in order to send messages.
And at that time, cryptography was not developed.
So what is the first classical cipher?
Well, the first classical cipher is substitution, cipher substitution ciphers and cryptic plain text
by swapping each letter or symbol in the plain text by a different symbol as directed by the key.
Now, when you are going to encrypt, we have already seen that we need a key.
So we have encryption algorithm, we have the key and then we get the data.
So perhaps the most simplest substitution cipher is the SESAR cipher, which is named after the man
who used it for the first time.
A cipher is perhaps better known to the captain.
Midnight Colgrove sees a cipher maybe differentiated from other, more complex substitution cipher,
but that is one of the most easiest SESAR cipher.
So let us see.
You have to encrypt this as B and why you want to tell someone that I am a spy.
And the key here is, let's say E so the key here is e what you are going to do is you are going to
apply this key and then you are going to get the encrypted text, which is.
Now, if you use a numbering alphabet here, if you use this series, just let me show you the series
right here.
Yeah, so I was talking about this series, so now here every single letter has a number associated.
For example, zero is E, 18 is S, 23 is X.
So when you write spy, OK, when you when you write spy over here, what exactly it's doing is.
S is 18, so s is it here?
B, B is 15, so B is 15.
Y is twenty four wise twenty four.
And the key here is for the key here is for so remember one thing.
Plain text.
OK, plain text.
Plus, the key gives you the ciphertext city.
All right, so our plaintext is this key is for so substitution cipher does is it adds all the digits
or 18 plus four gives us twenty two.
So 18 plus four gives us 20 to 15 plus four gives us nineteen and twenty four plus four gets twenty
eight.
OK, so 22 here is W 22, here is W.
19, here is D..
Now, do we have 28?
Well, this is twenty five, twenty six, twenty seven, and then you have twenty eight, so.
If you are a spy and if you want to tell your friend that you are a spy, you just tell him that, OK,
the key is E and you give this ciphertext.
So when he can, you know, have this WTC.
Now, let's say your friend has this WPEC and now he's confused about how you're going to decrypt it.
Well, you have these letters and you have the key.
So friend knows the keys and friend your friend knows these letters.
So what he has to do is while encrypting, you added so much decrypting, he has to subtract.
So 20 to minus four gives him 18, 19, minus four gives him 15.
Twenty eight minus four gives him.
What does it give?
No, so in that case, what he has to do is if it's greater than 25, he has to jump back four places
here and he has to add twenty eight minus four anyways, is 24.
So 18 again, he checks is as 15.
He checks is B and twenty four he checks is via hurry.
So he got the word spy.
This is how substitution ciphers actually work.
So this is just a basic example of how you encrypt and how you decrypt.
So if I, if I take a different Molcho all the way right here, this process, this process here is
encryption process and this process here is the decryption process.
So you have done encryption and you have the decryption.
And that is how SESAR cipher or the substitution ciphers used to work in the early periods.
Not the next type of cipher we are going to see is transposition ciphers.
But before that I would just like to clear my screen.
Now, let's continue with the next type of Saiful, which is transpositions, Saiful transpositions
Saiful is another form of an ciphering technique and it involves rearranging of the letters of a plain
text message.
So if you want to, let's say write again, spy, then you rearrange it using a key.
But this time you do not add, you just rearrange or you just shift by some particular numbers.
So what is about classical ciphers?
All substitution ciphers is the key is very weak.
And if someone finds out a key, then there is no point in having that encryption at all.
No modern type of ciphers are based on two factors, the first factor being and the first factor being
the private key.
So modern ciphers are basically based on two types, on the type of key and on the type of data.
So when it comes to the type of key, there are two keys which we had discussed, public and private
key.
So this private key stays with you.
You do not tell anyone about this private key.
And the public key is to public knowledge.
Anyone in the world can know your public.
So I hope now you have got more hints to the question which I had told you to look upon in the last
lecture.
And then based on type of data, whether it is a stream cipher or whether it is a block cipher seems
a trifle.
See, I'm sorry, stream cipher is basically a bit by bit.
You know, it's it's a stream of data that gets encrypted simultaneously.
So ACMS encryption, ICMS encryption becomes encryption, whereas in case of Block Saiful a block of
data, a chunk of data comes into the algorithm, it gets encrypted and then only the next data, next
block of data gets encrypted.
So it's a it's not a continuous thing, but it's a block by block thing, a block of 64 bits or a block
of let's say eight bits or a block of 128 bits.
So what happens in case of block cipher is sentences may get break and it becomes very difficult to
rearrange to get a meaningful data.
But when it comes to Stream Saiful, the data gets encrypted in one go.
Now this was about the different types of ciphers.
In the next lecture we'll talk about the most important and the most fundamental topic of symmetric
encryption.
All right.
I will see you in the next lecture.