Documentation ¶
Index ¶
- Constants
- Variables
- func NewCTR(cip BlockCipher, keyLen int, entropy, nonce, personalstr []byte) (*ctrDRBG, error)
- func NewGMHash(digest hash.Hash, entropy []byte, nonce []byte, personalstr []byte) (*hashDRBG, error)
- func NewHMAC(h func() hash.Hash, entropy, nonce, personalstr []byte) (*hmacDRBG, error)
- func NewHash(digest hash.Hash, entropy []byte, nonce []byte, personalstr []byte, isGm bool) (*hashDRBG, error)
- func NewNISTHash(digest hash.Hash, entropy []byte, nonce []byte, personalstr []byte) (*hashDRBG, error)
- type BlockCipher
Constants ¶
View Source
const ( /* seedlen for hash_drgb, table 2 of nist sp 800-90a rev.1 */ DIGEST_MAX_SIZE = 64 HASH_DRBG_SEED_SIZE = 55 HASH_DRBG_MAX_SEED_SIZE = 111 HASH_DRBG_RESEED_INTERVAL = (uint64(1) << 48) )
View Source
const MAX_BYTES = 1 << 27
View Source
const MAX_BYTES_PER_GENERATE = 1 << 11
Variables ¶
View Source
var ErrReseedRequired = errors.New("the DRGB must be reseeded")
Functions ¶
func NewCTR ¶
func NewCTR(cip BlockCipher, keyLen int, entropy, nonce, personalstr []byte) (*ctrDRBG, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.