-
Notifications
You must be signed in to change notification settings - Fork 0
/
aes256ctr.h
32 lines (24 loc) · 859 Bytes
/
aes256ctr.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
#ifndef AES256CTR_H
#define AES256CTR_H
#include <stddef.h>
#include <stdint.h>
#define AES256CTR_BLOCKBYTES 64
#define AES256CTR_NAMESPACE(s) pqcrystals_kyber_aes256ctr_ref_##s
typedef struct {
uint64_t sk_exp[120];
uint32_t ivw[16];
} aes256ctr_ctx;
#define aes256ctr_prf AES256CTR_NAMESPACE(prf)
void aes256ctr_prf(uint8_t *out,
size_t outlen,
const uint8_t key[32],
const uint8_t nonce[12]);
#define aes256ctr_init AES256CTR_NAMESPACE(init)
void aes256ctr_init(aes256ctr_ctx *state,
const uint8_t key[32],
const uint8_t nonce[12]);
#define aes256ctr_squeezeblocks AES256CTR_NAMESPACE(squeezeblocks)
void aes256ctr_squeezeblocks(uint8_t *out,
size_t nblocks,
aes256ctr_ctx *state);
#endif