Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::crypto::detail::crngt Namespace Reference

Classes

struct  CrngtState
 CRNGT state — stores the previous 32-byte RNG output for comparison. More...
 

Functions

void fill_random_bytes_tested (CrngtState &state, uint8_t *buf, size_t size)
 Generate random bytes with FIPS 140-3 §4.9.2 continuous test.
 

Function Documentation

◆ fill_random_bytes_tested()

void signet::forge::crypto::detail::crngt::fill_random_bytes_tested ( CrngtState state,
uint8_t *  buf,
size_t  size 
)
inline

Generate random bytes with FIPS 140-3 §4.9.2 continuous test.

Compares each 32-byte chunk against the previous output. If any consecutive 32-byte blocks are identical, throws std::runtime_error (FIPS 140-3 error state).

Parameters
stateCRNGT state (must persist across calls).
bufOutput buffer for random bytes.
sizeNumber of random bytes to generate.

Definition at line 227 of file cipher_interface.hpp.