diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-28 20:31:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-28 20:31:32 +0000 |
commit | ddb15b8f679c0c6b095a734947fe3ae668607887 (patch) | |
tree | c60355dee5276253aff49bf5adf782e4fcba79ed /src/or/circuit.c | |
parent | 5d1510883ea583b12b1d66156c31f03700c79245 (diff) | |
download | tor-ddb15b8f679c0c6b095a734947fe3ae668607887.tar.gz tor-ddb15b8f679c0c6b095a734947fe3ae668607887.zip |
Remove IVs from cipher code, since AES-ctr has none.
svn:r1742
Diffstat (limited to 'src/or/circuit.c')
-rw-r--r-- | src/or/circuit.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c index 4298922f01..b97ea14eba 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -1627,7 +1627,6 @@ int circuit_extend(cell_t *cell, circuit_t *circ) { */ int circuit_init_cpath_crypto(crypt_path_t *cpath, char *key_data, int reverse) { - unsigned char iv[_ARRAYSIZE(CIPHER_IV_LEN)]; crypto_digest_env_t *tmp_digest; crypto_cipher_env_t *tmp_crypto; @@ -1635,8 +1634,6 @@ int circuit_init_cpath_crypto(crypt_path_t *cpath, char *key_data, int reverse) tor_assert(!(cpath->f_crypto || cpath->b_crypto || cpath->f_digest || cpath->b_digest)); - memset(iv, 0, CIPHER_IV_LEN); - log_fn(LOG_DEBUG,"hop init digest forward 0x%.8x, backward 0x%.8x.", (unsigned int)*(uint32_t*)key_data, (unsigned int)*(uint32_t*)(key_data+20)); cpath->f_digest = crypto_new_digest_env(); @@ -1647,12 +1644,12 @@ int circuit_init_cpath_crypto(crypt_path_t *cpath, char *key_data, int reverse) log_fn(LOG_DEBUG,"hop init cipher forward 0x%.8x, backward 0x%.8x.", (unsigned int)*(uint32_t*)(key_data+40), (unsigned int)*(uint32_t*)(key_data+40+16)); if (!(cpath->f_crypto = - crypto_create_init_cipher(key_data+(2*DIGEST_LEN),iv,1))) { + crypto_create_init_cipher(key_data+(2*DIGEST_LEN),1))) { log(LOG_WARN,"forward cipher initialization failed."); return -1; } if (!(cpath->b_crypto = - crypto_create_init_cipher(key_data+(2*DIGEST_LEN)+CIPHER_KEY_LEN,iv,0))) { + crypto_create_init_cipher(key_data+(2*DIGEST_LEN)+CIPHER_KEY_LEN,0))) { log(LOG_WARN,"backward cipher initialization failed."); return -1; } |