kuznechik

package module
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: ISC Imports: 3 Imported by: 4

README

Kuznechik

GoDoc Go Report Card

GOST R 34.12-2015 128-bit block cipher Кузнечик (Kuznechik) (RFC 7801)

Documentation

Overview

GOST 34.12-2015 128-bit Кузнечик (Kuznechik) block cipher.

Index

Constants

View Source
const BlockSize = 16

Variables

View Source
var CipherInitialized = false
View Source
var LS_enc_lookup [16][256][16]uint8
View Source
var L_inv_lookup [16][256][16]uint8
View Source
var L_vector = [16]uint8{0x94, 0x20, 0x85, 0x10, 0xC2, 0xC0, 0x01, 0xFB, 0x01, 0xC0, 0xC2, 0x10, 0x85, 0x20, 0x94, 0x01}
View Source
var Pi_inverse_table = [256]uint8{}/* 256 elements not displayed */
View Source
var Pi_table = [256]uint8{}/* 256 elements not displayed */
View Source
var SL_dec_lookup [16][256][16]uint8

Functions

func Decrypt

func Decrypt(key [32]uint8, block [16]uint8) [16]uint8

func Decrypt_K

func Decrypt_K(rkeys [10][16]uint8, block [16]uint8) [16]uint8

func Decrypt_L

func Decrypt_L(key [32]uint8, block [16]uint8) [16]uint8

func Encrypt

func Encrypt(key [32]uint8, block [16]uint8) [16]uint8

func Encrypt_K

func Encrypt_K(rkeys [10][16]uint8, block [16]uint8) [16]uint8

func GF2_mul

func GF2_mul(x, y uint8) uint8

func GetDecryptRoundKeys

func GetDecryptRoundKeys(rkeys [10][16]uint8) [10][16]uint8

func InitCipher

func InitCipher()

func L

func L(block [16]uint8) [16]uint8

func L_inv

func L_inv(block [16]uint8) [16]uint8

func NewCipher

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

func StretchKey

func StretchKey(key [32]uint8) [10][16]uint8

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