Diffie Hellman Key Exchange Algorithm? (x,y value)

Click For Summary
SUMMARY

The discussion centers on the Diffie-Hellman Key Exchange algorithm, specifically addressing the correctness of the implementation with parameters p=23, g=5, x=4, and y=5. The participants confirm that the algorithm produces a valid secret key of 12, validating its functionality. It is established that x and y should be random integers within the range of 1 to p, and the mathematical proof for the algorithm's correctness is provided through the equivalence of A^y mod p and B^x mod p.

PREREQUISITES
  • Understanding of Diffie-Hellman Key Exchange principles
  • Familiarity with modular arithmetic
  • Knowledge of cryptographic algorithms
  • Basic programming skills to implement the algorithm
NEXT STEPS
  • Study the mathematical proof of Diffie-Hellman Key Exchange
  • Implement the Diffie-Hellman algorithm in Python
  • Explore security implications of using small prime numbers in cryptography
  • Learn about variations of the Diffie-Hellman algorithm, such as Ephemeral Diffie-Hellman
USEFUL FOR

Cryptographers, software developers, and security analysts interested in understanding and implementing secure key exchange methods.

shivajikobardan
Messages
637
Reaction score
54
Homework Statement
What should be the value of x and y in Diffie Hellman Key Exchange Algorithm?
Relevant Equations
Diffie-Hellman Key Exchange Algorithm
I'm not asking it from "will it be secure" point of view, rather I'm asking textbook kind technically correct or not.

This is the algorithm (in the 3rd step of right figure, it should be generate y, typo)
4G10LfaUD3Aqvtq8qGaDEdc-QKSOH1G7MI7iKtKn_Mwp14BRgQ.png

I took p=23,g=5.
And picked x=4,y=5
I got the secret key as 12 and both got 12, so it looks like the algorithm worked. But were there any restrictions and if this was a fluke?

What I'm aware?
x,y should be random. And x,y range from 1 to p.
 
Physics news on Phys.org

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
2
Views
2K
Replies
18
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K