qcrypto_pubkey_from_privkey()

Updated: April 19, 2023

Extract a public key

Synopsis:

#include <qcrypto/qcrypto_keys.h>
int qcrypto_pubkey_from_privkey(qcrypto_ctx_t *ctx,
                                qcrypto_key_t *privkey,
                                qcrypto_key_t **pubkey)

Arguments:

ctx
The algorithm context object.
privkey
The private key handle.
pubkey
A pointer to the public key handle.

Library:

libqcrypto

Description:

This function extracts the public key from the specified private key.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.