Hacker News new | past | comments | ask | show | jobs | submit login
What should be the value of x and y in Diffie Hellman Key Exchange Algorithm?
1 point by shivajikobardan on Aug 31, 2022 | hide | past | favorite
Image is in this site:

https://mathforums.com/proxy.php?image=https%3A%2F%2Flh3.googleusercontent.com%2FAvgI3gcpc9HMbdMuWa_q85P1pvdAqF7ade3fxDY9F3sgu0q4Po8WgkGZB_mrH1vZHrTHh77_RHOeV0ryi3bVGKMOBHcoiky_J6qdb9IWDlvSu8GjmLSaRjhsWGGFvdRQWinKtMsC4G10LfaUD3Aqvtq8qGaDEdc-QKSOH1G7MI7iKtKn_Mwp14BRgQ&hash=525e3bfe383dd96a8a81b353a7ba31c7

I'm not asking it from "will it be secure" point of view, rather I'm asking textbook kind technically correct or not.

But I will post the gist here.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: