curupira1

package
v1.0.3008 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 12

Variables

This section is empty.

Functions

This section is empty.

Types

type AEAD

type AEAD interface {
	SetIV(iv []byte)
	Update(aData []byte)
	Encrypt(mData, cData []byte)
	Decrypt(cData, mData []byte)
	GetTag(tag []byte, tagBits int) []byte
}

func NewLetterSoup

func NewLetterSoup(cipher BlockCipher) AEAD

func NewLetterSoupWithMAC

func NewLetterSoupWithMAC(cipher BlockCipher, mac MAC) AEAD

type BlockCipher

type BlockCipher interface {
	cipher.Block
	Sct(dst, src []byte)
}

func NewCipher

func NewCipher(key []byte) (BlockCipher, error)

NewCipher creates and returns a new BlockCipher.

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

type LetterSoup

type LetterSoup struct {
	A []byte
	D []byte
	R []byte
	L []byte
	// contains filtered or unexported fields
}

func (*LetterSoup) Decrypt

func (this *LetterSoup) Decrypt(dst, src []byte)

func (*LetterSoup) Encrypt

func (this *LetterSoup) Encrypt(dst, src []byte)

func (*LetterSoup) GetTag

func (this *LetterSoup) GetTag(tag []byte, tagBits int) []byte

func (*LetterSoup) LFSRC

func (this *LetterSoup) LFSRC(mData, cData []byte)

func (*LetterSoup) SetIV

func (this *LetterSoup) SetIV(iv []byte)

func (*LetterSoup) Update

func (this *LetterSoup) Update(aData []byte)

type MAC

type MAC interface {
	Init()
	InitWithR(R []byte)
	Update(aData []byte)
	GetTag(tag []byte, tagBits int) []byte
}

func NewMarvin

func NewMarvin(cipher BlockCipher, R []byte, letterSoupMode bool) MAC

type Marvin

type Marvin struct {
	R []byte
	O []byte
	// contains filtered or unexported fields
}

func (*Marvin) GetTag

func (this *Marvin) GetTag(tag []byte, tagBits int) []byte

func (*Marvin) Init

func (this *Marvin) Init()

func (*Marvin) InitWithR

func (this *Marvin) InitWithR(R []byte)

func (*Marvin) Update

func (this *Marvin) Update(aData []byte)

Jump to

Keyboard shortcuts

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