1 /* Copyright 2003 Roger Dingledine
2 * Copyright 2004-2006 Roger Dingledine, Nick Mathewson */
3 /* See LICENSE for licensing information */
6 /* Implements a minimal interface to counter-mode AES. */
10 #define AES_H_ID "$Id$"
14 * \brief Headers for aes.c
17 #include "../common/torint.h"
19 struct aes_cnt_cipher
;
20 typedef struct aes_cnt_cipher aes_cnt_cipher_t
;
22 aes_cnt_cipher_t
* aes_new_cipher(void);
23 void aes_free_cipher(aes_cnt_cipher_t
*cipher
);
24 void aes_set_key(aes_cnt_cipher_t
*cipher
, const char *key
, int key_bits
);
25 void aes_crypt(aes_cnt_cipher_t
*cipher
, const char *input
, size_t len
,
27 uint64_t aes_get_counter(aes_cnt_cipher_t
*cipher
);
28 void aes_set_counter(aes_cnt_cipher_t
*cipher
, uint64_t counter
);
29 void aes_adjust_counter(aes_cnt_cipher_t
*cipher
, long delta
);