lea

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package lea implements LEA encryption, as defined in TTAK.KO-12.0223

Index

Constants

View Source
const (
	// The LEA block size in bytes.
	BlockSize = 16
)

Variables

This section is empty.

Functions

func NewCipher

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

NewCipher creates and returns a new cipher.Block. The key argument should be the LEA key, either 16, 24, or 32 bytes to select LEA-128, LEA-192, or LEA-256.

func NewCipherECB

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

NewCipherECB creates and returns a new cipher.Block by ECB mode. This function can be useful in amd64. The key argument should be the LEA key, either 16, 24, or 32 bytes to select LEA-128, LEA-192, or LEA-256.

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