diff options
author | Damien Miller <djm@mindrot.org> | 2003-12-17 16:33:53 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-12-17 16:33:53 +1100 |
commit | 8975ddf11b17bf58191c653a0173d91e50e942c7 (patch) | |
tree | 3625ddd71ec3d86f289d4a06fea8378c044b6bff /dh.c | |
parent | 509b0107f0e67cb4af663c147179d35fa6425614 (diff) | |
download | openssh-git-8975ddf11b17bf58191c653a0173d91e50e942c7.tar.gz |
- markus@cvs.openbsd.org 2003/12/16 15:51:54
[dh.c]
use <= instead of < in dh_estimate; ok provos/hshoexer;
do not return < DH_GRP_MIN
Diffstat (limited to 'dh.c')
-rw-r--r-- | dh.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: dh.c,v 1.25 2003/09/18 13:02:21 miod Exp $"); +RCSID("$OpenBSD: dh.c,v 1.26 2003/12/16 15:51:54 markus Exp $"); #include "xmalloc.h" @@ -279,11 +279,9 @@ int dh_estimate(int bits) { - if (bits < 64) - return (512); /* O(2**63) */ - if (bits < 128) + if (bits <= 128) return (1024); /* O(2**86) */ - if (bits < 192) + if (bits <= 192) return (2048); /* O(2**116) */ return (4096); /* O(2**156) */ } |