mgm

package
v0.0.0-...-faedeaf Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: GPL-3.0, GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Multilinear Galois Mode (MGM) block cipher mode.

Index

Constants

View Source
const Mul64MaxBit = 64 - 1

Variables

View Source
var R64 = big.NewInt(0).SetBytes([]byte{
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b,
})

Functions

func NewMGM

func NewMGM(cipher cipher.Block, tagSize int) (cipher.AEAD, error)

Types

type MGM

type MGM struct {
	MaxSize   uint64
	BlockSize int
	TagSize   int
	// contains filtered or unexported fields
}

func (*MGM) NonceSize

func (mgm *MGM) NonceSize() int

func (*MGM) Open

func (mgm *MGM) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error)

func (*MGM) Overhead

func (mgm *MGM) Overhead() int

func (*MGM) Seal

func (mgm *MGM) Seal(dst, nonce, plaintext, additionalData []byte) []byte

type Mul

type Mul interface {
	Mul(x, y []byte) []byte
}

Jump to

Keyboard shortcuts

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