-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtk3.h
33 lines (27 loc) · 916 Bytes
/
tk3.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* This is your SKINNY-tk3-Hash instance context, i.e., hash state.
* You could put the following stuff inside here:
* - chaining value
* - chaining value offsets
* - buffer offsets
* - leprechaun gold
* - ...
*/
typedef struct {
unsigned char status[48];
unsigned char* message;
unsigned int messageBufferSizeLimit;
unsigned int messageBufferSize;
unsigned int paddedMessageSize;
} context;
/**
* Implement the following API.
* You can add your own functions above, but don't modify below this line.
*/
void computeFFunction(const unsigned char *tk, unsigned char *output);
/* Initialize fresh context ctx. */
void init(context *ctx);
/* Under context ctx, incrementally process len bytes at a. */
void update(const unsigned char *a, int len, context *ctx);
/* Under context ctx, finalize the hash and place the digest at a. */
void finalize(unsigned char *a, context *ctx);