6.3.1 Crypto_DigiSign_Ecdsa_Sign
crypto_DigiSign_Status_E Crypto_DigiSign_Ecdsa_Sign(
crypto_HandlerType_E ecdsaHandlerType_en,
uint8_t *ptr_inputHash,
uint32_t hashLen,
uint8_t *ptr_outSig,
uint32_t sigLen,
uint8_t *ptr_privKey,
uint32_t privKeyLen,
crypto_EccCurveType_E eccCurveType_en,
uint32_t ecdsaSessionId
);
Description
This API is utilized for signing a hash using the ECDSA algorithm. It employs the ECC private key to sign the hash. The size of the ECC private key is determined by the curve being used. For instance, the private key size for secp256r1 is 32 bytes
Parameters
No. | Argument Type | Argument Name | Type | Description |
---|---|---|---|---|
1 | crypto_HandlerType_E | ecdsaHandlerType_en | Input | Enum for crypto operation handler i.e., SW, HW |
2 | uint8_t* | ptr_inputHash | Input | Pointer which holds hash to sign |
3 | uint32_t | hashLen | Input | Length of the hash in bytes |
4 | uint8_t* | ptr_outSig | Output | Pointer holds the signatures of hash |
5 | uint32_t | sigLen | Input | Length of signature in bytes |
6 | uint8_t* | ptr_privKey | Input | Pointer to hold private key x9.63 format |
7 | uint32_t | privKeyLen | Input | Length of ECC private key in bytes |
8 | crypto_EccCurveType_E | eccCurveType_en | Input | Curve type used for the ECC keys |
9 | uint32_t | ecdsaSessionId | Input | It defines the session ID, must be more than zero |
Returns
Return Type | Description |
---|---|
crypto_DigiSign_Status_E | Function returns the status of the API. |
Remarks
This API does not support DER format of Keys.