pub unsafe extern "C" fn otPlatCryptoEcdsaExportPublicKey(
    aKeyRef: otCryptoKeyRef,
    aPublicKey: *mut otPlatCryptoEcdsaPublicKey
) -> otError
Expand description

Get the associated public key from the key reference passed.

The public key is stored differently depending on the crypto backend library being used (OPENTHREAD_CONFIG_CRYPTO_LIB).

This API must make sure to return the public key as a byte sequence representation of an uncompressed curve point (RFC 6605 - sec 4)

@param[in] aKeyRef Key Reference to the slot where the key-pair is stored. @param[out] aPublicKey A pointer to an ECDSA public key structure to store the public key.

@retval OT_ERROR_NONE Public key was retrieved successfully, and @p aBuffer is updated. @retval OT_ERROR_PARSE The key-pair DER format could not be parsed (invalid format). @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL.

@note This API is only used by OT core when OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE is enabled.