QSC Post Quantum Cryptographic Library 1.0.0.6c (A6)
A post quantum secure library written in Ansi C
 
Loading...
Searching...
No Matches
ecdhbase.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

bool qsc_ed25519_key_exchange (uint8_t *secret, const uint8_t *publickey, const uint8_t *privatekey)
 Combine an external public key with an internal private key to produce a shared secret.
 
void qsc_ed25519_generate_keypair (uint8_t *publickey, uint8_t *privatekey, const uint8_t *seed)
 Generates public and private keys for the ECDH key encapsulation mechanism.
 

Detailed Description

Contains the internal API for Ed25519 key exchange operations.

This header defines functions for combining an external public key with an internal private key to produce a shared secret, as well as for generating key pairs for the Elliptic Curve Diffie-Hellman (ECDH) key encapsulation mechanism using the Ed25519 curve.

Function Documentation

◆ qsc_ed25519_generate_keypair()

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

Generates public and private keys for the ECDH key encapsulation mechanism.

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_key_exchange()

bool qsc_ed25519_key_exchange ( uint8_t * secret,
const uint8_t * publickey,
const uint8_t * privatekey )

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
secret[uint8_t*] Pointer to the shared secret.
publickey[const uint8_t*] Pointer to the public-key array.
privatekey[const uint8_t*] Pointer to the private-key array.
Returns
Returns true on success.