davidlazar / python-drbg

Cryptographically Secure PRNG for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This Python library provides a cryptographically secure pseudorandom number generator. Specifically, it implements HMAC_DRBG (SHA-512) as specified in NIST SP 800-90A.

For simplicity, this library currently does not track the seed period, so the generate function always returns the requested number of bytes. It is the user's responsibility to periodically reseed the PRNG.

This library is tested with NIST-provided test vectors. To run the tests:

$ python hmac_drbg_tests.py 
Passed all 224 tests.

See also: go-crypto.

About

Cryptographically Secure PRNG for Python

License:MIT License


Languages

Language:Python 100.0%