3 * This file is distributed under the same license as OpenSSL
6 #ifndef GOST_GRASSHOPPER_CORE_H
7 #define GOST_GRASSHOPPER_CORE_H
9 #if defined(__cplusplus)
13 #include "gost_grasshopper_defines.h"
15 static void grasshopper_l(grasshopper_w128_t* w);
16 static void grasshopper_l_inv(grasshopper_w128_t* w);
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);
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);
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);
29 #if defined(__cplusplus)