QSC Post Quantum Cryptographic Library 1.0.0.6c (A6)
A post quantum secure library written in Ansi C
 
Loading...
Searching...
No Matches
ecdsabase.h File Reference

Contains the internal API for Ed25519 key exchange operations. More...

#include "common.h"

Go to the source code of this file.

Functions

void qsc_ed25519_keypair (uint8_t *publickey, uint8_t *privatekey, const uint8_t *seed)
 Combine an external public key with an internal private key to produce a shared secret.
 
int32_t qsc_ed25519_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.
 
int32_t qsc_ed25519_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.
 

Detailed Description

Contains the internal API for Ed25519 key exchange operations.

This header defines internal functions for Ed25519 key exchange operations, including generating key pairs, signing messages, and verifying signature-message pairs.

Function Documentation

◆ qsc_ed25519_keypair()

void qsc_ed25519_keypair ( uint8_t * publickey,
uint8_t * privatekey,
const uint8_t * seed )

Combine an external public key with an internal private key to produce a shared secret.

Warning
Arrays must be sized to QSC_ECDH_PUBLICKEY_SIZE and QSC_ECDH_SECRETKEY_SIZE.
Parameters
publickey[uint8_t*] Pointer to the output public-key array.
privatekey[uint8_t*] Pointer to the output private-key array.
seed[const uint8_t*] Pointer to the random seed.

◆ qsc_ed25519_sign()

int32_t qsc_ed25519_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.

Parameters
signedmsg[uint8_t*] Pointer to the signed message.
smsglen[size_t*] Pointer to the signed message length.
message[const uint8_t*] Pointer to the message to be signed.
msglen[size_t] The message length.
privatekey[const uint8_t*] Pointer to the private signature key.
Returns
[int32_t] Returns 0 for success.

◆ qsc_ed25519_verify()

int32_t qsc_ed25519_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.

Parameters
message[uint8_t*] Pointer to the message to be verified.
msglen[size_t*] Pointer to the message length.
signedmsg[const uint8_t*] Pointer to the signed message.
smsglen[size_t] The signed message length.
publickey[const uint8_t*] Pointer to the public verification key.
Returns
[int32_t]Returns 0 for success.