Files
moss-kernel/Cargo.toml
Matthew Leach 65517c6641 Add BLAKE2s entropy pool with per-CPU ChaCha20 CSPRNG
Replace the single `SmallRng` with a proper two-layer RNG architecture:

- Global BLAKE2s-256 entropy pool that accumulates entropy and gates
  seed extraction behind a 256-bit threshold.
- Per-CPU ChaCha20Rng instances that are lazily seeded from the pool on
  first use and periodically reseed every 1 MB by XOR-ing a fresh BLAKE2
  extract with 32 bytes of their own output.

The /dev/random chardev uses fill_random_bytes directly instead of
routing through the syscall layer.
2026-03-07 07:33:15 +00:00

64 lines
1.8 KiB
TOML

[workspace]
members = ["libkernel", "moss-macros", "usertest"]
[workspace.dependencies]
async-trait = "0.1.89"
bitflags = "2.11"
log = "0.4"
paste = "1.0.15"
rand = { version = "0.10", default-features = false }
[workspace.lints.clippy]
semicolon_if_nothing_returned = "warn"
uninlined_format_args = "warn"
[package]
name = "moss"
version = "0.1.0"
edition = "2024"
[[bin]]
name = "moss"
test = true
bench = false
[dependencies]
libkernel = { path = "libkernel" }
moss-macros = { path = "moss-macros" }
aarch64-cpu = "11.1.0"
arm-pl011-uart = { version = "0.4.0", default-features = false }
async-trait = { workspace = true }
bitflags = { workspace = true }
fdt-parser = "0.4.16"
futures = { version = "0.3.31", default-features = false, features = ["alloc", "async-await"] }
getargs = { version = "0.5.0", default-features = false }
log = { workspace = true }
object = { version = "0.38.0", default-features = false, features = ["core", "elf", "read_core"] }
paste = { workspace = true }
ringbuf = { version = "0.4.8", default-features = false, features = ["alloc"] }
rand = { workspace = true }
rustc-hash = { version = "2.1", default-features = false }
smoltcp = { version = "0.12.0", default-features = false, features = ["alloc", "medium-ethernet", "medium-ip", "proto-ipv4", "proto-ipv6", "socket-tcp", "socket-udp"] }
tock-registers = "0.10.1"
virtio-drivers = "0.12.0"
blake2 = { version = "0.10.6", default-features = false }
chacha20 = { version = "0.10.0", default-features = false, features = ["rng"] }
[build-dependencies]
time = { version = "0.3.47", features = ["formatting", "macros"] } # For build timestamping via build.rs
[features]
default = ["smp"]
# Support for Symmetric Multiprocessing
smp = []
[profile.release]
debug = "full"
opt-level = 3
codegen-units = 1
[lints]
workspace = true