This commit is contained in:
LeoVasanko committed 2026-10-04 17:31:11 +00:00
1 parent f7f3a450c9
commit c3c4d66ea8
1 file changed
+4 -4
+4 -4
View File
@@ -123,12 +123,12 @@ Constants (per module): NAME, KEYBYTES, NONCEBYTES, MACBYTES, MACBYTES_LONG, RAT
- nonce_increment(nonce) - nonce_increment(nonce)
- wipe(buffer) - wipe(buffer)
### CSPRNG (aeg.random) ### Random Generator (CSPRNG)
Seeded once from the OS, then a deterministic AEGIS keystream: each call increments the nonce, so no output block ever repeats. random_key() and random_nonce() draw from it. Seeded once from the OS with random key and nonce, then a cryptographically secure AEGIS keystream: each call increments the nonce, so no output block ever repeats. `random_key()` and `random_nonce()` draw from it. The into variant can directly fill Numpy integer arrays and other structures that support Buffer API, making it far faster than any alternatives (e.g. Numpy's own random module).
- ciph.random() -> per-thread aeg.random.Random singleton for the cipher module - random().bytes(n) -> bytearray
- rng.bytes(n) -> bytearray, rng.into(buf), rng(n) - random().into(buffer) -> None
### Random-access encrypted files (aeg.raf) ### Random-access encrypted files (aeg.raf)