mars

package
v1.0.3012 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const BlockSize = 16

Variables

This section is empty.

Functions

func B_MIX added in v1.0.2039

func B_MIX(a, b, c, d *uint32)

Backwards mixing

func CORE added in v1.0.2039

func CORE(a, b, c, d *uint32, k1, k2 uint32)

Cryptographic core (encryption)

func CORE_INV added in v1.0.2039

func CORE_INV(a, b, c, d *uint32, k1, k2 uint32)

Cryptographic core (decryption)

func F_MIX added in v1.0.2039

func F_MIX(a, b, c, d *uint32)

func MASK_GEN added in v1.0.2039

func MASK_GEN(m *uint32, w uint32)

Mask generation (Brian Gladman and Shai Halevi's technique)

func NewCipher

func NewCipher(key []byte) (cipher.Block, error)

NewCipher creates and returns a new cipher.Block.

func ROL32 added in v1.0.2039

func ROL32(x, n uint32) uint32

func ROR32 added in v1.0.2039

func ROR32(x, n uint32) uint32

func S added in v1.0.2039

func S(n uint32) uint32

S-box S

func S0 added in v1.0.2039

func S0(n uint32) uint32

S-box S0

func S1 added in v1.0.2039

func S1(n uint32) uint32

S-box S1

Types

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

Jump to

Keyboard shortcuts

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