This page uses content from Wikipedia and is licensed under CC BY-SA.

# Kuznyechik

Kuznyechik
General
DesignersInfoTeCS JSC[1]
First published2015
CertificationGOST, and FSS
Cipher detail
Key sizes256 bits Feistel network
Block sizes128 bits
StructureSubstitution-permutation network
Rounds10
Best public cryptanalysis
A meet-in-the-middle attack on 5 rounds.[2]

Kuznyechik (Russian: Кузнечик, literally "grasshopper") is a symmetric block cipher. It has a block size of 128 bits and key length of 256 bits. It is defined in the National Standard of the Russian Federation GOST R 34.12-2015 in English[3] and also in RFC 7801.

The name of the cipher can be translated from Russian as grasshopper, however, the standard explicitly says that the English name for the cipher is Kuznyechik (/kʊznˈɛɪk/). The designers claim that by naming the cipher Kuznyechik they follow the trend of difficult to pronounce algorithm names set up by Rijndael and Keccak.[4] There is also a rumor that the cipher was named after its creators: A.S.Kuzmin[5], A.A.Nechaev[6] and Company (Russian: Кузьмин, Нечаев и Компания).

The standard GOST R 34.12-2015 defines the new cipher in addition to the old GOST block cipher (now called Magma) as one and does not declare the old cipher obsolete.[7]

Kuznyechik is based on a substitution-permutation network, though the key schedule employs a Feistel network.

## Designations

${\displaystyle \mathbb {F} }$Finite field ${\displaystyle GF(2^{8})}$ ${\displaystyle x^{8}+x^{7}+x^{6}+x+1}$.

${\displaystyle Bin_{8}:\mathbb {Z} _{p}\rightarrow V_{8}}$${\displaystyle \mathbb {Z} _{p}}$ (${\displaystyle p=2^{8}}$)

${\displaystyle {Bin_{8}}^{-1}:V_{8}\rightarrow \mathbb {Z} _{p}}$${\displaystyle Bin_{8}}$.

${\displaystyle \delta :V_{8}\rightarrow \mathbb {F} }$${\displaystyle \mathbb {F} }$.

${\displaystyle \delta ^{-1}:\mathbb {F} \rightarrow V_{8}}$${\displaystyle \delta }$

## Description

For encryption, decryption and key generation, the following functions:

${\displaystyle Add_{2}[k](a)=k\oplus a}$, where ${\displaystyle k}$, ${\displaystyle a}$ are binary strings of the form ${\displaystyle a=a_{15}||}$${\displaystyle ||a_{0}}$ (${\displaystyle ||}$ is string concatenation).

${\displaystyle N(a)=S(a_{15})||}$${\displaystyle ||S(a_{0}).~~N^{-1}(a)}$ is a reversed transformation of ${\displaystyle N(a)}$.

${\displaystyle G(a)=\delta (a_{15},}$${\displaystyle ,a_{0})||a_{15}||}$${\displaystyle ||a_{1}.}$

${\displaystyle G^{-1}(a)}$ — reversed transformation of ${\displaystyle G(a)}$ , ${\displaystyle G^{-1}(a)=a_{14}||a_{13}||}$${\displaystyle ||a_{0}||\delta (a_{14},a_{13},}$${\displaystyle ,a_{0},a_{15}).}$

${\displaystyle H(a)=G^{16}(a)}$, where ${\displaystyle G^{16}}$ — composition of transformations ${\displaystyle G^{15}}$ and ${\displaystyle G}$ etc.

${\displaystyle F[k](a_{1},a_{0})=(HNAdd_{2}[k](a_{1})\oplus a_{0},a_{1}).}$

### The nonlinear transformation

Non-linear transformation is given by substituting S = Bin8 S' Bin8−1.

