diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/Makefile.org openssl-1.0.1f-rlwekex/Makefile.org
--- openssl-1.0.1f/Makefile.org	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/Makefile.org	2014-10-16 12:38:15.000000000 +0200
@@ -142,11 +142,11 @@
 # dirs in crypto to build
 SDIRS=  \
 	objects \
 	md2 md4 md5 sha mdc2 hmac ripemd whrlpool \
 	des aes rc2 rc4 rc5 idea bf cast camellia seed modes \
-	bn ec rsa dsa ecdsa dh ecdh dso engine \
+	bn ec rsa dsa ecdsa dh ecdh rlwekex dso engine \
 	buffer bio stack lhash rand err \
 	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
 	cms pqueue ts jpake srp store cmac
 # keep in mind that the above list is adjusted by ./Configure
 # according to no-xxx arguments...
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/apps/speed.c openssl-1.0.1f-rlwekex/apps/speed.c
--- openssl-1.0.1f/apps/speed.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/apps/speed.c	2014-10-16 12:51:57.000000000 +0200
@@ -77,10 +77,11 @@
 #define SECONDS		3	
 #define RSA_SECONDS	10
 #define DSA_SECONDS	10
 #define ECDSA_SECONDS   10
 #define ECDH_SECONDS    10
+#define RLWEKEX_SECONDS    10
 
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
 #undef PROG
@@ -187,10 +188,13 @@
 #include <openssl/ecdsa.h>
 #endif
 #ifndef OPENSSL_NO_ECDH
 #include <openssl/ecdh.h>
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+#include <openssl/rlwekex.h>
+#endif
 #include <openssl/modes.h>
 
 #ifdef OPENSSL_FIPS
 #ifdef OPENSSL_DOING_MAKEDEPEND
 #undef AES_set_encrypt_key
@@ -245,10 +249,13 @@
 #define DSA_NUM		3
 
 #define EC_NUM       16
 #define MAX_ECDH_SIZE 256
 
+#define RLWEKEX_NUM	1
+#define MAX_RLWEKEX_SIZE 256
+
 static const char *names[ALGOR_NUM]={
   "md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4",
   "des cbc","des ede3","idea cbc","seed cbc",
   "rc2 cbc","rc5-32/12 cbc","blowfish cbc","cast cbc",
   "aes-128 cbc","aes-192 cbc","aes-256 cbc",
@@ -267,10 +274,13 @@
 static double ecdsa_results[EC_NUM][2];
 #endif
 #ifndef OPENSSL_NO_ECDH
 static double ecdh_results[EC_NUM][1];
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+static double rlwekex_results[RLWEKEX_NUM][3];
+#endif
 
 #if defined(OPENSSL_NO_DSA) && !(defined(OPENSSL_NO_ECDSA) && defined(OPENSSL_NO_ECDH))
 static const char rnd_seed[] = "string to make the random number generator think it has entropy";
 static int rnd_fake = 0;
 #endif
@@ -339,11 +349,12 @@
 	return app_tminterval(s,usertime);
 	}
 #endif
 
 
-#ifndef OPENSSL_NO_ECDH
+#if defined(OPENSSL_NO_ECDH) && defined(OPENSSL_NO_RLWEKEX)
+#else
 static const int KDF1_SHA1_len = 20;
 static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen)
 	{
 #ifndef OPENSSL_NO_SHA
 	if (*outlen < SHA_DIGEST_LENGTH)
@@ -353,11 +364,11 @@
 	return SHA1(in, inlen, out);
 #else
 	return NULL;
 #endif	/* OPENSSL_NO_SHA */
 	}
-#endif	/* OPENSSL_NO_ECDH */
+#endif	/* defined(OPENSSL_NO_ECDH) || defined(OPENSSL_NO_RLWEKEX) */
 
 
 int MAIN(int, char **);
 
 int MAIN(int argc, char **argv)
@@ -611,18 +622,30 @@
 	int ecdh_checks = 0;
 	int secret_idx = 0;
 	long ecdh_c[EC_NUM][2];
 #endif
 
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PAIR *rlwekex_a[RLWEKEX_NUM], *rlwekex_b[RLWEKEX_NUM];
+	RLWE_REC *rlwekex_rec[RLWEKEX_NUM];
+	RLWE_CTX *rlwekex_ctx;
+	unsigned char rlwekex_secret_a[MAX_RLWEKEX_SIZE], rlwekex_secret_b[MAX_RLWEKEX_SIZE];
+	int rlwekex_secret_size_a, rlwekex_secret_size_b;
+	long rlwekex_c[RLWEKEX_NUM][3];
+#endif
+
 	int rsa_doit[RSA_NUM];
 	int dsa_doit[DSA_NUM];
 #ifndef OPENSSL_NO_ECDSA
 	int ecdsa_doit[EC_NUM];
 #endif
 #ifndef OPENSSL_NO_ECDH
         int ecdh_doit[EC_NUM];
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+        int rlwekex_doit[RLWEKEX_NUM];
+#endif
 	int doit[ALGOR_NUM];
 	int pr_header=0;
 	const EVP_CIPHER *evp_cipher=NULL;
 	const EVP_MD *evp_md=NULL;
 	int decrypt=0;
@@ -647,10 +670,19 @@
 		{
 		ecdh_a[i] = NULL;
 		ecdh_b[i] = NULL;
 		}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	rlwekex_ctx = NULL;
+	for (i=0; i<RLWEKEX_NUM; i++)
+		{
+		rlwekex_a[i] = NULL;
+		rlwekex_b[i] = NULL;
+		rlwekex_rec[i] = NULL;
+		}
+#endif
 
 
 	if (bio_err == NULL)
 		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
@@ -691,10 +723,14 @@
 #endif
 #ifndef OPENSSL_NO_ECDH
 	for (i=0; i<EC_NUM; i++)
 		ecdh_doit[i]=0;
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	for (i=0; i<RLWEKEX_NUM; i++)
+		rlwekex_doit[i]=0;
+#endif
 
 	
 	j=0;
 	argc--;
 	argv++;
@@ -1003,10 +1039,18 @@
 			for (i=0; i < EC_NUM; i++)
 				ecdh_doit[i]=1;
 			}
 		else
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+		     if (strcmp(*argv,"rlwekex") == 0)
+			{
+			for (i=0; i < RLWEKEX_NUM; i++)
+				rlwekex_doit[i]=1;
+			}
+		else
+#endif
 			{
 			BIO_printf(bio_err,"Error: bad option or value\n");
 			BIO_printf(bio_err,"\n");
 			BIO_printf(bio_err,"Available values:\n");
 #ifndef OPENSSL_NO_MD2
@@ -1098,10 +1142,13 @@
 			BIO_printf(bio_err,"ecdhp160  ecdhp192  ecdhp224  ecdhp256  ecdhp384  ecdhp521\n");
 			BIO_printf(bio_err,"ecdhk163  ecdhk233  ecdhk283  ecdhk409  ecdhk571\n");
 			BIO_printf(bio_err,"ecdhb163  ecdhb233  ecdhb283  ecdhb409  ecdhb571\n");
 			BIO_printf(bio_err,"ecdh\n");
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+			BIO_printf(bio_err,"rlwekex\n");
+#endif
 
 #ifndef OPENSSL_NO_IDEA
 			BIO_printf(bio_err,"idea     ");
 #endif
 #ifndef OPENSSL_NO_SEED
@@ -1175,10 +1222,14 @@
 #endif
 #ifndef OPENSSL_NO_ECDH
 		for (i=0; i<EC_NUM; i++)
 			ecdh_doit[i]=1;
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+		for (i=0; i<RLWEKEX_NUM; i++)
+			rlwekex_doit[i]=1;
+#endif
 		}
 	for (i=0; i<ALGOR_NUM; i++)
 		if (doit[i]) pr_header++;
 
 	if (usertime == 0 && !mr)
@@ -1482,10 +1533,16 @@
 				ecdh_c[i][1]=1;
 				}
 			}
 		}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	for (i=0; i<=RLWEKEX_NUM; i++) {
+		rlwekex_c[i][0]=count/1000;
+		rlwekex_c[i][1]=count/1000;
+	}
+#endif
 
 #define COND(d)	(count < (d))
 #define COUNT(d) (d)
 #else
 /* not worth fixing */
@@ -2387,10 +2444,109 @@
 			ecdh_doit[j]=0;
 			}
 		}
 	if (rnd_fake) RAND_cleanup();
 #endif
+
+#ifndef OPENSSL_NO_RWLEKEX
+	if (RAND_status() != 1)
+		{
+		RAND_seed(rnd_seed, sizeof rnd_seed);
+		rnd_fake = 1;
+		}
+	rlwekex_ctx = RLWE_CTX_new();
+	if (rlwekex_ctx == NULL)
+		{
+		BIO_printf(bio_err,"RLWEKEX failure.\n");
+		ERR_print_errors(bio_err);
+		rsa_count=1;
+		}
+	else 
+		{
+		for (j=0; j<RLWEKEX_NUM; j++)
+			{
+			if (!rlwekex_doit[j]) continue;
+			rlwekex_a[j] = RLWE_PAIR_new();
+			rlwekex_b[j] = RLWE_PAIR_new();
+			rlwekex_rec[j] = RLWE_REC_new();
+			if ((rlwekex_a[j] == NULL) || (rlwekex_b[j] == NULL) || (rlwekex_rec[j] == NULL))
+				{
+				BIO_printf(bio_err,"RLWEKEX failure.\n");
+				ERR_print_errors(bio_err);
+				rsa_count=1;
+				}
+			else
+				{
+
+				/* Time RLWEKEX key generation */
+				pkey_print_message("rlwe","key generation", rlwekex_c[j][0], 1024, RLWEKEX_SECONDS);
+				Time_F(START);
+				for (count=0,run=1; COND(rlwekex_c[j][0]); count++)
+					{
+					RLWE_PAIR_generate_key(rlwekex_a[j], rlwekex_ctx);
+					}
+				d=Time_F(STOP);
+				BIO_printf(bio_err, mr ? "+R9:%ld:%d:%.2f\n" :"%ld n=%d RLWE key generations in %.2fs\n",
+					count, 1024, d);
+				rlwekex_results[j][0]=d/(double)count;
+				rsa_count=count;
+
+				rlwekex_secret_size_b = KDF1_SHA1_len;
+				rlwekex_secret_size_a = KDF1_SHA1_len;
+				/* generate two RLWE key pairs */
+				if (!RLWE_PAIR_generate_key(rlwekex_a[j], rlwekex_ctx) ||
+					!RLWE_PAIR_generate_key(rlwekex_b[j], rlwekex_ctx))
+					{
+					BIO_printf(bio_err,"RLWEKEX key generation failure.\n");
+					ERR_print_errors(bio_err);
+					rsa_count=1;		
+					}
+				else
+					{
+					/* Time RLWEKEX Bob shared secret generation */
+					pkey_print_message("rlwe","Bob shared secret", rlwekex_c[j][1], 1024, RLWEKEX_SECONDS);
+					Time_F(START);
+					for (count=0,run=1; COND(rlwekex_c[j][1]); count++)
+						{
+						RLWEKEX_compute_key_bob(rlwekex_secret_b, rlwekex_secret_size_b, rlwekex_rec[j], 
+							RLWE_PAIR_get_publickey(rlwekex_a[j]), rlwekex_b[j], KDF1_SHA1, rlwekex_ctx);
+						}
+					d=Time_F(STOP);
+					BIO_printf(bio_err, mr ? "+R10:%ld:%d:%.2f\n" :"%ld n=%d RLWE Bob shared secret in %.2fs\n",
+						count, 1024, d);
+					rlwekex_results[j][1]=d/(double)count;
+					rsa_count=count;
+
+					/* Time RLWEKEX Alice shared secret generation */
+					pkey_print_message("rlwe","Alice shared secret", rlwekex_c[j][2], 1024, RLWEKEX_SECONDS);
+					Time_F(START);
+					for (count=0,run=1; COND(rlwekex_c[j][2]); count++)
+						{
+						RLWEKEX_compute_key_alice(rlwekex_secret_a, rlwekex_secret_size_a, 
+							RLWE_PAIR_get_publickey(rlwekex_b[j]), rlwekex_rec[j], rlwekex_a[j], KDF1_SHA1, rlwekex_ctx);
+						}
+					d=Time_F(STOP);
+					BIO_printf(bio_err, mr ? "+R11:%ld:%d:%.2f\n" :"%ld n=%d RLWE Alice shared secret in %.2fs\n",
+						count, 1024, d);
+					rlwekex_results[j][2]=d/(double)count;
+					rsa_count=count;
+
+					}
+				}
+
+			if (rsa_count <= 1)
+				{
+				/* if longer than 10s, don't do any more */
+				for (j++; j<RLWEKEX_NUM; j++)
+					rlwekex_doit[j]=0;
+				}
+			}
+
+		}
+	if (rnd_fake) RAND_cleanup();
+#endif
+
 #ifndef NO_FORK
 show_res:
 #endif
 	if(!mr)
 		{
@@ -2535,10 +2691,34 @@
 				test_curves_names[k],
 				ecdh_results[k][0], 1.0/ecdh_results[k][0]);
 		}
 #endif
 
+#ifndef OPENSSL_NO_RLWEKEX
+	j=1;
+	for (k=0; k<RLWEKEX_NUM; k++)
+		{
+		if (!rlwekex_doit[k]) continue;
+		if (j && !mr)
+			{
+			printf("%19skeygen   keygen/s   Bob shared      Bob/s   Alice shared    Alice/s\n"," ");
+			j=0;
+			}
+		if (mr)
+			fprintf(stdout,"+F6:%u:%u:%f:%f:%f\n",
+				k, 1024,
+				rlwekex_results[k][0], rlwekex_results[k][1], rlwekex_results[k][2]);
+
+		else
+			fprintf(stdout,"rlwe n=%4u     %8.4fs    %8.1f   %8.4fs   %8.1f      %8.4fs   %8.1f\n",
+				1024,
+				rlwekex_results[k][0], 1.0/rlwekex_results[k][0],
+				rlwekex_results[k][1], 1.0/rlwekex_results[k][1],
+				rlwekex_results[k][2], 1.0/rlwekex_results[k][2]);
+		}
+#endif
+
 	mret=0;
 
 end:
 	ERR_print_errors(bio_err);
 	if (buf != NULL) OPENSSL_free(buf);
@@ -2566,10 +2746,21 @@
 			EC_KEY_free(ecdh_a[i]);
 		if (ecdh_b[i] != NULL)
 			EC_KEY_free(ecdh_b[i]);
 	}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	for (i=0; i<RLWEKEX_NUM; i++)
+	{
+		if (rlwekex_a[i] != NULL)
+			RLWE_PAIR_free(rlwekex_a[i]);
+		if (rlwekex_b[i] != NULL)
+			RLWE_PAIR_free(rlwekex_b[i]);
+		if (rlwekex_rec[i] != NULL)
+			RLWE_REC_free(rlwekex_rec[i]);
+	}
+#endif
 
 	apps_shutdown();
 	OPENSSL_EXIT(mret);
 	}
 
@@ -2824,10 +3015,29 @@
 					ecdh_results[k][0]=d;
 
 				}
 #endif
 
+#ifndef OPENSSL_NO_RLWEKEX
+			else if(!strncmp(buf,"+F6:",4))
+				{
+				int k;
+				double d;
+				
+				p=buf+4;
+				k=atoi(sstrsep(&p,sep));
+				sstrsep(&p,sep);
+
+				d=atof(sstrsep(&p,sep));
+				if(n)
+					rlwekex_results[k][0]=1/(1/rlwekex_results[k][0]+1/d);
+				else
+					rlwekex_results[k][0]=d;
+
+				}
+#endif
+
 			else if(!strncmp(buf,"+H:",3))
 				{
 				}
 			else
 				fprintf(stderr,"Unknown type '%s' from child %d\n",buf,n);
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/err/err.h openssl-1.0.1f-rlwekex/crypto/err/err.h
--- openssl-1.0.1f/crypto/err/err.h	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/err/err.h	2014-10-16 12:38:19.000000000 +0200
@@ -190,10 +190,11 @@
 #define ERR_LIB_OCSP            39
 #define ERR_LIB_UI              40
 #define ERR_LIB_COMP            41
 #define ERR_LIB_ECDSA		42
 #define ERR_LIB_ECDH		43
+#define ERR_LIB_RLWEKEX		50
 #define ERR_LIB_STORE           44
 #define ERR_LIB_FIPS		45
 #define ERR_LIB_CMS		46
 #define ERR_LIB_TS		47
 #define ERR_LIB_HMAC		48
@@ -226,10 +227,11 @@
 #define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__)
 #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__)
 #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__)
 #define ECDSAerr(f,r)  ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__)
 #define ECDHerr(f,r)  ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__)
+#define RLWEKEXerr(f,r)  ERR_PUT_error(ERR_LIB_RLWEKEX,(f),(r),__FILE__,__LINE__)
 #define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__)
 #define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__)
 #define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__)
 #define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),__FILE__,__LINE__)
 #define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__)
@@ -288,10 +290,11 @@
 #define ERR_R_COMP_LIB	ERR_LIB_COMP     /* 41 */
 #define ERR_R_ECDSA_LIB ERR_LIB_ECDSA	 /* 42 */
 #define ERR_R_ECDH_LIB  ERR_LIB_ECDH	 /* 43 */
 #define ERR_R_STORE_LIB ERR_LIB_STORE    /* 44 */
 #define ERR_R_TS_LIB	ERR_LIB_TS       /* 45 */
+#define ERR_R_RLWE_LIB  ERR_LIB_RLWEKEX	 /* 46 */
 
 #define ERR_R_NESTED_ASN1_ERROR			58
 #define ERR_R_BAD_ASN1_OBJECT_HEADER		59
 #define ERR_R_BAD_GET_ASN1_OBJECT_CALL		60
 #define ERR_R_EXPECTING_AN_ASN1_SEQUENCE	61
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/err/openssl.ec openssl-1.0.1f-rlwekex/crypto/err/openssl.ec
--- openssl-1.0.1f/crypto/err/openssl.ec	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/err/openssl.ec	2014-10-16 12:38:19.000000000 +0200
@@ -28,10 +28,11 @@
 L OCSP		crypto/ocsp/ocsp.h		crypto/ocsp/ocsp_err.c
 L UI		crypto/ui/ui.h			crypto/ui/ui_err.c
 L COMP		crypto/comp/comp.h		crypto/comp/comp_err.c
 L ECDSA		crypto/ecdsa/ecdsa.h		crypto/ecdsa/ecs_err.c
 L ECDH		crypto/ecdh/ecdh.h		crypto/ecdh/ech_err.c
