3 * This file is distributed under the same license as OpenSSL
6 #ifndef GOST_GRASSHOPPER_DEFINES_H
7 #define GOST_GRASSHOPPER_DEFINES_H
9 #if defined(__cplusplus)
16 # if !defined(inline) && !defined(__cplusplus)
17 # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
18 # define GRASSHOPPER_INLINE inline
19 # elif defined(__GNUC__) && __GNUC__ >= 2
20 # define GRASSHOPPER_INLINE __inline__
21 # elif defined(_MSC_VER)
22 # define GRASSHOPPER_INLINE __inline
24 # define GRASSHOPPER_INLINE
27 # define GRASSHOPPER_INLINE inline
42 grasshopper_w128_t k[2];
49 #define GRASSHOPPER_ROUND_KEYS_COUNT 10
52 grasshopper_w128_t k[GRASSHOPPER_ROUND_KEYS_COUNT];
53 } grasshopper_round_keys_t;
55 extern const uint8_t grasshopper_pi[0x100];
57 extern const uint8_t grasshopper_pi_inv[0x100];
59 extern const uint8_t grasshopper_lvec[16];
61 #define GRASSHOPPER_BLOCK_SIZE (128/8)
62 #define GRASSHOPPER_KEY_SIZE (256/8)
64 #if defined(__cplusplus)