mars

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 16

Variables

This section is empty.

Functions

func B_MIX

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

Backwards mixing

func CORE

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

Cryptographic core (encryption)

func CORE_INV

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

Cryptographic core (decryption)

func F_MIX

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

func MASK_GEN

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

func ROL32(x, n uint32) uint32

func ROR32

func ROR32(x, n uint32) uint32

func S

func S(n uint32) uint32

S-box S

func S0

func S0(n uint32) uint32

S-box S0

func S1

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