drbg

package
v0.0.0-...-b73af74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2020 License: MIT, MIT Imports: 2 Imported by: 7

README

This Go 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 Read 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.

See also: python-drbg.

Documentation

Overview

Based on HMAC_DRBG in NIST SP SP 800-90A http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf

This file was generated by hmac_drbg_tests.py from python-drbg.

Index

Constants

This section is empty.

Variables

View Source
var HmacSha512PrTests = []map[string]string{}/* 224 elements not displayed */

Functions

This section is empty.

Types

type DRBG

type DRBG struct {
	// contains filtered or unexported fields
}

func New

func New(seed []byte) *DRBG

func (*DRBG) Read

func (rng *DRBG) Read(b []byte) (n int, err error)

func (*DRBG) Reseed

func (rng *DRBG) Reseed(seed []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL