PandA-2024.02
theta.c
Go to the documentation of this file.
1 #include "Keccak.h"
2 
3 void theta(UINT64 *A)
4 {
5  unsigned int x, y;
6  UINT64 C[5], D[5];
7 
8  for(x=0; x<5; x++) {
9  C[x] = 0;
10  for(y=0; y<5; y++)
11  C[x] ^= A[index(x, y)];
12  }
13  for(x=0; x<5; x++)
14  D[x] = ROL64(C[(x+1)%5], 1) ^ C[(x+4)%5];
15  for(x=0; x<5; x++)
16  for(y=0; y<5; y++)
17  A[index(x, y)] ^= D[x];
18 }
19 
void theta(UINT64 *A)
Definition: theta.c:3
#define C
Definition: generate.c:15
#define ROL64(a, offset)
Definition: Keccak.c:75
#define A
Definition: generate.c:13
#define index(x, y)
Definition: Keccak.c:74
#define D
Definition: generate.c:16
unsigned long long int UINT64
Definition: Keccak.c:13
x
Return the smallest n such that 2^n >= _x.

Generated on Mon Feb 12 2024 13:02:48 for PandA-2024.02 by doxygen 1.8.13