aes.h File Reference

Headers for aes.c. More...

#include "torint.h"

Go to the source code of this file.

Typedefs

typedef struct aes_cnt_cipher aes_cnt_cipher_t

Functions

aes_cnt_cipher_taes_new_cipher (void)
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_crypt_inplace (aes_cnt_cipher_t *cipher, char *data, size_t len)
void aes_set_iv (aes_cnt_cipher_t *cipher, const char *iv)


Detailed Description

Headers for aes.c.


Function Documentation

void aes_crypt ( aes_cnt_cipher_t cipher,
const char *  input,
size_t  len,
char *  output 
)

Encrypt len bytes from input, storing the result in output. Uses the key in cipher, and advances the counter by len bytes as it encrypts.

References _aes_fill_buf(), aes_cnt_cipher::buf, and aes_cnt_cipher::pos.

Referenced by crypto_cipher_decrypt(), and crypto_cipher_encrypt().

void aes_crypt_inplace ( aes_cnt_cipher_t cipher,
char *  data,
size_t  len 
)

Encrypt len bytes from input, storing the results in place. Uses the key in cipher, and advances the counter by len bytes as it encrypts.

References _aes_fill_buf(), aes_cnt_cipher::buf, and aes_cnt_cipher::pos.

Referenced by crypto_cipher_crypt_inplace().

void aes_free_cipher ( aes_cnt_cipher_t cipher  ) 

Release storage held by cipher

References tor_free.

Referenced by crypto_free_cipher_env().

aes_cnt_cipher_t* aes_new_cipher ( void   ) 

Return a newly allocated counter-mode AES128 cipher implementation.

Referenced by crypto_new_cipher_env().

void aes_set_iv ( aes_cnt_cipher_t cipher,
const char *  iv 
)

Reset the 128-bit counter of cipher to the 16-bit big-endian value in iv.

References _aes_fill_buf(), aes_cnt_cipher::buf, aes_cnt_cipher::counter0, aes_cnt_cipher::counter1, aes_cnt_cipher::counter2, aes_cnt_cipher::counter3, get_uint32(), and aes_cnt_cipher::pos.

Referenced by crypto_cipher_set_iv().

void aes_set_key ( aes_cnt_cipher_t cipher,
const char *  key,
int  key_bits 
)


Generated on Tue May 25 00:30:40 2010 for tor by  doxygen 1.5.6