Files
sqisign/include/rng.h
SQIsign team 28ff420dd0 initial version of SQIsign
Co-authored-by: Jorge Chavez-Saab <jorgechavezsaab@gmail.com>
Co-authored-by: Maria Corte-Real Santos <36373796+mariascrs@users.noreply.github.com>
Co-authored-by: Luca De Feo <github@defeo.lu>
Co-authored-by: Jonathan Komada Eriksen <jonathan.eriksen97@gmail.com>
Co-authored-by: Basil Hess <bhe@zurich.ibm.com>
Co-authored-by: Antonin Leroux <18654258+tonioecto@users.noreply.github.com>
Co-authored-by: Patrick Longa <plonga@microsoft.com>
Co-authored-by: Lorenz Panny <lorenz@yx7.cc>
Co-authored-by: Francisco Rodríguez-Henríquez <francisco.rodriguez@tii.ae>
Co-authored-by: Sina Schaeffler <108983332+syndrakon@users.noreply.github.com>
Co-authored-by: Benjamin Wesolowski <19474926+Calodeon@users.noreply.github.com>
2023-07-09 12:48:54 +02:00

29 lines
851 B
C

// SPDX-License-Identifier: Apache-2.0
#ifndef rng_h
#define rng_h
/**
* Randombytes initialization.
* Initialization may be needed for some random number generators (e.g. CTR-DRBG).
*
* @param[in] entropy_input 48 bytes entropy input
* @param[in] personalization_string Personalization string
* @param[in] security_strength Security string
*/
void randombytes_init(unsigned char *entropy_input,
unsigned char *personalization_string,
int security_strength);
/**
* Random byte generation.
* The caller is responsible to allocate sufficient memory to hold x.
*
* @param[out] x Memory to hold the random bytes.
* @param[in] xlen Number of random bytes to be generated
* @return int 0 on success, -1 otherwise
*/
int randombytes(unsigned char *x, unsigned long long xlen);
#endif /* rng_h */