Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top