Contains the primary public API for the Falcon asymmetric signature scheme implementation. More...
#include "common.h"
Go to the source code of this file.
Functions | |
QSC_EXPORT_API void | qsc_falcon_generate_keypair (uint8_t *publickey, uint8_t *privatekey, bool(*rng_generate)(uint8_t *, size_t)) |
Generates a Falcon public/private key-pair. | |
QSC_EXPORT_API void | qsc_falcon_sign (uint8_t *signedmsg, size_t *smsglen, const uint8_t *message, size_t msglen, const uint8_t *privatekey, bool(*rng_generate)(uint8_t *, size_t)) |
Signs a message and returns an array containing the signature followed by the message. | |
QSC_EXPORT_API bool | qsc_falcon_verify (uint8_t *message, size_t *msglen, const uint8_t *signedmsg, size_t smsglen, const uint8_t *publickey) |
Verifies a signature-message pair with the public key. | |
Contains the primary public API for the Falcon asymmetric signature scheme implementation.
This file provides the API for the Falcon signature scheme implementation. It defines functions to generate key pairs, sign messages, and verify signature-message pairs using the Falcon algorithm. The implementation is based on the NIST PQC Round 3 submission, with parameters selected via preprocessor definitions.
QSC_EXPORT_API void qsc_falcon_generate_keypair | ( | uint8_t * | publickey, |
uint8_t * | privatekey, | ||
bool(* | rng_generate )(uint8_t *, size_t) ) |
Generates a Falcon public/private key-pair.
publickey | [uint8_t*] Pointer to the public verification-key array. |
privatekey | [uint8_t*] Pointer to the private signature-key array. |
rng_generate | [bool (*)(uint8_t*, size_t)] Pointer to the random generator function. |
QSC_EXPORT_API void qsc_falcon_sign | ( | uint8_t * | signedmsg, |
size_t * | smsglen, | ||
const uint8_t * | message, | ||
size_t | msglen, | ||
const uint8_t * | privatekey, | ||
bool(* | rng_generate )(uint8_t *, size_t) ) |
Signs a message and returns an array containing the signature followed by the message.
signedmsg | [uint8_t*] Pointer to the signed-message array. |
smsglen | [size_t*] Pointer to the signed message length. |
message | [const uint8_t*] Pointer to the message array. |
msglen | [size_t] The message array length. |
privatekey | [const uint8_t*] Pointer to the private signature-key. |
rng_generate | [bool (*)(uint8_t*, size_t)] Pointer to the random generator function. |
QSC_EXPORT_API bool qsc_falcon_verify | ( | uint8_t * | message, |
size_t * | msglen, | ||
const uint8_t * | signedmsg, | ||
size_t | smsglen, | ||
const uint8_t * | publickey ) |
Verifies a signature-message pair with the public key.
message | [uint8_t*] Pointer to the message output array. |
msglen | [size_t*] Pointer to the message length. |
signedmsg | [const uint8_t*] Pointer to the signed message array. |
smsglen | [size_t] The signed message length. |
publickey | [const uint8_t*] Pointer to the public verification-key array. |