Documentation ¶
Index ¶
- func FromBlock(newCipher func(key []byte) (cipher.Block, error), newHash func() hash.Hash, ...) abstract.Cipher
- func FromSponge(sponge Sponge, key []byte, options ...interface{}) abstract.Cipher
- func FromStream(newStream func(key []byte) cipher.Stream, newHash func() hash.Hash, ...) abstract.Cipher
- func NewAEAD(c abstract.Cipher) cipher.AEAD
- func NewHash(cipher func(key []byte, options ...interface{}) abstract.Cipher, size int) hash.Hash
- type Block
- type Padding
- type Sponge
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromBlock ¶
func FromBlock(newCipher func(key []byte) (cipher.Block, error), newHash func() hash.Hash, blockLen, keyLen, hashLen int, key []byte, options ...interface{}) abstract.Cipher
Construct a general message Cipher from a Block cipher and a cryptographic Hash.
func FromSponge ¶
SpongeCipher builds a general message Cipher from a Sponge function.
func FromStream ¶
func FromStream(newStream func(key []byte) cipher.Stream, newHash func() hash.Hash, blockLen, keyLen, hashLen int, key []byte, options ...interface{}) abstract.Cipher
Construct a general message Cipher from a Stream cipher and a cryptographic Hash.
Types ¶
type Padding ¶
type Padding byte
Padding is an Option to configure the multi-rate padding byte to be used with a Sponge cipher.
type Sponge ¶
type Sponge interface { // XOR src data into sponge's internal state, // transform its state, and copy resulting state into dst. // Buffers must be either Rate or Rate+Capacity bytes long. Transform(dst, src []byte) // Return the number of data bytes the sponge can aborb in one block. Rate() int // Return the sponge's secret state capacity in bytes. Capacity() int // Create a copy of this Sponge with identical state Clone() Sponge }
Sponge is an interface representing a primitive sponge function.
Directories ¶
Path | Synopsis |
---|---|
Package aes implements the general Cipher interface using AES, SHA2, and HMAC.
|
Package aes implements the general Cipher interface using AES, SHA2, and HMAC. |
This package exists runs comparative benchmarks across several alternative Cipher implementations.
|
This package exists runs comparative benchmarks across several alternative Cipher implementations. |
Package NORX implements the experimental NORX cipher.
|
Package NORX implements the experimental NORX cipher. |
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
|
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. |
Click to show internal directories.
Click to hide internal directories.