spongecrypto

package module
v0.0.0-...-8ce7768 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: CC0-1.0 Imports: 3 Imported by: 0

README

sponge-crypto

Yet another Sponge-Construction based algorithm.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

type Crypto struct {
	Len   uint8 // 0 < Len < 64
	Off   uint8 // 0 <= Off < Len
	State [64]byte
}

An orthogonal implementation of the Sponge-Construction using the Core208() function of the salsa20 cipher.

func (*Crypto) BlockSize

func (c *Crypto) BlockSize() int

func (*Crypto) CloneCipher

func (c *Crypto) CloneCipher() *Crypto

func (*Crypto) Construct

func (c *Crypto) Construct(l int) error

func (*Crypto) Decrypt

func (c *Crypto) Decrypt(dst, src []byte)

func (*Crypto) Encrypt

func (c *Crypto) Encrypt(dst, src []byte)

func (*Crypto) Pad

func (c *Crypto) Pad()

func (*Crypto) Read

func (c *Crypto) Read(p []byte) (n int, err error)

func (*Crypto) Reset

func (c *Crypto) Reset()

func (*Crypto) Size

func (c *Crypto) Size() int

func (*Crypto) Sum

func (c *Crypto) Sum(b []byte) []byte

func (*Crypto) Write

func (c *Crypto) Write(p []byte) (n int, err error)

type Decrypter

type Decrypter struct {
	Crypto
}

func (*Decrypter) XORKeyStream

func (c *Decrypter) XORKeyStream(dst, src []byte)

type Encrypter

type Encrypter struct {
	Crypto
}

func (*Encrypter) XORKeyStream

func (c *Encrypter) XORKeyStream(dst, src []byte)

type Mac

type Mac struct {
	Crypto
	Bak Crypto
}

func (*Mac) Construct

func (m *Mac) Construct(l int, key []byte) error

func (*Mac) Reset

func (m *Mac) Reset()

type PiCrypto

type PiCrypto struct {
	Len   uint8 // 0 < Len < 256
	Off   uint8 // 0 <= Off < Len
	State [256]byte
}

An orthogonal implementation of the Sponge-Construction using the π-function from the π-Cipher https://aezoo.compute.dtu.dk/doku.php?id=%CF%80-cipher

func (*PiCrypto) BlockSize

func (c *PiCrypto) BlockSize() int

func (*PiCrypto) CloneCipher

func (c *PiCrypto) CloneCipher() *PiCrypto

func (*PiCrypto) Construct

func (c *PiCrypto) Construct(l int) error

func (*PiCrypto) Decrypt

func (c *PiCrypto) Decrypt(dst, src []byte)

func (*PiCrypto) Encrypt

func (c *PiCrypto) Encrypt(dst, src []byte)

func (*PiCrypto) Pad

func (c *PiCrypto) Pad()

func (*PiCrypto) Read

func (c *PiCrypto) Read(p []byte) (n int, err error)

func (*PiCrypto) Reset

func (c *PiCrypto) Reset()

func (*PiCrypto) Size

func (c *PiCrypto) Size() int

func (*PiCrypto) Sum

func (c *PiCrypto) Sum(b []byte) []byte

func (*PiCrypto) Write

func (c *PiCrypto) Write(p []byte) (n int, err error)

type PiDecrypter

type PiDecrypter struct {
	PiCrypto
}

func (*PiDecrypter) XORKeyStream

func (c *PiDecrypter) XORKeyStream(dst, src []byte)

type PiEncrypter

type PiEncrypter struct {
	PiCrypto
}

func (*PiEncrypter) XORKeyStream

func (c *PiEncrypter) XORKeyStream(dst, src []byte)

type PiMac

type PiMac struct {
	PiCrypto
	Bak PiCrypto
}

func (*PiMac) Construct

func (m *PiMac) Construct(l int, key []byte) error

func (*PiMac) Reset

func (m *PiMac) Reset()

Jump to

Keyboard shortcuts

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