Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 902 Bytes

README.md

File metadata and controls

28 lines (16 loc) · 902 Bytes

##drbg-rb

This gem implements cryptographically secure deterministic random bit generators for Ruby. Currently, the gem supports HMAC_DRBG as described in NIST SP 800-90A.

###Warning

If you are looking for a generic Ruby CSRPNG, this is probably not what you are looking for. Instead, use SecureRandom. Only use this library if you absolutely need a random number generator that is explicitly seedable. If you don't know what this means, do not use this library.

###Install

gem install drbg-rb

###Usage

require 'drbg-rb'

rng = DRBG::HMAC.new(entropy)
bytes = rng.generate(10)

###Reference

  • NIST SP 800-90 - Deterministic Random Bit Generator Validation System

###License

This program is released under the BSD license.