Professional Documents
Culture Documents
Cryptography
Submitted By—
Vartika Bajpai (26057)
Brijesh Kumar Gupta(26058)
• Cryptography Authentication :
Types of Ciphers
Substitution Cipher : In this cipher , each letter or a group of
letters is replaced by another letter or group of letters.
These are of two types-
Monoalphabetic Cipher : In this cipher , character in the
plain text is always changed to the same character in the
cipher text regardless of the position in the text.
-For Example:
Plaintext : HELLO
Ciphertext : K H O O R
Polyalphabetic Cipher : In this cipher , each occurrence of
a character can have a different substitute.
-For Example:
Plaintext : HELLO
Ciphertext : A B N Z F
Transposition Cipher : In this cipher, there is no
substitution of the characters instead their locations change.
In other words , it reorders the symbol in a block of symbols.
- For Example : The MEGABUCK is the key.
Plaintext : please transfer one million dollar to.
MEGABUCK
7 4 5 1 2 8 3 6
p l e a s e t r
a ns f e r o n
e m i l l i o n
d o l l a r t o
Ciphertext : afllselatootlnmoesilrnnopaederir
Cryptographic Techniques
Two types of Cryptographic Techniques :
Original
Plaintext Ciphertext Plaintext
Encryption Decryption
Original
Plaintext Ciphertext Plaintext
Encryption Decryption
ot 3: r edoc e D
ot 8: r edoc n E
DES : Overview
It takes 64 bits input plaintext
at a time gives 64 bit
output INITIAL PERMUTATION
Initial permutation ROUND 1
rearranges 64 bits (no
cryptographic effect) ROUND 2
Encoding is in 16 ...
rounds
ROUND 16
INITIAL PERMUTATION-1
ciphertext
DES : Encryption Round
64 bits divided into
left, right halves. Li-1 Ri-1
Right half goes
through function f,
mixed with key.
⊕ f
Right half added to
left half.
Halves swapped
(except in last round)
Li Ri
DES Function
Expand right side from Ri-1
32 to 48 bits (some
get reused)
Expansion
Add 48 bits of key
(chosen by schedule)
⊕ Ki
S-boxes: each set of 6
bits reduced to 4 Eight S-boxes
P-box permutes 32
bits P-box
Output
DES :Decryption Round
Equations for round i:
Li-1 Ri-1
Li =R i−1
Ri = Li −1 ⊕ f (Ri −1 )
In other words:
⊕ f
Ri −1 = Li
Li −1 = Ri ⊕ f (Li )
So decryption is the
same as encryption
Last round, no swap: Li Ri
really is the same
Insecurity In DES
The key in DES is too short that it can be broken into
2^n time if it has n bit of key.
Why not 2-DES?
In public key cryptography, the data that is encrypted with the public
key can only be decrypted with the corresponding private key and vice
versa. Due to this asymmetry public key cryptography is known as
asymmetric cryptography.
The public key cryptography solves one of the most vexing problems of
all prior cryptography the necessity of establishing a secure
channel for the exchange of the key.
For example:-
An analogy to Public Key Encryption is that of a locked mailbox and
mail slot. Mailslot is accessible to public but mailbox can be opened by
one who has the Key to it.
Public Key Algorithm
The Encryption algorithm, E and the decryption
algorithm, D has to meet three requirements which are as
follows :
D(E(P))=P;
S 19 6859 28 134929285 19 S
12
U 21 9261 21 180108854 21 U
1
Z 26 17576 20 128000000 26 Z
0
A 01 1 1 1 01 A
N 14 5 5 78125 14 N
N 14 5 5 78125 14 N
E 05 26 26 803180176 05 E
RSA ISSUES
RSA is computationally intense.
Commonly used key lengths are 512 bits.
The plain text should be smaller than the key length.
The encrypted text is same size as the key length.
Generally used to encrypt secret keys.
Basis: Factoring a big number is hard.
Digital Signature
A digital signature or digital signature scheme is a
mathematical scheme for demonstrating the authenticity of
a digital message or document. A valid digital signature
gives a recipient reason to believe that the message was
created by a known sender, and that it was not altered in
transit.
s=m^d mod n.
Sends this signature s to the recipient, B.
Signature verification:
Recipient B does the following:-