/* pqclean.h — Umbrella include for the ESP32 firmware PQClean component.
 *
 * Exposes the three post-quantum algorithms (ML-DSA-65, SLH-DSA-128s,
 * ML-KEM-768) and the deterministic DRBG used for mnemonic-recoverable
 * key generation.
 *
 * On ESP32 the underlying hash/SHAKE primitives are provided by the
 * mbedtls backend (crypto_backend_mbedtls.c) instead of OpenSSL.
 */
#ifndef FIRMWARE_PQCLEAN_H
#define FIRMWARE_PQCLEAN_H

#include <stddef.h>
#include <stdint.h>

/* --- ML-DSA-65 (FIPS 204, lattice signatures) --- */
#include "ml_dsa_65_api.h"

/* --- SLH-DSA-128s (FIPS 205, hash-based signatures) --- */
#include "slh_dsa_128s_api.h"

/* --- ML-KEM-768 (FIPS 203, lattice KEM) --- */
#include "ml_kem_768_api.h"

/* --- Deterministic DRBG (replaces randombytes() for keygen) --- */
/* Initializes the DRBG with a 32-byte mnemonic-derived seed. Subsequent
 * randombytes() calls will produce a deterministic byte stream. */
void pq_drbg_init(const unsigned char *seed, size_t seed_len);

/* Zeroizes the DRBG state (call after keygen to wipe sensitive material). */
void pq_drbg_zeroize(void);

/* randombytes() — called by the PQClean algorithm code.
 * On firmware this is provided by randombytes_mbedtls.c (deterministic DRBG
 * for keygen, or mbedtls_ctr_drbg for real randomness during encaps). */
int randombytes(unsigned char *buf, size_t len);

#endif /* FIRMWARE_PQCLEAN_H */
