On Tue, Mar 19, 2002 at 08:40:18AM +0000, Jason Holt wrote:

> I've added the general form of generator checking to crypto/dh/dh_gen.c and
> fixed the uninitialized t1,t2 bug.  It compiles, but I haven't really tested
> it.  What I have so far is at:
> 
> http://www.lunkwill.org/dh_gen.c

I had not seen this message when I replied to the previous one.  As
this time I'm replying to the list and not via private mail, here's my
previous response:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Thanks.  I now set t1 to 2 and t2 to 1 for 'non-standard' generators;
i.e., any odd number is acceptable.  I suppose this is the fix you had
in mind?

But the example call in dhtest.c indicates that you are not really
supposed to call DH_generate_parameters with some integer as
'generator' argument -- instead, DH_GENERATOR_2 or DH_GENERATOR_5 can
be used (these macros evaluate directly to 2 and 5, respectively, and
no other DH_GENERATOR_... macros are defined).
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


Actually the existing code is rather pointless.  There is no reason to
insist to use a generator of the multiplicative group.  A generator of
the order-q subgroup is, in some sense, better.  So I suggest to keep
the current behaviour for cases 2 and 5 (mostly for backwards
compatibility), and not to worry whether the number is a generator
otherwise.  -- We should report an error for negative generators and
for 0 and 1, though.



-- 
Bodo M�ller <[EMAIL PROTECTED]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to