Documentation ¶
Overview ¶
implements the GOST 28147 OFB counter mode (GCTR).
Index ¶
- Constants
- func NewBCDecrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewBCEncrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewCFB1(block cipher.Block, iv []byte, decrypt bool) cipher.Stream
- func NewCFB16(block cipher.Block, iv []byte, decrypt bool) cipher.Stream
- func NewCFB16Decrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB16Encrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB1Decrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB1Encrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB32(block cipher.Block, iv []byte, decrypt bool) cipher.Stream
- func NewCFB32Decrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB32Encrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB64(block cipher.Block, iv []byte, decrypt bool) cipher.Stream
- func NewCFB64Decrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB64Encrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB8(block cipher.Block, iv []byte, decrypt bool) cipher.Stream
- func NewCFB8Decrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewCFB8Encrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func NewG3413CBCDecrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewG3413CBCEncrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewG3413CFBDecrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewG3413CFBDecrypterWithBitBlockSize(block cipher.Block, iv []byte, bitBlockSize int) cipher.Stream
- func NewG3413CFBEncrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewG3413CFBEncrypterWithBitBlockSize(block cipher.Block, iv []byte, bitBlockSize int) cipher.Stream
- func NewG3413CTR(block cipher.Block, iv []byte) cipher.Stream
- func NewG3413CTRWithBitBlockSize(block cipher.Block, iv []byte, bitBlockSize int) cipher.Stream
- func NewG3413OFB(b cipher.Block, iv []byte) cipher.Stream
- func NewGCFBDecrypter(block GCFBCipherFunc, key, iv []byte) cipher.Stream
- func NewGCFBEncrypter(block GCFBCipherFunc, key, iv []byte) cipher.Stream
- func NewGOFB(b cipher.Block, iv []byte) cipher.Stream
- func NewIGEDecrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewIGEEncrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewNCFBDecrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewNCFBEncrypter(block cipher.Block, iv []byte) cipher.Stream
- func NewNOFB(b cipher.Block, iv []byte) cipher.Stream
- func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream
- func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte)
- func NewOFB8(b cipher.Block, iv []byte) cipher.Stream
- func NewOFBNLFDecrypter(newKey KeyCreator, key, iv []byte) cipher.BlockMode
- func NewOFBNLFEncrypter(newKey KeyCreator, key, iv []byte) cipher.BlockMode
- func NewPCBCDecrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewPCBCEncrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewWrapDecrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewWrapEncrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewWrapPadDecrypter(b cipher.Block, iv []byte) cipher.BlockMode
- func NewWrapPadEncrypter(b cipher.Block, iv []byte) cipher.BlockMode
- type GCFBCipherFunc
- type KeyCreator
- type OCFBResyncOption
Constants ¶
const WRAP_MAX = uint64(1) << 31
Input size limit: lower than maximum of standards but far larger than anything that will be used in practice.
Variables ¶
This section is empty.
Functions ¶
func NewBCDecrypter ¶ added in v1.0.2038
func NewBCEncrypter ¶ added in v1.0.2038
func NewCFB16Decrypter ¶ added in v1.0.2006
func NewCFB16Encrypter ¶ added in v1.0.2006
func NewCFB1Decrypter ¶ added in v1.0.2006
func NewCFB1Encrypter ¶ added in v1.0.2006
func NewCFB32Decrypter ¶ added in v1.0.2006
func NewCFB32Encrypter ¶ added in v1.0.2006
func NewCFB64Decrypter ¶ added in v1.0.2006
func NewCFB64Encrypter ¶ added in v1.0.2006
func NewCFB8Decrypter ¶
NewCFB8Decrypter returns a Stream which decrypts with cipher feedback mode (segment size = 8), using the given Block. The iv must be the same length as the Block's block size.
func NewCFB8Encrypter ¶
NewCFB8Encrypter returns a Stream which encrypts with cipher feedback mode (segment size = 8), using the given Block. The iv must be the same length as the Block's block size.
func NewECBDecrypter ¶ added in v1.0.1048
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncrypter ¶ added in v1.0.1048
NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func NewG3413CBCDecrypter ¶ added in v1.0.2051
NewG3413CBCDecrypter returns a cipher.BlockMode which decrypts in cipher block chaining mode, using the given cipher.Block. The length of iv must be the same as the Block's block size and must match the iv used to encrypt the data.
func NewG3413CBCEncrypter ¶ added in v1.0.2051
NewG3413CBCEncrypter returns a cipher.BlockMode which encrypts in cipher block chaining mode, using the given cipher.Block. The length of iv must be the same as the Block's block size.
func NewG3413CFBDecrypter ¶ added in v1.0.2051
NewG3413CFBDecrypter returns a Stream which decrypts with cipher feedback mode, using the given cipher.Block. The iv must be the same length as the cipher.Block's block size.
func NewG3413CFBDecrypterWithBitBlockSize ¶ added in v1.0.2051
func NewG3413CFBEncrypter ¶ added in v1.0.2051
NewG3413CFBEncrypter returns a Stream which encrypts with cipher feedback mode, using the given cipher.Block. The iv must be the same length as the cipher.Block's block size.
func NewG3413CFBEncrypterWithBitBlockSize ¶ added in v1.0.2051
func NewG3413CTR ¶ added in v1.0.2051
NewCTR returns a Stream which encrypts/decrypts using the given Block in counter mode. The length of iv must be the same as the Block's block size.
func NewG3413CTRWithBitBlockSize ¶ added in v1.0.2051
NewG3413CTRWithBitBlockSize returns a Stream which encrypts/decrypts using the given Block in counter mode. The length of iv must be the same as the Block's block size.
func NewG3413OFB ¶ added in v1.0.2051
NewG3413OFB returns a Stream that encrypts or decrypts using the block cipher b in output feedback mode. The initialization vector iv's length must be equal to b's block size.
func NewGCFBDecrypter ¶ added in v1.0.2051
func NewGCFBDecrypter(block GCFBCipherFunc, key, iv []byte) cipher.Stream
NewGCFBDecrypter returns a Stream which decrypts with cipher feedback mode, using the given Block. The iv must be the same length as the Block's block size.
func NewGCFBEncrypter ¶ added in v1.0.2051
func NewGCFBEncrypter(block GCFBCipherFunc, key, iv []byte) cipher.Stream
NewGCFBEncrypter returns a Stream which encrypts with cipher feedback mode, using the given Block. The iv must be the same length as the Block's block size.
func NewGOFB ¶ added in v1.0.2051
NewGOFB returns a Stream that encrypts or decrypts using the block cipher b in output feedback mode. The initialization vector iv's length must be equal to b's block size.
func NewIGEDecrypter ¶ added in v1.0.2054
NewIGEDecrypter returns a BlockMode which decrypts in infinite garble extension mode, using the given Block. The length of iv must be 2 times of Block's block size.
func NewIGEEncrypter ¶ added in v1.0.2054
NewIGEEncrypter returns a BlockMode which encrypts in infinite garble extension mode, using the given Block. The length of iv must be 2 times of Block's block size.
func NewNCFBDecrypter ¶ added in v1.0.2035
func NewNCFBEncrypter ¶ added in v1.0.2035
func NewNOFB ¶ added in v1.0.2035
NewNOFB returns a Stream that encrypts or decrypts using the block cipher b in output feedback mode. The initialization vector iv's length must be equal to b's block size.
func NewOCFBDecrypter ¶ added in v1.0.2025
NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's cipher feedback mode using the given cipher.Block. Prefix must be the first blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's block size. If an incorrect key is detected then nil is returned. On successful exit, blockSize+2 bytes of decrypted data are written into prefix. Resync determines if the "resynchronization step" from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on this point.
func NewOCFBEncrypter ¶ added in v1.0.2025
func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte)
NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's cipher feedback mode using the given cipher.Block, and an initial amount of ciphertext. randData must be random bytes and be the same length as the cipher.Block's block size. Resync determines if the "resynchronization step" from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on this point.
func NewOFBNLFDecrypter ¶ added in v1.0.2038
func NewOFBNLFDecrypter(newKey KeyCreator, key, iv []byte) cipher.BlockMode
func NewOFBNLFEncrypter ¶ added in v1.0.2038
func NewOFBNLFEncrypter(newKey KeyCreator, key, iv []byte) cipher.BlockMode
func NewPCBCDecrypter ¶ added in v1.0.2007
func NewPCBCEncrypter ¶ added in v1.0.2007
func NewWrapDecrypter ¶ added in v1.0.2054
func NewWrapEncrypter ¶ added in v1.0.2054
func NewWrapPadDecrypter ¶ added in v1.0.2054
Types ¶
type OCFBResyncOption ¶ added in v1.0.2025
type OCFBResyncOption bool
An OCFBResyncOption determines if the "resynchronization step" of OCFB is performed.
const ( OCFBResync OCFBResyncOption = true OCFBNoResync OCFBResyncOption = false )
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ascon implements the ASCON AEAD cipher.
|
Package ascon implements the ASCON AEAD cipher. |
Package grain implements the Grain128-AEAD cipher.
|
Package grain implements the Grain128-AEAD cipher. |
Package kcipher2 implements the KCipher-2 stream cipher
|
Package kcipher2 implements the KCipher-2 stream cipher |
Package misty1 implements the MISTY1 cipher
|
Package misty1 implements the MISTY1 cipher |
Package spritz implements the Spritz stream-cipher
|
Package spritz implements the Spritz stream-cipher |
Package threefish implements the Threefish tweakable block cipher.
|
Package threefish implements the Threefish tweakable block cipher. |
Package twine implements the TWINE lightweight block cipher
|
Package twine implements the TWINE lightweight block cipher |