]> Cypherpunks.ru repositories - gost-www.git/blob - en/meshing.texi
Key meshing example
[gost-www.git] / en / meshing.texi
1 @node enMeshing
2 @section Key meshing
3
4 There is no key meshing western algorithm analogue. That algorithm
5 changes cipherkey each kilobyte of data processed. It is used together
6 with @ref{en2814789, GOST 28147-89} and is defined in
7 @url{https://tools.ietf.org/html/rfc4357.html, RFC 4357}. CryptoPro
8 developers tell that it is intended to resist side-channel attacks.
9
10 Implementation is rather simple and uses two crypt/decrypt operations
11 over the key and initialization vector.
12
13 @verbatim
14 # for each KiB of data
15 def mesh(old_key, old_iv):
16     new_key = ecb_decrypt(old_key, MESH_CONST)
17     new_iv = ecb_encrypt(old_key, old_iv)
18     return new_key, new_iv
19 @end verbatim
20
21 It has already showed usefulness: there is @url{https://sweet32.info/,
22 Sweet32} attack on all 64-bit blockciphers, that is not applicable to
23 when key meshing used.