[or-cvs] Force hybrid encryption on for key negotiation
Nick Mathewson
nickm at seul.org
Tue Apr 6 20:55:49 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv31210/src/or
Modified Files:
onion.c rendclient.c test.c
Log Message:
Force hybrid encryption on for key negotiation
Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/src/or/onion.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- onion.c 6 Apr 2004 20:45:44 -0000 1.145
+++ onion.c 6 Apr 2004 20:55:46 -0000 1.146
@@ -585,7 +585,7 @@
/* set meeting point, meeting cookie, etc here. Leave zero for now. */
if (crypto_pk_public_hybrid_encrypt(dest_router_key, challenge,
ONIONSKIN_CHALLENGE_LEN-CIPHER_KEY_LEN,
- onion_skin_out, PK_NO_PADDING)<0)
+ onion_skin_out, PK_NO_PADDING, 1)<0)
goto err;
tor_free(challenge);
Index: rendclient.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendclient.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- rendclient.c 6 Apr 2004 20:25:18 -0000 1.22
+++ rendclient.c 6 Apr 2004 20:55:46 -0000 1.23
@@ -100,7 +100,7 @@
r = crypto_pk_public_hybrid_encrypt(parsed->pk, tmp,
MAX_NICKNAME_LEN+1+REND_COOKIE_LEN+DH_KEY_LEN,
payload+DIGEST_LEN,
- PK_PKCS1_OAEP_PADDING);
+ PK_PKCS1_OAEP_PADDING, 0);
if (r<0) {
log_fn(LOG_WARN,"hybrid pk encrypt failed.");
goto err;
Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- test.c 3 Apr 2004 02:40:30 -0000 1.74
+++ test.c 6 Apr 2004 20:55:46 -0000 1.75
@@ -418,7 +418,7 @@
continue;
p = (i==0)?PK_NO_PADDING:
(i==1)?PK_PKCS1_PADDING:PK_PKCS1_OAEP_PADDING;
- len = crypto_pk_public_hybrid_encrypt(pk1,data1,j,data2,p);
+ len = crypto_pk_public_hybrid_encrypt(pk1,data1,j,data2,p,0);
test_assert(len>=0);
len = crypto_pk_private_hybrid_decrypt(pk1,data2,len,data3,p);
test_eq(len,j);
More information about the tor-commits
mailing list