DES Attack à
man in the middle attack
Sender …DES encrypted
message + key by hacker ….Receiver
IDEA àInternational
Data Encryption Standard (Commercial Version)
Input : 128 bits
Key :
128 bits
Output: 128 bits
To get down encryption
it take 8 rounds
For doing email
encryption is using PGPà Pretty good privacy
RC-5 à
Rivest Cipher / Smart Card
AES à
Advanced Encryption Standard
Input : 128 bits or 256
bits
Key: 128 bits or 256
bits
Output : 128 bits or
256 bits
Week 4 Day 5 –
ITEC Programme
AXCRYPTà
Encryptionà
EAS
For Securing key exchange there is save way to
do it using Diffie Hellman Key Exchange or Agreement.
Sender ------à------
Receiver
Step 1 : 1st
sender & receiver agree upon two large prime numbers
Step 2 : Sender choses
another large random number.
Ex : it is X
Such that sender
calculate A=
g x mod n
Step 3 : This A is sent
to receiver
Step 4 : At the
receiver end, receiver also chooses large random number that is suppose Y
And calculate B such
that B= g y
mod n
Step 5 : Receiver sends
B to sender
Step 6 : Sender
calculates the key as K1= B x mod n
Step 7 : Receiver calculates the key as K2=A y mod n so K=K1=K2
Example
Step 1 : Let n=11 g=7
Step 2 : ender chooses x suppose
x =3
Step 3 : A=g x mod n
=7 3 mod 11
= 2
Step 4 : suppose y= 6 and B =4
B = g y mod
n
= 7 6
mod 11
= 4
Step 5 : B will be sent to sender
Step 6 : Sender calculates key value
K1 = B x
mod n
= 4 3
mod 11
= 9
Step 7 : Receiver end calculate key value
K2 = A y
mod n
= 26
mod 11
= 9
K = k 1 = k
2
Assymetric Key
Assymetric Keyà Same Key (Encryption & Decryption)
Assymetric Key à Public Key (Known to all) and Private key (Remind private or an
individual)
Public Key à Encryption, Private Key à Decryption
But if the aim is authentication
Private Key à Encryption, Public Key à Decryption
RSA Algorithm
Working of RSA
Step 1 : Change two large prime numbers , suppose P & Q
Step 2 : Calculate N= P.Q
Step 3 : Select the public key E such that it shared not be the factor
of (p-1) (q-1)
Step 4 : Encryption is given by
C= (PT) E
mod n
Where C =Cipher text
PT = Plain text
E = Public key
N = P.Q
Step 5 : The private key D should be chosen by receiver such that
(D.E) mod
(P-1).(Q-1) = 1
Step 6 : Decryption
PT = C D
mod n
D = Private key
C = Cipher text
PT=
Plain text
Example :
Step 1 : suppose P=7 Q = 17
Step 2 : n = p. q
= 7 . 17
= 119
Step 3 : E such that (p-1) (q-1)
(p-1) (q-1) = 6.16
= 96
Suppose E= 5 bcoz
6=1,2,3,6 (6 can be devided by numbers written beside)
And 16 (1,2,4,8,16)
/prime #. So choose which is not there.
Step 4 : C=(PT) E mod N
= (10) 5 mod 119
= 40
Step 5 : (D.E) mod (P-1) . (Q-1) =1
(D.5) mod 96 = 1
To figure out D à 96 . 4
= 384 + 1 = 385 / 5 = 77
(D.5) mod 96 = 1
(77.5) mod 97 = 1
Step 6 : Decryption
PT = C D mod n
= 40 77
mod 119
= 10
No comments:
Post a Comment