Hello,
Attached is an alternative pseudo-random number generator for OpenSSL, based
upon the FIPS186-2 specification.
Tested on x86 and PPC, linux-elf.
Hope you find it useful.
Yair
---
diff -urN openssl-0.9.8-stable-SNAP-20080112/crypto/rand/Makefile
openssl-0.9.8-stable-SNAP-devel/crypto/rand/Makefile
--- openssl-0.9.8-stable-SNAP-20080112/crypto/rand/Makefile 2006-02-04
04:06:21.000000000 +0200
+++ openssl-0.9.8-stable-SNAP-devel/crypto/rand/Makefile 2008-01-15
11:29:47.000000000 +0200
@@ -18,9 +18,9 @@
LIB=$(TOP)/libcrypto.a
LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
- rand_win.c rand_unix.c rand_os2.c rand_nw.c
+ rand_win.c rand_unix.c rand_os2.c rand_nw.c rand_fips186.c
LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o \
- rand_win.o rand_unix.o rand_os2.o rand_nw.o
+ rand_win.o rand_unix.o rand_os2.o rand_nw.o rand_fips186.o
SRC= $(LIBSRC)
diff -urN openssl-0.9.8-stable-SNAP-20080112/crypto/rand/rand_fips186.c
openssl-0.9.8-stable-SNAP-devel/crypto/rand/rand_fips186.c
--- openssl-0.9.8-stable-SNAP-20080112/crypto/rand/rand_fips186.c 1970-01-01
02:00:00.000000000 +0200
+++ openssl-0.9.8-stable-SNAP-devel/crypto/rand/rand_fips186.c 2008-01-15
11:36:04.000000000 +0200
@@ -0,0 +1,253 @@
+/* FIPS 186-2 random number generator
+ * by Yair Elharrar, Jan 2008
+ *
+ * Adapted from FIPS186-2 at
http://csrc.nist.gov/publications/fips/fips186-2/fips186-2-change1.pdf
+ *
+ * Usage: RAND_set_rand_method(RAND_FIPS186()), followed by RAND_cleanup()
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]