upstream: Remove 3 as a guess for possible generator during moduli

generation. It's not mentioned in RFC4419 and it's not possible for
Sophie-Germain primes greater than 5.  bz#2330, from Christian Wittenhorst ,
ok djm@ tb@

OpenBSD-Commit-ID: 1467652e6802ad3333b0959282d8d49dfe22c8cd
This commit is contained in:
dtucker@openbsd.org 2019-01-23 09:49:00 +00:00 committed by Darren Tucker
parent 8976f1c4b2
commit be3e6cba95
1 changed files with 1 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: moduli.c,v 1.33 2019/01/20 02:01:59 tb Exp $ */
/* $OpenBSD: moduli.c,v 1.34 2019/01/23 09:49:00 dtucker Exp $ */
/*
* Copyright 1994 Phil Karn <karn@qualcomm.com>
* Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@ -716,8 +716,6 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted,
if (generator_known == 0) {
if (BN_mod_word(p, 24) == 11)
generator_known = 2;
else if (BN_mod_word(p, 12) == 5)
generator_known = 3;
else {
u_int32_t r = BN_mod_word(p, 10);