Question

Does Ruby provide functionality to run a seedable CSPRNG? From the standard library, OpenSSL/SecureRandom is cryptographically secure, but not seedable. Random is seedable, but not cryptographically secure.

Alternatively, what is a secure way to instantiate a cryptographically secure PRNG in Ruby using only OpenSSL APIs?

Was it helpful?

Solution

I ended up implementing DRBG_HMAC in Ruby. The code can be found here: https://github.com/cryodex/drbg-rb

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top