belt

package
v1.0.4013 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 16

Variables

View Source
var KIdx = [8][7]uint32{
	{0, 1, 2, 3, 4, 5, 6},
	{7, 0, 1, 2, 3, 4, 5},
	{6, 7, 0, 1, 2, 3, 4},
	{5, 6, 7, 0, 1, 2, 3},
	{4, 5, 6, 7, 0, 1, 2},
	{3, 4, 5, 6, 7, 0, 1},
	{2, 3, 4, 5, 6, 7, 0},
	{1, 2, 3, 4, 5, 6, 7},
}
View Source
var S = [256]byte{}/* 256 elements not displayed */

Functions

func G

func G(x uint32, r int) uint32

func GET_BYTE

func GET_BYTE(x uint32, a int) byte

func NewCipher

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

NewCipher creates and returns a new cipher.Block.

func PUT_BYTE

func PUT_BYTE(x uint32, a int) uint32

func ROTL_BELT

func ROTL_BELT(x uint32, n int) uint32

func SB

func SB(x uint32, a int) uint32

Types

type KeySizeError

type KeySizeError int

KeySizeError is returned when key size in bytes isn't one of 16, 24, or 32.

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