-
- Downloads
Merge #640
640: Reimplement random data generation, add `read_entropy` syscall r=stlankes a=joboet Fixes #143 by reimplementing random data generation using a [ChaCha-based RNG](https://docs.rs/rand_chacha/0.3.1/rand_chacha/struct.ChaCha20Rng.html) continuously reseeded using the `RDSEED` instruction. This should provide better security, as `RDRAND` is known to have hardware bugs. Also adds a new buffer-based syscall, `read_entropy`, which better fits the usecase of crates like [`getrandom`](https://github.com/rust-random/getrandom ). The old `secure_rand*` and `rand` syscalls should probably be removed at some point, but I do not know the Hermit stability policy and therefore have not done this in this PR. Co-authored-by:joboet <jonasboettiger@icloud.com>
No related branches found
No related tags found
Showing
- Cargo.lock 17 additions, 0 deletionsCargo.lock
- Cargo.toml 1 addition, 0 deletionsCargo.toml
- src/arch/aarch64/kernel/processor.rs 1 addition, 5 deletionssrc/arch/aarch64/kernel/processor.rs
- src/arch/x86_64/kernel/processor.rs 21 additions, 27 deletionssrc/arch/x86_64/kernel/processor.rs
- src/entropy.rs 53 additions, 0 deletionssrc/entropy.rs
- src/lib.rs 1 addition, 0 deletionssrc/lib.rs
- src/macros.rs 0 additions, 12 deletionssrc/macros.rs
- src/syscalls/entropy.rs 57 additions, 20 deletionssrc/syscalls/entropy.rs
- src/syscalls/mod.rs 3 additions, 3 deletionssrc/syscalls/mod.rs
Loading
Please register or sign in to comment