+L RLWEKEX	crypto/rlwekex/rlwekex.h		crypto/rlwekex/rlwekex_err.c
 L STORE		crypto/store/store.h		crypto/store/str_err.c
 L TS		crypto/ts/ts.h			crypto/ts/ts_err.c
 L HMAC		crypto/hmac/hmac.h		crypto/hmac/hmac_err.c
 L CMS		crypto/cms/cms.h		crypto/cms/cms_err.c
 L JPAKE		crypto/jpake/jpake.h		crypto/jpake/jpake_err.c
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/Makefile openssl-1.0.1f-rlwekex/crypto/rlwekex/Makefile
--- openssl-1.0.1f/crypto/rlwekex/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/Makefile	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,96 @@
+#
+# crypto/rlwekex/Makefile
+#
+
+DIR=	rlwekex
+TOP=	../..
+CC=	cc
+INCLUDES= -I.. -I$(TOP) -I../../include
+CFLAG=-g -Wall
+MAKEFILE=	Makefile
+AR=		ar r
+
+CFLAGS= $(INCLUDES) $(CFLAG)
+
+GENERAL=Makefile
+TEST=rlwekextest.c
+APPS=
+
+LIB=$(TOP)/libcrypto.a
+LIBSRC=	rlwekex_key.c rlwekex_err.c
+
+LIBOBJ=	rlwekex_key.o rlwekex_err.o
+
+SRC= $(LIBSRC)
+
+EXHEADER= rlwekex.h
+HEADER=	rlwekex_locl.h $(EXHEADER)
+
+ALL=    $(GENERAL) $(SRC) $(HEADER)
+
+top:
+	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
+
+all:	lib
+
+lib:	$(LIBOBJ)
+	$(AR) $(LIB) $(LIBOBJ)
+	$(RANLIB) $(LIB) || echo Never mind.
+	@touch lib
+
+files:
+	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+
+links:
+	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
+	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
+	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
+
+install:
+	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
+	@headerlist="$(EXHEADER)"; for i in $$headerlist; \
+	do  \
+	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+	done;
+
+tags:
+	ctags $(SRC)
+
+tests:
+
+lint:
+	lint -DLINT $(INCLUDES) $(SRC)>fluff
+
+depend:
+	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
+	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
+
+dclean:
+	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
+	mv -f Makefile.new $(MAKEFILE)
+
+clean:
+	rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+rlwekex_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rlwekex_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
+rlwekex_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
+rlwekex_err.o: ../../include/openssl/opensslconf.h
+rlwekex_err.o: ../../include/openssl/opensslv.h
+rlwekex_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rlwekex.h
+rlwekex_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+rlwekex_err.o: ../../include/openssl/symhacks.h rlwekex_err.c
+rlwekex_key.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rlwekex_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
+rlwekex_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
+rlwekex_key.o: ../../include/openssl/opensslconf.h
+rlwekex_key.o: ../../include/openssl/opensslv.h
+rlwekex_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
+rlwekex_key.o: ../../include/openssl/rlwekex.h
+rlwekex_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+rlwekex_key.o: ../../include/openssl/symhacks.h rlwekexlib/fft.h rlwekexlib/fft.c 
+rlwekex_key.o: rlwekexlib/rlwe.h rlwekexlib/rlwe.c rlwekexlib/rlwe_a.h
+rlwekex_key.o: rlwekexlib/rlwe_table.h rlwekex_key.c rlwekex_locl.h
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekex.h openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex.h
--- openssl-1.0.1f/crypto/rlwekex/rlwekex.h	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex.h	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,101 @@
+/* crypto/rlwekex/rlwekex.h */
+#ifndef HEADER_RLWEKEX_H
+#define HEADER_RLWEKEX_H
+
+#include <openssl/opensslconf.h>
+
+#ifdef OPENSSL_NO_RLWEKEX
+#error RLWEKEX is disabled.
+#endif
+
+#include <openssl/ossl_typ.h>
+#include <openssl/bn.h>
+#include <openssl/err.h>
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct rlwe_param_st RLWE_PARAM;
+typedef struct rlwe_pub_st RLWE_PUB;
+typedef struct rlwe_pair_st RLWE_PAIR;
+typedef struct rlwe_rec_st RLWE_REC;
+typedef struct rlwe_ctx_st RLWE_CTX;
+
+/* Allocate and deallocate parameters, public keys, private key / public key pairs, and reconciliation data structures */
+RLWE_PARAM *RLWE_PARAM_new(void);
+void RLWE_PARAM_free(RLWE_PARAM *param);
+
+RLWE_PUB *RLWE_PUB_new(void);
+RLWE_PUB *RLWE_PUB_copy(RLWE_PUB *dest, const RLWE_PUB *src);
+void RLWE_PUB_free(RLWE_PUB *pub);
+
+RLWE_PAIR *RLWE_PAIR_new(void);
+RLWE_PAIR *RLWE_PAIR_copy(RLWE_PAIR *dest, const RLWE_PAIR *src);
+RLWE_PAIR *RLWE_PAIR_dup(const RLWE_PAIR *pair);
+void RLWE_PAIR_free(RLWE_PAIR *pair);
+
+RLWE_REC *RLWE_REC_new(void);
+void RLWE_REC_free(RLWE_REC *rec);
+
+RLWE_CTX *RLWE_CTX_new(void);
+void RLWE_CTX_free(RLWE_CTX *ctx);
+
+/* Generate key pair */
+int RLWE_PAIR_generate_key(RLWE_PAIR *key, RLWE_CTX *ctx);
+
+/* Convert public keys and reconciliation data structures from/to binary */
+RLWE_PUB *o2i_RLWE_PUB(RLWE_PUB **pub, const unsigned char *in, long len);
+int i2o_RLWE_PUB(RLWE_PUB *pub, unsigned char **out);
+RLWE_REC *o2i_RLWE_REC(RLWE_REC **rec, const unsigned char *in, long len);
+int i2o_RLWE_REC(RLWE_REC *rec, unsigned char **out);
+
+/* Get public key from a key pair */
+RLWE_PUB *RLWE_PAIR_get_publickey(RLWE_PAIR *pair);
+/* Does private key exist? */
+int RLWE_PAIR_has_privatekey(RLWE_PAIR *pair);
+
+/* Compute shared secret values */
+int RLWEKEX_compute_key_alice(void *out, size_t outlen, const RLWE_PUB *peer_pub_key,  const RLWE_REC *peer_reconciliation,
+                              const RLWE_PAIR *priv_pub_key, void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), RLWE_CTX *ctx);
+int RLWEKEX_compute_key_bob(void *out, size_t outlen, RLWE_REC *reconciliation, const RLWE_PUB *peer_pub_key,  const RLWE_PAIR *priv_pub_key,
+                            void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), RLWE_CTX *ctx);
+
+/* BEGIN ERROR CODES */
+/* The following lines are auto generated by the script mkerr.pl. Any changes
+ * made after this point may be overwritten when the script is next run.
+ */
+void ERR_load_RLWEKEX_strings(void);
+
+/* Error codes for the RLWEKEX functions. */
+
+/* Function codes. */
+#define RLWEKEX_F_I2O_RLWE_PUB				 100
+#define RLWEKEX_F_I2O_RLWE_REC				 104
+#define RLWEKEX_F_O2I_RLWE_PUB				 101
+#define RLWEKEX_F_O2I_RLWE_REC				 105
+#define RLWEKEX_F_RANDOM32				 111
+#define RLWEKEX_F_RANDOM64				 112
+#define RLWEKEX_F_RANDOM8				 110
+#define RLWEKEX_F_RLWEKEX_				 107
+#define RLWEKEX_F_RLWEKEX_COMPUTE_KEY_ALICE		 108
+#define RLWEKEX_F_RLWEKEX_COMPUTE_KEY_BOB		 109
+#define RLWEKEX_F_RLWE_CTX_NEW				 114
+#define RLWEKEX_F_RLWE_PAIR_COPY			 115
+#define RLWEKEX_F_RLWE_PAIR_NEW				 102
+#define RLWEKEX_F_RLWE_PARAM_NEW			 113
+#define RLWEKEX_F_RLWE_PUB_COPY				 116
+#define RLWEKEX_F_RLWE_PUB_NEW				 103
+#define RLWEKEX_F_RLWE_REC_NEW				 106
+
+/* Reason codes. */
+#define RLWEKEX_R_INVALID_LENGTH			 102
+#define RLWEKEX_R_KDF_FAILED				 100
+#define RLWEKEX_R_RANDOM_FAILED				 101
+
+#ifdef  __cplusplus
+}
+#endif
+#endif
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekex_err.c openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex_err.c
--- openssl-1.0.1f/crypto/rlwekex/rlwekex_err.c	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex_err.c	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,113 @@
+/* crypto/rlwekex/rlwekex_err.c */
+/* ====================================================================
+ * Copyright (c) 1999-2011 The OpenSSL Project.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission. For written permission, please contact
+ *    openssl-core@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ *    nor may "OpenSSL" appear in their names without prior written
+ *    permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com).  This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+/* NOTE: this file was auto generated by the mkerr.pl script: any changes
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
+ */
+
+#include <stdio.h>
+#include <openssl/err.h>
+#include <openssl/rlwekex.h>
+
+/* BEGIN ERROR CODES */
+#ifndef OPENSSL_NO_ERR
+
+#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RLWEKEX,func,0)
+#define ERR_REASON(reason) ERR_PACK(ERR_LIB_RLWEKEX,0,reason)
+
+static ERR_STRING_DATA RLWEKEX_str_functs[]=
+	{
+{ERR_FUNC(RLWEKEX_F_I2O_RLWE_PUB),	"i2o_RLWE_PUB"},
+{ERR_FUNC(RLWEKEX_F_I2O_RLWE_REC),	"i2o_RLWE_REC"},
+{ERR_FUNC(RLWEKEX_F_O2I_RLWE_PUB),	"o2i_RLWE_PUB"},
+{ERR_FUNC(RLWEKEX_F_O2I_RLWE_REC),	"o2i_RLWE_REC"},
+{ERR_FUNC(RLWEKEX_F_RANDOM32),	"RANDOM32"},
+{ERR_FUNC(RLWEKEX_F_RANDOM64),	"RANDOM64"},
+{ERR_FUNC(RLWEKEX_F_RANDOM8),	"RANDOM8"},
+{ERR_FUNC(RLWEKEX_F_RLWEKEX_),	"RLWEKEX_"},
+{ERR_FUNC(RLWEKEX_F_RLWEKEX_COMPUTE_KEY_ALICE),	"RLWEKEX_compute_key_alice"},
+{ERR_FUNC(RLWEKEX_F_RLWEKEX_COMPUTE_KEY_BOB),	"RLWEKEX_compute_key_bob"},
+{ERR_FUNC(RLWEKEX_F_RLWE_CTX_NEW),	"RLWE_CTX_new"},
+{ERR_FUNC(RLWEKEX_F_RLWE_PAIR_COPY),	"RLWE_PAIR_copy"},
+{ERR_FUNC(RLWEKEX_F_RLWE_PAIR_NEW),	"RLWE_PAIR_new"},
+{ERR_FUNC(RLWEKEX_F_RLWE_PARAM_NEW),	"RLWE_PARAM_new"},
+{ERR_FUNC(RLWEKEX_F_RLWE_PUB_COPY),	"RLWE_PUB_copy"},
+{ERR_FUNC(RLWEKEX_F_RLWE_PUB_NEW),	"RLWE_PUB_new"},
+{ERR_FUNC(RLWEKEX_F_RLWE_REC_NEW),	"RLWE_REC_new"},
+{0,NULL}
+	};
+
+static ERR_STRING_DATA RLWEKEX_str_reasons[]=
+	{
+{ERR_REASON(RLWEKEX_R_INVALID_LENGTH)    ,"invalid length"},
+{ERR_REASON(RLWEKEX_R_KDF_FAILED)        ,"kdf failed"},
+{ERR_REASON(RLWEKEX_R_RANDOM_FAILED)     ,"random failed"},
+{0,NULL}
+	};
+
+#endif
+
+void ERR_load_RLWEKEX_strings(void)
+	{
+#ifndef OPENSSL_NO_ERR
+
+	if (ERR_func_error_string(RLWEKEX_str_functs[0].error) == NULL)
+		{
+		ERR_load_strings(0,RLWEKEX_str_functs);
+		ERR_load_strings(0,RLWEKEX_str_reasons);
+		}
+#endif
+	}
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekex_key.c openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex_key.c
--- openssl-1.0.1f/crypto/rlwekex/rlwekex_key.c	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex_key.c	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,629 @@
+/* crypto/rlwekex/rlwekex_key.c */
+
+#include <string.h>
+#include <openssl/rand.h>
+#include "rlwekex_locl.h"
+
+#define RANDOMNESS_AESCTR
+
+#ifdef RANDOMNESS_AESCTR
+#include <openssl/aes.h>
+#define RANDOM_VARS \
+	AES_KEY aes_key; \
+	unsigned char aes_key_bytes[16]; \
+	RAND_bytes(aes_key_bytes, 16); \
+	AES_set_encrypt_key(aes_key_bytes, 128, &aes_key); \
+	unsigned char aes_ivec[AES_BLOCK_SIZE]; \
+	memset(aes_ivec, 0, AES_BLOCK_SIZE); \
+	unsigned char aes_ecount_buf[AES_BLOCK_SIZE]; \
+	memset(aes_ecount_buf, 0, AES_BLOCK_SIZE); \
+	unsigned int aes_num = 0; \
+	unsigned char aes_in[AES_BLOCK_SIZE]; \
+	memset(aes_in, 0, AES_BLOCK_SIZE);
+#define RANDOM8   ((uint8_t) randomplease(&aes_key, aes_ivec, aes_ecount_buf, &aes_num, aes_in))
+#define RANDOM32 ((uint32_t) randomplease(&aes_key, aes_ivec, aes_ecount_buf, &aes_num, aes_in))
+#define RANDOM64 ((uint64_t) randomplease(&aes_key, aes_ivec, aes_ecount_buf, &aes_num, aes_in))
+
+uint64_t randomplease(AES_KEY *aes_key, unsigned char aes_ivec[AES_BLOCK_SIZE],
+                      unsigned char aes_ecount_buf[AES_BLOCK_SIZE],
+                      unsigned int *aes_num, unsigned char aes_in[AES_BLOCK_SIZE]) {
+	uint64_t out;
+	AES_ctr128_encrypt(aes_in, (unsigned char *) &out, 8, aes_key, aes_ivec, aes_ecount_buf, aes_num);
+	return out;
+}
+#endif
+
+#ifdef RANDOMNESS_RCFOUR
+#include <openssl/rc4.h>
+#define RANDOM_VARS \
+	RC4_KEY rc4_key; \
+	unsigned char rc4_key_bytes[16]; \
+	RAND_bytes(rc4_key_bytes, 16); \
+	RC4_set_key(&rc4_key, 16, rc4_key_bytes);
+
+#define RANDOM8   ((uint8_t) randomplease(&rc4_key))
+#define RANDOM32 ((uint32_t) randomplease(&rc4_key))
+#define RANDOM64 ((uint64_t) randomplease(&rc4_key))
+
+uint64_t randomplease(RC4_KEY *rc4_key) {
+	uint64_t b;
+	uint64_t z = (uint64_t) 0;
+	RC4(rc4_key, 8, (unsigned char *) &z, (unsigned char *) &b);
+	return b;
+}
+
+#endif
+
+#ifdef RANDOMNESS_RAND_bytes
+#define RANDOM_VARS
+#define RANDOM8 (random8())
+#define RANDOM32 (random32())
+#define RANDOM64 (random64())
+
+uint8_t random8() {
+	uint8_t b;
+	int r = RAND_bytes((unsigned char *) &b, 1);
+	if (r != 1) {
+		RLWEKEXerr(RLWEKEX_F_RANDOM8, RLWEKEX_R_RANDOM_FAILED);
+	}
+	return b;
+}
+uint32_t random32() {
+	uint32_t b;
+	int r = RAND_bytes((unsigned char *) &b, 4);
+	if (r != 1) {
+		RLWEKEXerr(RLWEKEX_F_RANDOM32, RLWEKEX_R_RANDOM_FAILED);
+	}
+	return b;
+}
+uint64_t random64() {
+	uint64_t b;
+	int r = RAND_bytes((unsigned char *) &b, 8);
+	if (r != 1) {
+		RLWEKEXerr(RLWEKEX_F_RANDOM64, RLWEKEX_R_RANDOM_FAILED);
+	}
+	return b;
+}
+#endif
+
+#include "rlwekexlib/fft.c"
+#include "rlwekexlib/rlwe.c"
+#include "rlwekexlib/rlwe_a.h"
+
+/* Allocate and deallocate auxiliary variables (context) data structure */
+
+RLWE_CTX *RLWE_CTX_new(void) {
+	RLWE_CTX *ret;
+	ret = (RLWE_CTX *)OPENSSL_malloc(sizeof(RLWE_CTX));
+	if (ret == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_CTX_NEW, ERR_R_MALLOC_FAILURE);
+		return (NULL);
+	}
+	ret->fft_ctx = (FFT_CTX *)OPENSSL_malloc(sizeof(FFT_CTX));
+	if (ret->fft_ctx == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_CTX_NEW, ERR_R_MALLOC_FAILURE);
+		return (NULL);
+	}
+	if (FFT_CTX_init(ret->fft_ctx) == 0) {
+		goto err;
+	}
+	return (ret);
+  err:
+  	FFT_CTX_free(ret->fft_ctx);
+  	OPENSSL_free(ret->fft_ctx);
+  	OPENSSL_free(ret);
+  	return (NULL);
+}
+
+void RLWE_CTX_free(RLWE_CTX *r) {
+	if (r == NULL) return;
+	FFT_CTX_clear(r->fft_ctx);
+	FFT_CTX_free(r->fft_ctx);
+	OPENSSL_free(r->fft_ctx);
+	OPENSSL_cleanse((void *)r, sizeof(RLWE_CTX));
+	OPENSSL_free(r);
+}
+
+/* Allocate and deallocate public parameters data structure */
+
+RLWE_PARAM *RLWE_PARAM_new(void) {
+	RLWE_PARAM *ret;
+
+	ret = (RLWE_PARAM *)OPENSSL_malloc(sizeof(RLWE_PARAM));
+	if (ret == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_PARAM_NEW, ERR_R_MALLOC_FAILURE);
+		return (NULL);
+	}
+
+	ret->version = 1;
+	ret->flags = 0;
+	ret->references = 1;
+
+	ret->a = (uint32_t *) rlwe_a;
+
+	return (ret);
+}
+
+void RLWE_PARAM_free(RLWE_PARAM *r) {
+	int i;
+
+	if (r == NULL) return;
+
+	i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_EC);
+#ifdef REF_PRINT
+	REF_PRINT("RLWE_PARAM", r);
+#endif
+	if (i > 0) return;
+#ifdef REF_CHECK
+	if (i < 0) {
+		fprintf(stderr, "RLWE_PARAM_free, bad reference count\n");
+		abort();
+	}
+#endif
+
+	OPENSSL_cleanse((void *)r, sizeof(RLWE_PARAM));
+
+	OPENSSL_free(r);
+}
+
+/* Allocate and deallocate public key data structure */
+
+RLWE_PUB *RLWE_PUB_new(void) {
+	RLWE_PUB *ret;
+
+	ret = (RLWE_PUB *)OPENSSL_malloc(sizeof(RLWE_PUB));
+	if (ret == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_PUB_NEW, ERR_R_MALLOC_FAILURE);
+		return (NULL);
+	}
+
+	ret->version = 1;
+	ret->flags = 0;
+	ret->references = 1;
+
+	ret->param = NULL;
+	ret->b = (uint32_t *) OPENSSL_malloc (1024 * sizeof (uint32_t));
+
+	return (ret);
+}
+
+RLWE_PUB *RLWE_PUB_copy(RLWE_PUB *dest, const RLWE_PUB *src) {
+	if (dest == NULL || src == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_PUB_COPY, ERR_R_PASSED_NULL_PARAMETER);
+		return NULL;
+	}
+
+	/* copy the parameters; this takes advantage of the fact that we only currently
+	   support one set of parameters */
+	if (!dest->param) {
+		dest->param = RLWE_PARAM_new();
+	}
+
+	/* copy the public key */
+	if (src->b) {
+		if (!dest->b) {
+			dest->b = OPENSSL_malloc(1024 * sizeof (uint32_t));
+		}
+		memcpy(dest->b, src->b, 1024 * sizeof (uint32_t));
+	}
+
+	/* copy the rest */
+	dest->version   = src->version;
+	dest->flags = src->flags;
+
+	return dest;
+}
+
+void RLWE_PUB_free(RLWE_PUB *r) {
+	int i;
+
+	if (r == NULL) return;
+
+	i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_EC);
+#ifdef REF_PRINT
+	REF_PRINT("RLWE_PUB", r);
+#endif
+	if (i > 0) return;
+#ifdef REF_CHECK
+	if (i < 0) {
+		fprintf(stderr, "RLWE_PUB_free, bad reference count\n");
+		abort();
+	}
+#endif
+
+	RLWE_PARAM_free(r->param);
+
+	OPENSSL_cleanse(r->b, 1024 * sizeof (uint32_t));
+	OPENSSL_free(r->b);
+
+	OPENSSL_cleanse((void *)r, sizeof(RLWE_PUB));
+
+	OPENSSL_free(r);
+}
+
+/* Allocate and deallocate public key / private key pair data structure */
+
+RLWE_PAIR *RLWE_PAIR_new(void) {
+	RLWE_PAIR *ret;
+
+	ret = (RLWE_PAIR *)OPENSSL_malloc(sizeof(RLWE_PAIR));
+	if (ret == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_PAIR_NEW, ERR_R_MALLOC_FAILURE);
+		return (NULL);
+	}
+
+	ret->version = 1;
+	ret->flags = 0;
+	ret->references = 1;
+
+	ret->pub = NULL;
+
+	ret->s = (uint32_t *) OPENSSL_malloc (1024 * sizeof (uint32_t));
+	ret->e = (uint32_t *) OPENSSL_malloc (1024 * sizeof (uint32_t));
+
+	return (ret);
+}
+
+RLWE_PAIR *RLWE_PAIR_copy(RLWE_PAIR *dest, const RLWE_PAIR *src) {
+	if (dest == NULL || src == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_PAIR_COPY, ERR_R_PASSED_NULL_PARAMETER);
+		return NULL;
+	}
+
+	/* copy the public key */
+	if (src->pub) {
+		if (dest->pub)
+			RLWE_PUB_free(dest->pub);
+		dest->pub = RLWE_PUB_new();
+		if (dest->pub == NULL)
+			return NULL;
+		if (!RLWE_PUB_copy(dest->pub, src->pub))
+			return NULL;
+	}
+
+	/* copy the private key */
+	if (src->s) {
+		if (!dest->s) {
+			dest->s = OPENSSL_malloc(1024 * sizeof (uint32_t));
+		}
+		memcpy(dest->s, src->s, 1024 * sizeof (uint32_t));
+	}
+	if (src->e) {
+		if (!dest->e) {
+			dest->e = OPENSSL_malloc(1024 * sizeof (uint32_t));
+		}
+		memcpy(dest->e, src->e, 1024 * sizeof (uint32_t));
+	}
+
+	/* copy the rest */
+	dest->version   = src->version;
+	dest->flags = src->flags;
+
+	return dest;
+}
+
+RLWE_PAIR *RLWE_PAIR_dup(const RLWE_PAIR *pair) {
+	RLWE_PAIR *ret = RLWE_PAIR_new();
+	if (ret == NULL)
+		return NULL;
+	if (RLWE_PAIR_copy(ret, pair) == NULL) {
+		RLWE_PAIR_free(ret);
+		return NULL;
+	}
+	return ret;
+}
+
+void RLWE_PAIR_free(RLWE_PAIR *r) {
+	int i;
+
+	if (r == NULL) return;
+
+	i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_EC);
+#ifdef REF_PRINT
+	REF_PRINT("RLWE_PAIR", r);
+#endif
+	if (i > 0) return;
+#ifdef REF_CHECK
+	if (i < 0) {
+		fprintf(stderr, "RLWE_PAIR_free, bad reference count\n");
+		abort();
+	}
+#endif
+
+	RLWE_PUB_free(r->pub);
+
+	OPENSSL_cleanse(r->s, 1024 * sizeof (uint32_t));
+	OPENSSL_free(r->s);
+	OPENSSL_cleanse(r->e, 1024 * sizeof (uint32_t));
+	OPENSSL_free(r->e);
+
+	OPENSSL_cleanse((void *)r, sizeof(RLWE_PAIR));
+
+	OPENSSL_free(r);
+}
+
+/* Allocate and deallocate reconciliation data structure */
+
+RLWE_REC *RLWE_REC_new(void) {
+	RLWE_REC *ret;
+
+	ret = (RLWE_REC *)OPENSSL_malloc(sizeof(RLWE_REC));
+	if (ret == NULL) {
+		RLWEKEXerr(RLWEKEX_F_RLWE_REC_NEW, ERR_R_MALLOC_FAILURE);
+		return (NULL);
+	}
+
+	ret->version = 1;
+	ret->flags = 0;
+	ret->references = 1;
+
+	ret->c = (uint64_t *) malloc (16 * sizeof (uint64_t));
+
+	return (ret);
+}
+
+void RLWE_REC_free(RLWE_REC *r) {
+	int i;
+
+	if (r == NULL) return;
+
+	i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_EC);
+#ifdef REF_PRINT
+	REF_PRINT("RLWE_REC", r);
+#endif
+	if (i > 0) return;
+#ifdef REF_CHECK
+	if (i < 0) {
+		fprintf(stderr, "RLWE_REC_free, bad reference count\n");
+		abort();
+	}
+#endif
+
+	OPENSSL_cleanse(r->c, 16 * sizeof (uint64_t));
+	OPENSSL_free(r->c);
+
+	OPENSSL_cleanse((void *)r, sizeof(RLWE_REC));
+
+	OPENSSL_free(r);
+}
+
+/* Generate key pair */
+
+int RLWE_PAIR_generate_key(RLWE_PAIR *key, RLWE_CTX *ctx) {
+	int	ok = 0;
+
+	key->pub = RLWE_PUB_new();
+	if (key->pub == NULL) {
+		goto err;
+	}
+
+	key->pub->param = RLWE_PARAM_new();
+	if (key->pub->param == NULL) {
+		goto err;
+	}
+
+#if CONSTANT_TIME
+	sample_ct(key->s);
+	sample_ct(key->e);
+#else
+	sample(key->s);
+	sample(key->e);
+#endif
+	key_gen(key->pub->b, key->pub->param->a, key->s, key->e, ctx->fft_ctx);
+
+	ok = 1;
+	goto err;
+
+err:
+	return (ok);
+}
+
+/* Convert public keys data structures from/to binary */
+
+RLWE_PUB *o2i_RLWE_PUB(RLWE_PUB **pub, const unsigned char *in, long len) {
+	int i;
+	if (pub == NULL) {
+		RLWEKEXerr(RLWEKEX_F_O2I_RLWE_PUB, ERR_R_PASSED_NULL_PARAMETER);
+		return 0;
+	}
+	if (*pub == NULL && (*pub = RLWE_PUB_new()) == NULL) {
+		RLWEKEXerr(RLWEKEX_F_O2I_RLWE_PUB, ERR_R_MALLOC_FAILURE);
+		return 0;
+	}
+
+	if (len != 1024 * 4) {
+		RLWEKEXerr(RLWEKEX_F_O2I_RLWE_PUB, RLWEKEX_R_INVALID_LENGTH);
+		return 0;
+	}
+
+	for (i = 0; i < 1024; i++) {
+		(*pub)->b[i] = (((uint32_t) in[4 * i + 0]) << 24) |
+		               (((uint32_t) in[4 * i + 1]) << 16) |
+		               (((uint32_t) in[4 * i + 2]) << 8) |
+		               ( (uint32_t) in[4 * i + 3]);
+	}
+
+	return *pub;
+}
+
+int i2o_RLWE_PUB(RLWE_PUB *pub, unsigned char **out) {
+	size_t buf_len = 0;
+	int new_buffer = 0, i;
+
+	if (pub == NULL) {
+		RLWEKEXerr(RLWEKEX_F_I2O_RLWE_PUB, ERR_R_PASSED_NULL_PARAMETER);
+		return 0;
+	}
+
+	buf_len = 1024 * 4;
+
+	if (out == NULL || buf_len == 0)
+		/* out == NULL => just return the length of the octet string */
+		return buf_len;
+
+	if (*out == NULL) {
+		if ((*out = OPENSSL_malloc(buf_len)) == NULL) {
+			RLWEKEXerr(RLWEKEX_F_I2O_RLWE_PUB, ERR_R_MALLOC_FAILURE);
+			return 0;
+		}
+		new_buffer = 1;
+	}
+
+	for (i = 0; i < 1024; i++) {
+		(*out)[4 * i + 0] = (unsigned char)  (pub->b[i] >> 24);
+		(*out)[4 * i + 1] = (unsigned char) ((pub->b[i] >> 16) & 0xff);
+		(*out)[4 * i + 2] = (unsigned char) ((pub->b[i] >>  8) & 0xff);
+		(*out)[4 * i + 3] = (unsigned char) ( pub->b[i]        & 0xff);
+	}
+
+	if (!new_buffer)
+		*out += buf_len;
+	return buf_len;
+}
+
+/* Convert reconciliation data structure from/to binary */
+
+RLWE_REC *o2i_RLWE_REC(RLWE_REC **rec, const unsigned char *in, long len) {
+
+	if (rec == NULL) {
+		RLWEKEXerr(RLWEKEX_F_O2I_RLWE_REC, ERR_R_PASSED_NULL_PARAMETER);
+		return 0;
+	}
+	if (*rec == NULL && (*rec = RLWE_REC_new()) == NULL) {
+		RLWEKEXerr(RLWEKEX_F_O2I_RLWE_REC, ERR_R_MALLOC_FAILURE);
+		return 0;
+	}
+
+	if (len != 16 * 8) {
+		RLWEKEXerr(RLWEKEX_F_O2I_RLWE_REC, RLWEKEX_R_INVALID_LENGTH);
+		return 0;
+	}
+
+	memcpy((unsigned char *) ((*rec)->c), in, len);
+
+	return *rec;
+}
+
+int i2o_RLWE_REC(RLWE_REC *rec, unsigned char **out) {
+	size_t buf_len = 0;
+	int new_buffer = 0;
+
+	if (rec == NULL) {
+		RLWEKEXerr(RLWEKEX_F_I2O_RLWE_REC, ERR_R_PASSED_NULL_PARAMETER);
+		return 0;
+	}
+
+	buf_len = 16 * 8;
+
+	if (out == NULL || buf_len == 0)
+		/* out == NULL => just return the length of the octet string */
+		return buf_len;
+
+	if (*out == NULL) {
+		if ((*out = OPENSSL_malloc(buf_len)) == NULL) {
+			RLWEKEXerr(RLWEKEX_F_I2O_RLWE_REC, ERR_R_MALLOC_FAILURE);
+			return 0;
+		}
+		new_buffer = 1;
+	}
+
+	memcpy(*out, (unsigned char *) rec->c, buf_len);
+
+	if (!new_buffer)
+		*out += buf_len;
+	return buf_len;
+}
+
+/* Get public key from a key pair */
+RLWE_PUB *RLWE_PAIR_get_publickey(RLWE_PAIR *pair) {
+	if (pair == NULL) return NULL;
+	return pair->pub;
+}
+
+/* Does private key exist? */
+int RLWE_PAIR_has_privatekey(RLWE_PAIR *pair) {
+	return (pair->s != NULL) && (pair->e != NULL);
+}
+
+/* Compute shared secret values */
+int RLWEKEX_compute_key_alice(void *out, size_t outlen, const RLWE_PUB *peer_pub_key,  const RLWE_REC *peer_reconciliation,
+                              const RLWE_PAIR *priv_pub_key, void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), RLWE_CTX *ctx) {
+
+	int ret = -1;
+
+	uint32_t *w = (uint32_t *) OPENSSL_malloc (1024 * sizeof (uint32_t));
+	uint64_t *ka  = (uint64_t *) OPENSSL_malloc (16 * sizeof (uint64_t));
+
+	FFT_mul(w, peer_pub_key->b, priv_pub_key->s, ctx->fft_ctx);
+#if CONSTANT_TIME
+	rec_ct (ka, w, peer_reconciliation->c);
+#else
+	rec (ka, w, peer_reconciliation->c);
+#endif
+
+	if (KDF != 0) {
+		if (KDF((unsigned char *) ka, 16 * sizeof(uint64_t), out, &outlen) == NULL) {
+			RLWEKEXerr(RLWEKEX_F_RLWEKEX_COMPUTE_KEY_ALICE, RLWEKEX_R_KDF_FAILED);
+			goto err;
+		}
+		ret = outlen;
+	} else {
+		/* no KDF, just copy as much as we can */
+		if (outlen > 16 * sizeof(uint64_t))
+			outlen = 16 * sizeof(uint64_t);
+		memcpy(out, (unsigned char *) ka, outlen);
+		ret = outlen;
+	}
+
+err:
+	if (w) OPENSSL_free(w);
+	if (ka) OPENSSL_free(ka);
+	return (ret);
+
+}
+
+int RLWEKEX_compute_key_bob(void *out, size_t outlen, RLWE_REC *reconciliation, const RLWE_PUB *peer_pub_key,  const RLWE_PAIR *priv_pub_key,
+                            void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), RLWE_CTX *ctx) {
+
+	int ret = -1;
+
+	uint32_t *v  = (uint32_t *) OPENSSL_malloc (1024 * sizeof (uint32_t));
+	uint64_t *kb = (uint64_t *) OPENSSL_malloc (16 * sizeof (uint64_t));
+
+	uint32_t *eprimeprime = (uint32_t *) OPENSSL_malloc (1024 * sizeof (uint32_t));
+#if CONSTANT_TIME
+	sample_ct(eprimeprime);
+#else
+	sample(eprimeprime);
+#endif
+	key_gen(v, peer_pub_key->b, priv_pub_key->s, eprimeprime, ctx->fft_ctx);
+	OPENSSL_free(eprimeprime);
+
+#if CONSTANT_TIME
+	crossround2_ct(reconciliation->c, v);
+	round2_ct(kb, v);
+#else
+	crossround2(reconciliation->c, v);
+	round2(kb, v);
+#endif
+
+	if (KDF != 0) {
+		if (KDF((unsigned char *) kb, 16 * sizeof(uint64_t), out, &outlen) == NULL) {
+			RLWEKEXerr(RLWEKEX_F_RLWEKEX_COMPUTE_KEY_BOB, RLWEKEX_R_KDF_FAILED);
+			goto err;
+		}
+		ret = outlen;
+	} else {
+		/* no KDF, just copy as much as we can */
+		if (outlen > 16 * sizeof(uint64_t))
+			outlen = 16 * sizeof(uint64_t);
+		memcpy(out, (unsigned char *) kb, outlen);
+		ret = outlen;
+	}
+
+err:
+	if (v) OPENSSL_free(v);
+	if (kb) OPENSSL_free(kb);
+	return (ret);
+
+}
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekex_locl.h openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex_locl.h
--- openssl-1.0.1f/crypto/rlwekex/rlwekex_locl.h	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekex_locl.h	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,57 @@
+/* crypto/rlwekex/rlwekex_locl.h */
+
+#ifndef HEADER_RLWEKEX_LOCL_H
+#define HEADER_RLWEKEX_LOCL_H
+
+#include <openssl/rlwekex.h>
+#include "rlwekexlib/fft.h"
+
+#define CONSTANT_TIME 1
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+struct rlwe_param_st {
+	int version;
+	uint32_t *a;
+	int references;
+	int	flags;
+};
+
+struct rlwe_pub_st {
+	int version;
+	RLWE_PARAM *param;
+	uint32_t *b;
+	int references;
+	int	flags;
+};
+
+struct rlwe_pair_st {
+	int version;
+	RLWE_PUB *pub;
+	uint32_t *s;
+	uint32_t *e;
+	int references;
+	int	flags;
+};
+
+struct rlwe_rec_st {
+	int version;
+	uint64_t *c;
+	int references;
+	int	flags;
+};
+
+struct rlwe_ctx_st {
+	int version;
+	FFT_CTX *fft_ctx;
+	int references;
+	int	flags;
+};
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif /* HEADER_RLWEKEX_LOCL_H */
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekexlib/LICENSE openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/LICENSE
--- openssl-1.0.1f/crypto/rlwekex/rlwekexlib/LICENSE	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/LICENSE	2014-10-16 12:53:58.000000000 +0200
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekexlib/fft.c openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/fft.c
--- openssl-1.0.1f/crypto/rlwekex/rlwekexlib/fft.c	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/fft.c	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,280 @@
+/* This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * See LICENSE for complete information.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "fft.h"
+
+/* Reduction modulo p = 2^32 - 1.
+ * This is not a prime since 2^32-1 = (2^1+1)*(2^2+1)*(2^4+1)*(2^8+1)*(2^16+1).
+ * But since 2 is a unit in Z/pZ we can use it for computing FFTs in
+ * Z/pZ[X]/(X^(2^7)+1)
+ */
+
+/* Caution:
+ * We use a redundant representation where the integer 0 is represented both
+ * by 0 and 2^32-1.
+ * This approach follows the describtion from the paper:
+ * Joppe W. Bos, Craig Costello, Huseyin Hisil, and Kristin Lauter: Fast Cryptography in Genus 2
+ * EUROCRYPT 2013, Lecture Notes in Computer Science 7881, pp. 194-210, Springer, 2013.
+ * More specifically see: Section 3 related to Modular Addition/Subtraction.
+ */
+
+/* Compute: c = (a+b) mod (2^32-1)
+ * Let, t = a+b = t_1*2^32 + t0, where 0 <= t_1 <= 1, 0 <= t_0 < 2^32.
+ * Then t mod (2^32-1) = t0 + t1 */
+
+/* NOTE:
+ * Implementing this arithmetic in asm might significantly
+ * increase performance.
+ */
+
+#define modadd(c,a,b) \
+do { \
+  uint32_t _t = a+b; \
+  c = _t + (_t < a); \
+} while (0)
+
+#define modsub(c,a,b) c = (a-b) - (b > a)
+
+#define modmul(c,a,b) \
+do { \
+  uint64_t _T = (uint64_t) a * (uint64_t) b; \
+  modadd (c, ((uint32_t) _T), ((uint32_t) ((uint64_t) _T >> (uint64_t) 32))); \
+} while (0)
+
+
+#define modmuladd(c,a,b) \
+do { \
+  uint64_t _T = (uint64_t) a * (uint64_t) b + c; \
+  modadd (c, ((uint32_t) _T), ((uint32_t) ((uint64_t) _T >> (uint64_t) 32))); \
+} while (0)
+
+#define div2(c,a) c= (uint32_t) (((uint64_t) (a) + (uint64_t) ((uint32_t)(0-((a)&1))&0xFFFFFFFF))>>1)
+#define normalize(c,a) c = (a) + ((a) == 0xFFFFFFFF)
+
+/* Define the basic building blocks for the FFT. */
+#define DATATYPE uint32_t
+
+#define SET_ZERO(x) (x)=0
+#define add(c,a,b) modadd(c,a,b)
+#define sub(c,a,b) modsub(c,a,b)
+#define mul(c,a,b) modmul(c,a,b)
+#define moddiv2(c,a)  normalize(c,a); div2(c,c)
+#define neg(c,a)   (c)=0xFFFFFFFF-(a); normalize(c,c)
+#define squ(c,a)   mul(c,a,a)
+#define set(c,a)   (c)=(a)
+
+/* Reverse the bits, approach from "Bit Twiddling Hacks"
+ * See: https://graphics.stanford.edu/~seander/bithacks.html
+ */
+static uint32_t reverse(uint32_t x) {
+	x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1));
+	x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2));
+	x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4));
+	x = (((x & 0xff00ff00) >> 8) | ((x & 0x00ff00ff) << 8));
+	return ((x >> 16) | (x << 16));
+}
+
+/* Nussbaumer approach, see:
+ * H. J. Nussbaumer. Fast polynomial transform algorithms for digital convolution. Acoustics, Speech and
+ * Signal Processing, IEEE Transactions on, 28(2):205{215, 1980
+ * We followed the describtion from Knuth:
+ * D. E. Knuth. Seminumerical Algorithms. The Art of Computer Programming. Addison-Wesley, Reading,
+ * Massachusetts, USA, 3rd edition, 1997
+ * Exercise Exercise 4.6.4.59.
+ */
+
+static void naive(DATATYPE *z, const DATATYPE *x, const DATATYPE *y, unsigned int n) {
+	unsigned int i, j, k;
+	DATATYPE A, B;
+
+	for (i = 0; i < n; i++) {
+		SET_ZERO(B);
+
+		mul(A, x[0], y[i]);
+
+		for (j = 1; j <= i; j++) {
+			modmuladd(A, x[j], y[i - j]);
+		}
+
+		for (k = 1; j < n; j++, k++) {
+			modmuladd(B, x[j], y[n - k]);
+		}
+		sub(z[i], A, B);
+	}
+}
+
+static void nussbaumer_fft(DATATYPE *z, const DATATYPE *x, const DATATYPE *y, FFT_CTX *ctx) {
+	DATATYPE **X1;
+	DATATYPE **Y1;
+	DATATYPE **Z1;
+	DATATYPE *T1;
+	unsigned int i;
+	int j;
+
+	X1 = (DATATYPE **) ctx->x1;
+	Y1 = (DATATYPE **) ctx->y1;
+
+	for (i = 0; i < 32; i++) {
+		for (j = 0; j < 32; j++) {
+			set(X1[i][j], x[32 * j + i]);
+			set(X1[i + 32][j], x[32 * j + i]);
+
+			set(Y1[i][j], y[32 * j + i]);
+			set(Y1[i + 32][j], y[32 * j + i]);
+		}
+	}
+
+	Z1 = (DATATYPE **) ctx->z1;
+	T1 = (DATATYPE *) ctx->t1;
+
+	for (j = 4; j >= 0; j--) {
+		for (i = 0; i < (1U << (5 - j)); i++) {
+			unsigned int t, ssr = reverse(i);
+			for (t = 0; t < (1U << j); t++) {
+				unsigned int s, sr, I, L, a;
+				s = i;
+				sr = (ssr >> (32 - 5 + j));
+				sr <<= j;
+				s <<= (j + 1);
+
+				// X_i(w) = X_i(w) + w^kX_l(w) can be computed as
+				// X_ij = X_ij - X_l(j-k+r)  for  0 <= j < k
+				// X_ij = X_ij + X_l(j-k)    for  k <= j < r
+				I = s + t, L = s + t + (1 << j);
+
+				for (a = sr; a < 32; a++) {
+					set(T1[a], X1[L][a - sr]);
+				}
+				for (a = 0; a < sr; a++) {
+					neg(T1[a], X1[L][32 + a - sr]);
+				}
+
+				for (a = 0; a < 32; a++) {
+					sub(X1[L][a], X1[I][a], T1[a]);
+					add(X1[I][a], X1[I][a], T1[a]);
+				}
+
+				for (a = sr; a < 32; a++) {
+					set(T1[a], Y1[L][a - sr]);
+				}
+				for (a = 0; a < sr; a++) {
+					neg(T1[a], Y1[L][32 + a - sr]);
+				}
+
+				for (a = 0; a < 32; a++) {
+					sub(Y1[L][a], Y1[I][a], T1[a]);
+					add(Y1[I][a], Y1[I][a], T1[a]);
+				}
+			}
+		}
+	}
+
+	for (i = 0; i < 2 * 32; i++) {
+		naive(Z1[i], X1[i], Y1[i], 32);
+	}
+
+	for (j = 0; j <= (int) 5; j++) {
+		for (i = 0; i < (1U << (5 - j)); i++) {
+			unsigned int t, ssr = reverse(i);
+			for (t = 0; t < (1U << j); t++) {
+				unsigned int s, sr, A, B, a;
+				s = i;
+				sr = (ssr >> (32 - 5 + j));
+				sr <<= j;
+				s <<= (j + 1);
+
+				A = s + t;
+				B = s + t + (1 << j);
+				for (a = 0; a < 32; a++) {
+					sub(T1[a], Z1[A][a], Z1[B][a]);
+					moddiv2(T1[a], T1[a]);
+					add(Z1[A][a], Z1[A][a], Z1[B][a]);
+					moddiv2(Z1[A][a], Z1[A][a]);
+				}
+
+				// w^{-(r/m)s'} (Z_{s+t}(w)-Z_{s+t+2^j}(w))
+				for (a = 0; a < 32 - sr; a++) {
+					set(Z1[B][a], T1[a + sr]);
+				}
+				for (a = 32 - sr; a < 32; a++) {
+					neg(Z1[B][a], T1[a - (32 - sr)]);
+				}
+			}
+		}
+	}
+
+	for (i = 0; i < 32; i++) {
+		sub(z[i], Z1[i][0], Z1[32 + i][32 - 1]);
+		for (j = 1; j < 32; j++) {
+			add(z[32 * j + i], Z1[i][j], Z1[32 + i][j - 1]);
+		}
+	}
+}
+
+void FFT_mul(uint32_t *z, const uint32_t *x, const uint32_t *y, FFT_CTX *ctx) {
+	nussbaumer_fft(z, x, y, ctx);
+}
+
+void FFT_add(uint32_t *z, const uint32_t *x, const uint32_t *y) {
+	int i;
+	for (i = 0; i < 1024; i++) {
+		add(z[i], x[i], y[i]);
+	}
+}
+
+int FFT_CTX_init(FFT_CTX *ctx) {
+	ctx->x1 = (uint32_t **) malloc(64 * sizeof(uint32_t *));
+	ctx->y1 = (uint32_t **) malloc(64 * sizeof(uint32_t *));
+	ctx->z1 = (uint32_t **) malloc(64 * sizeof(uint32_t *));
+	ctx->t1 = (uint32_t *) malloc(64 * sizeof(uint32_t));
+	if (ctx->x1 == NULL || ctx->y1 == NULL || ctx->z1 == NULL || ctx->t1 == NULL) {
+		return 0;
+	}
+	for (int i = 0; i < 64; i++) {
+		ctx->x1[i] = (uint32_t *) malloc(64 * sizeof(uint32_t));
+		ctx->y1[i] = (uint32_t *) malloc(64 * sizeof(uint32_t));
+		ctx->z1[i] = (uint32_t *) malloc(64 * sizeof(uint32_t));
+		if (ctx->x1[i] == NULL || ctx->y1[i] == NULL || ctx->z1[i] == NULL) {
+			return 0;
+		}
+	}
+	return 1;
+}
+
+void FFT_CTX_clear(FFT_CTX *ctx) {
+	if (ctx == NULL) {
+		return;
+	}
+	for (int i = 0; i < 64; i++) {
+		memset((void *) ctx->x1[i], 0, 64 * sizeof(uint32_t));
+		memset((void *) ctx->y1[i], 0, 64 * sizeof(uint32_t));
+		memset((void *) ctx->z1[i], 0, 64 * sizeof(uint32_t));
+	}
+	memset((void *) ctx->t1, 0, 64 * sizeof(uint32_t));
+}
+
+void FFT_CTX_free(FFT_CTX *ctx) {
+	if (ctx == NULL) {
+		return;
+	}
+	for (int i = 0; i < 64; i++) {
+		free(ctx->x1[i]);
+		free(ctx->y1[i]);
+		free(ctx->z1[i]);
+	}
+	free(ctx->x1);
+	free(ctx->y1);
+	free(ctx->z1);
+	free(ctx->t1);
+}
+
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekexlib/fft.h openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/fft.h
--- openssl-1.0.1f/crypto/rlwekex/rlwekexlib/fft.h	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/fft.h	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,32 @@
+/* This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * See LICENSE for complete information.
+ */
+
+#ifndef _FFT_H_
+#define _FFT_H_
+
+#include <stdint.h>
+
+struct fft_ctx {
+	uint32_t **x1;
+	uint32_t **y1;
+	uint32_t **z1;
+	uint32_t *t1;
+};
+typedef struct fft_ctx FFT_CTX;
+
+int FFT_CTX_init(FFT_CTX *ctx);
+void FFT_CTX_clear(FFT_CTX *ctx);
+void FFT_CTX_free(FFT_CTX *ctx);
+
+void FFT_mul(uint32_t *z, const uint32_t *x, const uint32_t *y, FFT_CTX *ctx);
+void FFT_add(uint32_t *z, const uint32_t *x, const uint32_t *y);
+
+#endif /* _FFT_H_ */
+
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe.c openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe.c
--- openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe.c	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe.c	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,216 @@
+/* This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * See LICENSE for complete information.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "fft.h"
+#include "rlwe.h"
+
+#include "rlwe_table.h"
+
+#define setbit(a,x) ((a)[(x)/64] |= (((uint64_t) 1) << (uint64_t) ((x)%64)))
+#define getbit(a,x) (((a)[(x)/64] >> (uint64_t) ((x)%64)) & 1)
+#define clearbit(a,x) ((a)[(x)/64] &= ((~((uint64_t) 0)) - (((uint64_t) 1) << (uint64_t) ((x)%64))))
+
+#define RANDOM192(c) c[0] = RANDOM64; c[1] = RANDOM64; c[2] = RANDOM64
+
+/* Returns 0 if a >= b
+ * Returns 1 if a < b
+ * Where a and b are both 3-limb 64-bit integers.
+ * This function runs in constant time.
+ */
+static int cmplt_ct(uint64_t *a, uint64_t *b) {
+	int m;
+	m = (a[0] >= b[0]);
+	m = ((a[1] >= b[1]) && (!(a[1] == b[1]) || m));
+	m = ((a[2] >= b[2]) && (!(a[2] == b[2]) || m));
+	return (m == 0);
+}
+
+static uint32_t single_sample(uint64_t *in) {
+	uint32_t lower_index = 0, this_index = 32, upper_index = 64;
+	int i;
+	for (i = 0; i < 6; i++) {
+		if (cmplt_ct(in, rlwe_table[this_index])) {
+			upper_index = this_index;
+		} else {
+			lower_index = this_index;
+		}
+		this_index = (lower_index + upper_index) / 2;
+	}
+	return lower_index;
+}
+
+/* Constant time version. */
+static uint32_t single_sample_ct(uint64_t *in) {
+	uint32_t index = 0, i;
+
+	for (i = 0; i < 52; i++) {
+		uint32_t mask1, mask2;
+		mask1 = cmplt_ct(in, rlwe_table[i]);
+		mask1 = (uint32_t) (0 - (int32_t) mask1);
+		mask2 = (~mask1);
+		index = ((index & mask1) | (i & mask2));
+	}
+	return index;
+}
+
+void sample_ct(uint32_t *s) {
+	RANDOM_VARS
+	int i, j;
+	for (i = 0; i < 16; i++) {
+		uint64_t r = RANDOM64;
+		for (j = 0; j < 64; j++) {
+			uint64_t rnd[3];
+			int32_t m;
+			uint32_t t;
+			RANDOM192(rnd);
+			m = (r & 1);
+			r >>= 1;
+			m = 2 * m - 1;
+			// use the constant time version single_sample
+			s[i * 64 + j] = single_sample_ct(rnd);
+			t = 0xFFFFFFFF - s[i * 64 + j];
+			s[i * 64 + j] = ((t & (uint32_t) m) | (s[i * 64 + j] & (~((uint32_t) m))));
+		}
+	}
+}
+
+void sample(uint32_t *s) {
+	RANDOM_VARS
+	int i, j;
+	for (i = 0; i < 16; i++) {
+		uint64_t r = RANDOM64;
+		for (j = 0; j < 64; j++) {
+			uint64_t rnd[3];
+			int32_t m;
+			RANDOM192(rnd);
+			m = (r & 1);
+			r >>= 1;
+			m = 2 * m - 1;
+			s[i * 64 + j] = single_sample(rnd);
+			if (m == -1) {
+				s[i * 64 + j] = 0xFFFFFFFF - s[i * 64 + j];
+			}
+		}
+	}
+}
+
+void round2(uint64_t *out, const uint32_t *in) {
+	int i;
+
+	// out should have enough space for 1024-bits
+	memset(out, 0, 128);
+
+	//q/4 and 3*q/4
+	for (i = 0; i < 1024; i++) {
+		if (in[i] >= 1073741824 && in[i] <= 3221225471) {
+			setbit(out, i);
+		}
+	}
+}
+
+/* Constant time version. */
+void round2_ct(uint64_t *out, const uint32_t *in) {
+	int i;
+	memset(out, 0, 128);
+	for (i = 0; i < 1024; i++) {
+		uint32_t b = (in[i] >= 1073741824 && in[i] <= 3221225471);
+		out[i / 64] |= (((uint64_t) b) << (uint64_t) (i % 64));
+	}
+}
+
+/* We assume that e contains two random bits in the two
+ * least significant positions. */
+uint64_t dbl(const uint32_t in, int32_t e) {
+	// sample uniformly from [-1, 0, 0, 1]
+	// Hence, 0 is sampled with twice the probability of 1
+	e = (((e >> 1) & 1) - ((int32_t) (e & 1)));
+	return (uint64_t) ((((uint64_t) in) << (uint64_t) 1) - e);
+}
+
+void crossround2(uint64_t *out, const uint32_t *in) {
+	int i, j;
+	RANDOM_VARS
+	// out should have enough space for 1024-bits
+	memset(out, 0, 128);
+
+	for (i = 0; i < 64; i++) {
+		uint32_t e = RANDOM32;
+		for (j = 0; j < 16; j++) {
+			uint64_t dd = dbl(in[i * 16 + j], (int32_t) e);
+			e >>= 2;
+			//q/2 to q and 3*q/2 to 2*q
+			if ((dd >= (uint64_t) 2147483648 && dd <= (uint64_t) 4294967295) || (dd >= (uint64_t) 6442450942 && dd <= (uint64_t) 8589934590)) {
+				setbit(out, (i * 16 + j));
+			}
+		}
+	}
+}
+
+void crossround2_ct(uint64_t *out, const uint32_t *in) {
+	RANDOM_VARS
+	int i, j;
+	memset(out, 0, 128);
+	for (i = 0; i < 64; i++) {
+		uint32_t e = RANDOM32;
+		for (j = 0; j < 16; j++) {
+			uint64_t dd;
+			uint32_t b;
+			dd = dbl(in[i * 16 + j], (int32_t) e);
+			e >>= 2;
+			b = ((dd >= (uint64_t) 2147483648 && dd <= (uint64_t) 4294967295) || (dd >= (uint64_t) 6442450942 && dd <= (uint64_t) 8589934590));
+			out[(i * 16 + j) / 64] |= (((uint64_t) b) << (uint64_t) ((i * 16 + j) % 64));
+		}
+	}
+}
+
+void rec(uint64_t *out, const uint32_t *w, const uint64_t *b) {
+	int i;
+
+	// out should have enough space for 1024-bits
+	memset(out, 0, 128);
+
+	for (i = 0; i < 1024; i++) {
+		uint64_t coswi = (((uint64_t) w[i]) << (uint64_t) 1);
+		if (getbit(b, i) == 0) {
+			//Ceiling(2*3*q/8)..Floor(2*7*q/8)
+			if (coswi >= (uint64_t) 3221225472 && coswi <= (uint64_t) 7516192766) {
+				setbit(out, i);
+			}
+		} else {
+			// Ceiling(2*q/8)..Floor(2*5*q/8)
+			if (coswi >= (uint64_t) 1073741824 && coswi <= (uint64_t) 5368709118) {
+				setbit(out, i);
+			}
+		}
+	}
+}
+
+void rec_ct(uint64_t *out, const uint32_t *w, const uint64_t *b) {
+	int i;
+	memset(out, 0, 128);
+	for (i = 0; i < 1024; i++) {
+		uint64_t coswi;
+		uint32_t B;
+		coswi = (((uint64_t) w[i]) << (uint64_t) 1);
+		B = ((getbit(b, i) == 0 && coswi >= (uint64_t) 3221225472 && coswi <= (uint64_t) 7516192766) || (getbit(b, i) == 1 && coswi >= (uint64_t) 1073741824 && coswi <= (uint64_t) 5368709118));
+		out[i / 64] |= (((uint64_t) B) << (uint64_t) (i % 64));
+	}
+}
+
+void key_gen(uint32_t *out, const uint32_t *a, const uint32_t *s, const uint32_t *e, FFT_CTX *ctx) {
+	FFT_mul(out, a, s, ctx);
+	FFT_add(out, out, e);
+}
+
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe.h openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe.h
--- openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe.h	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe.h	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,36 @@
+/* This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * See LICENSE for complete information.
+ */
+
+#ifndef _RLWE_H_
+#define _RLWE_H_
+
+#include <stdint.h>
+
+#include "fft.h"
+
+void sample_ct(uint32_t *s);
+void sample(uint32_t *s);
+
+void round2_ct(uint64_t *out, const uint32_t *in);
+void round2(uint64_t *out, const uint32_t *in);
+
+/* We assume that e contains two random bits in the two
+ * least significant positions. */
+uint64_t dbl(const uint32_t in, int32_t e);
+
+void crossround2_ct(uint64_t *out, const uint32_t *in);
+void crossround2(uint64_t *out, const uint32_t *in);
+
+void rec_ct(uint64_t *out, const uint32_t *w, const uint64_t *b);
+void rec(uint64_t *out, const uint32_t *w, const uint64_t *b);
+
+void key_gen(uint32_t *out, const uint32_t *a, const uint32_t *s, const uint32_t *e, FFT_CTX *ctx);
+
+#endif /* _RLWE_H_ */
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe_a.h openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe_a.h
--- openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe_a.h	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe_a.h	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,268 @@
+/* This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * See LICENSE for complete information.
+ */
+
+uint32_t rlwe_a[1024] = {
+	0x29FE0191, 0xDD1A457D, 0x3534EE4B, 0x6450ED74,
+	0xBBFE9F64, 0x92BF0F31, 0x8DCF8995, 0x4C5E30D0,
+	0x9E2ED04D, 0x8C18FE0B, 0x1A70F2E7, 0x2625CD93,
+	0x0065DA14, 0x6E009722, 0xE6A70E8B, 0xAEF6EF56,
+	0x8C6C06AF, 0x9E59E953, 0x4995F67B, 0xE918EE9D,
+	0x8B4F41A7, 0x0D811041, 0xF5FE6458, 0x3C02B584,
+	0xCBCFC8FD, 0x5A01F116, 0x73408361, 0x44D3A098,
+	0xBBDEECF6, 0x90E09082, 0xF8538BA4, 0xF9600091,
+	0xD8D30FEF, 0x56201487, 0xACB2159D, 0x38F47F77,
+	0xED7A864F, 0x8FC785CA, 0x7CBD6108, 0x3CA577DE,
+	0xFF44CCC2, 0xA1385A79, 0x5C88E3AD, 0x177C46A9,
+	0xDA4A4DD8, 0x2AA3594F, 0xA4A5E629, 0x47CA6F6E,
+	0xB2DF1BC6, 0x6841B78E, 0x0823F5A8, 0xA18C7D52,
+	0x7634A0D1, 0xDA1751BA, 0x18B9D25D, 0x5B2643BC,
+	0xACC6975D, 0x48E786F4, 0x05E3ED4E, 0x4DC86568,
+	0x3F5C5F99, 0x585DBFD7, 0xEF6E0715, 0x7D36B823,
+	0x12D872CD, 0xD7B78F27, 0xDD672BF5, 0x2DC7C7EB,
+	0xA3033801, 0x50E48348, 0x9162A260, 0x0BE8F15B,
+	0xABB563EC, 0x06624C5A, 0x812BF7BC, 0x8637AC35,
+	0xF44504F3, 0xFF8577AB, 0x4A0161B0, 0x000AEB0E,
+	0x311204AF, 0x2A76831B, 0x4D903F3A, 0x97204FA9,
+	0x9EB524E3, 0x1757AFAC, 0xBA369FEC, 0xCD8F198D,
+	0x6B33C246, 0x51C13FCE, 0xB58ACC4E, 0x39ACF8DA,
+	0x7BB7EBF7, 0xEDC1449D, 0xC7B47FDB, 0x9C39148D,
+	0x4E688D7B, 0xFAD0C2C2, 0x296CE85C, 0x6045C89C,
+	0x6441C0C6, 0x50C7C83A, 0xC11764DD, 0x58D7EEA2,
+	0xE57B9D0E, 0x4E142770, 0xB8BFBB59, 0xE143EBAA,
+	0xFF60C855, 0x238727F0, 0xE35B4A5B, 0x8F96940B,
+	0x4498A6BA, 0x5911093A, 0x394DD002, 0x521B00D2,
+	0x140BDAF9, 0xEAB67207, 0x21E631A6, 0xA04AADA9,
+	0xA96A9843, 0x4B44CC9B, 0xE4D24C33, 0xC7E7AE78,
+	0xE45A6C72, 0xCBE61D3C, 0xCE5A4869, 0x10442A52,
+	0xDB11F194, 0x39FC415D, 0x7E7BDB76, 0xAE9EFA22,
+	0x25F4F262, 0x472DD0A7, 0x42EBD7A0, 0xE8038ECE,
+	0xD3DB002A, 0x8416D2EC, 0xDF88C989, 0x7FEA22D5,
+	0xC7A3F6FE, 0x37409982, 0xF45B75E2, 0x9A4AC289,
+	0x90406FD6, 0xEA1C74A5, 0x5777B39F, 0xD07F1FA3,
+	0xCE6EDA0D, 0xD150ECFB, 0xBEFF71BA, 0x50129EFC,
+	0x51CE65B9, 0xB9FB0AB8, 0x770C59CB, 0x11F2354F,
+	0x8623D4BB, 0xD6FCAFD6, 0xB2B1697C, 0x0D7067E2,
+	0x2BA5AFB9, 0xD369C585, 0x5B5E156C, 0xD8C81E6E,
+	0x80CFDF16, 0xF6F441EB, 0xC173BAF5, 0x78099E3A,
+	0xD38F027B, 0x4AC8D518, 0x8D0108A1, 0xE442B0F1,
+	0x56F9EA3C, 0xD0D6BBCA, 0x4E17DCB4, 0x69BF743B,
+	0x0CCE779F, 0xD5E59851, 0x63861EA2, 0xB1CB22C1,
+	0xBBFD2ACE, 0xDDA390D1, 0xEDF1059F, 0x04F80F89,
+	0xB13AF849, 0x58C66009, 0xE0D781C0, 0x588DC348,
+	0xA305669D, 0x0D7AF67F, 0x32BC3C38, 0xD725EFBA,
+	0xDC3D9434, 0x22BD7ED8, 0x2DFD2926, 0x4BDEAD3A,
+	0xB2D5ECE6, 0x16B05C99, 0xFEEC7104, 0xF6CAC918,
+	0x0944C774, 0xCE00633B, 0xC59DA01A, 0x41E8E924,
+	0x335DF501, 0x3049E8EE, 0x5B4B8AAC, 0xC962FC91,
+	0xD6BB22B3, 0x0AC870EB, 0xC3D99400, 0xA0CEAC28,
+	0xAF07DE1E, 0x831C2824, 0x258C5DDC, 0x779417E6,
+	0x41CB33D0, 0x4E51076A, 0xD1DB6038, 0x9E0B1C41,
+	0xA9A1F90D, 0xF27E7705, 0x75892711, 0x5D9F1175,
+	0x85CC508B, 0x5CA415BE, 0x1858C792, 0xFB18632F,
+	0xC94111EB, 0x937C0D28, 0xC2A09970, 0x386209D9,
+	0xBBDD9787, 0x2473F53A, 0xEF7E7637, 0xCFC8630B,
+	0x2BA3B7F8, 0x3C0047AD, 0x10D76FF7, 0xB1D9414D,
+	0xCEB7B902, 0xA5B543F5, 0x2E484905, 0xE0233C10,
+	0xD061A1F8, 0xCED0A901, 0xAC373CAC, 0x04281F37,
+	0x3609797F, 0xDB80964D, 0x7B49A74F, 0x7699656F,
+	0x0DCEC4BC, 0x0EC49C2D, 0xF1573A4E, 0xA3708464,
+	0x9A1E89F0, 0x6B26DEB6, 0x2329FA10, 0xCA4F2BFF,
+	0x9E012C8E, 0x788C1DFD, 0x2C758156, 0x2774C544,
+	0x150A1F7D, 0x50156D6E, 0x7B675DE1, 0x5D634703,
+	0xA7CEB801, 0x92733DAB, 0xB213C00B, 0x304A65B1,
+	0x8856CF8E, 0x7FF7DD67, 0xD0912293, 0x30064297,
+	0x663D051D, 0x01BC31B4, 0x2B1700BD, 0x39D7D18F,
+	0x1EAD5C95, 0x6FB9CD8B, 0xA09993A6, 0xB42071C0,
+	0x3C1F2195, 0x7FDF4CF8, 0xC7565A7E, 0x64703D34,
+	0x14B250EF, 0x2FA338D2, 0xAEE576DC, 0x6CCED41D,
+	0x612D0913, 0xD0680733, 0x8B4DBE8A, 0x6FFEA3D0,
+	0x46197CA2, 0xA77F916F, 0xFA5D7BD6, 0x01E22AEB,
+	0x18E462DD, 0x4EC9B937, 0xDE753212, 0x05113C94,
+	0x7786FBD4, 0xFB379F71, 0x756CF595, 0xEAADCFAB,
+	0xBBD74C2E, 0x1F234AC9, 0x85E28AEB, 0x329F7878,
+	0xD48FDE09, 0x47A60D0A, 0xAE95163F, 0x72E70995,
+	0x27F9FCBF, 0xBDCFCC41, 0x334BC498, 0xEE7931A1,
+	0xDFA6AEF4, 0x1EC5E1BF, 0x6221870F, 0xCD54AE13,
+	0x7B56EF58, 0x4847B490, 0x31640CD3, 0x10940E14,
+	0x556CC334, 0xC9E9B521, 0x499611FF, 0xBEC8D592,
+	0x44A7DCB7, 0x4AC2EABD, 0x7D387357, 0x1B76D4B6,
+	0x2EACE8C9, 0x52B2D2A4, 0x0C1F2A64, 0x50EF2B9A,
+	0x3B23F4F4, 0x8DDE415E, 0xF6B92D2D, 0x9DB0F840,
+	0xE18F309D, 0x737B7733, 0xF9F563C5, 0x3C5D4AEE,
+	0x8136B0AF, 0xC5AC5550, 0x6E93DEF9, 0x946BCCEC,
+	0x5163A273, 0xB5C72175, 0x4919EFBD, 0x222E9B68,
+	0x6E43D8EE, 0xAA039B23, 0x913FD80D, 0x42206F18,
+	0x5552C01F, 0x35B1136D, 0xFDC18279, 0x5946202B,
+	0xFAAE3A37, 0x4C764C88, 0x78075D9B, 0x844C8BA0,
+	0xCC33419E, 0x4B0832F6, 0x10D15E89, 0xEE0DD05A,
+	0x27432AF3, 0xE12CECA6, 0x60A231B3, 0xF81F258E,
+	0xE0BA44D7, 0x144F471B, 0xB4C8451E, 0x3705395C,
+	0xE8A69794, 0x3C23F27E, 0x186D2FBA, 0x3DAED36B,
+	0xF04DEFF1, 0x0CFA7BDD, 0xFEE45A4F, 0x5E9A4684,
+	0x98438C69, 0x5F1D921B, 0x7E43FD86, 0xBD0CF049,
+	0x28F47D38, 0x7DF38246, 0x8EED8923, 0xE524E7FC,
+	0x089BEC03, 0x15E3DE77, 0x78E8AE28, 0xCB79A298,
+	0x9F604E2B, 0x3C6428F7, 0xDCDEABF3, 0x33BAF60A,
+	0xBF801273, 0x247B0C3E, 0xE74A8192, 0xB45AC81D,
+	0xFC0D2ABE, 0xF17E99F5, 0x412BD1C1, 0x75DF4247,
+	0xA90FC3C0, 0xB2A99C0E, 0x0D3999D7, 0xD04543BA,
+	0x0FBC28A1, 0xEF68C7EF, 0x64327F30, 0xF11ECDBE,
+	0x4DBD312C, 0xD71CE03A, 0xAEFDAD34, 0xE1CC7315,
+	0x797A865C, 0xB9F1B1EB, 0xF7E68DFA, 0x816685B4,
+	0x9F38D44B, 0x366911C8, 0x756A7336, 0x696B8261,
+	0xC2FA21D2, 0x75085BF3, 0x2E5402B4, 0x75E6E744,
+	0xEAD80B0C, 0x4E689F68, 0x7A9452C6, 0xA5E1958A,
+	0x4B2B0A24, 0x97E0165E, 0xA4539B68, 0xF87A3096,
+	0x6543CA9D, 0x92A8D398, 0xA7D7FDB4, 0x1EA966B3,
+	0x75B50372, 0x4C63A778, 0x34E8E033, 0x87C60F82,
+	0xFC47303B, 0x8469AB86, 0x2DAADA50, 0xCFBB663F,
+	0x711C9C41, 0xE6C1C423, 0x8751BAA9, 0x861EC777,
+	0x31BCCCE1, 0xC1333271, 0x06864BEE, 0x41B50595,
+	0xD2267D30, 0x878BA5C5, 0x65267F56, 0x2118FB18,
+	0xA6DDD3DE, 0x8D309B98, 0x68928CB2, 0xFAE967DC,
+	0x3CEC52D0, 0x9CA8404B, 0xAADD68A8, 0x3AC6B1DF,
+	0xD53D67EA, 0x95C8D163, 0xB5F03F1D, 0x3A4C28A7,
+	0xE3C4B709, 0xB8EB7C65, 0xE76B42A3, 0x25E5A217,
+	0x6B6DD2B4, 0xBEFC5DF4, 0x9ACA5758, 0xC17F14D3,
+	0xB224A9D3, 0xDE1A7C8F, 0x1382911B, 0x627A2FB9,
+	0xC66AE36E, 0x02CC60EF, 0xC6800B20, 0x7A583C77,
+	0xE1CECEE8, 0xCA0001B4, 0x6A14CF16, 0xEF45DD21,
+	0x64CAA7D5, 0xFF3F1D95, 0xD328C67E, 0xC85868B1,
+	0x7FBF3FEB, 0x13D68388, 0x25373DD9, 0x8DE47EFB,
+	0x47912F26, 0x65515942, 0xC5ED711D, 0x6A368929,
+	0xA2405C50, 0xFFA9D6EB, 0xED39A0D4, 0xE456B8B5,
+	0x53283330, 0x7837FD52, 0x6EE46629, 0xCAFC9D63,
+	0xB781B08F, 0xDD61D834, 0xFB9ACF09, 0xEDA4444A,
+	0xBB6AA57F, 0xAED2385C, 0x22C9474D, 0x36E90167,
+	0xE6DF6150, 0xF1B0DA3B, 0xC3F6800E, 0x966302E0,
+	0x7DB1F627, 0xF9632186, 0xB4933075, 0x81C5C817,
+	0x878CA140, 0x4EDE8FED, 0x1AF347C1, 0xFDEB72BA,
+	0x2DA7FF9A, 0xB9BA3638, 0x2BB883F1, 0x474D1417,
+	0xC2F474A4, 0x1E2CF9F3, 0x231CB6B0, 0x7E574B53,
+	0xEDA8E1DA, 0xE1ACB7BB, 0xD1E354A6, 0x7C32B431,
+	0x8189991B, 0x25F9376A, 0x3FFA8782, 0xCD9038F1,
+	0x119EDBD1, 0x5C571840, 0x3DCA350F, 0x83923909,
+	0x9DC3CF55, 0x94D79DD0, 0xD683DE2B, 0xECF4316A,
+	0x0FFF48D4, 0x5D8076ED, 0x12B42C97, 0x2284CDB4,
+	0xCB245554, 0x3025B4D9, 0xB0075F35, 0x43A3802E,
+	0x18332B4D, 0x056C4467, 0xC597E3F7, 0x3F0EAF9D,
+	0xF48EBB9F, 0x92F62731, 0xBDB76296, 0x516D4466,
+	0x226102B3, 0x15E38046, 0xA683C4E0, 0x6C0D1962,
+	0xE20CB6CA, 0xC90C1D70, 0xD0FF8692, 0xD1419690,
+	0x2D6F1081, 0x34782E5E, 0xAE092CD5, 0x90C99193,
+	0xE97C0405, 0xEAE201DA, 0x631FB5AC, 0x279A2821,
+	0xDF47BA5B, 0xFBE587E2, 0x6810AD2D, 0xC63E94BD,
+	0x9AF36B42, 0xF14F0855, 0x946CE350, 0x7E3320E0,
+	0x34130DFF, 0x8C57C413, 0xAB0723B2, 0xF514C743,
+	0x63694BA3, 0x5665D23D, 0x6292C0B5, 0x9D768323,
+	0x2F8E447C, 0xB99A00FB, 0x6F8E5970, 0x69B3BB45,
+	0x59253E02, 0x1C518A02, 0xDD7C1232, 0xC6416C38,
+	0x77E10340, 0xCF6BEB9A, 0x006F9239, 0x0E99B50F,
+	0x863AD247, 0x75F0451A, 0x096E9094, 0xE0C2B357,
+	0x7CC81E15, 0x222759D4, 0xEE5BCFD0, 0x050F829B,
+	0x723B8FA9, 0x76143C55, 0x3B455EAF, 0xC2683EFD,
+	0xEE7874B4, 0x9BCE92F7, 0x6EED7461, 0x8E93898F,
+	0xA4EBE1D0, 0xFA4F019F, 0x1B0AD6DA, 0xA39CDE2F,
+	0x27002B33, 0x830D478D, 0x3EEA937E, 0x572E7DA3,
+	0x4BFFA4D1, 0x5E53DB0B, 0x708D21EE, 0xB003E23B,
+	0x12ED0756, 0x53CA0412, 0x73237D35, 0x438EC16B,
+	0x295177B8, 0xC85F4EE6, 0xB67FD3B4, 0x5221BC81,
+	0xD84E3094, 0x18C84200, 0x855E0795, 0x37BEC004,
+	0xDF9FAFC9, 0x60BEB6CD, 0x8645F0C5, 0xB1D2F1C3,
+	0xECDC4AE3, 0x424D17F1, 0x8429238C, 0x6155EAAB,
+	0xA17BEE21, 0x218D3637, 0x88A462CC, 0x8A1A031E,
+	0x3F671EA5, 0x9FA08639, 0xFF4A0F8E, 0x34167A7D,
+	0x1A817F54, 0x3215F21E, 0x412DD498, 0x57B633E7,
+	0xE8A2431F, 0x397BD699, 0x5A155288, 0xBB3538E8,
+	0xA49806D2, 0x49438A07, 0x24963568, 0x40414C26,
+	0xE45C08D4, 0x61D2435B, 0x2F36AEDE, 0x6580370C,
+	0x02A56A5E, 0x53B18017, 0xAF2C83FC, 0xF4C83871,
+	0xD9E5DDC3, 0x17B90B01, 0xED4A0904, 0xFA6DA26B,
+	0x35D9840D, 0xA0C505E4, 0x3396D0B5, 0xEC66B509,
+	0xC190E41C, 0x2F0CE5CF, 0x419C3E94, 0x220D42CA,
+	0x2F611F4F, 0x47906734, 0x8C2CDB17, 0xD8658F1C,
+	0x2F6745CD, 0x543D0D4F, 0x818F0469, 0x380FFDAE,
+	0xF5DD91E2, 0xAD25E46A, 0xE7039205, 0xA9F47165,
+	0xB2114C12, 0xCF7F626F, 0x54D2C9FF, 0xE4736A36,
+	0x16DB09FC, 0xE2B787BB, 0x9631709A, 0x72629F66,
+	0x819EBA08, 0x7F5D73F3, 0xA0B0B91C, 0xFEDFBA71,
+	0x252F14EE, 0xF26F8FA2, 0x92805F94, 0x43650F7F,
+	0x3051124F, 0x72CA8EAD, 0x21973E34, 0xA5B70509,
+	0xB36A41CC, 0xC52EDE5F, 0xF706A24E, 0x8AAF9F92,
+	0xADF6D99A, 0x23746D73, 0x1DA39F70, 0x9660FC8F,
+	0xA0A8CFEB, 0x83D5EFCA, 0x0AA4A72F, 0xEEF1B2DE,
+	0x00CFCC66, 0x8A145369, 0x6376CEDA, 0xA3262E2E,
+	0x3367BBA8, 0x01488C32, 0x5561A2AD, 0x40821BF2,
+	0xF0C89F61, 0xC4FAA6B3, 0xD843377A, 0x67A76555,
+	0xE8D9F1CE, 0x943034FF, 0x2BD468BD, 0xA514D935,
+	0x50CDB19D, 0xA09C7E9E, 0x6FEBEC30, 0xB1B36CF7,
+	0xCD7A30BC, 0x36C6FE0A, 0x2DF52C45, 0x45C9957F,
+	0x65076A79, 0xBF783DEE, 0x718D37F0, 0x098F9117,
+	0x9A70C430, 0x80EB1A53, 0x9F2505B1, 0x48D10D98,
+	0xB8D781E9, 0xF2376133, 0xECF25B98, 0x5A3B0E18,
+	0x2F623537, 0x9F0E34A4, 0xF1027EB6, 0xF9B16022,
+	0xBA3FEC59, 0xEF7226FD, 0x9F3058AA, 0xBB51DE0E,
+	0xD5435EA0, 0x8A6479D5, 0x077708B8, 0x9634876A,
+	0x069A260A, 0x168D9E6A, 0x9FD18E94, 0x8A7ACD53,
+	0x8E5A5869, 0x1B6F35FD, 0xA968913B, 0xC72F076B,
+	0x7DDA354C, 0x25B0297C, 0xD07219D5, 0xA66862BA,
+	0x87E8EE67, 0xFA28809B, 0x55762443, 0x31EF4956,
+	0xF4F4A511, 0x9A9378CB, 0x42ABDBDE, 0x7AA484B7,
+	0xE8EC22ED, 0xCADDEF61, 0x9D18538A, 0xA81B923E,
+	0x9C32F92A, 0x6D278E58, 0x4CDFC716, 0xAB64814F,
+	0xF832BF1A, 0xE2C1A36B, 0x20675610, 0xE78D855A,
+	0x38332C3D, 0x5AE0EAD9, 0x2E23F22D, 0x3C8683C5,
+	0xA351AF89, 0x54720D3B, 0xABC6E51F, 0x89330C8E,
+	0x600D5650, 0x197EA0C6, 0x7D502A5D, 0x3A536EA7,
+	0x7DF71F32, 0x456FE645, 0x3EF5E7A2, 0x6664BCAF,
+	0xA9D074C2, 0xE9D9E478, 0x1AE9AB77, 0xFECE7160,
+	0xC618EEEC, 0x771B0026, 0x2B54F43C, 0x145DA102,
+	0x1B3D7949, 0xBB6E2D9D, 0xDB8FDC4A, 0x25397EBA,
+	0x9228A6E9, 0x56B4C69D, 0x337B943C, 0xE35B716C,
+	0xF7FE89A1, 0x023AC20D, 0x033165C8, 0x9F13B130,
+	0xC1BAFB1D, 0xA2C42C8C, 0x58E4D431, 0xE10741E6,
+	0x2547589A, 0x8D9EF7BD, 0x7E322280, 0xF49FDDC2,
+	0xBE21A094, 0xA061178A, 0x34D9F13B, 0x694D652F,
+	0x05084A2A, 0x2767B991, 0xE8536AB4, 0xEBFADF6F,
+	0xF4C8DFAC, 0xD9967CCA, 0xE04BCF3F, 0x232B3460,
+	0x9FF6E88A, 0x6DF3A2B0, 0x0FE10E99, 0x7B059283,
+	0x067BFB57, 0x8DDA26B0, 0xB7D6652F, 0x85705248,
+	0x0826240C, 0x5DF7F52E, 0x47973463, 0xB9C22D37,
+	0x9BEB265D, 0x493AB6FD, 0x10C0FB07, 0x947C102A,
+	0x5FEC0608, 0x140E07AE, 0x8B330F43, 0x9364A649,
+	0xC9AD63EF, 0xBE4B2475, 0x1A09AC77, 0x9E40A4B0,
+	0xBA9C23E7, 0x7F4A798D, 0xE2C52D66, 0xA26EE9E0,
+	0x8C79DCE7, 0xDD7F1C3D, 0x6AE83B20, 0x073DBA03,
+	0xB1844D97, 0x16D7ED6E, 0x5E0DE0B1, 0xA497D717,
+	0xFA507AA2, 0xC332649B, 0x21419E15, 0x384D9CCC,
+	0x8B915A8B, 0xBA328FD5, 0xF99E8016, 0x545725EC,
+	0xED9840ED, 0x71E5D78A, 0x21862496, 0x6F858B6C,
+	0xF3736AE2, 0x8979FC2B, 0x5C8122D0, 0x0A20EB5A,
+	0x2278AA6E, 0x55275E74, 0x22D57650, 0xE5FFDC96,
+	0x6BA86E10, 0x4EC5BFCC, 0x05AFA305, 0xFB7FD007,
+	0x726EA097, 0xF6A349C4, 0xCB2F71E4, 0x08DD80BA,
+	0x892D0E23, 0xBD2E0A55, 0x40AC0CD3, 0xBFAF5688,
+	0x6E40A6A5, 0x6DA1BBE0, 0x969557A9, 0xFB88629B,
+	0x11F845C4, 0x5FC91C6F, 0x1B0C7E79, 0xD6946953,
+	0x27A164A0, 0x55D20869, 0x29A2182D, 0x406AA963,
+	0x74F40C59, 0x56A90570, 0x535AC9C6, 0x9521EF76,
+	0xBA38759B, 0xCD6EF76E, 0xF2181DB9, 0x7BE78DA6,
+	0xF88E4115, 0xABA7E166, 0xF60DC9B3, 0xFECA1EF3,
+	0x43DF196A, 0xCC4FC9DD, 0x428A8961, 0xCF6B4560,
+	0x87B30B57, 0x20E7BAC5, 0xBFBDCCDF, 0xF7D3F6BB,
+	0x7FC311C8, 0x2C7835B5, 0xA24F6821, 0x6A38454C,
+	0x460E42FD, 0x2B6BA832, 0xC7068C72, 0x28CDCE59,
+	0xAE82A0B4, 0x25F39572, 0x9B6C7758, 0xE0FE9EBA,
+	0xA8F03EE1, 0xD70B928E, 0x95E529D7, 0xDD91DB86,
+	0xF912BA8C, 0x7F478A6A, 0x1F017850, 0x5A717E10,
+	0xDAC243F9, 0xD235F314, 0x4F80AAE6, 0xA46364D8,
+	0xA1E3A9E9, 0x495FEFB1, 0xB9058508, 0x23A20999,
+	0x73D18118, 0xCA3EEE2A, 0x34E1C7E2, 0xAADBADBD
+};
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe_table.h openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe_table.h
--- openssl-1.0.1f/crypto/rlwekex/rlwekexlib/rlwe_table.h	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekexlib/rlwe_table.h	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,64 @@
+/* This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * See LICENSE for complete information.
+ */
+
+static uint64_t rlwe_table[52][3] = {
+	{0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0x1FFFFFFFFFFFFFFF},
+	{0xE0C81DA0D6A8BD22, 0x161ABD186DA13542, 0x5CEF2C248806C827},
+	{0x8D026C4E14BC7408, 0x4344C125B3533F22, 0x9186506BCC065F20},
+	{0x10AC7CEC7D7E2A3B, 0x5D62CE65E6217813, 0xBAAB5F82BCDB43B3},
+	{0x709C92996E94D801, 0x1411F551608E4D22, 0xD7D9769FAD23BCB1},
+	{0x6287D827008404B7, 0x7E1526D618902F20, 0xEA9BE2F4D6DDB5ED},
+	{0x34CBDC118C15F40E, 0xE7D2A13787E94674, 0xF58A99474919B8C9},
+	{0xD521F7EBBBE8C3A2, 0xE8A773D9A1EA0AAB, 0xFB5117812753B7B8},
+	{0xC3D9E58131089A6A, 0x148CB49FF716491B, 0xFE151BD0928596D3},
+	{0x2E060C4A842A27F6, 0x07E44D009ADB0049, 0xFF487508BA9F7208},
+	{0xFCEDEFCFAA887582, 0x1A5409BF5D4B039E, 0xFFC16686270CFC82},
+	{0x4FE22E5DF9FAAC20, 0xFDC99BFE0F991958, 0xFFEC8AC3C159431B},
+	{0xA36605F81B14FEDF, 0xA6FCD4C13F4AFCE0, 0xFFFA7DF4B6E92C28},
+	{0x9D1FDCFF97BBC957, 0x4B869C6286ED0BB5, 0xFFFE94BB4554B5AC},
+	{0x6B3EEBA74AAD104B, 0xEC72329E974D63C7, 0xFFFFAADE1B1CAA95},
+	{0x48C8DA4009C10760, 0x337F6316C1FF0A59, 0xFFFFEDDC1C6436DC},
+	{0x84480A71312F35E7, 0xD95E7B2CD6933C97, 0xFFFFFC7C9DC2569A},
+	{0x23C01DAC1513FA0F, 0x8E0B132AE72F729F, 0xFFFFFF61BC337FED},
+	{0x90C89D6570165907, 0x05B9D725AAEA5CAD, 0xFFFFFFE6B3CF05F7},
+	{0x692E2A94C500EC7D, 0x99E8F72C370F27A6, 0xFFFFFFFC53EA610E},
+	{0x28C2998CEAE37CC8, 0xC6E2F0D7CAFA9AB8, 0xFFFFFFFF841943DE},
+	{0xC515CF4CB0130256, 0x4745913CB4F9E4DD, 0xFFFFFFFFF12D07EC},
+	{0x39F0ECEA047D6E3A, 0xEE62D42142AC6544, 0xFFFFFFFFFE63E348},
+	{0xDF11BB25B50462D6, 0x064A0C6CC136E943, 0xFFFFFFFFFFD762C7},
+	{0xCDBA0DD69FD2EA0F, 0xC672F3A74DB0F175, 0xFFFFFFFFFFFC5E37},
+	{0xFDB966A75F3604D9, 0x6ABEF8B144723D83, 0xFFFFFFFFFFFFB48F},
+	{0x3C4FECBB600740D1, 0x697598CEADD71A15, 0xFFFFFFFFFFFFFA72},
+	{0x1574CC916D60E673, 0x12F5A30DD99D7051, 0xFFFFFFFFFFFFFFA1},
+	{0xDD3DCD1B9CB7321D, 0x4016ED3E05883572, 0xFFFFFFFFFFFFFFFA},
+	{0xB4A4E8CF3DF79A7A, 0xAF22D9AFAD5A73CF, 0xFFFFFFFFFFFFFFFF},
+	{0x91056A8196F74466, 0xFBF88681905332BA, 0xFFFFFFFFFFFFFFFF},
+	{0x965B9ED9BD366C04, 0xFFD16385AF29A51F, 0xFFFFFFFFFFFFFFFF},
+	{0xF05F75D38F2D28A3, 0xFFFE16FF8EA2B60C, 0xFFFFFFFFFFFFFFFF},
+	{0x77E35C8980421EE8, 0xFFFFEDD3C9DDC7E8, 0xFFFFFFFFFFFFFFFF},
+	{0x92783617956F140A, 0xFFFFFF63392B6E8F, 0xFFFFFFFFFFFFFFFF},
+	{0xA536DC994639AD78, 0xFFFFFFFB3592B3D1, 0xFFFFFFFFFFFFFFFF},
+	{0x8F3A871874DD9FD5, 0xFFFFFFFFDE04A5BB, 0xFFFFFFFFFFFFFFFF},
+	{0x310DE3650170B717, 0xFFFFFFFFFF257152, 0xFFFFFFFFFFFFFFFF},
+	{0x1F21A853A422F8CC, 0xFFFFFFFFFFFB057B, 0xFFFFFFFFFFFFFFFF},
+	{0x3CA9D5C6DB4EE2BA, 0xFFFFFFFFFFFFE5AD, 0xFFFFFFFFFFFFFFFF},
+	{0xCFD9CE958E59869C, 0xFFFFFFFFFFFFFF81, 0xFFFFFFFFFFFFFFFF},
+	{0xDB8E1F91D955C452, 0xFFFFFFFFFFFFFFFD, 0xFFFFFFFFFFFFFFFF},
+	{0xF78EE3A8E99E08C3, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFE1D7858BABDA25, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFF9E52E32CAB4A, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFFFEE13217574F, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFFFFFD04888041, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFFFFFFF8CD8A56, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFFFFFFFFF04111, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFFFFFFFFFFE0C5, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFFFFFFFFFFFFC7, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+	{0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF}
+};
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/crypto/rlwekex/rlwekextest.c openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekextest.c
--- openssl-1.0.1f/crypto/rlwekex/rlwekextest.c	1970-01-01 01:00:00.000000000 +0100
+++ openssl-1.0.1f-rlwekex/crypto/rlwekex/rlwekextest.c	2014-10-16 12:38:19.000000000 +0200
@@ -0,0 +1,228 @@
+/* crypto/rlwekex/rlwekextest.c */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "../e_os.h"
+
+#include <openssl/opensslconf.h>
+#include <openssl/crypto.h>
+#include <openssl/bio.h>
+#include <openssl/bn.h>
+#include <openssl/objects.h>
+#include <openssl/rand.h>
+#include <openssl/sha.h>
+#include <openssl/err.h>
+
+#ifdef OPENSSL_NO_RLWEKEX
+int main(int argc, char *argv[]) {
+	printf("No RLWEKEX support\n");
+	return (0);
+}
+#else
+#include <openssl/rlwekex.h>
+
+#ifdef OPENSSL_SYS_WIN16
+#define MS_CALLBACK	_far _loadds
+#else
+#define MS_CALLBACK
+#endif
+
+static const char rnd_seed[] = "string to make the random number generator think it has entropy";
+
+static const int KDF1_SHA1_len = 20;
+static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen) {
+#ifndef OPENSSL_NO_SHA
+	if (*outlen < SHA_DIGEST_LENGTH)
+		return NULL;
+	else
+		*outlen = SHA_DIGEST_LENGTH;
+	return SHA1(in, inlen, out);
+#else
+	return NULL;
+#endif
+}
+
+
+static int test_rlwekex(BIO *out, int single) {
+
+	RLWE_PAIR *alice = NULL, *bob = NULL;
+	RLWE_REC *rec = NULL;
+
+	RLWE_PUB *bob_reconstructed = NULL;
+	RLWE_REC *rec_reconstructed = NULL;
+
+	RLWE_CTX *ctx = NULL;
+
+	unsigned char *apubbuf = NULL, *bpubbuf = NULL;
+	size_t apublen, bpublen;
+
+	unsigned char *recbuf = NULL;
+	size_t reclen;
+
+	unsigned char *assbuf = NULL, *bssbuf = NULL;
+	size_t asslen, bsslen;
+
+	int i, ret = 0;
+
+	alice = RLWE_PAIR_new();
+	bob = RLWE_PAIR_new();
+	bob_reconstructed = RLWE_PUB_new();
+	rec = RLWE_REC_new();
+	rec_reconstructed = RLWE_REC_new();
+	ctx = RLWE_CTX_new ();
+	if ((alice == NULL) || (bob == NULL) || (bob_reconstructed == NULL) || (rec == NULL) || (rec_reconstructed == NULL) || (ctx == NULL)) {
+		goto err;
+	}
+
+	if (single) BIO_puts(out, "Testing key generation\n");
+
+	if (!RLWE_PAIR_generate_key(alice, ctx)) goto err;
+	apublen = i2o_RLWE_PUB(RLWE_PAIR_get_publickey(alice), &apubbuf);
+	if (single) BIO_printf(out, "  pub_A (%i bytes) = ", (int) apublen);
+	if (apublen <= 0) {
+		fprintf(stderr, "Error in RLWEKEX routines\n");
+		ret = 0;
+		goto err;
+	}
+	if (single) {
+		for (i = 0; i < apublen; i++) {
+			BIO_printf(out, "%02X", apubbuf[i]);
+		}
+		BIO_puts(out, "\n");
+	}
+
+	if (!RLWE_PAIR_generate_key(bob, ctx)) goto err;
+	bpublen = i2o_RLWE_PUB(RLWE_PAIR_get_publickey(bob), &bpubbuf);
+	if (single) {
+		BIO_printf(out, "\n  pub_B (%i bytes) = ", (int) bpublen);
+		for (i = 0; i < bpublen; i++) {
+			BIO_printf(out, "%02X", bpubbuf[i]);
+		}
+		BIO_puts(out, "\n");
+	}
+
+	if (single) BIO_puts(out, "Testing Bob shared secret generation\n");
+
+	bsslen = KDF1_SHA1_len;
+	bssbuf = (unsigned char *)OPENSSL_malloc(bsslen);
+	bsslen = RLWEKEX_compute_key_bob(bssbuf, bsslen, rec,
+	                                 RLWE_PAIR_get_publickey(alice), bob, KDF1_SHA1, ctx);
+	if (single) {
+		BIO_printf(out, "  key_B (%i bytes) = ", (int) bsslen);
+		for (i = 0; i < bsslen; i++) {
+			BIO_printf(out, "%02X", bssbuf[i]);
+		}
+		BIO_puts(out, "\n");
+	}
+	reclen = i2o_RLWE_REC(rec, &recbuf);
+	if (single) {
+		BIO_printf(out, "  rec (%i bytes) = ", (int) reclen);
+		for (i = 0; i < reclen; i++) {
+			BIO_printf(out, "%02X", recbuf[i]);
+		}
+		BIO_puts(out, "\n");
+	}
+
+	if (single) BIO_puts(out, "Reconstructing Bob's values\n");
+
+	if (o2i_RLWE_PUB(&bob_reconstructed, bpubbuf, bpublen) == NULL) {
+		fprintf(stderr, "Error in RLWEKEX routines (Bob public key reconstruction)\n");
+		ret = 0;
+		goto err;
+	}
+	if (o2i_RLWE_REC(&rec_reconstructed, recbuf, reclen) == NULL) {
+		fprintf(stderr, "Error in RLWEKEX routines (Bob reconciliation reconstruction)\n");
+		ret = 0;
+		goto err;
+	}
+
+	if (single) BIO_puts(out, "Testing Alice shared secret generation\n");
+
+	asslen = KDF1_SHA1_len;
+	assbuf = (unsigned char *)OPENSSL_malloc(asslen);
+	asslen = RLWEKEX_compute_key_alice(assbuf, asslen, bob_reconstructed, rec_reconstructed, alice, KDF1_SHA1, ctx);
+	if (single) {
+		BIO_printf(out, "  key_A (%i bytes) = ", (int) asslen);
+		for (i = 0; i < asslen; i++) {
+			BIO_printf(out, "%02X", assbuf[i]);
+		}
+		BIO_puts(out, "\n");
+	}
+
+	if ((bsslen != asslen) || (memcmp(assbuf, bssbuf, asslen) != 0)) {
+		BIO_printf(out, " failed\n\n");
+		fprintf(stderr, "Error in RLWEKEX routines (mismatched shared secrets)\n");
+		ret = 0;
+	} else {
+		if (single) BIO_printf(out, "ok!\n");
+		ret = 1;
+	}
+err:
+	ERR_print_errors_fp(stderr);
+
+	OPENSSL_free(bssbuf);
+	OPENSSL_free(assbuf);
+	OPENSSL_free(apubbuf);
+	OPENSSL_free(bpubbuf);
+	OPENSSL_free(recbuf);
+	RLWE_REC_free(rec_reconstructed);
+	RLWE_REC_free(rec);
+	RLWE_PUB_free(bob_reconstructed);
+	RLWE_PAIR_free(bob);
+	RLWE_PAIR_free(alice);
+	RLWE_CTX_free(ctx);
+	return (ret);
+}
+
+int main(int argc, char *argv[]) {
+	int ret = 1;
+	BIO *out;
+
+	CRYPTO_malloc_debug_init();
+	CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
+	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
+
+#ifdef OPENSSL_SYS_WIN32
+	CRYPTO_malloc_init();
+#endif
+
+	RAND_seed(rnd_seed, sizeof rnd_seed);
+
+	out = BIO_new(BIO_s_file());
+	if (out == NULL) EXIT(1);
+	BIO_set_fp(out, stdout, BIO_NOCLOSE);
+
+	if (argc == 1) {
+		if (!test_rlwekex(out, 1)) goto err;
+	} else {
+		int iterations = 0;
+		int failures = 0;
+		time_t starttime = time(NULL);
+		while (1) {
+			iterations++;
+			if (test_rlwekex(out, 0) == 1) {
+			} else {
+				failures++;
+			}
+			if ((iterations % 100) == 0) {
+				BIO_printf(out, "Iterations: %d, failures: %d, elapsed time: %ld\n", iterations, failures, time(NULL) - starttime);
+			}
+		}
+	}
+
+	ret = 0;
+
+err:
+	ERR_print_errors_fp(stderr);
+	BIO_free(out);
+	CRYPTO_cleanup_all_ex_data();
+	ERR_remove_thread_state(NULL);
+	CRYPTO_mem_leaks_fp(stderr);
+	EXIT(ret);
+	return (ret);
+}
+
+#endif
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/Makefile openssl-1.0.1f-rlwekex/ssl/Makefile
--- openssl-1.0.1f/ssl/Makefile	2014-01-06 15:36:06.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/Makefile	2014-10-16 12:38:15.000000000 +0200
@@ -104,40 +104,42 @@
 	rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
 bio_ssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h
