Diffie-Helman example in g++

Matthew Gream mgream at acacia.itd.uts.edu.au
Fri Oct 8 19:15:48 PDT 1993



Earlier, Douglas Barnes wrote:

> // Demo of mathematics for Diffie-Hellman type key exchange
[..]
> // Does anyone have a clue what good values of 'a' are in this
> // algorithm?
> 
> a = 127;

The only restriction placed on /a/ is that it be a primitive root of
/p/. To do this, you choose /a/ at random until you find the condition
(/a/, /p/-1) == 1 is satisfied. Since there are lots of primitive roots,
this shouldn't take long. I wonder though, are there any strengths in
choosing higher values of /a/?

Feel free to correct me if I'm wrong, my engineering background means
my number theory isn't as strong as it could be (but I'm working on it
:-).

Matthew.
-- 
Matthew Gream, M.Gream at uts.edu.au. "... encryption is the ultimate means of
Consent Technologies, 02-821-2043.  protection against an Orwellian state."






More information about the cypherpunks-legacy mailing list