PQLR  dev-1426-v1.4-474-b578073a
Postquantum Crypto Library by QAPP
falcon.h File Reference
#include "params.h"
#include <pqlr/common/pqlr.h>
#include <pqlr/common/api.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct falcon_st * falcon_t
 Falcon algorithm instance handle. More...
 

Functions

PQLR_API falcon_t falcon_new (falcon_parameterset_t parameterset)
 Creates new falcon instance with selected parameter set. More...
 
PQLR_API void falcon_free (falcon_t falcon)
 Frees falcon instance and all corresponding resources. More...
 
PQLR_API falcon_t falcon_duplicate (const falcon_t src)
 Duplicates context copying all related resources. More...
 
PQLR_API pqlr_t falcon_to_pqlr (falcon_t falcon)
 Casts falcon instance to pqlr instance. More...
 
PQLR_API size_t falcon_get_public_key_bytes_len (falcon_t falcon)
 Obtains public key buffer length in bytes for current falcon instance. More...
 
PQLR_API size_t falcon_get_secret_key_bytes_len (falcon_t falcon)
 Obtains secret key buffer length in bytes for current falcon instance. More...
 
PQLR_API size_t falcon_get_signature_bytes_len (falcon_t falcon)
 Obtains signature buffer length in bytes for current falcon instance. More...
 
PQLR_API void falcon_generate_keys (const falcon_t falcon, uint8_t *result_sk, uint8_t *result_pk)
 Generates random secret key and public key for given context. More...
 
PQLR_API void falcon_sign (const falcon_t falcon, const uint8_t *sk, const uint8_t *msg, size_t msg_len, uint8_t *result_sig, size_t *sig_len)
 Generates signature for given message according to context and secret key. The signature is non-deterministic, i.e. there are different results for the same message. More...
 
PQLR_API int falcon_verify (const falcon_t falcon, const uint8_t *pk, const uint8_t *sig, size_t sig_len, const uint8_t *msg, size_t msg_len)
 Verifies that given signature is the signature of given message. More...