2020-10-27 13:48:42 +00:00
|
|
|
#include "aes256ctr.h"
|
2020-10-27 00:05:07 +00:00
|
|
|
#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);
|
2020-02-11 10:15:14 +00:00
|
|
|
}
|