45QSC_CPLUSPLUS_ENABLED_START
91#if defined(QSC_ECDSA_S1EC25519)
97# define QSC_ECDSA_SIGNATURE_SIZE 64
103# define QSC_ECDSA_PRIVATEKEY_SIZE 64
109# define QSC_ECDSA_PUBLICKEY_SIZE 32
112# error "The ECDSA parameter set is invalid!"
119#define QSC_ECDSA_SEED_SIZE 32ULL
125#define QSC_ECDSA_ALGNAME "ECDSA"
160QSC_EXPORT_API void qsc_ecdsa_sign(uint8_t* signedmsg,
size_t* smsglen,
const uint8_t* message,
size_t msglen,
const uint8_t* privatekey);
174QSC_CPLUSPLUS_ENABLED_END
Contains common definitions for the Quantum Secure Cryptographic (QSC) library.
#define QSC_EXPORT_API
API export macro for Microsoft compilers when importing from a DLL.
Definition common.h:520
QSC_EXPORT_API void qsc_ecdsa_generate_seeded_keypair(uint8_t *publickey, uint8_t *privatekey, const uint8_t *seed)
Generates a ECDSA public/private key-pair.
Definition ecdsa.c:6
QSC_EXPORT_API void qsc_ecdsa_generate_keypair(uint8_t *publickey, uint8_t *privatekey, bool(*rng_generate)(uint8_t *, size_t))
Generates a ECDSA public/private key-pair.
Definition ecdsa.c:15
QSC_EXPORT_API bool qsc_ecdsa_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.
Definition ecdsa.c:38
QSC_EXPORT_API void qsc_ecdsa_sign(uint8_t *signedmsg, size_t *smsglen, const uint8_t *message, size_t msglen, const uint8_t *privatekey)
Takes the message as input and returns an array containing the signature followed by the message.
Definition ecdsa.c:28