-bio_ssl.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-bio_ssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
-bio_ssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-bio_ssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
-bio_ssl.o: ../include/openssl/err.h ../include/openssl/evp.h
-bio_ssl.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-bio_ssl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-bio_ssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-bio_ssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-bio_ssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-bio_ssl.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+bio_ssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+bio_ssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+bio_ssl.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
+bio_ssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+bio_ssl.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
+bio_ssl.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+bio_ssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+bio_ssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+bio_ssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+bio_ssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+bio_ssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+bio_ssl.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 bio_ssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 bio_ssl.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 bio_ssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 bio_ssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 bio_ssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 bio_ssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h bio_ssl.c
 d1_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-d1_both.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-d1_both.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-d1_both.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-d1_both.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-d1_both.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-d1_both.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-d1_both.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-d1_both.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-d1_both.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-d1_both.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-d1_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-d1_both.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+d1_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+d1_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+d1_both.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+d1_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+d1_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+d1_both.o: ../include/openssl/err.h ../include/openssl/evp.h
+d1_both.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+d1_both.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+d1_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+d1_both.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+d1_both.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+d1_both.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+d1_both.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 d1_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 d1_both.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 d1_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 d1_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 d1_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
@@ -155,112 +157,117 @@
 d1_clnt.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
 d1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 d1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 d1_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
 d1_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
