diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-06 20:55:46 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-06 20:55:46 +0000 |
commit | 2fc106d2101edd80a7ba8cdcc9f49522619ba9cf (patch) | |
tree | 832842d3b113734e45d8a5391027ceb93299e899 /src/or | |
parent | 40a5d6055e0921ec6b9e5000d7b33c4599c6e22c (diff) | |
download | tor-2fc106d2101edd80a7ba8cdcc9f49522619ba9cf.tar.gz tor-2fc106d2101edd80a7ba8cdcc9f49522619ba9cf.zip |
Force hybrid encryption on for key negotiation
svn:r1509
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/onion.c | 2 | ||||
-rw-r--r-- | src/or/rendclient.c | 2 | ||||
-rw-r--r-- | src/or/test.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/or/onion.c b/src/or/onion.c index 6ff58ee375..0185a47555 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -585,7 +585,7 @@ onion_skin_create(crypto_pk_env_t *dest_router_key, /* 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); diff --git a/src/or/rendclient.c b/src/or/rendclient.c index ec50465791..470f30d77e 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -100,7 +100,7 @@ rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) { 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; diff --git a/src/or/test.c b/src/or/test.c index eb04532774..276636670f 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -418,7 +418,7 @@ test_crypto() 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); |