Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 6

Types of keys used for encryption/decryption

SYMMETRIC KEY ASYMMETRIC KEY


Same key is used for Different key is used for
encryption and decryption encryption and decryption

It is public key infrastructure where two users agree on same public key and
calculate the key required for encryption /decryption using their private key.
A key

Encrypted content

ATTACKER
B
What is Diffie-Hellman?
• It is algorithm for key exchange.
• It is a method of securely exchanging
cryptographic keys over a public channel.
• It was first published by Whitfield Diffie and
Martin Hellman in 1976.
Steps
• Alice and Bob agree on two large prime numbers N and
G(these two integers need not to be kept secret)
• Alice selects another large random number X which is
secret and calculates A=g^(x)mod n
• Bob selects another large random number Y which is
secret and calculates B=g^(y)mod n
• Alice sends A to Bob and Bob sends B to alice.
• Alice now calculates secret key K1=B^(x)mod n
• Bob calculates his secret key k2=A^(y)mod n
• Both k1 and k2 are surprisingly same
ALICE PUBLIC ROUTE BOB

B Y R

B+Y R+Y

R+Y B+Y

B+R+Y B+R+Y
ALICE PUBLIC ROUTE BOB

a g=small prime number b


n =big number

g^(a)mod n g^(b)mod n

g^(b)mod n g^(a)mod n

g^(b)^(a)mod n g^(a)^(b)mod n

g^(ab)mod n g^(ab)mod n

You might also like