-d1_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
-d1_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-d1_clnt.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
-d1_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-d1_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-d1_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-d1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_clnt.c
-d1_clnt.o: kssl_lcl.h ssl_locl.h
+d1_clnt.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
+d1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+d1_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h
+d1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+d1_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+d1_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+d1_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
+d1_clnt.o: ../include/openssl/x509_vfy.h d1_clnt.c ssl_locl.h
 d1_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-d1_enc.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-d1_enc.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-d1_enc.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-d1_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-d1_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-d1_enc.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-d1_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-d1_enc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
-d1_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-d1_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-d1_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-d1_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
-d1_enc.o: ../include/openssl/rand.h ../include/openssl/rsa.h
+d1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+d1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+d1_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+d1_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+d1_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+d1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
+d1_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+d1_enc.o: ../include/openssl/lhash.h ../include/openssl/md5.h
+d1_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+d1_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+d1_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+d1_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+d1_enc.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+d1_enc.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 d1_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 d1_enc.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 d1_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 d1_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 d1_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 d1_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_enc.c
 d1_enc.o: ssl_locl.h
 d1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-d1_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-d1_lib.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-d1_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-d1_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-d1_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-d1_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-d1_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-d1_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-d1_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-d1_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-d1_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-d1_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+d1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+d1_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+d1_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+d1_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+d1_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+d1_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
