1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-24 00:11:27 +00:00
pqcrypto/crypto_kem/ledakemlt12/clean/rng.h

27 lines
635 B
C

#ifndef RNG_H
#define RNG_H
#include <stddef.h>
#include <stdint.h>
#define RNG_SUCCESS ( 0)
#define RNG_BAD_MAXLEN (-1)
#define RNG_BAD_OUTBUF (-2)
#define RNG_BAD_REQ_LEN (-3)
typedef struct {
unsigned char buffer[16];
unsigned int buffer_pos;
uint64_t length_remaining;
unsigned char key[32];
unsigned char ctr[16];
} AES_XOF_struct;
int PQCLEAN_LEDAKEMLT12_CLEAN_seedexpander(AES_XOF_struct *ctx, unsigned char *x, size_t xlen);
/* TRNG_BYTE_LENGTH wide buffer */
void PQCLEAN_LEDAKEMLT12_CLEAN_seedexpander_from_trng(AES_XOF_struct *ctx, const unsigned char *trng_entropy);
#endif