tor  master
Data Fields
aes_cnt_cipher Struct Reference

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
 

Detailed Description

Implements an AES counter-mode cipher.

Field Documentation

◆ buf

uint8_t buf

The counter, in big-endian order, as bytes.

The encrypted value of ctr_buf.

◆ buf32

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.

◆ counter3

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.

◆ key

union { ... } key

This next element (however it's defined) is the AES key.

◆ pos

unsigned int pos

Our current stream position within buf.

◆ using_evp

uint8_t using_evp

True iff we're using the evp implementation of this cipher.


The documentation for this struct was generated from the following file: