diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-09-19 15:53:38 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-09-19 15:53:38 +0000 |
commit | 7e93139a85b6f912c11d8e26bc512d9330008278 (patch) | |
tree | b693e86a7e4e32349938e94bddf082fed266d684 /src/common/aes.h | |
parent | 5e81b0ecb8ef0b6747491fe91051097dc3526b4d (diff) | |
download | tor-7e93139a85b6f912c11d8e26bc512d9330008278.tar.gz tor-7e93139a85b6f912c11d8e26bc512d9330008278.zip |
r15171@catbus: nickm | 2007-09-19 11:44:54 -0400
Switch our AES implementation from "128 bit counter with to 64 bits set to 0" to a proper implementation of counter mode. Also, add an aes_set_iv function to initialize the counter to a nonzero value.
svn:r11518
Diffstat (limited to 'src/common/aes.h')
-rw-r--r-- | src/common/aes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/aes.h b/src/common/aes.h index 0962e7261b..264cf8c1b4 100644 --- a/src/common/aes.h +++ b/src/common/aes.h @@ -24,9 +24,12 @@ void aes_free_cipher(aes_cnt_cipher_t *cipher); void aes_set_key(aes_cnt_cipher_t *cipher, const char *key, int key_bits); void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len, char *output); +void aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv); +#if 0 uint64_t aes_get_counter(aes_cnt_cipher_t *cipher); void aes_set_counter(aes_cnt_cipher_t *cipher, uint64_t counter); void aes_adjust_counter(aes_cnt_cipher_t *cipher, long delta); +#endif #endif |