+d1_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+d1_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+d1_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+d1_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+d1_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+d1_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+d1_lib.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 d1_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 d1_lib.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 d1_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 d1_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 d1_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 d1_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_lib.c
 d1_lib.o: ssl_locl.h
 d1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-d1_meth.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-d1_meth.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-d1_meth.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-d1_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-d1_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-d1_meth.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-d1_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-d1_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-d1_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-d1_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-d1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-d1_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+d1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+d1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+d1_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+d1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+d1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+d1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
+d1_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+d1_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+d1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+d1_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+d1_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+d1_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+d1_meth.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 d1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 d1_meth.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 d1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 d1_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 d1_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 d1_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_meth.c
 d1_meth.o: ssl_locl.h
 d1_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-d1_pkt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-d1_pkt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-d1_pkt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-d1_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-d1_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-d1_pkt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-d1_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-d1_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-d1_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-d1_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-d1_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-d1_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+d1_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+d1_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+d1_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+d1_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+d1_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+d1_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
+d1_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+d1_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+d1_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+d1_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+d1_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+d1_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+d1_pkt.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 d1_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 d1_pkt.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 d1_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 d1_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 d1_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 d1_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 d1_pkt.o: ../include/openssl/x509_vfy.h d1_pkt.c ssl_locl.h
 d1_srtp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-d1_srtp.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-d1_srtp.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-d1_srtp.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-d1_srtp.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-d1_srtp.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-d1_srtp.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-d1_srtp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-d1_srtp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-d1_srtp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-d1_srtp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-d1_srtp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-d1_srtp.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+d1_srtp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+d1_srtp.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+d1_srtp.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+d1_srtp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+d1_srtp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+d1_srtp.o: ../include/openssl/err.h ../include/openssl/evp.h
+d1_srtp.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+d1_srtp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+d1_srtp.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+d1_srtp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+d1_srtp.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+d1_srtp.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+d1_srtp.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 d1_srtp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 d1_srtp.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 d1_srtp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 d1_srtp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 d1_srtp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
@@ -278,290 +285,304 @@
 d1_srvr.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
 d1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 d1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 d1_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
 d1_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
-d1_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
-d1_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-d1_srvr.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
-d1_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-d1_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-d1_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-d1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_srvr.c
-d1_srvr.o: ssl_locl.h
+d1_srvr.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
+d1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+d1_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h
+d1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+d1_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+d1_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+d1_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
+d1_srvr.o: ../include/openssl/x509_vfy.h d1_srvr.c ssl_locl.h
 kssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h
-kssl.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-kssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
-kssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-kssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+kssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+kssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+kssl.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
+kssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+kssl.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
 kssl.o: ../include/openssl/evp.h ../include/openssl/hmac.h
 kssl.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h
 kssl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
 kssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 kssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 kssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
 kssl.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
-kssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-kssl.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
-kssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-kssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-kssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-kssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl.c
-kssl.o: kssl_lcl.h
+kssl.o: ../include/openssl/rlwekex.h ../include/openssl/safestack.h
+kssl.o: ../include/openssl/sha.h ../include/openssl/srtp.h
+kssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+kssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+kssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+kssl.o: ../include/openssl/tls1.h ../include/openssl/x509.h
+kssl.o: ../include/openssl/x509_vfy.h kssl.c kssl_lcl.h
 s23_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s23_clnt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s23_clnt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s23_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s23_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s23_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s23_clnt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s23_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s23_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s23_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s23_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s23_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s23_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+s23_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s23_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s23_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s23_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s23_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s23_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
+s23_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s23_clnt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s23_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s23_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s23_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s23_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s23_clnt.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 s23_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s23_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s23_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s23_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s23_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 s23_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 s23_clnt.o: ../include/openssl/x509_vfy.h s23_clnt.c ssl_locl.h
 s23_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s23_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s23_lib.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s23_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s23_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s23_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s23_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s23_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s23_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s23_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s23_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s23_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s23_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+s23_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s23_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s23_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s23_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s23_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s23_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
+s23_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s23_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s23_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s23_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s23_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s23_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s23_lib.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 s23_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 s23_lib.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 s23_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 s23_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 s23_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 s23_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_lib.c
 s23_lib.o: ssl_locl.h
 s23_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s23_meth.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s23_meth.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s23_meth.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s23_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s23_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s23_meth.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s23_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s23_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s23_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s23_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s23_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s23_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+s23_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s23_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s23_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s23_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s23_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s23_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
+s23_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s23_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s23_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s23_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s23_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s23_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s23_meth.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 s23_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 s23_meth.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 s23_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 s23_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 s23_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 s23_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_meth.c
 s23_meth.o: ssl_locl.h
 s23_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s23_pkt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s23_pkt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s23_pkt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s23_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s23_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s23_pkt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s23_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s23_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s23_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s23_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s23_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s23_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+s23_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s23_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s23_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s23_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s23_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s23_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
+s23_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s23_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s23_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s23_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s23_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s23_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s23_pkt.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 s23_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 s23_pkt.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 s23_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 s23_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 s23_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 s23_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_pkt.c
 s23_pkt.o: ssl_locl.h
 s23_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s23_srvr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s23_srvr.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s23_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s23_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s23_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s23_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s23_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s23_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s23_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s23_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s23_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s23_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+s23_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s23_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s23_srvr.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s23_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s23_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s23_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
+s23_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s23_srvr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s23_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s23_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s23_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s23_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s23_srvr.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 s23_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s23_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s23_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s23_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s23_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 s23_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 s23_srvr.o: ../include/openssl/x509_vfy.h s23_srvr.c ssl_locl.h
 s2_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s2_clnt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s2_clnt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s2_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s2_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s2_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s2_clnt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s2_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s2_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s2_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s2_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s2_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s2_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+s2_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s2_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s2_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s2_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s2_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
+s2_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s2_clnt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s2_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s2_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s2_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s2_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s2_clnt.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 s2_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s2_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s2_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s2_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s2_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 s2_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 s2_clnt.o: ../include/openssl/x509_vfy.h s2_clnt.c ssl_locl.h
 s2_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s2_enc.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s2_enc.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s2_enc.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s2_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s2_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s2_enc.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s2_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s2_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s2_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s2_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s2_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s2_enc.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+s2_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s2_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s2_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s2_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s2_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
+s2_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s2_enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s2_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s2_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s2_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s2_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s2_enc.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 s2_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 s2_enc.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 s2_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 s2_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 s2_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 s2_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_enc.c
 s2_enc.o: ssl_locl.h
 s2_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s2_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s2_lib.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s2_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s2_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s2_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s2_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s2_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s2_lib.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
-s2_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-s2_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-s2_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s2_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s2_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s2_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s2_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s2_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s2_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
+s2_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s2_lib.o: ../include/openssl/lhash.h ../include/openssl/md5.h
+s2_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+s2_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+s2_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+s2_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+s2_lib.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 s2_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s2_lib.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s2_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s2_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s2_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 s2_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 s2_lib.o: ../include/openssl/x509_vfy.h s2_lib.c ssl_locl.h
 s2_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s2_meth.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s2_meth.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s2_meth.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s2_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s2_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s2_meth.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s2_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s2_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s2_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s2_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s2_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s2_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+s2_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s2_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s2_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s2_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s2_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s2_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
+s2_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s2_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s2_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s2_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s2_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s2_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s2_meth.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 s2_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 s2_meth.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 s2_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 s2_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 s2_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 s2_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_meth.c
 s2_meth.o: ssl_locl.h
 s2_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s2_pkt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s2_pkt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s2_pkt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s2_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s2_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s2_pkt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s2_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s2_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s2_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s2_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s2_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s2_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+s2_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s2_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s2_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s2_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s2_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
+s2_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s2_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s2_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s2_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s2_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s2_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s2_pkt.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 s2_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 s2_pkt.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 s2_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 s2_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 s2_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 s2_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_pkt.c
 s2_pkt.o: ssl_locl.h
 s2_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s2_srvr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s2_srvr.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s2_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s2_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s2_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s2_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s2_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s2_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s2_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s2_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s2_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s2_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+s2_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s2_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s2_srvr.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s2_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s2_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
+s2_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s2_srvr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s2_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s2_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s2_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s2_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s2_srvr.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 s2_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s2_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s2_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s2_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s2_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 s2_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 s2_srvr.o: ../include/openssl/x509_vfy.h s2_srvr.c ssl_locl.h
 s3_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s3_both.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s3_both.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s3_both.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s3_both.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s3_both.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s3_both.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s3_both.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s3_both.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s3_both.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s3_both.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s3_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s3_both.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s3_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s3_both.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s3_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s3_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s3_both.o: ../include/openssl/err.h ../include/openssl/evp.h
+s3_both.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s3_both.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s3_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s3_both.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s3_both.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s3_both.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s3_both.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 s3_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s3_both.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s3_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s3_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s3_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 s3_both.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 s3_both.o: ../include/openssl/x509_vfy.h s3_both.c ssl_locl.h
 s3_cbc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s3_cbc.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s3_cbc.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s3_cbc.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s3_cbc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s3_cbc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s3_cbc.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s3_cbc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s3_cbc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
-s3_cbc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-s3_cbc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-s3_cbc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s3_cbc.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s3_cbc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s3_cbc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s3_cbc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s3_cbc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s3_cbc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s3_cbc.o: ../include/openssl/err.h ../include/openssl/evp.h
+s3_cbc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s3_cbc.o: ../include/openssl/lhash.h ../include/openssl/md5.h
+s3_cbc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+s3_cbc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+s3_cbc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+s3_cbc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+s3_cbc.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 s3_cbc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s3_cbc.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s3_cbc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s3_cbc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s3_cbc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
@@ -580,30 +601,32 @@
 s3_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 s3_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 s3_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 s3_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
-s3_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-s3_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h
-s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
-s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
-s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
-s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
-s3_clnt.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_clnt.c ssl_locl.h
+s3_clnt.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
+s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+s3_clnt.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
+s3_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
+s3_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
+s3_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
+s3_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
+s3_clnt.o: s3_clnt.c ssl_locl.h
 s3_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s3_enc.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s3_enc.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s3_enc.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s3_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s3_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s3_enc.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s3_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s3_enc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
-s3_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-s3_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-s3_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s3_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s3_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s3_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s3_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s3_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s3_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
+s3_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s3_enc.o: ../include/openssl/lhash.h ../include/openssl/md5.h
+s3_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+s3_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+s3_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+s3_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+s3_enc.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 s3_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s3_enc.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s3_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s3_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s3_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
@@ -621,51 +644,53 @@
 s3_lib.o: ../include/openssl/lhash.h ../include/openssl/md5.h
 s3_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 s3_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 s3_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 s3_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s3_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
-s3_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-s3_lib.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
-s3_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-s3_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-s3_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-s3_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
-s3_lib.o: s3_lib.c ssl_locl.h
+s3_lib.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
+s3_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+s3_lib.o: ../include/openssl/sha.h ../include/openssl/srtp.h
+s3_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+s3_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+s3_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+s3_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
+s3_lib.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_lib.c ssl_locl.h
 s3_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s3_meth.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s3_meth.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s3_meth.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s3_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s3_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s3_meth.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s3_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s3_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s3_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s3_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s3_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s3_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+s3_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s3_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s3_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s3_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s3_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s3_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
+s3_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s3_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s3_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s3_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s3_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s3_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s3_meth.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 s3_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 s3_meth.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 s3_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 s3_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 s3_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 s3_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_meth.c
 s3_meth.o: ssl_locl.h
 s3_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-s3_pkt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-s3_pkt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-s3_pkt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-s3_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-s3_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-s3_pkt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s3_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-s3_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s3_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s3_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s3_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s3_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+s3_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+s3_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+s3_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+s3_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+s3_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+s3_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
+s3_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+s3_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+s3_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s3_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s3_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s3_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s3_pkt.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 s3_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s3_pkt.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s3_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s3_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s3_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
@@ -677,57 +702,59 @@
 s3_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 s3_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
 s3_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
 s3_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
 s3_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-s3_srvr.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h
