سؤال

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?

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top