You are on page 1of 17

Example: A message encrypted during second world war

found in recent past


Pigeon bones with
encrypted message found in
chimney
Cryptography
• Cryptography is a method of using advanced mathematical
principles in storing and transmitting data in a particular
form so that only those whom it is intended can read and
process it.
•  Encryption is a key concept in cryptography – It is a process
whereby a message is encoded in a format that cannot be
read or understood by an eavesdropper. 
SYMMETRIC AND
ASYMMETRIC ENCRYPTION
Symmetric and Asymmetric Encryption
Symmetric Encryption Asymmetric Encryption
(Secret Key) (Public Key)

1. Sender and receiver use same 1. Different keys are used to


key to encrypt and decrypt a encrypt and decrypt a message.
message which is kept secret These dual keys are called
2. It is fast ‘public’ and ‘private’ keys.
3. It produces compact cipher 2. It is slow
text 3. It produces large cipher text
4. Key distribution is a problem. 4. Key distribution is easy.
5. Symmetric encryption 5. Asymmetric encryption
algorithms: DES, 3DES, AES, algorithms: RSA, Deffie-
Blowfish, Twofish, IDEA, RC4 Hellman, Elliptic Curve
etc. Cryptosystem, ElGamal,
Knapsack etc.
Symmetric and Asymmetric Encryption

• Symmetric encryption ( private key)


• https://
www.youtube.com/watch?v=vk3py9M2IfE&list=PLSNNzog
5eyduN6o4e6AKFHekbH5-37BdV

Asymmetric encryption ( public key)


• https://
www.youtube.com/watch?v=8I7BNgD2Yag&list=PLSNNzog
5eyduN6o4e6AKFHekbH5-37BdV
Private
Key
Difference: Symmetric and Asymmetric Encryption
• Symmetric encryption uses a single key that needs to be shared
among the people who need to receive the message while
asymmetrical encryption uses a pair of public key and a private
key to encrypt and decrypt messages when communicating.
• Symmetric encryption is an old technique while asymmetric
encryption is relatively new.
• Asymmetric encryption was introduced to complement the
inherent problem of the need to share the key in symmetrical
encryption model, eliminating the need to share the key by
using a pair of public-private keys.
• Asymmetric encryption takes relatively more time than the
symmetric encryption.
Ways in which plain text is processed
• Block cipher processes • Stream cipher does not break input into
the input one block of blocks, instead take one character of the
elements at a time, message at a time.
producing an output • A key is given to the algorithm to create a
block for each input random stream of bits.
block. • These bits are XORed with the plaintext
to create cipher text.
Encryption
Key Plain Text

Block of Encryption Block of Random


plaintext Process ciphertext
Key Algorithm
Stream of bits ⊕ XOR

Cipher
Text
Plain text 1 0 1 1 0 0 0 1
Random stream
of bits
0 1 1 0 1 1 0 1
Cipher 1 1 0 1 1 1 0 1
(by XOR operation)
HASH FUNCTIONS
Hash Functions
• Hash function accepts variable-length string (or message) and
generates a fixed length hash value (or message digest).
• Usually no key is involved
• No confidentiality is provided because nothing is getting encrypted.
• Hashing employ one-way functions
• Message cannot be generated from message digest (MD)
• Creating two identical hash values should be computationally
infeasible.
How Hash Functions Work?
• How hash functions works?
• https://www.youtube.com/watch?v=xsp--srKWKw&list=PL
SNNzog5eyduN6o4e6AKFHekbH5-37BdV&index=3
DIGITAL SIGNATURES
Digital Signature
Digital Signature
• https://www.youtube.com/watch?v=TmA2QWSLSPg

• A digital signature is a hash value that is encrypted with the


sender’s private key.
• If sender wants to ensure that the message he sends to
receiver is not modified (i.e. integrity) and he wants her to
be sure it came only from him (i.e authenticity), he can
digitally sign the message.
Digital Signature
Working
• Sender computes hash value of message (or data) and
encrypt this has value with his private key. He sends both
of these items to the receiver.
• When receiver receives the message, she will perform the
hashing function on the message and come up with her
own hash value. Then she will decrypt the sent hash value
(digital signature) with sender’s public key. She then
compares the two values, and if they are the same, she can
be sure the message was not altered during transmission.
She is also sure the message came from sender because
the value was encrypted with his private key.
Digital Signature
Services
• The hashing function ensures the integrity of the
message, and the signing of the hash value provides
authentication and nonrepudiation.
Security Services
• We need to be clear on all the available choices within
cryptography, because different steps and algorithms
provide different types of security services:

Cryptographic operation(s) used Security Service(s)


Encryption Confidentiality
Hashing Integrity
Digital Signature Authentication, non-repudiation,
and integrity
Encryption and Digital Signature Confidentiality, authentication, non-
repudiation, and integrity

You might also like