Re:PlentyFS: PoC read-only filesystem with random contents g...
by minoru on Monday October 19, 2020 @03:46PM
(#24830145)
Hi, the author here. Thanks for taking a look at the code!
I picked SHA-1 because it was the simplest way to generate pseudorandom data: I knew there's a Rust crate for it which I used before. Works fine for a proof-of-concept :) I'm now reading up on other hashes and ciphers. My tentative plan was to replace SHA-1 with AES-NI in counter mode, but if I can find something that works on all CPUs while giving me a comparable performance, I'll go for that. (Should probably look at PRNGs as well; if I concatenate the file seed with the counter and use that as a seed for a PRNG, then ask it for a value -- it should be good enough too.)
I doubt Lars has requirements for the quality of randomness, but we'll see.
Re:PlentyFS: PoC read-only filesystem with random contents g...
by dredmorbius on Monday October 19, 2020 @02:13PM
(#24829119)
I'm really just a bystanderhere. File an issue w/ the project.
Why use a cryptographic hash? For nbdkit-random-plugin we use a fast PRNG (xoshiro256-starstar 1.0 as it happens, but the specific one is not important). I doubt a cryptographically secure hash is worth the extra computational cost to users.