[BACK]Return to moduli.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/moduli.c between version 1.21 and 1.22

version 1.21, 2008/06/26 09:19:40 version 1.22, 2010/11/10 01:33:07
Line 598 
Line 598 
                  * that p is also prime. A single pass will weed out the                   * that p is also prime. A single pass will weed out the
                  * vast majority of composite q's.                   * vast majority of composite q's.
                  */                   */
                 if (BN_is_prime(q, 1, NULL, ctx, NULL) <= 0) {                  if (BN_is_prime_ex(q, 1, ctx, NULL) <= 0) {
                         debug("%10u: q failed first possible prime test",                          debug("%10u: q failed first possible prime test",
                             count_in);                              count_in);
                         continue;                          continue;
Line 611 
Line 611 
                  * will show up on the first Rabin-Miller iteration so it                   * will show up on the first Rabin-Miller iteration so it
                  * doesn't hurt to specify a high iteration count.                   * doesn't hurt to specify a high iteration count.
                  */                   */
                 if (!BN_is_prime(p, trials, NULL, ctx, NULL)) {                  if (!BN_is_prime_ex(p, trials, ctx, NULL)) {
                         debug("%10u: p is not prime", count_in);                          debug("%10u: p is not prime", count_in);
                         continue;                          continue;
                 }                  }
                 debug("%10u: p is almost certainly prime", count_in);                  debug("%10u: p is almost certainly prime", count_in);
   
                 /* recheck q more rigorously */                  /* recheck q more rigorously */
                 if (!BN_is_prime(q, trials - 1, NULL, ctx, NULL)) {                  if (!BN_is_prime_ex(q, trials - 1, ctx, NULL)) {
                         debug("%10u: q is not prime", count_in);                          debug("%10u: q is not prime", count_in);
                         continue;                          continue;
                 }                  }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22