diff options
Diffstat (limited to 'dh.h')
-rw-r--r-- | dh.h | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: dh.h,v 1.12 2015/01/19 20:16:15 markus Exp $ */ +/* $OpenBSD: dh.h,v 1.18 2019/09/06 05:23:55 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. @@ -26,6 +26,8 @@ #ifndef DH_H #define DH_H +#ifdef WITH_OPENSSL + struct dhgroup { int size; BIGNUM *g; @@ -37,14 +39,20 @@ DH *dh_new_group_asc(const char *, const char *); DH *dh_new_group(BIGNUM *, BIGNUM *); DH *dh_new_group1(void); DH *dh_new_group14(void); +DH *dh_new_group16(void); +DH *dh_new_group18(void); +DH *dh_new_group_fallback(int); int dh_gen_key(DH *, int); -int dh_pub_is_valid(DH *, BIGNUM *); +int dh_pub_is_valid(const DH *, const BIGNUM *); u_int dh_estimate(int); -/* Min and max values from RFC4419. */ -#define DH_GRP_MIN 1024 +/* + * Max value from RFC4419. + * Min value from RFC8270. + */ +#define DH_GRP_MIN 2048 #define DH_GRP_MAX 8192 /* @@ -70,5 +78,6 @@ u_int dh_estimate(int); #define MODULI_TESTS_JACOBI (0x08) #define MODULI_TESTS_ELLIPTIC (0x10) +#endif /* WITH_OPENSSL */ -#endif +#endif /* DH_H */ |