Go to the documentation of this file.
47 #define KECCAK_ROL(a, n) ROL8(a, (n) % 8)
49 #define KECCAK_HTOLE(a) (a)
51 #define KECCAK_LETOH(a) (a)
54 #define keccak_lane_t uint16_t
56 #define KECCAK_ROL(a, n) ROL16(a, (n) % 16)
58 #define KECCAK_HTOLE(a) htole16(a)
60 #define KECCAK_LETOH(a) letoh16(a)
63 #define keccak_lane_t uint32_t
65 #define KECCAK_ROL(a, n) ROL32(a, (n) % 32)
67 #define KECCAK_HTOLE(a) htole32(a)
69 #define KECCAK_LETOH(a) letoh32(a)
72 #define keccak_lane_t uint64_t
74 #define KECCAK_ROL(a, n) ROL64(a, (n) % 64)
76 #define KECCAK_HTOLE(a) htole64(a)
78 #define KECCAK_LETOH(a) letoh64(a)
80 #error KECCAK_L parameter is not valid
84 #define KECCAK_W (1 << KECCAK_L)
86 #define KECCAK_B (KECCAK_W * 25)
88 #define KECCAK_NR (12 + 2 * KECCAK_L)
91 #define KECCAK_PAD 0x01
93 #define KECCAK_SHA3_PAD 0x06
95 #define KECCAK_SHAKE_PAD 0x1F
97 #define KECCAK_CSHAKE_PAD 0x04
void keccakFinal(KeccakContext *context, uint8_t pad)
Finish absorbing phase.
error_t keccakInit(KeccakContext *context, uint_t capacity)
Initialize Keccak context.
void keccakPermutBlock(KeccakContext *context)
Block permutation.
void keccakSqueeze(KeccakContext *context, uint8_t *output, size_t length)
Extract data from the squeezing phase.
General definitions for cryptographic algorithms.
void keccakAbsorb(KeccakContext *context, const void *input, size_t length)
Absorb data.