diff options
author | Anton Kling <anton@kling.gg> | 2024-07-04 18:29:17 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-07-04 18:42:47 +0200 |
commit | 7d7f0aa9595bedf50083fb89dae049c1f064ca98 (patch) | |
tree | 9f821cb85e6deaf54b8c5b481325c7d9b231d907 /kernel/random.h | |
parent | f7752e37ce29b903e15d2579d25d4ebbaad023e6 (diff) |
Random: Improve random seeding.
Now it appears to be sufficiently good at producing a distinct seed at
each boot without using a /etc/seed file. Previously it did not do this.
Of course this is nowhere near cryptographically secure but randomness
does assist with things such as kmalloc.
Diffstat (limited to 'kernel/random.h')
-rw-r--r-- | kernel/random.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/random.h b/kernel/random.h index 9a44bb3..533209e 100644 --- a/kernel/random.h +++ b/kernel/random.h @@ -6,3 +6,7 @@ void setup_random(void); void add_random_devices(void); void get_random(u8 *buffer, u64 len); void get_fast_insecure_random(u8 *buffer, u64 len); +void random_add_entropy(u8 *buffer, u64 size); +// A interface that is not as expensive to run in comparison to +// random_add_entropy which may take longer. +void random_add_entropy_fast(u8 *buffer, u64 size); |