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

Diff for /src/usr.bin/ssh/dh.c between version 1.23.2.2 and 1.24

version 1.23.2.2, 2004/03/04 18:18:15 version 1.24, 2003/04/08 20:21:28
Line 198 
Line 198 
   
         if (dh->p == NULL)          if (dh->p == NULL)
                 fatal("dh_gen_key: dh->p == NULL");                  fatal("dh_gen_key: dh->p == NULL");
         if (need > INT_MAX / 2 || 2 * need >= BN_num_bits(dh->p))          if (2*need >= BN_num_bits(dh->p))
                 fatal("dh_gen_key: group too small: %d (2*need %d)",                  fatal("dh_gen_key: group too small: %d (2*need %d)",
                     BN_num_bits(dh->p), 2*need);                      BN_num_bits(dh->p), 2*need);
         do {          do {
Line 279 
Line 279 
 dh_estimate(int bits)  dh_estimate(int bits)
 {  {
   
         if (bits <= 128)          if (bits < 64)
                   return (512);   /* O(2**63) */
           if (bits < 128)
                 return (1024);  /* O(2**86) */                  return (1024);  /* O(2**86) */
         if (bits <= 192)          if (bits < 192)
                 return (2048);  /* O(2**116) */                  return (2048);  /* O(2**116) */
         return (4096);          /* O(2**156) */          return (4096);          /* O(2**156) */
 }  }

Legend:
Removed from v.1.23.2.2  
changed lines
  Added in v.1.24