![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Functions | |
| constexpr uint8_t | xtime (uint8_t a) |
| Multiply by x (i.e., by 2) in GF(2^8). | |
| constexpr uint8_t | gf_mul (uint8_t a, uint8_t b) |
| Multiply two elements in GF(2^8) using the Russian peasant algorithm. | |
| void | sub_word (uint8_t word[4]) |
| Apply S-box to each byte of a 4-byte word. | |
| void | rot_word (uint8_t word[4]) |
| Rotate a 4-byte word left by one byte: [a,b,c,d] -> [b,c,d,a]. | |
| void | secure_zero (void *ptr, size_t len) |
| Securely zero memory that held key material (CWE-244, NIST SP 800-38D §8.3). | |
| bool | has_hardware_aes () noexcept |
| Check if CPU supports AES-NI (x86) or ARMv8-CE AES (ARM). | |
|
inlineconstexpr |
Multiply two elements in GF(2^8) using the Russian peasant algorithm.
Constant-time: arithmetic masking instead of branches (CWE-208). This is used for MixColumns and InvMixColumns (FIPS-197 §5.1.3/§5.3.3).
Definition at line 165 of file aes_core.hpp.
|
inlinenoexcept |
Check if CPU supports AES-NI (x86) or ARMv8-CE AES (ARM).
Returns true if hardware AES acceleration is available. Currently used for diagnostics only — T-table path is always used (Gap C-5).
Definition at line 217 of file aes_core.hpp.
|
inline |
Rotate a 4-byte word left by one byte: [a,b,c,d] -> [b,c,d,a].
Definition at line 189 of file aes_core.hpp.
|
inline |
Securely zero memory that held key material (CWE-244, NIST SP 800-38D §8.3).
Uses volatile write + compiler barrier to prevent dead-store elimination. This is the approach used by libsodium and BoringSSL — portable across all compilers and platforms without relying on non-standard APIs.
Definition at line 203 of file aes_core.hpp.
|
inline |
Apply S-box to each byte of a 4-byte word.
Definition at line 181 of file aes_core.hpp.
|
inlineconstexpr |
Multiply by x (i.e., by 2) in GF(2^8).
This is the "xtime" operation. If the high bit is set, XOR with 0x1b after shifting (reduction mod 0x11b).
Definition at line 158 of file aes_core.hpp.