Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
aes_gcm.hpp File Reference

AES-256-GCM authenticated encryption (NIST SP 800-38D). More...

#include "signet/crypto/aes_core.hpp"
#include "signet/error.hpp"
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <vector>

Go to the source code of this file.

Classes

struct  signet::forge::crypto::detail::gcm::Block128
 128-bit value stored as two big-endian uint64_t halves. More...
 
struct  signet::forge::crypto::detail::gcm::GHashTable
 4-bit precomputed table for constant-time GHASH multiplication. More...
 
class  signet::forge::crypto::AesGcm
 AES-256 in Galois/Counter Mode (GCM) as specified in NIST SP 800-38D. More...
 

Namespaces

namespace  signet
 
namespace  signet::forge
 
namespace  signet::forge::crypto
 
namespace  signet::forge::crypto::detail
 
namespace  signet::forge::crypto::detail::gcm
 

Functions

Block128 signet::forge::crypto::detail::gcm::load_block (const uint8_t src[16])
 Load a 16-byte array into a Block128 (big-endian byte order).
 
void signet::forge::crypto::detail::gcm::store_block (uint8_t dst[16], const Block128 &b)
 Store a Block128 into a 16-byte array (big-endian byte order).
 
Block128 signet::forge::crypto::detail::gcm::xor_blocks (const Block128 &a, const Block128 &b)
 XOR two Block128 values.
 
Block128 signet::forge::crypto::detail::gcm::gf128_double (const Block128 &V)
 "Doubling" in GF(2^128): multiply by x (shift right by 1 in GCM bit ordering).
 
Block128 signet::forge::crypto::detail::gcm::ct_table_lookup (const Block128 table[16], uint8_t index)
 Constant-time 16-entry Block128 table lookup.
 
uint64_t signet::forge::crypto::detail::gcm::ct_reduce4 (uint8_t index)
 Constant-time 4-bit reduction table lookup.
 
uint8_t signet::forge::crypto::detail::gcm::rev4 (uint8_t n)
 Bit-reverse a 4-bit nibble value.
 
Block128 signet::forge::crypto::detail::gcm::gf128_mul_ct (const GHashTable &table, const Block128 &X)
 Constant-time GF(2^128) multiplication using the 4-bit precomputed table.
 
Block128 signet::forge::crypto::detail::gcm::gf128_mul (const Block128 &X, const Block128 &Y)
 Multiply two elements in GF(2^128) using the schoolbook algorithm.
 
Block128 signet::forge::crypto::detail::gcm::ghash (const Block128 &H, const uint8_t *data, size_t data_size)
 GHASH: Compute the GHASH function over data using hash subkey H.
 
void signet::forge::crypto::detail::gcm::inc32 (uint8_t counter[16])
 Increment the rightmost 32 bits of a 16-byte counter block (big-endian).
 
void signet::forge::crypto::detail::gcm::gctr (const Aes256 &cipher, const uint8_t icb[16], const uint8_t *input, size_t input_size, uint8_t *output)
 GCTR: AES-CTR encryption with the given initial counter block.
 

Detailed Description

AES-256-GCM authenticated encryption (NIST SP 800-38D).

Definition in file aes_gcm.hpp.