Hacker News new | ask | show | jobs
by andyjohnson0 1881 days ago
What is g here?
2 comments

Unfortunately I had to check it as well, and g seems to be a generating element of a finite cyclic group G

https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exc...

Diffie Hellman Key Exchange is performed over a cyclic group. That's just a large set of elements that wrap back around to each other. So for example the integers mod 7 is {0, 1, 2, 3, 4, 5, 6}. A generator for this group is any element that you can continuously add to generate the whole group, for example: 1.

In the case of DH, g is some such element.