PandA-2024.02
tb_keccak.c
Go to the documentation of this file.
1 #include "include/Keccak.h"
2 
3 #ifdef __BAMBU_SIM__
4 #include <mdpi/mdpi_user.h>
5 #endif
6 
7 extern void keccak_coproc(UINT64 A[25]);
8 
9 static const UINT64 A_gold[25] = {
10  17376452488221285863ULL, 9571781953733019530ULL, 15391093639620504046ULL, 13624874521033984333ULL,
11  10027350355371872343ULL, 18417369716475457492ULL, 10448040663659726788ULL, 10113917136857017974ULL,
12  12479658147685402012ULL, 3500241080921619556ULL, 16959053435453822517ULL, 12224711289652453635ULL,
13  9342009439668884831ULL, 4879704952849025062ULL, 140226327413610143ULL, 424854978622500449ULL,
14  7259519967065370866ULL, 7004910057750291985ULL, 13293599522548616907ULL, 10105770293752443592ULL,
15  10668034807192757780ULL, 1747952066141424100ULL, 1654286879329379778ULL, 8500057116360352059ULL,
16  16929593379567477321ULL};
17 
18 int main()
19 {
20  int i, errors;
21  UINT64 A[25] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
22 
23 #ifdef __BAMBU_SIM__
24  m_param_alloc(0, sizeof(A));
25 #endif
26  keccak_coproc(A);
27 
28  errors = 0;
29  for(i = 0; i < 25; ++i)
30  {
31  errors += A[i] != A_gold[i];
32  }
33 
34  return errors;
35 }
void keccak_coproc(UINT64 A[25])
int main()
Definition: tb_keccak.c:18
#define A
Definition: generate.c:13
unsigned long long int UINT64
Definition: Keccak.c:13
static const UINT64 A_gold[25]
Definition: tb_keccak.c:9

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