












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Short review
Source: https://www.edureka.co/blog/what-is-cryptography/
Diffie-Hellman algorithm
Description
Description The simplest, and original, implementation of the protocol uses the multiplicative group of integers modulo p , where p is prime and g is primitive root mod p. OBS. primitive root calculator: https://www.mathcelebrity.com/primitiveroot.php
Description
Secret Public Calculus Calculus Public Secret p,g p,g x z gx^ (mod p) gz^ (mod p) (gx^ )z(mod p) (gz^ )x(mod p)
EXAMPLE Let’s take a simple example that outlines the idea behind the protocol. AGENT Z want to send a message to you’re his friend AGENT X. However, you don’t want anyone apart from AGENT X to know what the contents of the message are. You’re using the Caesar cipher, a simple encryption technique in which each letter in your address is replaced by a letter that is a fixed number of positions down in the alphabet. This fixed number of positions is the shared key — if AGENT X has this key, she can decrypt your message.
EXAMPLE
(g x mod p) z mod p = g xz mod p*
What does this imply? (g x mod p) z mod p = (g z mod p) x =g xz mod p =g zx mod p** a and b are individual secrets, but the final result is a shared secret.
= 4 , then log of 4 to base 2 , is 2 ). The discrete logarithm is very close to this logarithm. (e. g. if we compute 4 ² mod 3 which is 1 , how do we find the value 1 , the shared ‘secret’-, if we only knew the values of 4 and 3 )
EXERCISE
Known Unknown Known Unknown Known Unknown p=31 p=31 p= g=11 g=11 g= a=6 b b=12 a a,b A = 11^6 mod 31= 4
11^12 mod 31= 16
Sharedkey= B a^ mod p Sharedkey= A b^ mod p Sharedkey= 16^6 mod 31=
Sharedkey= 4^12 mod 31=
EXERCISE 2
Known Unknown Known Unknown Known Unknown p=541? p=541??? g=2? g=2??? a=292? b=426??? ?????? Result?? Result????
EXERCISE
EXERCISE
Step 1 : Alex and Thomas get public numbers P = 11 , G = 2 Step 2 : Alex selected a private key a = 8 and Thomas selected a private key b = 4 Step 3 : Alex and Thomas compute public values Step 4 : Alex and Thomas exchange public numbers Step 5 : Alex and Thomas receives public key Step 6 : Alex and Thomas compute symmetric keys Step 7 : Shared key value.
The value of P :? The value of G :? The private key a for Alex : … The private key b for Thomas : … Secret key for the Alex is : … Secret Key for the Thomas is : …