ok so ah we start with introduction to cryptography
what do you mean by cryptography or cryptology
so the cryptography is to ah is the area in
by which we ah we can able to communicate
two people which are remotely sitting in two
different place and that communication should
be in a secured way and they are communicating
over a insecured channel so usually these
two people this is the fundamental objective
of cryptography fundamental objective of cryptography
is to ah is to enable two people and these
two people namely usually use in a crypto
every bob or everywhere alice and the second
person is bob so two people is usually referred
as name as alice and bob so ah the fundamental
objective of cryptography is to enable two
people to communicate over and in secure two
people for a secured communication communication
over over an insecured channel over an public
channel over a public channel or
so this is the area where which which ah guarantee
us or which give us confident to ah for the
secured communication between two party alice
and bob and and they are communicative over
public channels say telephone internet email
facebook whatsapp so these area is this is
objective of cryptography to ah it says ah
science of art of secret writing so we are
communicating over an in secured channel which
is public and which is ah which is which can
be captured by any party and but the communication
should be secure so whatever is sending by
the alice should not be revealed by anybody
else other than bob
so let us draw the picture suppose there are
this alice and bob are sitting in two different
place say a alice is sitting in say delhi
or in some part of india and bob is sitting
say ah newyork or u s a ok so now they they
they they want to communicate so alice want
to communicate to bob so alice want to send
a message to bob so message could be anything
like say ah bob called alice and bob asked
hey what is your age so this is the say age
of alice this could be a message alice wants
to send to bob so this is say twenty four
suppose alice age is twenty four
so alice want to ah let bob know that alice
age is twenty four so if so alice is communicating
with bob over a public channel so this channel
is public 
so public means it could be telephone or it
could be email whatsapp facebook anything
i mean ah any internet option so so these
are all public channels so which is captured
by a third party which is named as oscar so
oscar has access to this channel full access
to this channel oscar can hear or oscar can
see whatever ah message is whatever communication
is going on over this public channel
so oscar is typically referred as a bad guy
so oscar is hearing everything so if just
alice saying that hey my age is twenty four
then if alice pass twenty four then oscar
will will also come to know that twenty four
is alice age so that way alice they dont want
to reveal there i mean age says so this is
the secret this is the message alice wants
to send to bob without revealing this information
to the third party
so what alice can do or so this is the whole
area of cryptography how we can a securely
communicate over an in secured channel this
channel is in secured ok so now what alice
can do alice can do something on the plain
text this is called plain text or message
i will come to that so alice can do something
on the plain text so alice can reverse this
so alice can so twenty four forty two and
then alice can send this forty two bob to
bob now upon receiving forty two bob has to
get back twenty two so what bob will do so
bob has to know was what alice did so bob
has to again reverse this forty two to get
back twenty four
but if oscar knows that they just reverse
it then oscar will also be able to get the
alice original age which is twenty four ah
what what else alice can do alice can add
something on this say alice can add twenty
on this or alice can multiply ten on this
so ten so may be alice can add something on
this say alice can add say eighteen on this
or twenty eight on this say twenty six yeah
so this will be a round figure so alice is
adding twenty six on this so then it is fifty
so now alice send fifty over this public channel
ok so also fifty fifty is not alice original
age so alice original age is twenty four but
alice did something alice add twenty six with
it and got a number which is fifty alice could
multiply alice could multiply three that is
also possible
but this way alice is ah hiding the this message
or this original information so fifty now
fifty ah bob is receiving fifty so after receiving
fifty and oscar is also receiving fifty so
oscar will assume alice age is fifty but bob
knows what alice did something so alice bob
knows oscar may be also knowing alice added
something but how much alice added that information
oscar will not be having
so that information this twenty six this twenty
six is typically shared between alice and
bob so this this is called key this twenty
six is called key or the secret key which
is shared between alice and bob sorry this
is twenty six ok so after receiving this fifty
so what bob will do bob will subtract this
ah fifty minus this key and get back twenty
four which is the alice original age ok so
this is this is this process is called encryption
process or this is called encryption what
alice is doing this is called encryption and
this thing what bob is doing to get back the
plaintext this is called decryption ok and
this is called this twenty four is called
the message or the plaintext or the plaintext
and this twenty six which has been added with
the plaintext to get this fifty is called
e secret key shared between alice and bob
so how they are sharing that is also another
issue how they are because they they can not
just commun[icate]- telephone and say ok we
are going to use twenty six as a key then
that twenty six will be revealed to the oscar
so oscar also will be getting the key so that
communication that how they will get this
how they will agree with this common key so
that is another issue so that that has to
be done in a secured way otherwise it will
be revealed by the third party and the after
encryption the output is called ciphertext
cipher text so this fifty is the ciphertext
so this ciphertext is the output after the
encryption algorithm this encryption algorithm
is very simple we are adding we are taking
the plaintext we have the key secret key shared
between alice and bob and we are adding this
and we are getting the ciphertext and this
ciphertext is being ah sent over the public
channel and upon receiving this ciphertext
what bob is doing to get back the plaintext
bob is having the key bob is applying the
reverse process of that encryption that is
called decryption process
so encryption was added so decryption has
to be subtraction so bob is subtracting this
twenty six and get back ah the plaintext which
is twenty four so this process is called decryption
process for the decryption algorithm this
algorithm and this is the key and bob has
to use the same key now what oscar can do
the third party so oscar is having full access
to this public channel so oscar is receiving
this ah fifty which is the ciphertext but
oscar is not having this key so this key which
is here is twenty six is typically with alice
and bob so nobody else is having this key
so that means oscar is not knowing what is
the key but oscar may be knowing that they
have added something so this encryption algorithm
is public we cannot say that we will not reveal
we have whether we have added or we have multiplied
or we have divided we have used the division
for our encryption that that that encryption
algorithm we will make it public
ok we this is public either we have added
something so but how much we have added that
ah that information is not public so that
key is the secret key which is shared between
alice and bob so that is here is twenty six
so what oscar can do oscar is getting only
this ciphertext oscar is not having the key
so oscar goal of the oscar is to gives what
is the key and what is the plaintext what
is the alice original age ok so this is the
this is the ah this is the fundamental objective
of cryptography so this will be knowing this
encryption algorithm decryption algorithm
the study of this is called ah cryptography
and the who who does this the people who are
working on this is called the cryptographer
ok so ah so this is so what alice is doing
this is the encryption and what bob is doing
that is the decryption algorithm ok so can
you go to the slide please ok so here is the
ah the cryptography is the science or art
of secret writing so two party is only referred
as a alice and bob so they communicate so
fundamental objective of cryptography is to
enable two party to communicate over an in
secured channel such a way that the third
party oscar cannot understand what is being
ah said i mean so this age should not be revealed
by the third party oscar should not get what
is the age of the alice so this is the ah
so this is the some terminology plaintext
which we have discussed the information that
alice wants to send to bob that age here in
this example alice want to send the age to
let bob knows alice age so the age here is
the plaintext
so the information that alice want to share
with bob is called plaintext so alice encrypt
the plaintext using the predetermined key
so the this key is shared between alice and
bob and this is this is the encryption process
now after receiving the ciphertext oscar cannot
determine what is the plaintext or what is
the key but bob should able to hm bob is having
the encryption key so bob should able to decrypt
it to get back the plaintext so this is the
typical communication channel so we have two
party alice and bob so there is a plaintext
source of plaintext space and so there is
a encryption algorithm so in this case or
encryption algorithm is very simple one it
is a addition so this is typically called
shift ciper
we will formally define what is this shift
cipher so alice is choosing a plaintext and
alice is choosing a encryption algorithm and
they shared with a common key so the secret
key k this is shared between alice and bob
and this is done in a secured way i mean so
that i mean either they can meet with each
other at some point of time and they can decide
ok this twenty six we are going to use for
as our key for next one year so that is one
option they they they made some ah december
time they made and they decided ok we are
going to use this is our key for our next
one year communication
but that is also danger because key may be
revealed so there is a risk of ah using the
same key for ah long time so we need to change
the keys depending on the application in our
mobile how much security either we should
keep the key for one day one week or one hour
one minute so may be our prime minister mobile
they change the key in a second so every second
keys are changing so these are called session
key so it's not a good idea to decide the
key and use for it for long time because it
could be revealed so so this is one problem
to share the key so this is their anyway somehow
they have to agree with this common key ah
this key
so these key are coming from the key source
and these key they have shared over the secured
channel either they meet with each other or
they trust on somebody to send the key something
like that and this oscar is the bad guy third
party who is the called crypt cryptanalyst
who is i mean ready to break the code or the
hacker
so is to guess what is the key this is the
key had i mean the guessing of the key or
what is the plaintext the message alice sent
to bob so this is a typical communication
channel in cryptography so cryptography has
two components one is ah the cryptography
which is the this which which is the area
where we we know the algorithm like encryption
algorithm decryption algorithm and how we
shared the key all this issues come under
this cryptography and the other side of the
coin is the breaking the code like hacker
the cryptanalyst so this is called cryptanalyst
the other side of the coin
so cryptographer they design the code and
crypt analyst they break the code so their
job is to breaking the job so this is called
crypt analyst or crypt ah the people who are
breaking the code are called cryptanalyst
and this this area is called cryptanalysis
and the cryptography is to design designer
who design the this algorithms and combining
two area is called cryptology this basically
the whole area of i mean this cryptography
and cryptanalyst ok name two area of cryptography
is symmetric key cryptography and and public
key key cryptography the in symmetric key
cryptography alice and bob they shared with
a they shared with a secret key k so this
is single key or symmetric key and they if
alice wants to send a message to bob then
alice will apply encryption algorithm which
is basically e k of m and get a ciphertext
and this ciphertext alice is so this is the
encryption algorithm encryption function or
encryption algorithm and this ciphertext is
sending to bob and this after receiving the
c so bob will apply another algorithm which
is called decryption algorithm which is used
in the same key on c this is basically d k
of c is basically e k of m so it should give
us m so this is called decryption so this
is called typically a symmetric key because
we have used the same key or the symmetric
key symmetric key or private key or the single
key cryptosystem cryptography
ok and there are other area which is called
public key so there everybody is having two
pair of keys because in this case but there
many issues like how they share with this
key common key so to avoid that public key
was invented after the work of diffie hellman
he extends protocol they they gave a ah algorithm
where alice and bob sitting two different
place can agree with a common key so after
that work this public key was invented but
all the conventional cryptography like shift
cipher caesar cipher substitution cipher all
are comes under symmetric key crypto system
ok so ah so this is the conventional crypto
encryption algorithm this is basically symmetric
key so we we we have encryption algorithm
so this is used a this this algorithm use
a key which is a secret key shared between
alice and bob and this is the plaintext which
is the input and another input is the key
and it is generate basically the ciphertext
this is alice is doing sender and this is
this part is this part is doing which is referred
as bob and this is basically we have this
is we are receiving the bob is receiving the
ciphertext and bob is having the common key
k and that using that key bob is ah decrypting
that ah ciphertext to get the plaintext
ok so this is the simplified model of ok so
come back to the formal definition of a crypto
system 
so what do you mean by a crypto system so
typically a crypto system is a five tupel
crypto system is basically a five tuple ah
p set of plaintext c set of ciphertext k set
of key space e set of encryption algorithm
d set of decryption algorithm so this is called
set of all possible plaintexts set of all
possible plaintexts or this is referred as
plaintext space and this is set of all possible
ciphertext this is called ciphertext space
and this is the key space that means set of
all possible keys key space this is set of
all possible keys and this is the ah this
is the set of all possible encryption algorithm
this is set of all possible encryption algorithm
possible encryption function encryption function
or algorithm so basically this is a function
which is taking ah this is a function ah so
encryption function is basically if you denote
this by e of k ah it is basically a plaintext
space key space to the ciphertext space
this is function form so this is taking a
key if we so this is taking a key and then
a plaintext and giving us the ciphertext so
basically your e of k of m is basically c
so this is a plaintext this is the key and
this is the ciphertext so we choose a key
once i choose a key then our encryption algorithm
is fixed and then we use take a plaintext
and we encrypt it and we get the ciphertext
and this is called set of all possible decryption
algorithm set of all possible decryption algorithm
ok so that means this is this is basically
a decryption function set of all possible
decryption algorithm or decryption function
so a decryption function is typically what
are the input so input is a ciphertext and
the corresponding key and it will give us
the plaintext so d of k c is basically m if
and all if e k of a m is c so if this plaintext
if this ciphertext was derived from the encryption
algorithm of ah after encrypting this plaintext
using the key k and then it should give us
the it should give us the ciphertext ah so
this is the reverse process actually encryption
is the decryption is the reverse process of
the encryption so this is this five tuple
is called the ah called the crypto system
so but it must have some condition like for
a given key we should there must exist a encryption
algorithm such that and there must exist a
decryption algorithm such that we should after
encrypting the message ah we get the ciphertext
then their ciphertext if we apply the decryption
algorithm we should able to get back the message
so this is the condition this crypto system
should have should have so let us write the
condition for every key so this is the formal
way to define a crypto system for every key
even a key from the key space what we can
do so there must exist so this is the symbol
we use for their exist there exist a encryption
algorithm e k from this encryption space 
and the decryption algorithm from this d k
which is basically reverse of this encryption
process so decryption is basically the reverse
of the encryption process in our example alice
a age was twenty four we are adding something
on twenty four that adding something means
that key a key is twenty six so the key was
twenty six and the encryption is just the
addition so we are adding twenty four plus
twenty six and we are getting the ciphertext
so but decryption is the reverse so and there
exist a decryption algorithm such that such
that ah such that ah if we encrypt a message
we get the c now on that c if we apply this
decryption algorithm we should able to get
back m and this must be true for all m from
the plaintext so that means for a given k
for a given k we choose a k k is typically
chosen by the this ah this is the alice and
bob this is a two ah this is a symmetric crypto
system so alice and bob typically choose a
key k and they decide this is the k key we
are going to use for our communication
so after selecting the k they should able
to have a encryption algorithm alice should
able to choose a encryption algorithm from
this ah set of all possible encryption algorithm
encryption ah algorithm space encryption function
and the corresponding there should exist a
corresponding decryption function such that
this encrypting a message will give us the
ciphertext this is c and if we decrypt the
c it should give us the plaintext and this
e c e k c k this function all should be ah
should be computationally feasible function
i mean it should not be very hard to compute
it should be computationally i 
mean i mean ah feasible that means it should
be polynomial function it shouldn't be a hard
function like n p hard n p complete so it
should be i mean we should able to encrypt
a message that is the idea and you should
able to decrypt the corresponding ciphertext
to get back the message
so this encryption algorithm decryption algorithm
they should be ah i mean communication they
should be computationally feasible it should
not be typically hard problem or something
ok so this is the ah crypto system in the
next class we will talk about some ah conventional
crypto system which are called classical cryptosystem
like shift cipher caesar cipher substitution
cipher
thank you
