Versions in this module Expand all Collapse all v1 v1.0.0 Jan 12, 2022 Changes in this version + func EquivalentBytes(a, b Byte) bool + func ProbablyEquivalentBlocks(a, b Block) bool + func ProbablyEquivalentDoubles(a, b Double) bool + func ProbablyEquivalentWords(a, b Word) bool + func SerializeByte(e Byte) []byte + func XOR(dst, a, b []byte) int + type Block interface + Decode func(i [16]byte) [16]byte + Encode func(i [16]byte) [16]byte + type BlockAdditive [16]byte + func (ba BlockAdditive) Decode(in [16]byte) [16]byte + func (ba BlockAdditive) Encode(in [16]byte) [16]byte + type BlockAffine struct + func DecomposeBlockAffine(in Block) (BlockAffine, bool) + func NewBlockAffine(forwards matrix.Matrix, constant [16]byte) BlockAffine + func (ba BlockAffine) Decode(in [16]byte) [16]byte + func (ba BlockAffine) Encode(in [16]byte) [16]byte + type BlockLinear struct + Backwards matrix.Matrix + Forwards matrix.Matrix + func DecomposeBlockLinear(in Block) (BlockLinear, bool) + func NewBlockLinear(forwards matrix.Matrix) BlockLinear + func (bl BlockLinear) Decode(in [16]byte) (out [16]byte) + func (bl BlockLinear) Encode(in [16]byte) (out [16]byte) + type BlockTable struct + Hidden table.Block + In Byte + Out Block + func (bt BlockTable) Get(i byte) [16]byte + type Byte interface + Decode func(i byte) byte + Encode func(i byte) byte + func ParseByte(serialized []byte) Byte + type ByteAdditive byte + func (ba ByteAdditive) Decode(in byte) byte + func (ba ByteAdditive) Encode(in byte) byte + type ByteAffine struct + func DecomposeByteAffine(in Byte) (ByteAffine, bool) + func NewByteAffine(forwards matrix.Matrix, constant byte) ByteAffine + func (ba ByteAffine) Decode(in byte) byte + func (ba ByteAffine) Encode(in byte) byte + type ByteLinear struct + Backwards matrix.Matrix + Forwards matrix.Matrix + func DecomposeByteLinear(in Byte) (ByteLinear, bool) + func NewByteLinear(forwards matrix.Matrix) ByteLinear + func (bl ByteLinear) Decode(in byte) byte + func (bl ByteLinear) Encode(in byte) byte + type ByteMultiplication struct + Backwards number.ByteFieldElem + Forwards number.ByteFieldElem + func NewByteMultiplication(forwards number.ByteFieldElem) ByteMultiplication + func (bm ByteMultiplication) Decode(i byte) byte + func (bm ByteMultiplication) Encode(i byte) byte + type ByteTable struct + Hidden table.Byte + In Byte + Out Byte + func (bt ByteTable) Get(i byte) byte + type ComposedBlocks []Block + func (cb ComposedBlocks) Decode(i [16]byte) (out [16]byte) + func (cb ComposedBlocks) Encode(i [16]byte) (out [16]byte) + type ComposedBytes []Byte + func (cb ComposedBytes) Decode(i byte) byte + func (cb ComposedBytes) Encode(i byte) byte + type ComposedDoubles []Double + func (cd ComposedDoubles) Decode(i [2]byte) (out [2]byte) + func (cd ComposedDoubles) Encode(i [2]byte) (out [2]byte) + type ComposedWords []Word + func (cw ComposedWords) Decode(i [4]byte) (out [4]byte) + func (cw ComposedWords) Encode(i [4]byte) (out [4]byte) + type ConcatenatedBlock [16]Byte + func DecomposeConcatenatedBlock(in Block) (out ConcatenatedBlock) + func (cb ConcatenatedBlock) Decode(i [16]byte) (out [16]byte) + func (cb ConcatenatedBlock) Encode(i [16]byte) (out [16]byte) + type ConcatenatedByte [2]Nibble + func (cb ConcatenatedByte) Decode(i byte) byte + func (cb ConcatenatedByte) Encode(i byte) byte + type ConcatenatedDouble [2]Byte + func (cd ConcatenatedDouble) Decode(i [2]byte) [2]byte + func (cd ConcatenatedDouble) Encode(i [2]byte) [2]byte + type ConcatenatedWord [4]Byte + func (cw ConcatenatedWord) Decode(i [4]byte) [4]byte + func (cw ConcatenatedWord) Encode(i [4]byte) [4]byte + type Double interface + Decode func(i [2]byte) [2]byte + Encode func(i [2]byte) [2]byte + type DoubleAdditive [2]byte + func (da DoubleAdditive) Decode(in [2]byte) [2]byte + func (da DoubleAdditive) Encode(in [2]byte) [2]byte + type DoubleAffine struct + func DecomposeDoubleAffine(in Double) (DoubleAffine, bool) + func NewDoubleAffine(forwards matrix.Matrix, constant [2]byte) DoubleAffine + func (da DoubleAffine) Decode(in [2]byte) [2]byte + func (da DoubleAffine) Encode(in [2]byte) [2]byte + type DoubleLinear struct + Backwards matrix.Matrix + Forwards matrix.Matrix + func DecomposeDoubleLinear(in Double) (DoubleLinear, bool) + func NewDoubleLinear(forwards matrix.Matrix) DoubleLinear + func (dl DoubleLinear) Decode(in [2]byte) (out [2]byte) + func (dl DoubleLinear) Encode(in [2]byte) (out [2]byte) + type DoubleToByteTable struct + Hidden table.DoubleToByte + In Double + Out Byte + func (dtbt DoubleToByteTable) Get(i [2]byte) byte + type DoubleToWordTable struct + Hidden table.DoubleToWord + In Double + Out Word + func (dtwt DoubleToWordTable) Get(i [2]byte) [4]byte + type IdentityBlock struct + func (ib IdentityBlock) Decode(i [16]byte) (out [16]byte) + func (ib IdentityBlock) Encode(i [16]byte) (out [16]byte) + type IdentityByte struct + func (ib IdentityByte) Decode(i byte) byte + func (ib IdentityByte) Encode(i byte) byte + type IdentityDouble struct + func (id IdentityDouble) Decode(i [2]byte) [2]byte + func (id IdentityDouble) Encode(i [2]byte) [2]byte + type IdentityWord struct + func (iw IdentityWord) Decode(i [4]byte) (out [4]byte) + func (iw IdentityWord) Encode(i [4]byte) (out [4]byte) + type InverseBlock struct + func (ib InverseBlock) Decode(i [16]byte) [16]byte + func (ib InverseBlock) Encode(i [16]byte) [16]byte + type InverseByte struct + func (ib InverseByte) Decode(i byte) byte + func (ib InverseByte) Encode(i byte) byte + type InverseDouble struct + func (id InverseDouble) Decode(i [2]byte) [2]byte + func (id InverseDouble) Encode(i [2]byte) [2]byte + type InverseWord struct + func (iw InverseWord) Decode(i [4]byte) [4]byte + func (iw InverseWord) Encode(i [4]byte) [4]byte + type Nibble interface + Decode func(i byte) byte + Encode func(i byte) byte + type NibbleTable struct + Hidden table.Nibble + In Byte + Out Nibble + func (nt NibbleTable) Get(i byte) byte + type SBox struct + DecKey [256]byte + EncKey [256]byte + func GenerateSBox(reader io.Reader) (s SBox) + func (s SBox) Decode(i byte) byte + func (s SBox) Encode(i byte) byte + func (s SBox) Permutation() (out []int) + type Shuffle struct + DecKey [16]byte + EncKey [16]byte + func GenerateShuffle(reader io.Reader) (s Shuffle) + func (s Shuffle) Decode(i byte) byte + func (s Shuffle) Encode(i byte) byte + func (s Shuffle) Permutation() (out []int) + type Word interface + Decode func(i [4]byte) [4]byte + Encode func(i [4]byte) [4]byte + type WordAdditive [4]byte + func (wa WordAdditive) Decode(in [4]byte) [4]byte + func (wa WordAdditive) Encode(in [4]byte) [4]byte + type WordAffine struct + func DecomposeWordAffine(in Word) (WordAffine, bool) + func NewWordAffine(forwards matrix.Matrix, constant [4]byte) WordAffine + func (wa WordAffine) Decode(in [4]byte) [4]byte + func (wa WordAffine) Encode(in [4]byte) [4]byte + type WordLinear struct + Backwards matrix.Matrix + Forwards matrix.Matrix + func DecomposeWordLinear(in Word) (WordLinear, bool) + func NewWordLinear(forwards matrix.Matrix) WordLinear + func (wl WordLinear) Decode(in [4]byte) (out [4]byte) + func (wl WordLinear) Encode(in [4]byte) (out [4]byte) + type WordTable struct + Hidden table.Word + In Byte + Out Word + func (wt WordTable) Get(i byte) [4]byte