2020-10-27 00:05:07 +00:00
|
|
|
#ifndef PQCLEAN_KYBER102490S_AVX2_AES256CTR_H
|
|
|
|
#define PQCLEAN_KYBER102490S_AVX2_AES256CTR_H
|
2019-09-17 13:02:01 +01:00
|
|
|
|
|
|
|
#include <immintrin.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
|
|
|
|
#define AES256CTR_BLOCKBYTES 64
|
|
|
|
|
2019-09-17 13:02:01 +01:00
|
|
|
typedef struct {
|
|
|
|
__m128i rkeys[16];
|
|
|
|
__m128i n;
|
|
|
|
} aes256ctr_ctx;
|
|
|
|
|
2020-10-27 00:05:07 +00:00
|
|
|
void PQCLEAN_KYBER102490S_AVX2_aes256ctr_init(aes256ctr_ctx *state,
|
|
|
|
const uint8_t key[32],
|
|
|
|
uint64_t nonce);
|
|
|
|
|
|
|
|
void PQCLEAN_KYBER102490S_AVX2_aes256ctr_squeezeblocks(uint8_t *out,
|
|
|
|
size_t nblocks,
|
|
|
|
aes256ctr_ctx *state);
|
|
|
|
|
|
|
|
void PQCLEAN_KYBER102490S_AVX2_aes256ctr_prf(uint8_t *out,
|
|
|
|
size_t outlen,
|
|
|
|
const uint8_t key[32],
|
|
|
|
uint64_t nonce);
|
2019-09-17 13:02:01 +01:00
|
|
|
|
|
|
|
#endif
|