Commit bf3d6c0c authored by Ben Laurie's avatar Ben Laurie
Browse files

Make D-H safer, include well-known primes.

parent b8e8ccdc
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 OpenSSL CHANGES
 _______________

 Changes between 0.9.8 and 0.9.9  [xx XXX xxxx]
 Changes between 0.9.8a and 0.9.9  [xx XXX xxxx]

  *) Support for PKCS#1 RSAPublicKey format on rsa utility command line.
     [Steve Henson]
@@ -27,6 +27,12 @@

 Changes between 0.9.8 and 0.9.8a  [XX xxx XXXX]

  *) Avoid small subgroup attacks in Diffie-Hellman.
     [Nick Mathewson and Ben Laurie]

  *) Add functions for well-known primes.
     [Nick Mathewson]

  *) Extended Windows CE support.
     [Satoshi Nakamura and Andy Polyakov]
 
+1 −0
Original line number Diff line number Diff line
@@ -1040,6 +1040,7 @@ void ERR_load_ASN1_strings(void);
#define ASN1_F_ASN1_MBSTRING_NCOPY			 122
#define ASN1_F_ASN1_OBJECT_NEW				 123
#define ASN1_F_ASN1_PACK_STRING				 124
#define ASN1_F_ASN1_PCTX_NEW				 205
#define ASN1_F_ASN1_PKCS5_PBE_SET			 125
#define ASN1_F_ASN1_SEQ_PACK				 126
#define ASN1_F_ASN1_SEQ_UNPACK				 127
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
{ERR_FUNC(ASN1_F_ASN1_MBSTRING_NCOPY),	"ASN1_mbstring_ncopy"},
{ERR_FUNC(ASN1_F_ASN1_OBJECT_NEW),	"ASN1_OBJECT_new"},
{ERR_FUNC(ASN1_F_ASN1_PACK_STRING),	"ASN1_pack_string"},
{ERR_FUNC(ASN1_F_ASN1_PCTX_NEW),	"ASN1_PCTX_NEW"},
{ERR_FUNC(ASN1_F_ASN1_PKCS5_PBE_SET),	"ASN1_PKCS5_PBE_SET"},
{ERR_FUNC(ASN1_F_ASN1_SEQ_PACK),	"ASN1_seq_pack"},
{ERR_FUNC(ASN1_F_ASN1_SEQ_UNPACK),	"ASN1_seq_unpack"},
+2 −2
Original line number Diff line number Diff line
@@ -28,13 +28,13 @@ LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
	bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
	bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
	bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
	bn_depr.c
	bn_depr.c bn_const.c

LIBOBJ=	bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
	bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
	bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
	bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \
	bn_depr.o
	bn_depr.o bn_const.o

SRC= $(LIBSRC)

+12 −0
Original line number Diff line number Diff line
@@ -732,6 +732,18 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d);
BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num);
BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num);

/* Primes from RFC 2409 */
int get_rfc2409_prime_768(BIGNUM **bn);
int get_rfc2409_prime_1024(BIGNUM **bn);

/* Primes from RFC 3526 */
int get_rfc3526_prime_1536(BIGNUM **bn);
int get_rfc3526_prime_2048(BIGNUM **bn);
int get_rfc3526_prime_3072(BIGNUM **bn);
int get_rfc3526_prime_4096(BIGNUM **bn);
int get_rfc3526_prime_6144(BIGNUM **bn);
int get_rfc3526_prime_8192(BIGNUM **bn);

int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom);

/* BEGIN ERROR CODES */
Loading