Values of the substitution S' are given as array S' = (S'(0), S'(1), …, S'(255)):

${\displaystyle S'=(252,238,221,17,207,110,49,22,251,196,250,218,35,197,4,77,233,}$ ${\displaystyle 119,240,219,147,46,153,186,23,54,241,187,20,205,95,193,249,24,101,}$ ${\displaystyle 90,226,92,239,33,129,28,60,66,139,1,142,79,5,132,2,174,227,106,143,}$ ${\displaystyle 160,6,11,237,152,127,212,211,31,235,52,44,81,234,200,72,171,242,42,}$ ${\displaystyle 104,162,253,58,206,204,181,112,14,86,8,12,118,18,191,114,19,71,156,}$${\displaystyle 183,93,135,21,161,150,41,16,123,154,199,243,145,120,111,157,158,178,}$ ${\displaystyle 177,50,117,25,61,255,53,138,126,109,84,198,128,195,189,13,87,223,}$ ${\displaystyle 245,36,169,62,168,67,201,215,121,214,246,124,34,185,3,224,15,236,}$ ${\displaystyle 222,122,148,176,188,220,232,40,80,78,51,10,74,167,151,96,115,30,0,}$ ${\displaystyle 98,68,26,184,56,130,100,159,38,65,173,69,70,146,39,94,85,47,140,163,}$ ${\displaystyle 165,125,105,213,149,59,7,88,179,64,134,172,29,247,48,55,107,228,136,}$ ${\displaystyle 217,231,137,225,27,131,73,76,63,248,254,141,83,170,144,202,216,133,}$ ${\displaystyle 97,32,113,103,164,45,43,9,91,203,155,37,208,190,229,108,82,89,166,}$ ${\displaystyle 116,210,230,244,180,192,209,102,175,194,57,75,99,182).}$

### Linear transformation

${\displaystyle \gamma }$: ${\displaystyle \gamma (a_{15},}$${\displaystyle ,a_{0})=\delta ^{-1}~(148*\delta (a_{15})+32*\delta (a_{14})+133*\delta (a_{13})+16*\delta (a_{12})+}$ ${\displaystyle 194*\delta (a_{11})+192*\delta (a_{10})+1*\delta (a_{9})+251*\delta (a_{8})+1*\delta (a_{7})+192*\delta (a_{6})+}$ ${\displaystyle 194*\delta (a_{5})+16*\delta (a_{4})+133*\delta (a_{3})+32*\delta (a_{2})+148*\delta (a_{1})+1*\delta (a_{0})),}$

operations of addition and multiplication are carried out in the field ${\displaystyle \mathbb {F} }$.

### Key generation

The key generation algorithm uses iterative constant ${\displaystyle C_{i}=H(Bin_{128}(i))}$, i=1,2,…32 and sets the shared key as follows: ${\displaystyle K=k_{255}||}$${\displaystyle ||k_{0}}$.

Iterated keys:

${\displaystyle K_{1}=k_{255}||}$${\displaystyle ||k_{128}}$

${\displaystyle K_{2}=k_{127}||}$${\displaystyle ||k_{0}}$

${\displaystyle (K_{2i+1},K_{2i+2})=F[C_{8(i-1)+8}]}$${\displaystyle F[C_{8(i-1)+1}](K_{2i+1},K_{2i}),i=1,2,3,4.}$

### Encryption algorithm

${\displaystyle E(a)=Add_{2}[K_{10}]HNAdd_{2}[K_{9}]}$${\displaystyle HNAdd_{2}[K_{2}]HNAdd_{2}[K_{1}](a),}$ where a — 128-bit string.

### Decryption algorithm

${\displaystyle D(a)=Add_{2}[K_{1}]H^{-1}N^{-1}Add_{2}[K_{2}]}$${\displaystyle H^{-1}N^{-1}Add_{2}[K_{9}]H^{-1}N^{-1}Add_{2}[K_{10}](a).}$

## Cryptanalysis

Riham AlTawy and Amr M. Youssef describe a meet-in-the-middle attack on the 5-round reduced Kuznyechik which enables recovery of the key with a time complexity of 2140, memory complexity of 2153, and data complexity of 2113.[2]

Alex Biryukov, Leo Perrin, and Aleksei Udovenko published a paper in which they show that the S-Boxes of Kuznyechik and Streebog were not created pseudo-randomly but by using a hidden algorithm which they were able to reverse engineer.[8]

Later Leo Perrin and Aleksei Udovenko published two alternative decompositions of the S-Box and proved its connection to the S-Box of the Belarusian cipher BelT.[9] The authors of the paper note that while the reason for using such a structure remains unclear, generating S-Boxes by a hidden algorithm contradicts the concept of nothing up my sleeve numbers which could prove that no weaknesses were intentionally introduced in their design.

Riham AlTawy, Onur Duman, and Amr M. Youssef published two fault attacks on Kuznyechik which show the importance of protecting the implementations of the cipher.[10]

## Adoption

VeraCrypt (a fork of TrueCrypt) included Kuznyechik as one of its supported encryption algorithms.[11]

## Source code

[web.archive.org] [web.archive.org] (Alternative link for the case in which the first link is not working)

## References

1. ^ "Archived copy". Archived from the original on 2016-04-24. Retrieved 2016-04-13.CS1 maint: archived copy as title (link)
2. ^ a b Riham AlTawy and Amr M. Youssef (2015-04-17). "A Meet in the Middle Attack on Reduced Round Kuznyechik" (PDF). Cite journal requires |journal= (help)CS1 maint: uses authors parameter (link)
3. ^ [tc26.ru] Archived 2017-11-04 at the Wayback Machine National Standard of the Russian Federation GOST R 34.12–2015 (English Version)
4. ^ [mjos.fi] Low-Weight and Hi-End: Draft Russian Encryption Standard
5. ^ [www.researchgate.net]
6. ^ [www.researchgate.net]
7. ^ [www.itsec.ru] GOST R 34.12–2015: what to expect from a new standard? (Russian only)
8. ^ Alex Biryukov, Leo Perrin, and Aleksei Udovenko (2016-02-18). "Reverse-Engineering the S-Box of Streebog, Kuznyechik and STRIBOBr1 (Full Version)" (PDF). Cite journal requires |journal= (help)CS1 maint: uses authors parameter (link)
9. ^ Léo Perrin, Aleksei Udovenko (2017). "Exponential S-Boxes: a Link Between the S-Boxes of BelT and Kuznyechik/Streebog" (PDF).
10. ^ Riham AlTawy, Onur Duman, and Amr M. Youssef (2015-04-17). "Fault Analysis of Kuznyechik" (PDF). Cite journal requires |journal= (help)CS1 maint: uses authors parameter (link)
11. ^ "Kuznyechik". VeraCrypt Documentation. IDRIX. Retrieved 2018-02-03.
Retrieved from "[en.wikipedia.org]"