What is Cryptography? | Introduction to Cryptography | Cryptography for Beginners | Edureka
Summary
TLDRThis video script by Aria from Eddie Rocca delves into the world of cryptography, a crucial tool for secure communication. It outlines the basics of cryptography, explains its importance in protecting data, and covers various cryptographic classifications including symmetric and asymmetric key cryptography. The script provides a practical demonstration of the RSA algorithm, showcasing how it secures data on platforms like YouTube. It also explores encryption techniques such as transposition and substitution ciphers, stream and block ciphers, and the significance of digital certificates in cybersecurity.
Takeaways
- π Cryptography is essential for securing data and protecting against unauthorized access, identity theft, and tampering.
- π The video session will cover the basics of cryptography, classifications, and a demonstration of the RSA algorithm.
- π£ The example of Andy and Sam illustrates the need for secure communication over public channels like the internet.
- π Cryptography involves converting messages into numeric forms, encrypting them with a key, and then decrypting them with a corresponding key.
- π The process of encryption and decryption is vital to ensure that messages remain private and intact during transmission.
- ππ Cryptography is divided into symmetric key cryptography, which uses the same key for encryption and decryption, and asymmetric key cryptography, which uses a pair of keys.
- ππ Symmetric key cryptography includes classical methods like transposition and substitution ciphers, and modern methods like stream and block ciphers.
- ππ Asymmetric cryptography, or public key cryptography, uses a public key for encryption and a private key for decryption, enhancing security.
- π The RSA algorithm, used widely on the internet, is an example of asymmetric cryptography that relies on the difficulty of factoring large prime numbers.
- π The security of modern cryptography systems, like RSA, depends on keeping the private key secret while the public key can be openly distributed.
- π The strength of public key cryptography systems is based on the computational difficulty of deriving the private key from the public key, ensuring robust security.
Q & A
What is the primary purpose of cryptography?
-The primary purpose of cryptography is to securely protect data and communication from unauthorized access, ensuring the privacy and integrity of information such as corporate secrets, classified information, and personal data.
What is the scenario presented in the video to explain cryptography?
-The scenario involves a person named Andy who wants to send a private message to his friend Sam over the internet. The goal is to secure the message against eavesdroppers and potential tampering by a third party named Eve.
How is the message converted into a numeric form in cryptography?
-The message is first converted into a numeric form, which is then combined with an encryption key using an encryption algorithm to produce a ciphertext that can be securely transmitted.
What is a ciphertext?
-A ciphertext is the result of encrypting a message using an encryption key and an encryption algorithm, transforming the original message into a form that is unreadable without the decryption key.
How does cryptography help secure the connection between Andy and Sam?
-Cryptography helps secure the connection by allowing Andy to convert his readable message into an unreadable form (ciphertext) using a key. This ensures that even if someone intercepts the message, they cannot decipher it without the proper decryption key.
What are the two broad classifications of cryptography mentioned in the script?
-The two broad classifications of cryptography are symmetric key cryptography and asymmetric key cryptography, also known as public key cryptography.
What is symmetric key cryptography?
-Symmetric key cryptography is a type of cryptography where the same cryptographic key is used for both encryption and decryption of the message. This requires the key to be shared between the communicating parties.
What is the difference between a transposition cipher and a substitution cipher?
-A transposition cipher rearranges the positions of the plaintext characters according to a system, while a substitution cipher replaces each plaintext character with another character based on a fixed system or rule.
What is a block cipher and how does it differ from a stream cipher?
-A block cipher is an encryption method that applies a symmetric key to encrypt a fixed-size block of text at once, rather than encrypting one bit at a time as in stream ciphers.
What is asymmetric cryptography and how does it differ from symmetric cryptography?
-Asymmetric cryptography, also known as public key cryptography, uses a pair of keys consisting of a public key (which can be widely distributed) and a private key (which is known only to the owner). This allows for both encryption and authentication, where only the paired private key can decrypt messages encrypted with the public key.
What is the significance of the RSA algorithm mentioned in the script?
-The RSA algorithm is a widely used public key encryption system that is based on the computational difficulty of factoring large prime numbers. It is commonly used for secure data transmission over the internet and is an example of asymmetric cryptography.
Outlines
π Introduction to Cryptography
The video script begins by emphasizing the importance of cryptography for securing data against unauthorized access. It introduces the speaker, Aria from Eddie Rocca, and outlines the topics to be covered, including the definition of cryptography, its classifications, and a demonstration of the RSA algorithm. The script uses a scenario involving a person named Andy who wants to securely send a message to his friend Sam, highlighting the need for secure communication against potential eavesdroppers or tampering by a character named Eve. Cryptography is defined as the practice of securing communication and data in the presence of adversaries, involving the conversion of messages into numeric forms, encryption with a key, and decryption by the intended recipient using a corresponding key.
π Exploring Symmetric and Asymmetric Cryptography
This paragraph delves into the two main types of cryptography: symmetric key cryptography and asymmetric key cryptography. Symmetric key cryptography uses the same key for encryption and decryption, representing a shared secret between parties. The paragraph explains classical and modern symmetric cryptography, including transposition and substitution ciphers, as well as stream and block ciphers. It also introduces the Data Encryption Standard (DES) as a popular symmetric key system. Asymmetric cryptography, also known as public key cryptography, uses a pair of keys, one public and one private, for encryption and authentication. The strength of this system lies in the difficulty of deriving the private key from the public key, allowing the public key to be distributed without compromising security.
π Understanding Cryptography Techniques
The script continues by explaining various cryptographic techniques in detail. It describes transposition ciphers that rearrange the positions of plaintext characters according to a systematic scheme, creating a ciphertext that is a permutation of the original message. Substitution ciphers are also discussed, where each letter of the alphabet is replaced with another letter or symbol according to a fixed system. The paragraph further explains stream ciphers, which encrypt data bit by bit, and block ciphers, which encrypt data in larger chunks. The security and reliability of block ciphers, such as the Advanced Encryption Standard (AES), are highlighted, emphasizing their use in modern cryptography.
π Practical Demonstration of Public Key Encryption
The final paragraph of the script provides a practical demonstration of public key encryption, specifically using the RSA algorithm. It guides viewers on how to view digital certificates on YouTube as an example of public key cryptography in action. The script then walks through the process of generating a public and private key pair, encrypting a message using the public key, and decrypting it with the private key. The RSA algorithm is introduced, explaining the process of key generation, encryption, and decryption. The video concludes by inviting viewers to learn more about RSA and other cryptographic systems, encouraging them to engage with the content through likes, comments, and subscriptions.
Mindmap
Keywords
π‘Cryptography
π‘Encryption Key
π‘Ciphertext
π‘Decryption Key
π‘Symmetric Key Cryptography
π‘Asymmetric Key Cryptography
π‘Transposition Cipher
π‘Substitution Cipher
π‘Stream Cipher
π‘Block Cipher
π‘RSA
Highlights
Cryptography is essential for securing data against unauthorized access, protecting corporate secrets, classified information, and personal data from identity theft.
The session will cover the basics of cryptography, classifications, and a demonstration of the RSA algorithm.
Cryptography secures communication by converting messages into numeric form and applying an encryption key.
The concept of a secure communication channel between Andy and Sam is introduced to illustrate the use of cryptography.
Ciphertext is produced by encrypting the numeric form of a message with an encryption key, ensuring secure transmission.
The importance of keeping encryption and decryption keys secret is emphasized for the security of modern cryptography systems.
Symmetric key cryptography uses the same key for encryption and decryption, representing a shared secret between parties.
Transposition ciphers rearrange the positions of plaintext characters according to a systematic scheme.
Substitution ciphers replace letters or groups of letters with others according to a fixed system or key.
Stream ciphers encrypt data bit by bit using a cryptographic key and algorithm, contrasting with block ciphers.
Block ciphers like AES encrypt fixed-size blocks of text with a key of a predetermined length.
Asymmetric or public key cryptography uses a pair of keys, one public for encryption and one private for decryption.
The security of public key cryptography relies on the computational difficulty of deriving the private key from the public key.
RSA is a widely used encryption algorithm demonstrated through YouTube's digital certificates.
The RSA algorithm involves key pair generation and encryption/decryption processes using large prime numbers.
The strength of RSA encryption is due to the difficulty of factorizing large prime numbers.
The video provides a practical demonstration of public key encryption using an online demo.
The session concludes with an in-depth look at RSA, highlighting its significance and widespread use on the Internet.
Transcripts
[Music]
cryptography is essentially important
because it allows you to securely
protect data that you don't want anyone
else to have access to it is used to
protect corporate secrets secure
classified information and to protect
personal information to guard against
things like identity theft hi guys my
name is aria from Eddie Rocca and I
welcome you all to another session on
cyber security and today's video is
basically going to be about cryptography
now before we actually jump into the
session let me give you guys a brief on
the topics that we're gonna cover today
so first of all we're gonna cover what
is cryptography to the help of a very
simplistic scenario then we are going to
go through the classifications of
cryptography and how the different
classification of algorithm works in the
end I'm going to show you guys a nifty
demo on how a popular algorithm called
RSA actually works so let's get started
now I'm going to take the help of an
example or a scenario to actually
explain what is cryptography all right
so let's say we have a person and let's
call him Andy I suppose Andy sends a
message to his friend Sam who is on the
other side of the world now obviously he
wants this message to be private and
nobody else should have access to the
message now he uses a public forum for
example the internet for sending this
message the goal is to actually secure
this communication and of course we have
to be secure against someone now let's
say there is a smart guy called Eve who
is secretly got access to your
communication channel since this guy has
access to your communication he can do
much more than just eavesdrop for
example he can try to change the message
in itself now this is just a small
example what if Eve actually gets access
to your private information well that
could actually result in a big
catastrophe so how can Andy be sure that
nobody in the middle could access the
message sent to Sam the goal here is to
make communication secure and that's
where cryptography comes in so what
exactly is cryptography well
cryptography is the practice and the
study of techniques for securing
communication and data in the presence
of adversaries so let me take a moment
to explain how that actually happens
well first of all we have a message this
message is firstly converted into a
numeric form
and then this numeric form is applied
with a key called an encryption key and
this encryption key is used in an
encryption algorithm
so once the numeric message and the
encryption key has been applied in an
encryption algorithm what we get is
called a ciphertext now this ciphertext
is sent over the network to the other
side of the world where the other person
whose message is intended for will
actually use a decryption key and use
the ciphertext as a parameter of a
decryption algorithm and then he'll get
what we actually sent as a message and
if some error had actually occurred he'd
get an error so let's see how
cryptography can help secure the
connection between Andy and Sam so to
protect his message Andy first converts
his readable message to an unreadable
form here he converts a message to some
random numbers and after that he uses a
key to encrypt his message after
applying this key to the numerical form
of his message he gets a new value in
cryptography we call this ciphertext so
now if Andy sends the cipher text or
encrypted message over communication
channel he won't have to worry about
somebody in the middle of discovering
the private message even if somebody
manages to discover the message he won't
be able to decrypt the message without
having a proper key to unlock this
message so suppose Eve here discovers
the message and he somehow manages to
tamper with the message and message
finally reaches Sam Sam would need a key
to decrypt the message to recover the
original plaintext so using the key he
would convert a ciphertext to numerical
value corresponding to the plaintext now
after using the key for decryption what
will come out is the original plaintext
message or an arrow now this error is
very important it is the way Sam knows
that message sent by Andy is not the
same as a message that he received so
the error in a sense tells us that Eve
has tampered with the message now the
important thing to note here is that in
modern cryptography the security of the
system purely relies on keeping the
encryption and decryption key secret
based on the type of keys and encryption
algorithms cryptography is classified
under the following categories now
cryptography is broadly classified under
two categories namely symmetric key
cryptography and asymmetric key
cryptography popularly also known as
public
now symmetric key cryptography is
further classified as classical
cryptography and modern cryptography
further drilling down classical
cryptography is divided into two which
is transposition cipher and substitution
cipher on the other hand modern
cryptography is divided into stream
cipher and block cipher in the upcoming
slides I'll broadly explain all these
types of cryptography so let's start
with symmetric key cryptography first so
symmetric key algorithms are algorithms
for cryptography that use the same
cryptographic keys for both encryption
of plaintext and decryption of
ciphertext the keys may be identical but
there may be some simple transformation
to go between the two keys the keys in
practice represent a shared secret
between two or more parties that can be
used to maintain a private information
link this requirement that both parties
have access to the secret key there's no
the main drawbacks of symmetric key
encryption in comparison to publicly
encryption also known as a symmetric key
encryption now symmetric key
cryptography is sometimes also called
secret key cryptography and the most
popular symmetric key system is the data
encryption standards which also stands
for DES next up we're going to discuss
transposition cipher so in cryptography
a transposition cipher is a method of
encryption by which the positions held
by units of plaintext which are commonly
characters or groups of characters are
shifted according to a regular system so
that the ciphertext constitutes a
permutation of the plaintext that is the
order of units is changed the plaintext
is reordered now mathematically speaking
a bijective function is used on the
characters position to encrypt and an
inverse a function to decrypt so as you
can see that there is an example on the
slide so on the plaintext side we have a
message which says meet me after the
party now this has been carefully
arranged in the encryption matrix which
has been divided into six rows and the
columns so next we have a key which is
basically four two one six three five
and then we rearrange by looking at the
plaintext matrix and then we get the
cipher text which basically is some
unreadable gibberish at this moment so
that's how this whole algorithm work
on the other hand when the ciphertext is
being converted into the plaintext the
plaintext matrix is going to be referred
and it can be done very easily going on
we are going to discuss substitution
cipher
so substitution of single letters
separately simple substitution can be
demonstrated by writing out the
alphabets in some order to represent the
substitution this is termed a
substitution alphabet the cipher
alphabet may be shifted or reversed
creating the Caesar and app stash cipher
respectively or scrambled in a more
complex fashion in which case it is
called a mixed alphabet or deranged
alphabet traditionally mixed alphabets
may be created by first writing out
keyboard removing repeated letters in it
then writing all the remaining letters
in the alphabet in the usual order now
consider this example is shown on the
slide using the system we just discussed
the keyword zebra's gives us the
following alphabets from the plaintext
alphabet which is a to C so the
ciphertext alphabet is basically zebras
then followed by all the alphabets we
have missed out in the zebrawood so as
you guys can see it's zebras followed by
SC D F G H and so on now suppose we were
to actually encrypt a message using this
code so as you guys can see on the
screen I've shown you an example which
is a message flee at once we are
discovered is being actually encrypted
using this code so if you guys can see
out here though F letter actually
corresponds to s and then the L letter
actually corresponds to I out here then
we actually get the cipher text which is
s I is that you using the code and the
process that I just discussed now
traditionally the cipher text is written
out in blocks of fixed length omitting
punctuation x' and spaces this is done
to help avoid transmission errors to
disguise the word boundaries from the
plaintext
now these blocks are called groups and
sometimes a group count that is the
number of groups is given as an
additional check now five letter groups
are traditional as you guys can see that
we have also divided our ciphertext into
groups of five and this dates back to
when messages were actually used to be
transmitted by telegraph now if the
length of the message happens not to be
divisible by five it may be padded at
the end with nulls and these can be any
character
that can be decrypted too obvious
nonsense so the receiver can easily spot
them and discard them next on our list
is stream cipher so a stream cipher is a
method of encrypting text to produce
cipher text in which a cryptographic key
and algorithm are applied to each binary
digit in a data stream one bit at a time
this method is not much used in modern
cryptography the main alternative method
is block cipher in which a key and
algorithm are applied to block of data
rather than individual bits in a stream
okay so now that we've spoken about
block cipher let's go and actually
explain what block cipher does a block
cipher is an encryption method that
applies a deterministic algorithm for
the symmetric key to encrypt a block of
text rather than encrypting one bit at a
time as in stream ciphers for example a
common block cipher AES encrypts 128-bit
blocks with a key of predetermined
length that is either 128 192 or 256
bits in length now block ciphers are
pseudo ranbir mutation families that
operate on the fixed size of block of
bits these PRPs are function that cannot
be differentiated from completely random
permutation and thus are considered
reliable I've been proven to be
unreliable by some source ok so now it's
time that we discuss some asymmetric
cryptography so asymmetric cryptography
also known as public key cryptography is
any cryptographic system that uses pair
of keys which is a public key which may
be this emanated widely and private keys
which are known only to the owner this
accomplishes two functions
authentication where the public key
verify is that a holder of the paired
private key sent the message and
encryption where only the paired private
key holder can decrypt the message
encrypted with the public key in a
public key encryption system any person
can encrypt a message using the
receivers public key that encrypted
message can only be decrypted with the
receivers private key so to be practical
the generation of public and private key
pair must be computationally economical
the strength of a public key
cryptography system relies on
computational efforts required to find
the private key from its paired public
key so effective security only requires
keeping the private key private and the
public key can be openly distributed
without compromising security okay so
now that I've actually shown you
hobb cryptography actually works and how
the different classifications are
actually applied let's go and do
something interesting so you guys are
actually watching this video on YouTube
right now so if you guys actually go and
click on the secure part besides the URL
you can actually go and view the digital
certificates that are actually used out
here so click on certificates and you'll
see the details in the details tab now
as you guys can see the signature
algorithm that is used for actually
securing YouTube is being sha-256 with
RSA and RSA is a very very common
encryption algorithm that is used
throughout the internet then the
signature hash algorithm that is being
used is sha-256
and the issuer is Google in Internet
Authority and you can get a lot of
information about sites and all their
authority key identifier their
certificate policy is the key usage and
a lot of thing about security just from
this small little button audio also let
me show you a little how public key
encryption actually works so on the side
which is basically called web start CS
door UTA dot edu you can actually demo
out public key encryption so suppose we
had to send a message first we would
need to generate keys so as you can see
I just click generate keys and it got me
two keys which is one is the public key
which I will distribute or the network
and one the private key which I will
actually keep secret to myself now I
want to send message saying hi there
when is the exam tomorrow so now we are
going to encrypt it using the public key
because that's exactly what's
distributed so now as you can see we
have got our ciphertext so this huge
thing right out here is ciphertext and
it absolutely makes no sense whatsoever
now suppose we were to actually then
decrypt the message we would use the
private key that goes along with our
account and we would decode the message
and as you guys can see voila we have hi
there when is the exam tomorrow so we
have actually sent a message on the
Internet in a very secure fashion above
that there's also RSA that needs some
explaining because our promise at two
now RSA is a very very commonly used
algorithm that is used throughout the
internet and you just saw it being used
by YouTube so it has to be common
so RSA has a very unique way of applying
this algorithm there are many actual
parameters that you actually need to
study okay so now we're actually going
to discuss RSA which is a very popular
algorithm that is used throughout the
internet and you also saw that it's
being used by YouTube right now so this
crypto system is one of the initial
system it remains the most employed
crypto system even today and the system
was invented by three scholars which is
Ron Rivest Adi Shamir and Len Adleman
hence the name RSA and we will see the
two aspects of the RSA cryptosystem
firstly generation of key pair and
secondly encryption decryption
algorithms so each person or a party who
desires to participate in communication
using encryption needs to generate a
pair of keys namely public key and
private key so the process followed in
the generation of keys is as follows
first we have to actually calculate n
now n is actually given by multiplying p
and q as you guys can see out here so p
and q are supposed to be very large
prime numbers so out here P will be 35
but for some very strong encryption we
are going to choose very large prime
numbers then we actually have to
calculate Phi now Phi is you can see the
formula goes is P minus 1 into Q minus 1
and this helps us determine for the
encryption algorithm now then we have to
actually calculate e now he must be
greater than 1 and less than Phi which
is P minus 1 into Q minus 1 and there
must be no common factors for e and Phi
except for one so in other words they
must be co-prime to each other now to
form the public key the pair of numbers
m and e form the RSA public key system
this is actually made public and is
distributed throughout the network
interestingly though
n is a part of the public key and the
difficulty in factorizing a large prime
number ensures that the attacker cannot
find in finite time the two Prime's that
is P and Q that is used to obtain M this
actually ensures the strength of RSA now
in the generation of the private key the
private key D is calculated from P Q and
for a given n and E there is a unique
number D now the number D is the inverse
of e modulo 5
this means that D is the number less
than Phi such that when multiplied by e
it gives 1 so let's go and actually fill
up these numbers so n should be 35 out
here and if we generate them we get the
value of 5 which is 24 which is
basically 4 into 6 and then we should
also get e it's now it should be
co-prime so we are going to give it 11
as 11 is co-prime to both so now for the
actual encryption part we have to put in
E and n out here so e out here for us is
11 and n is 35 and then we're gonna pick
a letter to actually cipher which is a
and then we are going to encode it as a
number so as you guys can see we've
encoded as 1 and out here now after
we've given the message its numerical
form you click on encryption and we get
it now to actually decrypt the message
we are gonna need D and n now D for us
was 5 and n was 35 so 5 and 35 and then
we're gonna take encrypted message from
above and we're going to decrypt this
message so after you decrypt it we have
the numerical form of the plaintext and
then decode the message is like your
decode message and as you guys can see
we have decoded a message using RSA so
guys that's how RSA works I explain all
the factors that we actually use an RSA
from n 2 v 2e e 2 D and I hope you
understood a part of it if y'all are
still more interested you all can
actually research a lot on RSA it's a
very in-depth cryptography system and
also that brings us to the end of this
session I hope you guys had fun learning
about cryptography and the different
methods that are actually used on the
Internet that's it for me goodbye
I hope you have enjoyed listening to
this video please be kind enough to like
it and you can comment any of your
doubts and queries and we will reply
them at the earliest do look out for
more videos in our playlist and
subscribe to any rekha channel to learn
more happy learning
5.0 / 5 (0 votes)