pqc/crypto_kem/sntrup761/avx2/crypto_stream_aes256ctr.c
John M. Schanck 70543bba37 Add sntrup{653,761,857} and ntrulpr{653,761,857}
Exported from SUPERCOP-20200826 using the scripts at:
https://github.com/jschanck/pqclean-package-ntruprime
2020-08-28 20:22:56 -04:00

16 lines
364 B
C

#include "crypto_stream_aes256ctr.h"
int PQCLEAN_SNTRUP761_AVX2_crypto_stream_aes256ctr(
uint8_t *out,
size_t outlen,
const uint8_t nonce[AESCTR_NONCEBYTES],
const uint8_t key[AES256_KEYBYTES]) {
aes256ctx state;
aes256_ctr_keyexp(&state, key);
aes256_ctr(out, outlen, nonce, &state);
aes256_ctx_release(&state);
return 0;
}