Documentation ¶
Overview ¶
GOST 34.12-2015 128-bit Кузнечик (Kuznechik) block cipher.
Index ¶
- Constants
- Variables
- func Decrypt(key [32]uint8, block [16]uint8) [16]uint8
- func Decrypt_K(rkeys [10][16]uint8, block [16]uint8) [16]uint8
- func Decrypt_L(key [32]uint8, block [16]uint8) [16]uint8
- func Encrypt(key [32]uint8, block [16]uint8) [16]uint8
- func Encrypt_K(rkeys [10][16]uint8, block [16]uint8) [16]uint8
- func GF2_mul(x, y uint8) uint8
- func GetDecryptRoundKeys(rkeys [10][16]uint8) [10][16]uint8
- func InitCipher()
- func L(block [16]uint8) [16]uint8
- func L_inv(block [16]uint8) [16]uint8
- func NewCipher(key []byte) (cipher.Block, error)
- func StretchKey(key [32]uint8) [10][16]uint8
- type KeySizeError
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 GetDecryptRoundKeys ¶
func InitCipher ¶
func InitCipher()
func StretchKey ¶
Types ¶
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) Error ¶
func (k KeySizeError) Error() string
Click to show internal directories.
Click to hide internal directories.