Project

drbg-rb

0.0
No release in over 3 years
Low commit activity in last 3 years
Cryptographically secure deterministic random bit generators for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
~> 2.12.0
 Project Readme

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

This library should not be considered cryptographically secure. 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.