Tor 0.4.9.2-alpha-dev
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Functions
aes.h File Reference

Headers for aes.c. More...

#include "lib/cc/torint.h"
#include "lib/malloc/malloc.h"
#include "lib/testsupport/testsupport.h"

Go to the source code of this file.

Macros

#define aes_cipher_free(cipher)    FREE_AND_NULL(aes_cnt_cipher_t, aes_cipher_free_, (cipher))
 

Functions

aes_cnt_cipher_taes_new_cipher (const uint8_t *key, const uint8_t *iv, int key_bits)
 
void aes_cipher_set_iv_aligned (aes_cnt_cipher_t *cipher_, const uint8_t *iv)
 
void aes_cipher_set_key (aes_cnt_cipher_t *cipher_, const uint8_t *key, int key_bits)
 
void aes_cipher_free_ (aes_cnt_cipher_t *cipher)
 
void aes_crypt_inplace (aes_cnt_cipher_t *cipher, char *data, size_t len)
 

Detailed Description

Headers for aes.c.

Definition in file aes.h.

Macro Definition Documentation

◆ aes_cipher_free

#define aes_cipher_free (   cipher)     FREE_AND_NULL(aes_cnt_cipher_t, aes_cipher_free_, (cipher))

Definition at line 28 of file aes.h.

Function Documentation

◆ aes_cipher_free_()

void aes_cipher_free_ ( aes_cnt_cipher_t cipher)

Definition at line 95 of file aes_nss.c.

◆ aes_cipher_set_iv_aligned()

void aes_cipher_set_iv_aligned ( aes_cnt_cipher_t cipher_,
const uint8_t *  iv 
)

Change the IV of this stream cipher without changing the key.

Requires that the cipher stream position is at an even multiple of 16 bytes.

Definition at line 105 of file aes_nss.c.

Referenced by cgo_prf_xor_t0().

◆ aes_cipher_set_key()

void aes_cipher_set_key ( aes_cnt_cipher_t cipher_,
const uint8_t *  key,
int  key_bits 
)

Changes the key of the cipher; sets the IV to 0.

Definition at line 115 of file aes_nss.c.

Referenced by cgo_prf_set_key().

◆ aes_crypt_inplace()

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

Definition at line 130 of file aes_nss.c.

◆ aes_new_cipher()

aes_cnt_cipher_t * aes_new_cipher ( const uint8_t *  key,
const uint8_t *  iv,
int  key_bits 
)

Definition at line 84 of file aes_nss.c.