]> www.wagner.pp.ru Git - openssl-gost/engine.git/blob - gost_grasshopper_core.h
gost_crypt: process full available block in CFB and CNT mode
[openssl-gost/engine.git] / gost_grasshopper_core.h
1 /*
2  * Maxim Tishkov 2016
3  * This file is distributed under the same license as OpenSSL
4  */
5
6 #ifndef GOST_GRASSHOPPER_CORE_H
7 #define GOST_GRASSHOPPER_CORE_H
8
9 #if defined(__cplusplus)
10 extern "C" {
11 #endif
12
13 #include "gost_grasshopper_defines.h"
14
15 static void grasshopper_l(grasshopper_w128_t* w);
16 static void grasshopper_l_inv(grasshopper_w128_t* w);
17
18 // key setup
19 extern void grasshopper_set_encrypt_key(grasshopper_round_keys_t* subkeys, const grasshopper_key_t* key);
20 extern void grasshopper_set_decrypt_key(grasshopper_round_keys_t* subkeys, const grasshopper_key_t* key);
21
22 // single-block ecp ops
23 extern void grasshopper_encrypt_block(grasshopper_round_keys_t* subkeys, grasshopper_w128_t* source, grasshopper_w128_t* target, grasshopper_w128_t* buffer);
24 extern void grasshopper_decrypt_block(grasshopper_round_keys_t* subkeys, grasshopper_w128_t* source, grasshopper_w128_t* target, grasshopper_w128_t* buffer);
25
26 extern void grasshopper_encrypt_block2(grasshopper_round_keys_t* subkeys, grasshopper_w128_t* source, grasshopper_w128_t* target);
27 extern void grasshopper_decrypt_block2(grasshopper_round_keys_t* subkeys, grasshopper_w128_t* source, grasshopper_w128_t* target);
28
29 #if defined(__cplusplus)
30 }
31 #endif
32
33 #endif