feat(keystore): sealed real/duress slots (argon2id 16MiB/3, ChaCha20-Poly1305), torn-write-safe 2-copy record, wipe state; virtio-rng driver + Entropy port; RustCrypto deps

This commit is contained in:
2026-10-27 23:06:25 +01:00
parent 6b13bf8bbf
commit 600140d518
12 changed files with 882 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
[package]
name = "port-entropy"
version = "0.1.0"
edition = "2024"
[dependencies]

View File

@@ -0,0 +1,10 @@
//! Where randomness comes from: keys, salts, nonces.
#![no_std]
#![forbid(unsafe_code)]
pub trait Entropy {
/// Fills `buf` with random bytes from the hardware; false if it could
/// not (then nothing in `buf` may be used).
fn fill(&mut self, buf: &mut [u8]) -> bool;
}