otPlatCryptoEcdsaExportPublicKey() function
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)
Arguments
aKeyRef
Key Reference to the slot where the key-pair is stored.
aPublicKey
A pointer to an ECDSA public key structure to store the public key.
Return value
OT_ERROR_NONE Public key was retrieved successfully, and @p aBuffer is updated. OT_ERROR_PARSE The key-pair DER format could not be parsed (invalid format). OT_ERROR_INVALID_ARGS The @p aContext is NULL.
Notes
This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.