-s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md5.h
-s3_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-s3_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-s3_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-s3_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+s3_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+s3_srvr.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
+s3_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+s3_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+s3_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+s3_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+s3_srvr.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 s3_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 s3_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 s3_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 s3_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 s3_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 s3_srvr.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_srvr.c ssl_locl.h
 ssl_algs.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_algs.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_algs.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-ssl_algs.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-ssl_algs.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-ssl_algs.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-ssl_algs.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-ssl_algs.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-ssl_algs.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-ssl_algs.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ssl_algs.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ssl_algs.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ssl_algs.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_algs.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_algs.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+ssl_algs.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+ssl_algs.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+ssl_algs.o: ../include/openssl/err.h ../include/openssl/evp.h
+ssl_algs.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+ssl_algs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+ssl_algs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+ssl_algs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ssl_algs.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ssl_algs.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_algs.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 ssl_algs.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 ssl_algs.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssl_algs.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssl_algs.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssl_algs.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 ssl_algs.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_algs.c
 ssl_algs.o: ssl_locl.h
 ssl_asn1.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1_mac.h
-ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/buffer.h
-ssl_asn1.o: ../include/openssl/comp.h ../include/openssl/crypto.h
-ssl_asn1.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
-ssl_asn1.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-ssl_asn1.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
-ssl_asn1.o: ../include/openssl/err.h ../include/openssl/evp.h
-ssl_asn1.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-ssl_asn1.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-ssl_asn1.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-ssl_asn1.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-ssl_asn1.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-ssl_asn1.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/bn.h
+ssl_asn1.o: ../include/openssl/buffer.h ../include/openssl/comp.h
+ssl_asn1.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
+ssl_asn1.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
+ssl_asn1.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+ssl_asn1.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
+ssl_asn1.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+ssl_asn1.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ssl_asn1.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ssl_asn1.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+ssl_asn1.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+ssl_asn1.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+ssl_asn1.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 ssl_asn1.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 ssl_asn1.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 ssl_asn1.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 ssl_asn1.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
@@ -745,294 +772,309 @@
 ssl_cert.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 ssl_cert.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 ssl_cert.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 ssl_cert.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 ssl_cert.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ssl_cert.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
-ssl_cert.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-ssl_cert.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
-ssl_cert.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-ssl_cert.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-ssl_cert.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-ssl_cert.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
-ssl_cert.o: ../include/openssl/x509v3.h ssl_cert.c ssl_locl.h
+ssl_cert.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
+ssl_cert.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+ssl_cert.o: ../include/openssl/sha.h ../include/openssl/srtp.h
+ssl_cert.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+ssl_cert.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+ssl_cert.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+ssl_cert.o: ../include/openssl/tls1.h ../include/openssl/x509.h
+ssl_cert.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
+ssl_cert.o: ssl_cert.c ssl_locl.h
 ssl_ciph.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_ciph.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_ciph.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-ssl_ciph.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-ssl_ciph.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-ssl_ciph.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
-ssl_ciph.o: ../include/openssl/err.h ../include/openssl/evp.h
-ssl_ciph.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-ssl_ciph.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-ssl_ciph.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-ssl_ciph.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-ssl_ciph.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-ssl_ciph.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_ciph.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_ciph.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_ciph.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+ssl_ciph.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+ssl_ciph.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+ssl_ciph.o: ../include/openssl/engine.h ../include/openssl/err.h
+ssl_ciph.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+ssl_ciph.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ssl_ciph.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ssl_ciph.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+ssl_ciph.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+ssl_ciph.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+ssl_ciph.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 ssl_ciph.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 ssl_ciph.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 ssl_ciph.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 ssl_ciph.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 ssl_ciph.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 ssl_ciph.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 ssl_ciph.o: ../include/openssl/x509_vfy.h ssl_ciph.c ssl_locl.h
 ssl_err.o: ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_err.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_err.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
-ssl_err.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-ssl_err.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
-ssl_err.o: ../include/openssl/err.h ../include/openssl/evp.h
-ssl_err.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-ssl_err.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-ssl_err.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-ssl_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-ssl_err.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-ssl_err.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_err.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_err.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_err.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
+ssl_err.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+ssl_err.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
+ssl_err.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+ssl_err.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ssl_err.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ssl_err.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+ssl_err.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+ssl_err.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+ssl_err.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 ssl_err.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 ssl_err.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssl_err.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssl_err.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssl_err.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 ssl_err.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_err.c
 ssl_err2.o: ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_err2.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_err2.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
-ssl_err2.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-ssl_err2.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
-ssl_err2.o: ../include/openssl/err.h ../include/openssl/evp.h
-ssl_err2.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-ssl_err2.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-ssl_err2.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-ssl_err2.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-ssl_err2.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-ssl_err2.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_err2.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_err2.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_err2.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
+ssl_err2.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+ssl_err2.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
+ssl_err2.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+ssl_err2.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ssl_err2.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ssl_err2.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+ssl_err2.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+ssl_err2.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+ssl_err2.o: ../include/openssl/pqueue.h ../include/openssl/rlwekex.h
 ssl_err2.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 ssl_err2.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssl_err2.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssl_err2.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssl_err2.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 ssl_err2.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_err2.c
 ssl_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_lib.o: ../include/openssl/conf.h ../include/openssl/crypto.h
-ssl_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-ssl_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-ssl_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-ssl_lib.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
-ssl_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
-ssl_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-ssl_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-ssl_lib.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
-ssl_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ssl_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ssl_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ssl_lib.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+ssl_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h
+ssl_lib.o: ../include/openssl/crypto.h ../include/openssl/dh.h
+ssl_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+ssl_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+ssl_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+ssl_lib.o: ../include/openssl/engine.h ../include/openssl/err.h
+ssl_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+ssl_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ssl_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ssl_lib.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
+ssl_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ssl_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ssl_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_lib.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 ssl_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 ssl_lib.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 ssl_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 ssl_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 ssl_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 ssl_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 ssl_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h kssl_lcl.h
 ssl_lib.o: ssl_lib.c ssl_locl.h
 ssl_rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_rsa.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_rsa.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-ssl_rsa.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-ssl_rsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-ssl_rsa.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-ssl_rsa.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-ssl_rsa.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-ssl_rsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-ssl_rsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ssl_rsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ssl_rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ssl_rsa.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_rsa.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_rsa.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+ssl_rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+ssl_rsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+ssl_rsa.o: ../include/openssl/err.h ../include/openssl/evp.h
+ssl_rsa.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+ssl_rsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+ssl_rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+ssl_rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ssl_rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ssl_rsa.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_rsa.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 ssl_rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 ssl_rsa.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssl_rsa.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssl_rsa.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssl_rsa.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 ssl_rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
 ssl_rsa.o: ssl_rsa.c
 ssl_sess.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_sess.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_sess.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-ssl_sess.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-ssl_sess.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-ssl_sess.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
-ssl_sess.o: ../include/openssl/err.h ../include/openssl/evp.h
-ssl_sess.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-ssl_sess.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-ssl_sess.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-ssl_sess.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-ssl_sess.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-ssl_sess.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
-ssl_sess.o: ../include/openssl/rand.h ../include/openssl/rsa.h
+ssl_sess.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_sess.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_sess.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+ssl_sess.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+ssl_sess.o: ../include/openssl/engine.h ../include/openssl/err.h
+ssl_sess.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+ssl_sess.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ssl_sess.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ssl_sess.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+ssl_sess.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+ssl_sess.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+ssl_sess.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+ssl_sess.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 ssl_sess.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 ssl_sess.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssl_sess.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssl_sess.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssl_sess.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 ssl_sess.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
 ssl_sess.o: ssl_sess.c
 ssl_stat.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_stat.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_stat.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-ssl_stat.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-ssl_stat.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-ssl_stat.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-ssl_stat.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-ssl_stat.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-ssl_stat.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-ssl_stat.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ssl_stat.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ssl_stat.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ssl_stat.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_stat.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_stat.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+ssl_stat.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+ssl_stat.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+ssl_stat.o: ../include/openssl/err.h ../include/openssl/evp.h
+ssl_stat.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+ssl_stat.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+ssl_stat.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+ssl_stat.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ssl_stat.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ssl_stat.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_stat.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 ssl_stat.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 ssl_stat.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssl_stat.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssl_stat.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssl_stat.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 ssl_stat.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
 ssl_stat.o: ssl_stat.c
 ssl_txt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ssl_txt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-ssl_txt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-ssl_txt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-ssl_txt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-ssl_txt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-ssl_txt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-ssl_txt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-ssl_txt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-ssl_txt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ssl_txt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ssl_txt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ssl_txt.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+ssl_txt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+ssl_txt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+ssl_txt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+ssl_txt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+ssl_txt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+ssl_txt.o: ../include/openssl/err.h ../include/openssl/evp.h
+ssl_txt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+ssl_txt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+ssl_txt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+ssl_txt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ssl_txt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ssl_txt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+ssl_txt.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 ssl_txt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 ssl_txt.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssl_txt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssl_txt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssl_txt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 ssl_txt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
 ssl_txt.o: ssl_txt.c
 t1_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-t1_clnt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-t1_clnt.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-t1_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-t1_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-t1_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-t1_clnt.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-t1_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-t1_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-t1_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-t1_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-t1_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-t1_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+t1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+t1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+t1_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+t1_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+t1_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+t1_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
+t1_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+t1_clnt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+t1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+t1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+t1_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+t1_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+t1_clnt.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 t1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 t1_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 t1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 t1_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 t1_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 t1_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 t1_clnt.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_clnt.c
 t1_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-t1_enc.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-t1_enc.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-t1_enc.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-t1_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-t1_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-t1_enc.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-t1_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-t1_enc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
-t1_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-t1_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-t1_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-t1_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
-t1_enc.o: ../include/openssl/rand.h ../include/openssl/rsa.h
+t1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+t1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+t1_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+t1_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+t1_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+t1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
+t1_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+t1_enc.o: ../include/openssl/lhash.h ../include/openssl/md5.h
+t1_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+t1_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+t1_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+t1_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+t1_enc.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+t1_enc.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 t1_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 t1_enc.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 t1_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 t1_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 t1_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 t1_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
 t1_enc.o: t1_enc.c
 t1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-t1_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-t1_lib.o: ../include/openssl/conf.h ../include/openssl/crypto.h
-t1_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
-t1_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-t1_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
-t1_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
-t1_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
-t1_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-t1_lib.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
-t1_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-t1_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-t1_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-t1_lib.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+t1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+t1_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h
+t1_lib.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
+t1_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
+t1_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+t1_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
+t1_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+t1_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+t1_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+t1_lib.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
+t1_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+t1_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+t1_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+t1_lib.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 t1_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 t1_lib.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 t1_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 t1_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 t1_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 t1_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
 t1_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssl_locl.h
 t1_lib.o: t1_lib.c
 t1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-t1_meth.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-t1_meth.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-t1_meth.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-t1_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-t1_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-t1_meth.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-t1_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-t1_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-t1_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-t1_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-t1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-t1_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+t1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+t1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+t1_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+t1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+t1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+t1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
+t1_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+t1_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+t1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+t1_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+t1_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+t1_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+t1_meth.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 t1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 t1_meth.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 t1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 t1_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 t1_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 t1_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
 t1_meth.o: t1_meth.c
 t1_reneg.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-t1_reneg.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-t1_reneg.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-t1_reneg.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-t1_reneg.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-t1_reneg.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-t1_reneg.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-t1_reneg.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-t1_reneg.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-t1_reneg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-t1_reneg.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-t1_reneg.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-t1_reneg.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
+t1_reneg.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+t1_reneg.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+t1_reneg.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+t1_reneg.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+t1_reneg.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+t1_reneg.o: ../include/openssl/err.h ../include/openssl/evp.h
+t1_reneg.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+t1_reneg.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+t1_reneg.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+t1_reneg.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+t1_reneg.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+t1_reneg.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+t1_reneg.o: ../include/openssl/rlwekex.h ../include/openssl/rsa.h
 t1_reneg.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 t1_reneg.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 t1_reneg.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 t1_reneg.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 t1_reneg.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 t1_reneg.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
 t1_reneg.o: t1_reneg.c
 t1_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-t1_srvr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
-t1_srvr.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
-t1_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
-t1_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-t1_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
-t1_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-t1_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-t1_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-t1_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-t1_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-t1_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-t1_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
+t1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+t1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
+t1_srvr.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
+t1_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+t1_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+t1_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
+t1_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
+t1_srvr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+t1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+t1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+t1_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+t1_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
+t1_srvr.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
 t1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 t1_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h
 t1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 t1_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 t1_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
@@ -1049,13 +1091,14 @@
 tls_srp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
 tls_srp.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 tls_srp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 tls_srp.o: ../include/openssl/pem.h ../include/openssl/pem2.h
 tls_srp.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
-tls_srp.o: ../include/openssl/rand.h ../include/openssl/rsa.h
-tls_srp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-tls_srp.o: ../include/openssl/srp.h ../include/openssl/srtp.h
-tls_srp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
-tls_srp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
-tls_srp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
-tls_srp.o: ../include/openssl/tls1.h ../include/openssl/x509.h
-tls_srp.o: ../include/openssl/x509_vfy.h ssl_locl.h tls_srp.c
+tls_srp.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
+tls_srp.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+tls_srp.o: ../include/openssl/sha.h ../include/openssl/srp.h
+tls_srp.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
+tls_srp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
+tls_srp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
+tls_srp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
+tls_srp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
+tls_srp.o: tls_srp.c
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/s3_clnt.c openssl-1.0.1f-rlwekex/ssl/s3_clnt.c
--- openssl-1.0.1f/ssl/s3_clnt.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/s3_clnt.c	2014-10-16 12:38:15.000000000 +0200
@@ -1279,10 +1279,14 @@
 	BN_CTX *bn_ctx = NULL;
 	EC_POINT *srvr_ecpoint = NULL;
 	int curve_nid = 0;
 	int encoded_pt_len = 0;
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PUB *srvr_rlwepub = NULL;
+	int encoded_rlwepub_len = 0;
+#endif
 
 	/* use same message size as in ssl3_get_certificate_request()
 	 * as ServerKeyExchange message may be skipped */
 	n=s->method->ssl_get_message(s,
 		SSL3_ST_CR_KEY_EXCH_A,
@@ -1333,10 +1337,22 @@
 			{
 			EC_KEY_free(s->session->sess_cert->peer_ecdh_tmp);
 			s->session->sess_cert->peer_ecdh_tmp=NULL;
 			}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+		if (s->session->sess_cert->peer_rlwepub_tmp)
+			{
+			RLWE_PUB_free(s->session->sess_cert->peer_rlwepub_tmp);
+			s->session->sess_cert->peer_rlwepub_tmp=NULL;
+			}
+		if (s->session->sess_cert->peer_rlwerec_tmp)
+			{
+			RLWE_REC_free(s->session->sess_cert->peer_rlwerec_tmp);
+			s->session->sess_cert->peer_rlwerec_tmp=NULL;
+			}
+#endif
 		}
 	else
 		{
 		s->session->sess_cert=ssl_sess_cert_new();
 		}
@@ -1601,10 +1617,48 @@
 		SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER);
 		goto f_err;
 		}
 #endif /* !OPENSSL_NO_DH */
 
+#ifndef OPENSSL_NO_RLWEKEX
+	else if ((alg_k & SSL_kRLWE) && !(alg_k & SSL_kEECDH))
+		{
+		/* Get the encoded RLWE public key and reconciliation data */
+		if ((srvr_rlwepub = RLWE_PUB_new()) == NULL)
+			{
+			SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+			goto err;
+			}
+
+		encoded_rlwepub_len = (p[0] << 8) | p[1];
+		p += 2;
+		n -= 2;
+		if ((encoded_rlwepub_len >= n) ||
+			(o2i_RLWE_PUB(&srvr_rlwepub, p, encoded_rlwepub_len) == NULL))
+			{
+			al=SSL_AD_DECODE_ERROR;
+			SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_RLWE_PUB);
+			goto f_err;
+			}
+
+		n-=encoded_rlwepub_len;
+		p+=encoded_rlwepub_len;
+		param_len = 2 + encoded_rlwepub_len;
+
+		if (0) ;
+#ifndef OPENSSL_NO_RSA
+		else if (alg_a & SSL_aRSA)
+			pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509);
+#endif
+#ifndef OPENSSL_NO_ECDSA
+		else if (alg_a & SSL_aECDSA)
+			pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_ECC].x509);
+#endif
+		s->session->sess_cert->peer_rlwepub_tmp=srvr_rlwepub;
+		}
+#endif /* !OPENSSL_NO_RLWEKEX */
+
 #ifndef OPENSSL_NO_ECDH
 	else if (alg_k & SSL_kEECDH)
 		{
 		EC_GROUP *ngroup;
 		const EC_GROUP *group;
@@ -1680,10 +1734,37 @@
 			}
 
 		n-=param_len;
 		p+=encoded_pt_len;
 
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+		if (alg_k & SSL_kRLWE) {
+			/* Get the encoded RLWE public key and reconciliation data */
+			if ((srvr_rlwepub = RLWE_PUB_new()) == NULL)
+				{
+				SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+				goto err;
+				}
+
+			encoded_rlwepub_len = (p[0] << 8) | p[1];
+			p += 2;
+			n -= 2;
+			if ((encoded_rlwepub_len >= n) ||
+				(o2i_RLWE_PUB(&srvr_rlwepub, p, encoded_rlwepub_len) == NULL))
+				{
+				al=SSL_AD_DECODE_ERROR;
+				SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_RLWE_PUB);
+				goto f_err;
+				}
+
+			n-=encoded_rlwepub_len;
+			p+=encoded_rlwepub_len;
+			param_len += 2 + encoded_rlwepub_len;
+			s->session->sess_cert->peer_rlwepub_tmp=srvr_rlwepub;
+		}
+#endif
+
 		/* The ECC/TLS specification does not mention
 		 * the use of DSA to sign ECParameters in the server
 		 * key exchange message. We do support RSA and ECDSA.
 		 */
 		if (0) ;
@@ -1849,10 +1930,13 @@
 	BN_CTX_free(bn_ctx);
 	EC_POINT_free(srvr_ecpoint);
 	if (ecdh != NULL)
 		EC_KEY_free(ecdh);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PUB_free(srvr_rlwepub);
+#endif
 	EVP_MD_CTX_cleanup(&md_ctx);
 	return(-1);
 	}
 
 int ssl3_get_certificate_request(SSL *s)
@@ -2215,10 +2299,14 @@
 
 int ssl3_send_client_key_exchange(SSL *s)
 	{
 	unsigned char *p,*d;
 	int n;
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+	unsigned char *pprime;
+	int nprime;
+#endif
 	unsigned long alg_k;
 #ifndef OPENSSL_NO_RSA
 	unsigned char *q;
 	EVP_PKEY *pkey=NULL;
 #endif
@@ -2231,10 +2319,20 @@
 	EVP_PKEY *srvr_pub_pkey = NULL;
 	unsigned char *encodedPoint = NULL;
 	int encoded_pt_len = 0;
 	BN_CTX * bn_ctx = NULL;
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PAIR *clnt_rlwe = NULL;
+	RLWE_REC *clnt_rlwerec = NULL;
+	const RLWE_PUB *srvr_rlwepub = NULL;
+	unsigned char *encoded_rlwepub = NULL;
+	int encoded_rlwepub_len = 0;
+	unsigned char *encoded_rlwerec = NULL;
+	int encoded_rlwerec_len = 0;
+	RLWE_CTX * rlwe_ctx = NULL;
+#endif
 
 	if (s->state == SSL3_ST_CW_KEY_EXCH_A)
 		{
 		d=(unsigned char *)s->init_buf->data;
 		p= &(d[4]);
@@ -2627,10 +2725,67 @@
 				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, 
 				       ERR_R_ECDH_LIB);
 				goto err;
 				}
 
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+			if (alg_k & SSL_kRLWE) {
+				srvr_rlwepub = s->session->sess_cert->peer_rlwepub_tmp;
+
+				if (srvr_rlwepub == NULL)
+					{
+					SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
+					    ERR_R_INTERNAL_ERROR);
+					goto err;
+					}
+
+				if ((clnt_rlwe=RLWE_PAIR_new()) == NULL) 
+					{
+					SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+					goto err;
+					}
+				if ((clnt_rlwerec=RLWE_REC_new()) == NULL) 
+					{
+					SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+					goto err;
+					}
+
+				if ((rlwe_ctx = RLWE_CTX_new()) == NULL)
+					{
+					SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+					goto err;
+					}
+
+				/* Generate a new RLWE key pair */
+				if (!(RLWE_PAIR_generate_key(clnt_rlwe, rlwe_ctx)))
+					{
+					SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+					goto err;
+					}
+
+				/* use the 'pprime' buffer for the RLWE shared key, but
+				 * make sure to clear it out afterwards
+				 */
+
+				if ((pprime = OPENSSL_malloc(1024)) == NULL) {
+					SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+					goto err;					
+				}
+
+				nprime = RLWEKEX_compute_key_bob(pprime, 1024, clnt_rlwerec, srvr_rlwepub, clnt_rlwe, NULL, rlwe_ctx);
+				if (nprime <= 0)
+					{
+					SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+					goto err;
+					}
+				// FIXME: I have no idea if this is safe, as I don't know how big p is, but let's try it anyway for testing purposes.
+				memcpy(p + n, pprime, nprime);
+				n += nprime;
+				OPENSSL_free(pprime);
+			}
+#endif
+
 			/* generate master key from the result */
 			s->session->master_key_length = s->method->ssl3_enc \
 			    -> generate_master_secret(s, 
 				s->session->master_key,
 				p, n);
@@ -2673,22 +2828,133 @@
 				*p = n; /* length of encoded point */
 				/* Encoded point will be copied here */
 				p += 1; 
 				/* copy the point */
 				memcpy((unsigned char *)p, encodedPoint, n);
+				p += n;
 				/* increment n to account for length field */
 				n += 1; 
 				}
 
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+			if (alg_k & SSL_kRLWE) {
+				/* Encode the public key and reconciliation data */
+				encoded_rlwepub_len = i2o_RLWE_PUB(RLWE_PAIR_get_publickey(clnt_rlwe), &encoded_rlwepub);
+				encoded_rlwerec_len = i2o_RLWE_REC(clnt_rlwerec, &encoded_rlwerec);
+
+				p[0] = (encoded_rlwepub_len >> 8) & 0xFF;
+				p[1] =  encoded_rlwepub_len       & 0xFF;
+				p += 2;
+				memcpy((unsigned char *)p, encoded_rlwepub, encoded_rlwepub_len);
+				p += encoded_rlwepub_len;
+
+				p[0] = (encoded_rlwerec_len >> 8) & 0xFF;
+				p[1] =  encoded_rlwerec_len       & 0xFF;
+				p += 2;
+				memcpy((unsigned char *)p, encoded_rlwerec, encoded_rlwerec_len);
+				p += encoded_rlwerec_len;
+
+				n += 4 + encoded_rlwepub_len + encoded_rlwerec_len;
+
+				/* Free allocated memory */
+				RLWE_CTX_free(rlwe_ctx);
+				OPENSSL_free(encoded_rlwepub);
+				OPENSSL_free(encoded_rlwerec);
+				RLWE_PAIR_free(clnt_rlwe);
+				RLWE_REC_free(clnt_rlwerec);
+			}
+#endif
+
 			/* Free allocated memory */
 			BN_CTX_free(bn_ctx);
 			if (encodedPoint != NULL) OPENSSL_free(encodedPoint);
 			if (clnt_ecdh != NULL) 
 				 EC_KEY_free(clnt_ecdh);
 			EVP_PKEY_free(srvr_pub_pkey);
 			}
 #endif /* !OPENSSL_NO_ECDH */
