23 #ifndef LW_INTERNAL_GIFT64_H
24 #define LW_INTERNAL_GIFT64_H
56 #if !defined(GIFT64_LOW_MEMORY)
58 #define GIFT64_LOW_MEMORY 1
60 #define GIFT64_LOW_MEMORY 0
67 #define GIFT64_BLOCK_SIZE 8
75 #if !GIFT64_LOW_MEMORY
88 #define gift64n_update_round_keys(ks) do { ; } while (0)
113 const unsigned char *input);
127 const unsigned char *input);
130 #define GIFT64T_TWEAK_0 0x0000
131 #define GIFT64T_TWEAK_1 0xe1e1
132 #define GIFT64T_TWEAK_2 0xd2d2
133 #define GIFT64T_TWEAK_3 0x3333
134 #define GIFT64T_TWEAK_4 0xb4b4
135 #define GIFT64T_TWEAK_5 0x5555
136 #define GIFT64T_TWEAK_6 0x6666
137 #define GIFT64T_TWEAK_7 0x8787
138 #define GIFT64T_TWEAK_8 0x7878
139 #define GIFT64T_TWEAK_9 0x9999
140 #define GIFT64T_TWEAK_10 0xaaaa
141 #define GIFT64T_TWEAK_11 0x4b4b
142 #define GIFT64T_TWEAK_12 0xcccc
143 #define GIFT64T_TWEAK_13 0x2d2d
144 #define GIFT64T_TWEAK_14 0x1e1e
145 #define GIFT64T_TWEAK_15 0xffff
165 const unsigned char *input, uint16_t tweak);
185 const unsigned char *input, uint16_t tweak);
void gift64t_decrypt(const gift64n_key_schedule_t *ks, unsigned char *output, const unsigned char *input, uint16_t tweak)
Decrypts a 64-bit block with TweGIFT-64 (tweakable variant).
Definition: internal-gift64.c:628
Structure of the key schedule for GIFT-64.
Definition: internal-gift64.h:72
void gift64n_update_round_keys(gift64n_key_schedule_t *ks)
Updates the round keys after a change in the base key.
Definition: internal-gift64.c:241
void gift64n_decrypt(const gift64n_key_schedule_t *ks, unsigned char *output, const unsigned char *input)
Decrypts a 64-bit block with GIFT-64 (nibble-based).
Definition: internal-gift64.c:601
void gift64n_init(gift64n_key_schedule_t *ks, const unsigned char *key)
Initializes the key schedule for GIFT-64 (nibble-based).
Definition: internal-gift64.c:505
void gift64n_encrypt(const gift64n_key_schedule_t *ks, unsigned char *output, const unsigned char *input)
Encrypts a 64-bit block with GIFT-64 (nibble-based).
Definition: internal-gift64.c:591