1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-30 03:11:43 +00:00
pqcrypto/crypto_kem/kyber768-90s/clean/symmetric-aes.c

19 lines
629 B
C
Raw Normal View History

2020-10-27 13:48:42 +00:00
#include "aes256ctr.h"
#include "params.h"
#include "symmetric.h"
2019-09-17 13:02:01 +01:00
#include <stddef.h>
#include <stdint.h>
2020-10-27 13:48:42 +00:00
void PQCLEAN_KYBER76890S_CLEAN_kyber_aes256xof_absorb(aes256ctr_ctx *state, const uint8_t seed[32], uint8_t x, uint8_t y) {
uint8_t expnonce[12] = {0};
expnonce[0] = x;
expnonce[1] = y;
PQCLEAN_KYBER76890S_CLEAN_aes256ctr_init(state, seed, expnonce);
2019-09-17 13:02:01 +01:00
}
2020-10-27 13:48:42 +00:00
void PQCLEAN_KYBER76890S_CLEAN_kyber_aes256ctr_prf(uint8_t *out, size_t outlen, const uint8_t key[32], uint8_t nonce) {
uint8_t expnonce[12] = {0};
expnonce[0] = nonce;
PQCLEAN_KYBER76890S_CLEAN_aes256ctr_prf(out, outlen, key, expnonce);
}