1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-30 11:21:25 +00:00
pqcrypto/crypto_kem/ledakemlt52/leaktime/rng.h

25 lines
647 B
C
Raw Normal View History

2019-06-10 17:57:26 +01:00
#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)
#define RNG_MAXLEN (10 * 1024 * 1024)
2019-06-10 17:57:26 +01:00
typedef struct {
unsigned char buffer[16];
size_t buffer_pos;
size_t length_remaining;
2019-06-10 17:57:26 +01:00
unsigned char key[32];
unsigned char ctr[16];
} AES_XOF_struct;
2019-06-16 16:01:29 +01:00
int PQCLEAN_LEDAKEMLT52_LEAKTIME_seedexpander(AES_XOF_struct *ctx, unsigned char *x, size_t xlen);
void PQCLEAN_LEDAKEMLT52_LEAKTIME_seedexpander_from_trng(AES_XOF_struct *ctx, const unsigned char *trng_entropy);
2019-06-10 17:57:26 +01:00
#endif