0% found this document useful (0 votes)
13 views

Report

Uploaded by

Lama Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Report

Uploaded by

Lama Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Diffie-Hellman

1- Alice, Bob and Carol want to use a shared secret key for symmetric encryption:
a) Steps for Three-Party Diffie-Hellman Key Exchange
Initialization: three parties Alice, Bob, and Carol agree on prime n and generator
g assuming all participants already know the generator g and the modulus n.
1. Generation of secrets (private keys):

 Alice selects random number a and sets A=g amod n.

 Bob selects random number b and sets b=gb mod n.

 Carol selects random number c and sets c=g cmod n.

2. First Exchange:
 Alice sends A to Bob.
 Bob sends B to Carol.
 Carol sends C to Alice.
3. Partial Key Computations:
Each participant combines their own private key with the received
values:

 Alice computes AC= ga c mod n. and sends AC to Bob.

 Bob computes BA= gb a mod n. and sends BA to Carol.

 Carol computes CB= gc bmod n. and sends CB to Alice.

4. Final Shared Secret Computation:


Now each participant can compute the shared key by combining the
values received in Step 3:

 Alice computes K=(CB )a mod n.

 Bob computes K=( AC )b mod n.

 Carol computes k=( BA)c mod n.

Each of these calculations results in the same shared secret K= gabc mod n, which
all three participants can now use as the shared symmetric key.
a) Compare the Diffie-Hellman key exchange with an RSA key exchange for n
parties:

1. Public Parameters: both RSA and DH RSA use the public-key encryption algorithm,
DH uses shared generator and modulus. RSA only individual public keys needed.
2. Message Complexity: For n participants, in DH the number of messages required to
establish a shared secret grows as O(n). In RSA, each party can encrypt a random
symmetric key with every other participant’s public key and each participant then
shares their encrypted key with the others, requiring also O(n) messages in total.
However, Diffie-Hellman may require more coordination and intermediate values.
3. Forward Secrecy: RSA doesn’t provide perfect forward secrecy, that is, if the private
key is leaked in RSA, then that key could be used by an attacker not only to decrypt
future messages using it but also to decrypt past encrypted traffic which relied on that
key-pair. This is because the key pair is static, as it’s also used for server
authentication and cannot be changed every time. Diffie-Hellman provides forward
secrecy, as it uses a different key for each session.

You might also like