diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-16 15:51:55 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-16 15:51:55 +0000 |
commit | cee3a9ff67c9c8f19f7cee241d9712e2ee7d9ed1 (patch) | |
tree | 6ceaf3d491696cd6ec15f72fcd755ac4ba53b732 /usr.bin/ssh/dh.c | |
parent | 658fe8285793280d65d8e33e4e04d39dcaae653b (diff) |
use <= instead of < in dh_estimate; ok provos/hshoexer; do not return < DH_GRP_MIN
Diffstat (limited to 'usr.bin/ssh/dh.c')
-rw-r--r-- | usr.bin/ssh/dh.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c index c924efee0d1..c7a3e18be82 100644 --- a/usr.bin/ssh/dh.c +++ b/usr.bin/ssh/dh.c @@ -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) */ } |