1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-26 17:31:38 +00:00
pqcrypto/crypto_kem/kyber1024/avx2/fips202x4.h
Thom Wiggers f4bd312180 Adds AVX2 variants of Kyber512, Kyber768, Kyber1024 (#225)
* Integrate Kyber-AVX2 into PQClean

* Fix types and formatting in Kyber

* Workaround a valgrind crash

* Remove comment in shuffle.s

* Remove some extraneous truncations

* fixup! Fix types and formatting in Kyber
2019-09-10 11:45:01 +02:00

38 lines
843 B
C

#ifndef FIPS202X4_H
#define FIPS202X4_H
#include <immintrin.h>
#include <stddef.h>
#include <stdint.h>
typedef struct {
__m256i s[25];
} keccak4x_state;
void PQCLEAN_KYBER1024_AVX2_kyber_shake128x4_absorb(keccak4x_state *state,
const uint8_t *seed,
uint16_t nonce0,
uint16_t nonce1,
uint16_t nonce2,
uint16_t nonce3);
void PQCLEAN_KYBER1024_AVX2_shake128x4_squeezeblocks(uint8_t *out0,
uint8_t *out1,
uint8_t *out2,
uint8_t *out3,
size_t nblocks,
keccak4x_state *state);
void PQCLEAN_KYBER1024_AVX2_shake256x4_prf(uint8_t *out0,
uint8_t *out1,
uint8_t *out2,
uint8_t *out3,
size_t outlen,
const uint8_t *key,
uint8_t nonce0,
uint8_t nonce1,
uint8_t nonce2,
uint8_t nonce3);
#endif