+#ifndef OPENSSL_NO_RLWEKEX
+		else if ((alg_k & SSL_kRLWE) && !(alg_k & SSL_kEECDH))
+			{
+			srvr_rlwepub = s->session->sess_cert->peer_rlwepub_tmp;
+
+			if (srvr_rlwepub == NULL)
+				{
+				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
+				    ERR_R_INTERNAL_ERROR);
+				goto err;
+				}
+
+			if ((clnt_rlwe=RLWE_PAIR_new()) == NULL) 
+				{
+				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+				goto err;
+				}
+			if ((clnt_rlwerec=RLWE_REC_new()) == NULL) 
+				{
+				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+				goto err;
+				}
+
+			if ((rlwe_ctx = RLWE_CTX_new()) == NULL)
+				{
+				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+				goto err;
+				}
+
+			/* Generate a new RLWE key pair */
+			if (!(RLWE_PAIR_generate_key(clnt_rlwe, rlwe_ctx)))
+				{
+				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+
+			/* use the 'p' output buffer for the RLWE shared key, but
+			 * make sure to clear it out afterwards
+			 */
+
+			n = RLWEKEX_compute_key_bob(p, 1024, clnt_rlwerec, srvr_rlwepub, clnt_rlwe, NULL, rlwe_ctx);
+			if (n <= 0)
+				{
+				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+
+			/* generate master key from the result */
+			s->session->master_key_length = s->method->ssl3_enc \
+			    -> generate_master_secret(s, 
+				s->session->master_key,
+				p, n);
+
+			memset(p, 0, n); /* clean up */
+
+			/* Encode the public key and reconciliation data */
+			encoded_rlwepub_len = i2o_RLWE_PUB(RLWE_PAIR_get_publickey(clnt_rlwe), &encoded_rlwepub);
+			encoded_rlwerec_len = i2o_RLWE_REC(clnt_rlwerec, &encoded_rlwerec);
+
+			p[0] = (encoded_rlwepub_len >> 8) & 0xFF;
+			p[1] =  encoded_rlwepub_len       & 0xFF;
+			p += 2;
+			memcpy((unsigned char *)p, encoded_rlwepub, encoded_rlwepub_len);
+			p += encoded_rlwepub_len;
+
+			p[0] = (encoded_rlwerec_len >> 8) & 0xFF;
+			p[1] =  encoded_rlwerec_len       & 0xFF;
+			p += 2;
+			memcpy((unsigned char *)p, encoded_rlwerec, encoded_rlwerec_len);
+			p += encoded_rlwerec_len;
+
+			n = 4 + encoded_rlwepub_len + encoded_rlwerec_len;
+
+			/* Free allocated memory */
+			RLWE_CTX_free(rlwe_ctx);
+			OPENSSL_free(encoded_rlwepub);
+			OPENSSL_free(encoded_rlwerec);
+			RLWE_PAIR_free(clnt_rlwe);
+			RLWE_REC_free(clnt_rlwerec);
+			}
+#endif /* !OPENSSL_NO_RLWEKEX */
 		else if (alg_k & SSL_kGOST) 
 			{
 			/* GOST key exchange message creation */
 			EVP_PKEY_CTX *pkey_ctx;
 			X509 *peer_cert; 
@@ -2918,10 +3184,17 @@
 	if (encodedPoint != NULL) OPENSSL_free(encodedPoint);
 	if (clnt_ecdh != NULL) 
 		EC_KEY_free(clnt_ecdh);
 	EVP_PKEY_free(srvr_pub_pkey);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_CTX_free(rlwe_ctx);
+	OPENSSL_free(encoded_rlwepub);
+	OPENSSL_free(encoded_rlwerec);
+	RLWE_PAIR_free(clnt_rlwe);
+	RLWE_REC_free(clnt_rlwerec);
+#endif
 	return(-1);
 	}
 
 int ssl3_send_client_verify(SSL *s)
 	{
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/s3_lib.c openssl-1.0.1f-rlwekex/ssl/s3_lib.c
--- openssl-1.0.1f/ssl/s3_lib.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/s3_lib.c	2014-10-16 12:38:15.000000000 +0200
@@ -2826,10 +2826,78 @@
 	256,
 	},
 
 #endif /* OPENSSL_NO_ECDH */
 
+#ifndef OPENSSL_NO_RLWEKEX
+	/* Cipher D000 */
+	{
+	1,
+	TLS1_TXT_RLWE_RSA_WITH_AES_128_GCM_SHA256,
+	TLS1_CK_RLWE_RSA_WITH_AES_128_GCM_SHA256,
+	SSL_kRLWE,
+	SSL_aRSA,
+	SSL_AES128GCM,
+	SSL_AEAD,
+	SSL_TLSV1_2,
+	SSL_NOT_EXP|SSL_HIGH,
+	SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
+	128,
+	128,
+	},
+
+	/* Cipher D001 */
+	{
+	1,
+	TLS1_TXT_RLWE_ECDSA_WITH_AES_128_GCM_SHA256,
+	TLS1_CK_RLWE_ECDSA_WITH_AES_128_GCM_SHA256,
+	SSL_kRLWE,
+	SSL_aECDSA,
+	SSL_AES128GCM,
+	SSL_AEAD,
+	SSL_TLSV1_2,
+	SSL_NOT_EXP|SSL_HIGH,
+	SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
+	128,
+	128,
+	},
+
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+	/* Cipher D002 */
+	{
+	1,
+	TLS1_TXT_RLWE_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+	TLS1_CK_RLWE_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+	SSL_kRLWE|SSL_kEECDH,
+	SSL_aRSA,
+	SSL_AES128GCM,
+	SSL_AEAD,
+	SSL_TLSV1_2,
+	SSL_NOT_EXP|SSL_HIGH,
+	SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
+	128,
+	128,
+	},
+
+	/* Cipher D003 */
+	{
+	1,
+	TLS1_TXT_RLWE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+	TLS1_CK_RLWE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+	SSL_kRLWE|SSL_kEECDH,
+	SSL_aECDSA,
+	SSL_AES128GCM,
+	SSL_AEAD,
+	SSL_TLSV1_2,
+	SSL_NOT_EXP|SSL_HIGH,
+	SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
+	128,
+	128,
+	},
+#endif
+
+#endif
 
 #ifdef TEMP_GOST_TLS
 /* Cipher FF00 */
 	{
 	1,
@@ -2982,10 +3050,14 @@
 #endif
 #ifndef OPENSSL_NO_ECDH
 	if (s->s3->tmp.ecdh != NULL)
 		EC_KEY_free(s->s3->tmp.ecdh);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	if (s->s3->tmp.rlwe != NULL)
+		RLWE_PAIR_free(s->s3->tmp.rlwe);
+#endif
 
 	if (s->s3->tmp.ca_names != NULL)
 		sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free);
 	if (s->s3->handshake_buffer) {
 		BIO_free(s->s3->handshake_buffer);
@@ -3035,10 +3107,17 @@
 		{
 		EC_KEY_free(s->s3->tmp.ecdh);
 		s->s3->tmp.ecdh = NULL;
 		}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	if (s->s3->tmp.rlwe != NULL)
+		{
+		RLWE_PAIR_free(s->s3->tmp.rlwe);
+		s->s3->tmp.rlwe = NULL;
+		}
+#endif
 #ifndef OPENSSL_NO_TLSEXT
 #ifndef OPENSSL_NO_EC
 	s->s3->is_probably_safari = 0;
 #endif /* !OPENSSL_NO_EC */
 #endif /* !OPENSSL_NO_TLSEXT */
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/s3_srvr.c openssl-1.0.1f-rlwekex/ssl/s3_srvr.c
--- openssl-1.0.1f/ssl/s3_srvr.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/s3_srvr.c	2014-10-16 12:38:15.000000000 +0200
@@ -478,10 +478,11 @@
 			    /* SRP: send ServerKeyExchange */
 			    || (alg_k & SSL_kSRP)
 #endif
 			    || (alg_k & (SSL_kDHr|SSL_kDHd|SSL_kEDH))
 			    || (alg_k & SSL_kEECDH)
+			    || (alg_k & SSL_kRLWE)
 			    || ((alg_k & SSL_kRSA)
 				&& (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL
 				    || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher)
 					&& EVP_PKEY_size(s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey)*8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)
 					)
@@ -905,10 +906,17 @@
 			{
 			EC_KEY_free(s->s3->tmp.ecdh);
 			s->s3->tmp.ecdh = NULL;
 			}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+		if (s->s3->tmp.rlwe != NULL)
+			{
+			RLWE_PAIR_free(s->s3->tmp.rlwe);
+			s->s3->tmp.rlwe = NULL;
+			}
+#endif
 		s->s3->flags |= SSL3_FLAGS_SGC_RESTART_DONE;
 		return 2;
 		}
 	return 1;
 }
@@ -1563,10 +1571,16 @@
 	unsigned char *encodedPoint = NULL;
 	int encodedlen = 0;
 	int curve_id = 0;
 	BN_CTX *bn_ctx = NULL; 
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PAIR *rlwe=NULL, *rlwep;
+	unsigned char *encoded_rlwepub = NULL;
+	int encoded_rlwepub_len = 0;
+	RLWE_CTX *rlwe_ctx = NULL; 
+#endif
 	EVP_PKEY *pkey;
 	const EVP_MD *md = NULL;
 	unsigned char *p,*d;
 	int al,i;
 	unsigned long type;
@@ -1794,13 +1808,145 @@
 			 */
 			r[0]=NULL;
 			r[1]=NULL;
 			r[2]=NULL;
 			r[3]=NULL;
+
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+			if (type & SSL_kRLWE) {
+				rlwep=cert->rlwe_tmp;
+				if (rlwep == NULL)
+					{
+					rlwep=RLWE_PAIR_new();
+					}
+				if (rlwep == NULL)
+					{
+					al=SSL_AD_HANDSHAKE_FAILURE;
+					SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_MISSING_TMP_ECDH_KEY);
+					goto f_err;
+					}
+
+				if (s->s3->tmp.rlwe != NULL)
+					{
+					SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
+					goto err;
+					}
+
+				/* Duplicate the RLWE_PAIR structure. */
+				if (rlwep == NULL)
+					{
+					SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+					goto err;
+					}
+				if ((rlwe = RLWE_PAIR_dup(rlwep)) == NULL)
+					{
+					SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+					goto err;
+					}
+
+				s->s3->tmp.rlwe=rlwe;
+				if ((RLWE_PAIR_get_publickey(rlwe) == NULL) ||
+				    !RLWE_PAIR_has_privatekey(rlwe))
+					{
+					if ((rlwe_ctx = RLWE_CTX_new()) == NULL)
+					    {
+					    SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+					    goto err;
+					    }
+					if(!RLWE_PAIR_generate_key(rlwe, rlwe_ctx))
+					    {
+					    SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+					    goto err;
+					    }
+					   RLWE_CTX_free(rlwe_ctx); rlwe_ctx = NULL;
+					}
+
+				encoded_rlwepub_len = i2o_RLWE_PUB(RLWE_PAIR_get_publickey(rlwe), &encoded_rlwepub);
+
+				if (encoded_rlwepub_len == 0) 
+					{
+					SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+					goto err;
+					}
+
+				n += 2 + encoded_rlwepub_len;
+			}
+#endif
+
 			}
 		else 
 #endif /* !OPENSSL_NO_ECDH */
+#ifndef OPENSSL_NO_RLWEKEX
+			if ((type & SSL_kRLWE) && !(type & SSL_kEECDH))
+			{
+			rlwep=cert->rlwe_tmp;
+			if (rlwep == NULL)
+				{
+				rlwep=RLWE_PAIR_new();
+				}
+			if (rlwep == NULL)
+				{
+				al=SSL_AD_HANDSHAKE_FAILURE;
+				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_MISSING_TMP_ECDH_KEY);
+				goto f_err;
+				}
+
+			if (s->s3->tmp.rlwe != NULL)
+				{
+				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
+				goto err;
+				}
+
+			/* Duplicate the RLWE_PAIR structure. */
+			if (rlwep == NULL)
+				{
+				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+				goto err;
+				}
+			if ((rlwe = RLWE_PAIR_dup(rlwep)) == NULL)
+				{
+				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+				goto err;
+				}
+
+			s->s3->tmp.rlwe=rlwe;
+			if ((RLWE_PAIR_get_publickey(rlwe) == NULL) ||
+			    !RLWE_PAIR_has_privatekey(rlwe))
+				{
+				if ((rlwe_ctx = RLWE_CTX_new()) == NULL)
+				    {
+				    SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
+				    goto err;
+				    }
+				if(!RLWE_PAIR_generate_key(rlwe, rlwe_ctx))
+				    {
+				    SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+				    goto err;
+				    }
+				   RLWE_CTX_free(rlwe_ctx); rlwe_ctx = NULL;
+				}
+
+			encoded_rlwepub_len = i2o_RLWE_PUB(RLWE_PAIR_get_publickey(rlwe), &encoded_rlwepub);
+
+			if (encoded_rlwepub_len == 0) 
+				{
+				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_RLWE_LIB);
+				goto err;
+				}
+
+			n = 2 + encoded_rlwepub_len;
+
+			/* We'll generate the serverKeyExchange message
+			 * explicitly so we can set these to NULLs
+			 */
+			r[0]=NULL;
+			r[1]=NULL;
+			r[2]=NULL;
+			r[3]=NULL;
+			}
+		else 
+#endif /* !OPENSSL_NO_RLWEKEX */
 #ifndef OPENSSL_NO_PSK
 			if (type & SSL_kPSK)
 				{
 				/* reserve size for record length and PSK identity hint*/
 				n+=2+strlen(s->ctx->psk_identity_hint);
@@ -1904,10 +2050,22 @@
 			OPENSSL_free(encodedPoint);
 			encodedPoint = NULL;
 			p += encodedlen;
 			}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+		if (type & SSL_kRLWE) 
+			{
+			p[0] = (encoded_rlwepub_len >> 8) & 0xFF;
+			p[1] =  encoded_rlwepub_len       & 0xFF;
+			p += 2;
+			memcpy((unsigned char*)p, (unsigned char *)encoded_rlwepub, encoded_rlwepub_len);
+			OPENSSL_free(encoded_rlwepub);
+			encoded_rlwepub = NULL;
+			p += encoded_rlwepub_len;
+			}
+#endif
 
 #ifndef OPENSSL_NO_PSK
 		if (type & SSL_kPSK)
 			{
 			/* copy PSK identity hint */
@@ -2013,10 +2171,14 @@
 err:
 #ifndef OPENSSL_NO_ECDH
 	if (encodedPoint != NULL) OPENSSL_free(encodedPoint);
 	BN_CTX_free(bn_ctx);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	if (encoded_rlwepub != NULL) OPENSSL_free(encoded_rlwepub);
+	RLWE_CTX_free(rlwe_ctx);
+#endif
 	EVP_MD_CTX_cleanup(&md_ctx);
 	return(-1);
 	}
 
 int ssl3_send_certificate_request(SSL *s)
@@ -2120,10 +2282,14 @@
 	{
 	int i,al,ok;
 	long n;
 	unsigned long alg_k;
 	unsigned char *p;
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+	unsigned char *pprime;
+	long nprime;
+#endif
 #ifndef OPENSSL_NO_RSA
 	RSA *rsa=NULL;
 	EVP_PKEY *pkey=NULL;
 #endif
 #ifndef OPENSSL_NO_DH
@@ -2138,10 +2304,18 @@
 	EC_KEY *srvr_ecdh = NULL;
 	EVP_PKEY *clnt_pub_pkey = NULL;
 	EC_POINT *clnt_ecpoint = NULL;
 	BN_CTX *bn_ctx = NULL; 
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PAIR *srvr_rlwe = NULL;
+	RLWE_PUB *clnt_rlwe_pub = NULL;
+	unsigned int clnt_rlwe_pub_len;
+	RLWE_REC *clnt_rlwe_rec = NULL;
+	unsigned int clnt_rlwe_rec_len;
+	RLWE_CTX *rlwe_ctx = NULL; 
+#endif
 
 	n=s->method->ssl_get_message(s,
 		SSL3_ST_SR_KEY_EXCH_A,
 		SSL3_ST_SR_KEY_EXCH_B,
 		SSL3_MT_CLIENT_KEY_EXCHANGE,
@@ -2619,11 +2793,11 @@
 				}
 
 			/* Get encoded point length */
 			i = *p; 
 			p += 1;
-			if (n != 1 + i)
+			if (n < 1 + i)
 				{
 				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
 				    ERR_R_EC_LIB);
 				goto err;
 				}
@@ -2632,16 +2806,72 @@
 				{
 				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
 				    ERR_R_EC_LIB);
 				goto err;
 				}
-			/* p is pointing to somewhere in the buffer
-			 * currently, so set it to the start 
-			 */ 
-			p=(unsigned char *)s->init_buf->data;
+			p += i;
+			n -= 1 + i;
 			}
 
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+		if (alg_k & SSL_kRLWE) {
+			if ((rlwe_ctx = RLWE_CTX_new()) == NULL)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_MALLOC_FAILURE);
+				goto err;
+				}
+
+			srvr_rlwe = s->s3->tmp.rlwe;
+
+			/* Parse client public key */
+			if (n < 2)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+			clnt_rlwe_pub_len = (p[0] << 8) | p[1];
+			p += 2;
+			if (n < 2 + clnt_rlwe_pub_len)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+			if (o2i_RLWE_PUB(&clnt_rlwe_pub, p, clnt_rlwe_pub_len) == 0)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+			p += clnt_rlwe_pub_len;
+
+			/* Parse client reconciliation */
+			if (n < 2 + clnt_rlwe_pub_len + 2)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+			clnt_rlwe_rec_len = (p[0] << 8) | p[1];
+			p += 2;
+			if (n < 2 + clnt_rlwe_pub_len + 2 + clnt_rlwe_rec_len)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+			if (o2i_RLWE_REC(&clnt_rlwe_rec, p, clnt_rlwe_rec_len) == 0)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+			p += clnt_rlwe_rec_len;
+
+		}
+#endif
+
+		/* p is pointing to somewhere in the buffer
+		 * currently, so set it to the start 
+		 */ 
+		p=(unsigned char *)s->init_buf->data;
+
 		/* Compute the shared pre-master secret */
 		field_size = EC_GROUP_get_degree(group);
 		if (field_size <= 0)
 			{
 			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, 
@@ -2661,19 +2891,127 @@
 		EC_KEY_free(srvr_ecdh);
 		BN_CTX_free(bn_ctx);
 		EC_KEY_free(s->s3->tmp.ecdh);
 		s->s3->tmp.ecdh = NULL; 
 
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+		if (alg_k & SSL_kRLWE) {
+			/* Compute the shared pre-master secret */
+			if ((pprime = OPENSSL_malloc(1024)) == NULL) {
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_MALLOC_FAILURE);
+				goto err;
+			}
+			nprime = RLWEKEX_compute_key_alice(pprime, 1024, clnt_rlwe_pub, clnt_rlwe_rec, srvr_rlwe, NULL, rlwe_ctx);
+			if (nprime <= 0)
+				{
+				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+				goto err;
+				}
+			RLWE_PUB_free(clnt_rlwe_pub);
+			RLWE_REC_free(clnt_rlwe_rec);
+			RLWE_CTX_free(rlwe_ctx);
+			RLWE_PAIR_free(s->s3->tmp.rlwe);
+			s->s3->tmp.rlwe = NULL; 
+
+			// FIXME: I have no idea if this is safe, as I don't know how big p is, but let's try it anyway for testing purposes.
+			memcpy(p + i, pprime, nprime);
+			i += nprime;
+			OPENSSL_free(pprime);
+		}
+#endif
+
 		/* Compute the master secret */
 		s->session->master_key_length = s->method->ssl3_enc-> \
 		    generate_master_secret(s, s->session->master_key, p, i);
 		
 		OPENSSL_cleanse(p, i);
 		return (ret);
 		}
 	else
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+		if ((alg_k & SSL_kRLWE) && !(alg_k & SSL_kEECDH))
+		{
+		int ret = 1;
+
+		if ((rlwe_ctx = RLWE_CTX_new()) == NULL)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_MALLOC_FAILURE);
+			goto err;
+			}
+
+		srvr_rlwe = s->s3->tmp.rlwe;
+
+		/* Parse client public key */
+		if (n < 2)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+			goto err;
+			}
+		clnt_rlwe_pub_len = (p[0] << 8) | p[1];
+		p += 2;
+		if (n < 2 + clnt_rlwe_pub_len)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+			goto err;
+			}
+		if (o2i_RLWE_PUB(&clnt_rlwe_pub, p, clnt_rlwe_pub_len) == 0)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+			goto err;
+			}
+		p += clnt_rlwe_pub_len;
+
+		/* Parse client reconciliation */
+		if (n < 2 + clnt_rlwe_pub_len + 2)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+			goto err;
+			}
+		clnt_rlwe_rec_len = (p[0] << 8) | p[1];
+		p += 2;
+		if (n != 2 + clnt_rlwe_pub_len + 2 + clnt_rlwe_rec_len)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+			goto err;
+			}
+		if (o2i_RLWE_REC(&clnt_rlwe_rec, p, clnt_rlwe_rec_len) == 0)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+			goto err;
+			}
+		p += clnt_rlwe_rec_len;
+
+		/* p is pointing to somewhere in the buffer
+		 * currently, so set it to the start 
+		 */ 
+		p = (unsigned char *)s->init_buf->data;
+
+		/* Compute the shared pre-master secret */
+
+		n = RLWEKEX_compute_key_alice(p, 1024, clnt_rlwe_pub, clnt_rlwe_rec, srvr_rlwe, NULL, rlwe_ctx);
+		if (n <= 0)
+			{
+			SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_RLWE_LIB);
+			goto err;
+			}
+
+		RLWE_PUB_free(clnt_rlwe_pub);
+		RLWE_REC_free(clnt_rlwe_rec);
+		RLWE_CTX_free(rlwe_ctx);
+		RLWE_PAIR_free(s->s3->tmp.rlwe);
+		s->s3->tmp.rlwe = NULL; 
+
+		/* Compute the master secret */
+		s->session->master_key_length = s->method->ssl3_enc-> \
+		    generate_master_secret(s, s->session->master_key, p, n);
+		
+		OPENSSL_cleanse(p, n);
+		return (ret);
+		}
+	else
+#endif
 #ifndef OPENSSL_NO_PSK
 		if (alg_k & SSL_kPSK)
 			{
 			unsigned char *t = NULL;
 			unsigned char psk_or_pre_ms[PSK_MAX_PSK_LEN*2+4];
@@ -2886,20 +3224,25 @@
 		}
 
 	return(1);
 f_err:
 	ssl3_send_alert(s,SSL3_AL_FATAL,al);
-#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_ECDH) || defined(OPENSSL_NO_SRP)
+#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_ECDH) || defined(OPENSSL_NO_SRP) || !defined(OPENSSL_NO_RLWEKEX)
 err:
 #endif
 #ifndef OPENSSL_NO_ECDH
 	EVP_PKEY_free(clnt_pub_pkey);
 	EC_POINT_free(clnt_ecpoint);
 	if (srvr_ecdh != NULL) 
 		EC_KEY_free(srvr_ecdh);
 	BN_CTX_free(bn_ctx);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PUB_free(clnt_rlwe_pub);
