otPlatCryptoEcdsaSignUsingKeyRef() function
Calculate the ECDSA signature for a hashed message using the Key reference passed. Uses the deterministic digital signature generation procedure from RFC 6979.
Arguments
aKeyRef
Key Reference to the slot where the key-pair is stored.
aHash
A pointer to a SHA-256 hash structure where the hash value for signature calculation is stored.
aSignature
A pointer to an ECDSA signature structure to output the calculated signature.
Return value
OT_ERROR_NONE The signature was calculated successfully, @p aSignature was updated. OT_ERROR_PARSE The key-pair DER format could not be parsed (invalid format). OT_ERROR_NO_BUFS Failed to allocate buffer for signature calculation. 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.