auxFormat.h 632 Bytes
Newer Older
Zhao Xuefeng committed
1
#include<malloc.h>
KNOT team committed
2 3
#include"crypto_aead.h"
#include"api.h"
Zhao Xuefeng committed
4
#include"stdio.h"
KNOT team committed
5 6 7 8 9 10 11 12 13
#include  <string.h>
#define U32BIG(x) (x)

#define ARR_SIZE(a) (sizeof((a))/sizeof((a[0])))
#define LOTR32(x,n) (((x)<<(n))|((x)>>(32-(n))))

typedef unsigned char u8;
typedef unsigned int u32;
typedef unsigned long long u64;
Zhao Xuefeng committed
14 15 16 17 18 19 20 21
unsigned char constant6Format[52];
unsigned char constant7Format[68];

#define RATE (64 / 8)

#define PR0_ROUNDS 52
#define PR_ROUNDS 28
#define PRF_ROUNDS 32
KNOT team committed
22

Zhao Xuefeng committed
23 24
void packFormat(u32 * out, const u8 * in);
void unpackFormat(u8 * out, u32 * in);
KNOT team committed
25 26
void printU8(char name[], u8 var[], long len, int offset);