57QSC_CPLUSPLUS_ENABLED_START
101#if defined(QSC_EDDH_S1EC25519)
107# define QSC_EDDH_PUBLICKEY_SIZE 32U
113# define QSC_EDDH_PRIVATEKEY_SIZE 32U
119# define QSC_EDDH_SHAREDSECRET_SIZE 32U
125# define QSC_EDDH_SEED_SIZE 32U
131# define QSC_EDDH_ALGNAME "EDDH-P25519"
133#elif defined(QSC_EDDH_S3EC448)
139# define QSC_EDDH_PUBLICKEY_SIZE 56U
145# define QSC_EDDH_PRIVATEKEY_SIZE 56U
151# define QSC_EDDH_SHAREDSECRET_SIZE 56U
157# define QSC_EDDH_SEED_SIZE 56U
163# define QSC_EDDH_ALGNAME "EDDH-P448"
166# error "No EDDH parameter set defined. Define QSC_EDDH_S1EC25519 or QSC_EDDH_S3EC448."
225QSC_CPLUSPLUS_ENABLED_END
QSC_EXPORT_API bool qsc_eddh_key_exchange(uint8_t *secret, const uint8_t *privatekey, const uint8_t *publickey)
Decapsulates the shared secret for a given cipher-text using a private-key.
Definition eddh.c:67
QSC_EXPORT_API bool qsc_eddh_generate_seeded_keypair(uint8_t *publickey, uint8_t *privatekey, const uint8_t *seed)
Generates public and private keys for the EDDH key encapsulation mechanism using a seed.
Definition eddh.c:39
QSC_EXPORT_API void qsc_eddh_public_from_private(uint8_t *publickey, const uint8_t *privatekey)
Derives an X25519 public key from an existing private key.
Definition eddh.c:90
QSC_EXPORT_API bool qsc_eddh_generate_keypair(uint8_t *publickey, uint8_t *privatekey, bool(*rng_generate)(uint8_t *, size_t))
Generates public and private keys for the EDDH key encapsulation mechanism.
Definition eddh.c:11
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 qsccommon.h:645