tor
master
|
Data Fields | |
union { | |
EVP_CIPHER_CTX evp | |
AES_KEY aes | |
} | key |
uint32_t | counter3 |
uint32_t | counter2 |
uint32_t | counter1 |
uint32_t | counter0 |
union { | |
uint8_t buf [16] | |
uint32_t buf32 [4] | |
} | ctr_buf |
unsigned int | pos |
uint8_t | using_evp |
Implements an AES counter-mode cipher.
uint8_t buf |
The counter, in big-endian order, as bytes.
The encrypted value of ctr_buf.
uint32_t buf32[4] |
The counter, in big-endian order, as big-endian words. Note that on big-endian platforms, this is redundant with counter3...0, so we just use these values instead.
uint32_t counter3 |
These four values, together, implement a 128-bit counter, with counter0 as the low-order word and counter3 as the high-order word.
union { ... } key |
This next element (however it's defined) is the AES key.
unsigned int pos |
Our current stream position within buf.
uint8_t using_evp |
True iff we're using the evp implementation of this cipher.