State structure for AES-based Galois Counter Mode (GCM-128). More...
#include <aes.h>
Data Fields | |
| qsc_aes_state | cstate |
| uint8_t | C [QSC_AES_BLOCK_SIZE] |
| uint8_t | H [QSC_AES_BLOCK_SIZE] |
| uint8_t | J0 [QSC_AES_BLOCK_SIZE] |
| uint8_t | S [QSC_AES_BLOCK_SIZE] |
| uint64_t | aadlen |
| uint64_t | ctlen |
| bool | encrypt |
State structure for AES-based Galois Counter Mode (GCM-128).
Combines an AES-128 cipher context with Galois/Counter Mode to implement an AEAD scheme. The internal layout is identical to qsc_aes_gcm256_state; the sole distinction is that the cipher context is keyed with a 128-bit key.
| uint64_t aadlen |
[uint64_t] Total AAD length in bits
| uint8_t C[QSC_AES_BLOCK_SIZE] |
uint8_t[QSC_AES_BLOCK_SIZE] Current counter block (inc32 of J0)
| qsc_aes_state cstate |
[struct] Underlying AES-128 cipher context
| uint64_t ctlen |
[uint64_t] Total ciphertext length in bits
| bool encrypt |
[bool] true when initialized for encryption, false for decryption
| uint8_t H[QSC_AES_BLOCK_SIZE] |
uint8_t[QSC_AES_BLOCK_SIZE] GHASH subkey H = AES(K, 0^128)
| uint8_t J0[QSC_AES_BLOCK_SIZE] |
uint8_t[QSC_AES_BLOCK_SIZE] Pre-counter block derived from IV
| uint8_t S[QSC_AES_BLOCK_SIZE] |
uint8_t[QSC_AES_BLOCK_SIZE] Running GHASH accumulator