1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-23 07:59:01 +00:00
pqcrypto/crypto_sign/dilithium3aes/avx2/aes256ctr.h
John Schanck 32c613e8ec Round 3 update for Dilithium (from github source) (#369)
* Update Dilithium

* Alternative montgomery reduce to avoid i386 functest errors

* Explicit casts for msvc

* More casts; bump upstream version; fix metadata

* another cast
2021-03-24 21:02:50 +00:00

30 lines
666 B
C

#ifndef PQCLEAN_DILITHIUM3AES_AVX2_AES256CTR_H
#define PQCLEAN_DILITHIUM3AES_AVX2_AES256CTR_H
#include <immintrin.h>
#include <stddef.h>
#include <stdint.h>
#define AES256CTR_BLOCKBYTES 64
typedef struct {
__m128i rkeys[16];
__m128i n;
} aes256ctr_ctx;
void PQCLEAN_DILITHIUM3AES_AVX2_aes256ctr_init(aes256ctr_ctx *state,
const uint8_t key[32],
uint64_t nonce);
void PQCLEAN_DILITHIUM3AES_AVX2_aes256ctr_squeezeblocks(uint8_t *out,
size_t nblocks,
aes256ctr_ctx *state);
void PQCLEAN_DILITHIUM3AES_AVX2_aes256ctr_prf(uint8_t *out,
size_t outlen,
const uint8_t seed[32],
uint64_t nonce);
#endif