Go to the documentation of this file.
32 #define TRACE_LEVEL CRYPTO_TRACE_LEVEL
39 #if (KECCAK_SUPPORT == ENABLED)
89 c[0] =
a[0][0] ^
a[1][0] ^
a[2][0] ^
a[3][0] ^
a[4][0];
90 c[1] =
a[0][1] ^
a[1][1] ^
a[2][1] ^
a[3][1] ^
a[4][1];
91 c[2] =
a[0][2] ^
a[1][2] ^
a[2][2] ^
a[3][2] ^
a[4][2];
92 c[3] =
a[0][3] ^
a[1][3] ^
a[2][3] ^
a[3][3] ^
a[4][3];
93 c[4] =
a[0][4] ^
a[1][4] ^
a[2][4] ^
a[3][4] ^
a[4][4];
226 a[0][0] ^= ~
a[0][1] &
a[0][2];
227 a[0][1] ^= ~
a[0][2] &
a[0][3];
228 a[0][2] ^= ~
a[0][3] &
a[0][4];
229 a[0][3] ^= ~
a[0][4] & temp1;
230 a[0][4] ^= ~temp1 & temp2;
234 a[1][0] ^= ~
a[1][1] &
a[1][2];
235 a[1][1] ^= ~
a[1][2] &
a[1][3];
236 a[1][2] ^= ~
a[1][3] &
a[1][4];
237 a[1][3] ^= ~
a[1][4] & temp1;
238 a[1][4] ^= ~temp1 & temp2;
242 a[2][0] ^= ~
a[2][1] &
a[2][2];
243 a[2][1] ^= ~
a[2][2] &
a[2][3];
244 a[2][2] ^= ~
a[2][3] &
a[2][4];
245 a[2][3] ^= ~
a[2][4] & temp1;
246 a[2][4] ^= ~temp1 & temp2;
250 a[3][0] ^= ~
a[3][1] &
a[3][2];
251 a[3][1] ^= ~
a[3][2] &
a[3][3];
252 a[3][2] ^= ~
a[3][3] &
a[3][4];
253 a[3][3] ^= ~
a[3][4] & temp1;
254 a[3][4] ^= ~temp1 & temp2;
258 a[4][0] ^= ~
a[4][1] &
a[4][2];
259 a[4][1] ^= ~
a[4][2] &
a[4][3];
260 a[4][2] ^= ~
a[4][3] &
a[4][4];
261 a[4][3] ^= ~
a[4][4] & temp1;
262 a[4][4] ^= ~temp1 & temp2;
275 a[0][0] ^= rc[index];
345 input = (uint8_t *) input +
n;
466 output = (uint8_t *) output +
n;
__weak_func void keccakPermutBlock(KeccakContext *context)
Block permutation.
void keccakFinal(KeccakContext *context, uint8_t pad)
Finish absorbing phase.
@ ERROR_INVALID_PARAMETER
Invalid parameter.
#define osMemcpy(dest, src, length)
General definitions for cryptographic algorithms.
__weak_func void keccakAbsorb(KeccakContext *context, const void *input, size_t length)
Absorb data.
void keccakSqueeze(KeccakContext *context, uint8_t *output, size_t length)
Extract data from the squeezing phase.
error_t keccakInit(KeccakContext *context, uint_t capacity)
Initialize Keccak context.
#define osMemset(p, value, length)