Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top