dh_kcdsagen: Generate cofactor first.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 11 Feb 2006 23:55:26 +0000 (23:55 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Feb 2006 23:55:26 +0000 (23:55 +0000)
commit23aec1b481c71cff5872450f99ef2c65f5bda5af
tree5a75e49989aa2047a5d7486619c7f83252070365
parent4e67e30be6dbcc7d4f23be754b67bf7c6a0ade92
dh_kcdsagen: Generate cofactor first.

Reorganize the parameter generation so that we generate the cofactor
%$v = (p - 1)/2 q$% first, on its own, and then run a simultaneous
primality search to find %$q$% and %$p$%.  Because %$q$%-sized primes
are (usually) much more common than %$p$%-sized primes, this makes the
search go considerably faster -- though it seems to print many more
dots.
dh-kcdsa.c