+	RLWE_REC_free(clnt_rlwe_rec);
+	RLWE_CTX_free(rlwe_ctx);
+#endif
 	return(-1);
 	}
 
 int ssl3_get_cert_verify(SSL *s)
 	{
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/ssl.h openssl-1.0.1f-rlwekex/ssl/ssl.h
--- openssl-1.0.1f/ssl/ssl.h	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/ssl.h	2014-10-16 12:38:15.000000000 +0200
@@ -248,10 +248,11 @@
 #define SSL_TXT_kKRB5     	"kKRB5"
 #define SSL_TXT_kECDHr		"kECDHr"
 #define SSL_TXT_kECDHe		"kECDHe"
 #define SSL_TXT_kECDH		"kECDH"
 #define SSL_TXT_kEECDH		"kEECDH"
+#define SSL_TXT_kRLWE		"kRLWE"
 #define SSL_TXT_kPSK            "kPSK"
 #define SSL_TXT_kGOST		"kGOST"
 #define SSL_TXT_kSRP		"kSRP"
 
 #define	SSL_TXT_aRSA		"aRSA"
@@ -272,10 +273,11 @@
 #define SSL_TXT_RSA		"RSA"
 #define SSL_TXT_ECDH		"ECDH"
 #define SSL_TXT_EECDH		"EECDH" /* same as "kEECDH:-AECDH" */
 #define SSL_TXT_AECDH		"AECDH"
 #define SSL_TXT_ECDSA		"ECDSA"
+#define SSL_TXT_RLWE		"RLWE" /* same as "kRLWE" */
 #define SSL_TXT_KRB5      	"KRB5"
 #define SSL_TXT_PSK             "PSK"
 #define SSL_TXT_SRP		"SRP"
 
 #define SSL_TXT_DES		"DES"
@@ -2306,10 +2308,11 @@
 #define SSL_R_BAD_MESSAGE_TYPE				 114
 #define SSL_R_BAD_PACKET_LENGTH				 115
 #define SSL_R_BAD_PROTOCOL_VERSION_NUMBER		 116
 #define SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH		 316
 #define SSL_R_BAD_RESPONSE_ARGUMENT			 117
+#define SSL_R_BAD_RLWE_PUB				 371
 #define SSL_R_BAD_RSA_DECRYPT				 118
 #define SSL_R_BAD_RSA_ENCRYPT				 119
 #define SSL_R_BAD_RSA_E_LENGTH				 120
 #define SSL_R_BAD_RSA_MODULUS_LENGTH			 121
 #define SSL_R_BAD_RSA_SIGNATURE				 122
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/ssl3.h openssl-1.0.1f-rlwekex/ssl/ssl3.h
--- openssl-1.0.1f/ssl/ssl3.h	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/ssl3.h	2014-10-16 12:38:15.000000000 +0200
@@ -121,10 +121,13 @@
 #include <openssl/comp.h>
 #endif
 #include <openssl/buffer.h>
 #include <openssl/evp.h>
 #include <openssl/ssl.h>
+#ifndef OPENSSL_NO_RLWEKEX
+#include <openssl/rlwekex.h>
+#endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
@@ -497,10 +500,13 @@
 #endif
 
 #ifndef OPENSSL_NO_ECDH
 		EC_KEY *ecdh; /* holds short lived ECDH key */
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+		RLWE_PAIR *rlwe; /* holds short lived RLWE key */
+#endif
 
 		/* used when SSL_ST_FLUSH_DATA is entered */
 		int next_state;			
 
 		int reuse_message;
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/ssl_cert.c openssl-1.0.1f-rlwekex/ssl/ssl_cert.c
--- openssl-1.0.1f/ssl/ssl_cert.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/ssl_cert.c	2014-10-16 12:38:15.000000000 +0200
@@ -269,10 +269,21 @@
 			goto err;
 			}
 		}
 	ret->ecdh_tmp_cb = cert->ecdh_tmp_cb;
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	if (cert->rlwe_tmp)
+		{
+		ret->rlwe_tmp = RLWE_PAIR_dup(cert->rlwe_tmp);
+		if (ret->rlwe_tmp == NULL)
+			{
+			SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_RLWE_LIB);
+			goto err;
+			}
+		}
+#endif
 
 	for (i = 0; i < SSL_PKEY_NUM; i++)
 		{
 		if (cert->pkeys[i].x509 != NULL)
 			{
@@ -327,11 +338,11 @@
 	 */
 	ssl_cert_set_default_md(ret);
 
 	return(ret);
 	
-#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH)
+#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH) || !defined(OPENSSL_NO_RLWEKEX)
 err:
 #endif
 #ifndef OPENSSL_NO_RSA
 	if (ret->rsa_tmp != NULL)
 		RSA_free(ret->rsa_tmp);
@@ -342,10 +353,14 @@
 #endif
 #ifndef OPENSSL_NO_ECDH
 	if (ret->ecdh_tmp != NULL)
 		EC_KEY_free(ret->ecdh_tmp);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	if (ret->rlwe_tmp != NULL)
+		RLWE_PAIR_free(ret->rlwe_tmp);
+#endif
 
 	for (i = 0; i < SSL_PKEY_NUM; i++)
 		{
 		if (ret->pkeys[i].x509 != NULL)
 			X509_free(ret->pkeys[i].x509);
@@ -384,10 +399,13 @@
 	if (c->dh_tmp) DH_free(c->dh_tmp);
 #endif
 #ifndef OPENSSL_NO_ECDH
 	if (c->ecdh_tmp) EC_KEY_free(c->ecdh_tmp);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	if (c->rlwe_tmp) RLWE_PAIR_free(c->rlwe_tmp);
+#endif
 
 	for (i=0; i<SSL_PKEY_NUM; i++)
 		{
 		if (c->pkeys[i].x509 != NULL)
 			X509_free(c->pkeys[i].x509);
@@ -494,10 +512,16 @@
 #endif
 #ifndef OPENSSL_NO_ECDH
 	if (sc->peer_ecdh_tmp != NULL)
 		EC_KEY_free(sc->peer_ecdh_tmp);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	if (sc->peer_rlwepub_tmp != NULL)
+		RLWE_PUB_free(sc->peer_rlwepub_tmp);
+	if (sc->peer_rlwerec_tmp != NULL)
+		RLWE_REC_free(sc->peer_rlwerec_tmp);
+#endif
 
 	OPENSSL_free(sc);
 	}
 
 int ssl_set_peer_cert_type(SESS_CERT *sc,int type)
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/ssl_ciph.c openssl-1.0.1f-rlwekex/ssl/ssl_ciph.c
--- openssl-1.0.1f/ssl/ssl_ciph.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/ssl_ciph.c	2014-10-16 12:38:15.000000000 +0200
@@ -248,10 +248,11 @@
 
 	{0,SSL_TXT_kECDHr,0,  SSL_kECDHr,0,0,0,0,0,0,0,0},
 	{0,SSL_TXT_kECDHe,0,  SSL_kECDHe,0,0,0,0,0,0,0,0},
 	{0,SSL_TXT_kECDH,0,   SSL_kECDHr|SSL_kECDHe,0,0,0,0,0,0,0,0},
 	{0,SSL_TXT_kEECDH,0,  SSL_kEECDH,0,0,0,0,0,0,0,0},
+	{0,SSL_TXT_kRLWE,0,   SSL_kRLWE,0,0,0,0,0,0,0,0},
 	{0,SSL_TXT_ECDH,0,    SSL_kECDHr|SSL_kECDHe|SSL_kEECDH,0,0,0,0,0,0,0,0},
 
         {0,SSL_TXT_kPSK,0,    SSL_kPSK,  0,0,0,0,0,0,0,0},
 	{0,SSL_TXT_kSRP,0,    SSL_kSRP,  0,0,0,0,0,0,0,0},
 	{0,SSL_TXT_kGOST,0, SSL_kGOST,0,0,0,0,0,0,0,0},
@@ -272,10 +273,11 @@
 	{0,SSL_TXT_aGOST,0,0,SSL_aGOST94|SSL_aGOST01,0,0,0,0,0,0,0},
 
 	/* aliases combining key exchange and server authentication */
 	{0,SSL_TXT_EDH,0,     SSL_kEDH,~SSL_aNULL,0,0,0,0,0,0,0},
 	{0,SSL_TXT_EECDH,0,   SSL_kEECDH,~SSL_aNULL,0,0,0,0,0,0,0},
+	{0,SSL_TXT_RLWE,0,    SSL_kRLWE,~SSL_aNULL,0,0,0,0,0,0,0},
 	{0,SSL_TXT_NULL,0,    0,0,SSL_eNULL, 0,0,0,0,0,0},
 	{0,SSL_TXT_KRB5,0,    SSL_kKRB5,SSL_aKRB5,0,0,0,0,0,0,0},
 	{0,SSL_TXT_RSA,0,     SSL_kRSA,SSL_aRSA,0,0,0,0,0,0,0},
 	{0,SSL_TXT_ADH,0,     SSL_kEDH,SSL_aNULL,0,0,0,0,0,0,0},
 	{0,SSL_TXT_AECDH,0,   SSL_kEECDH,SSL_aNULL,0,0,0,0,0,0,0},
@@ -1590,10 +1592,13 @@
 		kx="ECDH/ECDSA";
 		break;
 	case SSL_kEECDH:
 		kx="ECDH";
 		break;
+	case SSL_kRLWE:
+		kx="RLWE";
+		break;
 	case SSL_kPSK:
 		kx="PSK";
 		break;
 	case SSL_kSRP:
 		kx="SRP";
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/ssl_err.c openssl-1.0.1f-rlwekex/ssl/ssl_err.c
--- openssl-1.0.1f/ssl/ssl_err.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/ssl_err.c	2014-10-16 12:38:15.000000000 +0200
@@ -317,10 +317,11 @@
 {ERR_REASON(SSL_R_BAD_MESSAGE_TYPE)      ,"bad message type"},
 {ERR_REASON(SSL_R_BAD_PACKET_LENGTH)     ,"bad packet length"},
 {ERR_REASON(SSL_R_BAD_PROTOCOL_VERSION_NUMBER),"bad protocol version number"},
 {ERR_REASON(SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH),"bad psk identity hint length"},
 {ERR_REASON(SSL_R_BAD_RESPONSE_ARGUMENT) ,"bad response argument"},
+{ERR_REASON(SSL_R_BAD_RLWE_PUB)          ,"bad rlwe pub"},
 {ERR_REASON(SSL_R_BAD_RSA_DECRYPT)       ,"bad rsa decrypt"},
 {ERR_REASON(SSL_R_BAD_RSA_ENCRYPT)       ,"bad rsa encrypt"},
 {ERR_REASON(SSL_R_BAD_RSA_E_LENGTH)      ,"bad rsa e length"},
 {ERR_REASON(SSL_R_BAD_RSA_MODULUS_LENGTH),"bad rsa modulus length"},
 {ERR_REASON(SSL_R_BAD_RSA_SIGNATURE)     ,"bad rsa signature"},
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/ssl_lib.c openssl-1.0.1f-rlwekex/ssl/ssl_lib.c
--- openssl-1.0.1f/ssl/ssl_lib.c	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/ssl_lib.c	2014-10-16 12:38:15.000000000 +0200
@@ -2019,10 +2019,13 @@
 	unsigned long mask_k,mask_a,emask_k,emask_a;
 	int have_ecc_cert, ecdh_ok, ecdsa_ok, ecc_pkey_size;
 #ifndef OPENSSL_NO_ECDH
 	int have_ecdh_tmp;
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	int have_rlwe_tmp;
+#endif
 	X509 *x = NULL;
 	EVP_PKEY *ecc_pkey = NULL;
 	int signature_nid = 0, pk_nid = 0, md_nid = 0;
 
 	if (c == NULL) return;
@@ -2045,10 +2048,13 @@
 #endif
 
 #ifndef OPENSSL_NO_ECDH
 	have_ecdh_tmp=(c->ecdh_tmp != NULL || c->ecdh_tmp_cb != NULL);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	have_rlwe_tmp=(c->rlwe_tmp != NULL);
+#endif
 	cpk= &(c->pkeys[SSL_PKEY_RSA_ENC]);
 	rsa_enc= (cpk->x509 != NULL && cpk->privatekey != NULL);
 	rsa_enc_export=(rsa_enc && EVP_PKEY_size(cpk->privatekey)*8 <= kl);
 	cpk= &(c->pkeys[SSL_PKEY_RSA_SIGN]);
 	rsa_sign=(cpk->x509 != NULL && cpk->privatekey != NULL);
@@ -2069,12 +2075,12 @@
 	emask_a=0;
 
 	
 
 #ifdef CIPHER_DEBUG
-	printf("rt=%d rte=%d dht=%d ecdht=%d re=%d ree=%d rs=%d ds=%d dhr=%d dhd=%d\n",
-	        rsa_tmp,rsa_tmp_export,dh_tmp,have_ecdh_tmp,
+	printf("rt=%d rte=%d dht=%d ecdht=%d rlwet=%d re=%d ree=%d rs=%d ds=%d dhr=%d dhd=%d\n",
+	        rsa_tmp,rsa_tmp_export,dh_tmp,have_ecdh_tmp,have_rlwe_tmp
 		rsa_enc,rsa_enc_export,rsa_sign,dsa_sign,dh_rsa,dh_dsa);
 #endif
 	
 	cpk = &(c->pkeys[SSL_PKEY_GOST01]);
 	if (cpk->x509 != NULL && cpk->privatekey !=NULL) {
@@ -2198,10 +2204,14 @@
 		{
 		mask_k|=SSL_kEECDH;
 		emask_k|=SSL_kEECDH;
 		}
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	mask_k|=SSL_kRLWE;
+	emask_k|=SSL_kRLWE;
+#endif
 
 #ifndef OPENSSL_NO_PSK
 	mask_k |= SSL_kPSK;
 	mask_a |= SSL_aPSK;
 	emask_k |= SSL_kPSK;
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/ssl_locl.h openssl-1.0.1f-rlwekex/ssl/ssl_locl.h
--- openssl-1.0.1f/ssl/ssl_locl.h	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/ssl_locl.h	2014-10-16 12:38:15.000000000 +0200
@@ -159,10 +159,13 @@
 #include <openssl/rsa.h>
 #endif
 #ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+#include <openssl/rlwekex.h>
+#endif
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 #include <openssl/symhacks.h>
 
 #ifdef OPENSSL_BUILD_SHLIBSSL
@@ -297,10 +300,11 @@
 #define SSL_kECDHe		0x00000040L /* ECDH cert, ECDSA CA cert */
 #define SSL_kEECDH		0x00000080L /* ephemeral ECDH */
 #define SSL_kPSK		0x00000100L /* PSK */
 #define SSL_kGOST       0x00000200L /* GOST key exchange */
 #define SSL_kSRP        0x00000400L /* SRP */
+#define SSL_kRLWE		0x00000800L /* Ring Learning with Errors */
 
 /* Bits for algorithm_auth (server authentication) */
 #define SSL_aRSA		0x00000001L /* RSA auth */
 #define SSL_aDSS 		0x00000002L /* DSS auth */
 #define SSL_aNULL 		0x00000004L /* no auth (i.e. use ADH or AECDH) */
@@ -510,10 +514,13 @@
 #ifndef OPENSSL_NO_ECDH
 	EC_KEY *ecdh_tmp;
 	/* Callback for generating ephemeral ECDH keys */
 	EC_KEY *(*ecdh_tmp_cb)(SSL *ssl,int is_export,int keysize);
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PAIR *rlwe_tmp;
+#endif
 
 	CERT_PKEY pkeys[SSL_PKEY_NUM];
 
 	int references; /* >1 only if SSL_copy_session_id is used */
 	} CERT;
@@ -538,10 +545,14 @@
 	DH *peer_dh_tmp; /* not used for SSL 2 */
 #endif
 #ifndef OPENSSL_NO_ECDH
 	EC_KEY *peer_ecdh_tmp;
 #endif
+#ifndef OPENSSL_NO_RLWEKEX
+	RLWE_PUB *peer_rlwepub_tmp;
+	RLWE_REC *peer_rlwerec_tmp;
+#endif
 
 	int references; /* actually always 1 at the moment */
 	} SESS_CERT;
 
 
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/ssl/tls1.h openssl-1.0.1f-rlwekex/ssl/tls1.h
--- openssl-1.0.1f/ssl/tls1.h	2014-01-06 14:47:42.000000000 +0100
+++ openssl-1.0.1f-rlwekex/ssl/tls1.h	2014-10-16 12:38:15.000000000 +0200
@@ -517,10 +517,18 @@
 #define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256       0x0300C02F
 #define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384       0x0300C030
 #define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256        0x0300C031
 #define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384        0x0300C032
 
+/* Ring-LWE based ciphersuites */
+#define TLS1_CK_RLWE_RSA_WITH_AES_128_GCM_SHA256        0x0300D000
+#define TLS1_CK_RLWE_ECDSA_WITH_AES_128_GCM_SHA256      0x0300D001
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+#define TLS1_CK_RLWE_ECDHE_RSA_WITH_AES_128_GCM_SHA256        0x0300D002
+#define TLS1_CK_RLWE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256      0x0300D003
+#endif
+
 /* XXX
  * Inconsistency alert:
  * The OpenSSL names of ciphers with ephemeral DH here include the string
  * "DHE", while elsewhere it has always been "EDH".
  * (The alias for the list of all such ciphers also is "EDH".)
@@ -668,10 +676,17 @@
 #define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256      "ECDHE-RSA-AES128-GCM-SHA256"
 #define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384      "ECDHE-RSA-AES256-GCM-SHA384"
 #define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256       "ECDH-RSA-AES128-GCM-SHA256"
 #define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384       "ECDH-RSA-AES256-GCM-SHA384"
 
+#define TLS1_TXT_RLWE_RSA_WITH_AES_128_GCM_SHA256        "RLWE-RSA-AES128-GCM-SHA256"
+#define TLS1_TXT_RLWE_ECDSA_WITH_AES_128_GCM_SHA256      "RLWE-ECDSA-AES128-GCM-SHA256"
+#ifdef OPENSSL_HYBRID_RLWE_ECDHE
+#define TLS1_TXT_RLWE_ECDHE_RSA_WITH_AES_128_GCM_SHA256        "RLWE-ECDHE-RSA-AES128-GCM-SHA256"
+#define TLS1_TXT_RLWE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256      "RLWE-ECDHE-ECDSA-AES128-GCM-SHA256"
+#endif
+
 #define TLS_CT_RSA_SIGN			1
 #define TLS_CT_DSS_SIGN			2
 #define TLS_CT_RSA_FIXED_DH		3
 #define TLS_CT_DSS_FIXED_DH		4
 #define TLS_CT_ECDSA_SIGN		64
diff --exclude=.svn --unified=5 --recursive --new-file openssl-1.0.1f/test/Makefile openssl-1.0.1f-rlwekex/test/Makefile
--- openssl-1.0.1f/test/Makefile	2014-01-06 15:36:07.000000000 +0100
+++ openssl-1.0.1f-rlwekex/test/Makefile	2014-10-16 12:38:16.000000000 +0200
@@ -30,10 +30,11 @@
 
 BNTEST=		bntest
 ECTEST=		ectest
 ECDSATEST=	ecdsatest
 ECDHTEST=	ecdhtest
+RLWEKEXTEST=	rlwekextest
 EXPTEST=	exptest
 IDEATEST=	ideatest
 SHATEST=	shatest
 SHA1TEST=	sha1test
 SHA256TEST=	sha256t
@@ -64,11 +65,11 @@
 SRPTEST=	srptest
 ASN1TEST=	asn1test
 
 TESTS=		alltests
 
-EXE=	$(BNTEST)$(EXE_EXT) $(ECTEST)$(EXE_EXT)  $(ECDSATEST)$(EXE_EXT) $(ECDHTEST)$(EXE_EXT) $(IDEATEST)$(EXE_EXT) \
+EXE=	$(BNTEST)$(EXE_EXT) $(ECTEST)$(EXE_EXT)  $(ECDSATEST)$(EXE_EXT) $(ECDHTEST)$(EXE_EXT) $(RLWEKEXTEST)$(EXE_EXT) $(IDEATEST)$(EXE_EXT) \
 	$(MD2TEST)$(EXE_EXT)  $(MD4TEST)$(EXE_EXT) $(MD5TEST)$(EXE_EXT) $(HMACTEST)$(EXE_EXT) $(WPTEST)$(EXE_EXT) \
 	$(RC2TEST)$(EXE_EXT) $(RC4TEST)$(EXE_EXT) $(RC5TEST)$(EXE_EXT) \
 	$(DESTEST)$(EXE_EXT) $(SHATEST)$(EXE_EXT) $(SHA1TEST)$(EXE_EXT) $(SHA256TEST)$(EXE_EXT) $(SHA512TEST)$(EXE_EXT) \
 	$(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \
 	$(RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \
@@ -76,20 +77,20 @@
 	$(EVPTEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) $(JPAKETEST)$(EXE_EXT) $(SRPTEST)$(EXE_EXT) \
 	$(ASN1TEST)$(EXE_EXT)
 
 # $(METHTEST)$(EXE_EXT)
 
-OBJ=	$(BNTEST).o $(ECTEST).o  $(ECDSATEST).o $(ECDHTEST).o $(IDEATEST).o \
+OBJ=	$(BNTEST).o $(ECTEST).o  $(ECDSATEST).o $(ECDHTEST).o $(RLWEKEXTEST).o $(IDEATEST).o \
 	$(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \
 	$(HMACTEST).o $(WPTEST).o \
 	$(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \
 	$(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(SHA256TEST).o $(SHA512TEST).o \
 	$(MDC2TEST).o $(RMDTEST).o \
 	$(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \
 	$(BFTEST).o  $(SSLTEST).o  $(DSATEST).o  $(EXPTEST).o $(RSATEST).o \
 	$(EVPTEST).o $(IGETEST).o $(JPAKETEST).o $(ASN1TEST).o
-SRC=	$(BNTEST).c $(ECTEST).c  $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \
+SRC=	$(BNTEST).c $(ECTEST).c  $(ECDSATEST).c $(ECDHTEST).c $(RLWEKEXTEST).c $(IDEATEST).c \
 	$(MD2TEST).c  $(MD4TEST).c $(MD5TEST).c \
 	$(HMACTEST).c $(WPTEST).c \
 	$(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \
 	$(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \
 	$(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \
@@ -131,11 +132,11 @@
 
 alltests: \
 	test_des test_idea test_sha test_md4 test_md5 test_hmac \
 	test_md2 test_mdc2 test_wp \
 	test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
-	test_rand test_bn test_ec test_ecdsa test_ecdh \
+	test_rand test_bn test_ec test_ecdsa test_ecdh test_rlwekex \
 	test_enc test_x509 test_rsa test_crl test_sid \
 	test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
 	test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
 	test_jpake test_srp test_cms
 
@@ -241,10 +242,14 @@
 
 test_ecdh:
 	@echo 'test ecdh'
 	../util/shlib_wrap.sh ./$(ECDHTEST)
 
+test_rlwekex:
+	@echo 'test rlwekex'
+	../util/shlib_wrap.sh ./$(RLWEKEXTEST)
+
 test_verify:
 	@echo "The following command should have some OK's and some failures"
 	@echo "There are definitly a few expired certificates"
 	../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs/demo ../certs/demo/*.pem
 
@@ -455,10 +460,13 @@
 	@target=$(ECDSATEST); $(BUILD_CMD)
 
 $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
 	@target=$(ECDHTEST); $(BUILD_CMD)
 
+$(RLWEKEXTEST)$(EXE_EXT): $(RLWEKEXTEST).o $(DLIBCRYPTO)
+	@target=$(RLWEKEXTEST); $(BUILD_CMD)
+
 $(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
 	@target=$(IGETEST); $(BUILD_CMD)
 
 $(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
 	@target=$(JPAKETEST); $(BUILD_CMD)
@@ -483,18 +491,20 @@
 	@target=dummytest; $(BUILD_CMD)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
 asn1test.o: ../include/openssl/asn1.h ../include/openssl/asn1_mac.h
-asn1test.o: ../include/openssl/bio.h ../include/openssl/buffer.h
-asn1test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-asn1test.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-asn1test.o: ../include/openssl/ecdsa.h ../include/openssl/evp.h
-asn1test.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-asn1test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-asn1test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-asn1test.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
+asn1test.o: ../include/openssl/bio.h ../include/openssl/bn.h
+asn1test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
+asn1test.o: ../include/openssl/dh.h ../include/openssl/dsa.h
+asn1test.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+asn1test.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+asn1test.o: ../include/openssl/evp.h ../include/openssl/lhash.h
+asn1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+asn1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+asn1test.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
+asn1test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 asn1test.o: ../include/openssl/sha.h ../include/openssl/stack.h
 asn1test.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
 asn1test.o: ../include/openssl/x509_vfy.h asn1test.c
 bftest.o: ../e_os.h ../include/openssl/blowfish.h ../include/openssl/e_os2.h
 bftest.o: ../include/openssl/opensslconf.h bftest.c
@@ -512,12 +522,13 @@
 bntest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 bntest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 bntest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h bntest.c
 casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h
 casttest.o: ../include/openssl/opensslconf.h casttest.c
-destest.o: ../include/openssl/des.h ../include/openssl/des_old.h
-destest.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
+destest.o: ../include/openssl/crypto.h ../include/openssl/des.h
+destest.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
+destest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 destest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
 destest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 destest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h destest.c
 dhtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
 dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -544,76 +555,86 @@
 ecdhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
 ecdhtest.o: ../include/openssl/sha.h ../include/openssl/stack.h
 ecdhtest.o: ../include/openssl/symhacks.h ecdhtest.c
 ecdsatest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
 ecdsatest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
-ecdsatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
+ecdsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
+ecdsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 ecdsatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
 ecdsatest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 ecdsatest.o: ../include/openssl/err.h ../include/openssl/evp.h
 ecdsatest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
 ecdsatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 ecdsatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 ecdsatest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-ecdsatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-ecdsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+ecdsatest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+ecdsatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
+ecdsatest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
 ecdsatest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
 ecdsatest.o: ecdsatest.c
 ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
 ectest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
-ectest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
+ectest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
+ectest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 ectest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
 ectest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 ectest.o: ../include/openssl/err.h ../include/openssl/evp.h
 ectest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
 ectest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 ectest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-ectest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-ectest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+ectest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+ectest.o: ../include/openssl/sha.h ../include/openssl/stack.h
+ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
 ectest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ectest.c
 enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
-enginetest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
-enginetest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-enginetest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
-enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h
-enginetest.o: ../include/openssl/evp.h ../include/openssl/lhash.h
-enginetest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-enginetest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-enginetest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
-enginetest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-enginetest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
+enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
+enginetest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+enginetest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
+enginetest.o: ../include/openssl/err.h ../include/openssl/evp.h
+enginetest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+enginetest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+enginetest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+enginetest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+enginetest.o: ../include/openssl/sha.h ../include/openssl/stack.h
+enginetest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
 enginetest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
 enginetest.o: enginetest.c
 evp_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-evp_test.o: ../include/openssl/buffer.h ../include/openssl/conf.h
-evp_test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-evp_test.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-evp_test.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
-evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h
-evp_test.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-evp_test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-evp_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-evp_test.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
-evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h
-evp_test.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
+evp_test.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h
+evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h
+evp_test.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+evp_test.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+evp_test.o: ../include/openssl/engine.h ../include/openssl/err.h
+evp_test.o: ../include/openssl/evp.h ../include/openssl/lhash.h
+evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
+evp_test.o: ../include/openssl/rand.h ../include/openssl/rsa.h
+evp_test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+evp_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+evp_test.o: ../include/openssl/ui.h ../include/openssl/x509.h
 evp_test.o: ../include/openssl/x509_vfy.h evp_test.c
 exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
 exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
 exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h
 exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
 exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 exptest.o: ../include/openssl/symhacks.h exptest.c
 hmactest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-hmactest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-hmactest.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
-hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-hmactest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
-hmactest.o: ../include/openssl/symhacks.h hmactest.c
+hmactest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+hmactest.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
+hmactest.o: ../include/openssl/hmac.h ../include/openssl/md5.h
+hmactest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+hmactest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+hmactest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
+hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h hmactest.c
 ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h
 ideatest.o: ../include/openssl/opensslconf.h ideatest.c
 igetest.o: ../include/openssl/aes.h ../include/openssl/e_os2.h
 igetest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h
 igetest.o: ../include/openssl/rand.h igetest.c
@@ -626,32 +647,35 @@
 md2test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
 md2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 md2test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 md2test.o: ../include/openssl/symhacks.h md2test.c
 md4test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-md4test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-md4test.o: ../include/openssl/evp.h ../include/openssl/md4.h
-md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
-md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md4test.c
+md4test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+md4test.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
+md4test.o: ../include/openssl/md4.h ../include/openssl/obj_mac.h
+md4test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+md4test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+md4test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
+md4test.o: ../include/openssl/symhacks.h md4test.c
 md5test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-md5test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-md5test.o: ../include/openssl/evp.h ../include/openssl/md5.h
-md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
-md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md5test.c
+md5test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+md5test.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
+md5test.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
+md5test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+md5test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+md5test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
+md5test.o: ../include/openssl/symhacks.h md5test.c
 mdc2test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-mdc2test.o: ../include/openssl/crypto.h ../include/openssl/des.h
-mdc2test.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
-mdc2test.o: ../include/openssl/evp.h ../include/openssl/mdc2.h
-mdc2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-mdc2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-mdc2test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
-mdc2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
-mdc2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h mdc2test.c
+mdc2test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+mdc2test.o: ../include/openssl/des.h ../include/openssl/des_old.h
+mdc2test.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
+mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+mdc2test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+mdc2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+mdc2test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
+mdc2test.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
+mdc2test.o: ../include/openssl/ui_compat.h mdc2test.c
 randtest.o: ../e_os.h ../include/openssl/e_os2.h
 randtest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h
 randtest.o: ../include/openssl/rand.h randtest.c
 rc2test.o: ../e_os.h ../include/openssl/e_os2.h
 rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h rc2test.c
@@ -661,39 +685,52 @@
 rc5test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
 rc5test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
 rc5test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 rc5test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 rc5test.o: ../include/openssl/symhacks.h rc5test.c
+rlwekextest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
+rlwekextest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+rlwekextest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+rlwekextest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+rlwekextest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+rlwekextest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+rlwekextest.o: ../include/openssl/rand.h ../include/openssl/rlwekex.h
+rlwekextest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+rlwekextest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+rlwekextest.o: rlwekextest.c
 rmdtest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-rmdtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-rmdtest.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h
-rmdtest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-rmdtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/safestack.h
-rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h rmdtest.c
+rmdtest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+rmdtest.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
+rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/ripemd.h
+rmdtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
+rmdtest.o: ../include/openssl/symhacks.h rmdtest.c
 rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
 rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
 rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h
 rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
 rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 rsa_test.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 rsa_test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 rsa_test.o: ../include/openssl/symhacks.h rsa_test.c
 sha1test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-sha1test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-sha1test.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h
-sha1test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-sha1test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h sha1test.c
+sha1test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+sha1test.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
+sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
+sha1test.o: ../include/openssl/sha.h ../include/openssl/stack.h
+sha1test.o: ../include/openssl/symhacks.h sha1test.c
 shatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-shatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
-shatest.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h
-shatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-shatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h shatest.c
+shatest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+shatest.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
+shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
+shatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
+shatest.o: ../include/openssl/symhacks.h shatest.c
 srptest.o: ../include/openssl/bio.h ../include/openssl/bn.h
 srptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
 srptest.o: ../include/openssl/err.h ../include/openssl/lhash.h
 srptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 srptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
@@ -718,12 +755,12 @@
 ssltest.o: ../include/openssl/sha.h ../include/openssl/srp.h
 ssltest.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
 ssltest.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 ssltest.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 ssltest.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-ssltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
-ssltest.o: ../include/openssl/x509v3.h ssltest.c
+ssltest.o: ../include/openssl/ui.h ../include/openssl/x509.h
+ssltest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssltest.c
 wp_test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
 wp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 wp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
 wp_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 wp_test.o: ../include/openssl/whrlpool.h wp_test.c
