sm4

package
v1.0.2039 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 16
View Source
const KeySchedule = 32

Variables

This section is empty.

Functions

func NewCipher

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

NewCipher creates and returns a new cipher.Block. key is 16 bytes, so 32 bytes is used half bytes. so the cipher use 16 bytes key. key bytes and src bytes is BigEndian type.

func T

func T(X uint32) uint32

func T_non_lin_sub

func T_non_lin_sub(X uint32) uint32

func T_slow

func T_slow(X uint32) uint32

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