Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
CryptoCell ECDSA APIs
[CryptoCell ECC APIs]
Functions | |
| CIMPORT_C CRYSError_t | CRYS_ECDSA_Sign (void *rndState_ptr, SaSiRndGenerateVectWorkFunc_t rndGenerateVectFunc, CRYS_ECDSA_SignUserContext_t *pSignUserContext, CRYS_ECPKI_UserPrivKey_t *pSignerPrivKey, CRYS_ECPKI_HASH_OpMode_t hashMode, uint8_t *pMessageDataIn, uint32_t messageSizeInBytes, uint8_t *pSignatureOut, uint32_t *pSignatureOutSize) |
| This function performs an ECDSA sign operation in integrated form. | |
| CIMPORT_C CRYSError_t | CRYS_ECDSA_Verify (CRYS_ECDSA_VerifyUserContext_t *pVerifyUserContext, CRYS_ECPKI_UserPublKey_t *pUserPublKey, CRYS_ECPKI_HASH_OpMode_t hashMode, uint8_t *pSignatureIn, uint32_t SignatureSizeBytes, uint8_t *pMessageDataIn, uint32_t messageSizeInBytes) |
| This function performs an ECDSA verify operation in integrated form. Algorithm according [ANS X9.62] standard. | |
Function Documentation
| CIMPORT_C CRYSError_t CRYS_ECDSA_Sign | ( | void * | rndState_ptr, |
| SaSiRndGenerateVectWorkFunc_t | rndGenerateVectFunc, | ||
| CRYS_ECDSA_SignUserContext_t * | pSignUserContext, | ||
| CRYS_ECPKI_UserPrivKey_t * | pSignerPrivKey, | ||
| CRYS_ECPKI_HASH_OpMode_t | hashMode, | ||
| uint8_t * | pMessageDataIn, | ||
| uint32_t | messageSizeInBytes, | ||
| uint8_t * | pSignatureOut, | ||
| uint32_t * | pSignatureOutSize | ||
| ) |
This function performs an ECDSA sign operation in integrated form.
- Note:
- Using of HASH functions with HASH size greater than EC modulus size, is not recommended!. Algorithm according [ANS X9.62] standard.
The message data may be either a non-hashed data or a digest of a hash function. For a non-hashed data, the message data will be hashed using the hash function indicated by CRYS_ECPKI_HASH_OpMode_t. For a digest, CRYS_ECPKI_HASH_OpMode_t should indicate the hash function that the message data was created by, and it will not be hashed.
- Returns:
- CRYS_OK on success.
- A non-zero value on failure as defined crys_ecpki_error.h, crys_hash_error.h or crys_rnd_error.h.
- Parameters:
-
[in,out] rndState_ptr Pointer to the RND state structure. [in] rndGenerateVectFunc Pointer to the random vector generation function. [in,out] pSignUserContext Pointer to the user buffer for signing the database. [in] pSignerPrivKey A pointer to a user private key structure. [in] hashMode One of the supported SHA-x HASH modes, as defined in CRYS_ECPKI_HASH_OpMode_t.
- Note:
- MD5 is not supported.
- Parameters:
-
[in] pMessageDataIn Pointer to the input data to be signed. The size of the scatter/gather list representing the data buffer is limited to 128 entries, and the size of each entry is limited to 64KB (fragments larger than 64KB are broken into fragments <= 64KB). [in] messageSizeInBytes Size of message data in bytes. [in] pSignatureOut Pointer to a buffer for output of signature. [in,out] pSignatureOutSize Pointer to the signature size. Used to pass the size of the SignatureOut buffer (in), which must be >= 2 OrderSizeInBytes. When the API returns, it is replaced with the size of the actual signature (out).
| CIMPORT_C CRYSError_t CRYS_ECDSA_Verify | ( | CRYS_ECDSA_VerifyUserContext_t * | pVerifyUserContext, |
| CRYS_ECPKI_UserPublKey_t * | pUserPublKey, | ||
| CRYS_ECPKI_HASH_OpMode_t | hashMode, | ||
| uint8_t * | pSignatureIn, | ||
| uint32_t | SignatureSizeBytes, | ||
| uint8_t * | pMessageDataIn, | ||
| uint32_t | messageSizeInBytes | ||
| ) |
This function performs an ECDSA verify operation in integrated form. Algorithm according [ANS X9.62] standard.
The message data may be either a non-hashed data or a digest of a hash function. For a non-hashed data, the message data will be hashed using the hash function indicated by CRYS_ECPKI_HASH_OpMode_t. For a digest, CRYS_ECPKI_HASH_OpMode_t should indicate the hash function that the message data was created by, and it will not be hashed.
- Returns:
- CRYS_OK on success.
- A non-zero value on failure as defined crys_ecpki_error.h or crys_hash_error.h.
- Parameters:
-
[in] pVerifyUserContext Pointer to the user buffer for signing the database. [in] pUserPublKey Pointer to a user public key structure. [in] hashMode One of the supported SHA-x HASH modes, as defined in CRYS_ECPKI_HASH_OpMode_t.
- Note:
- MD5 is not supported.
- Parameters:
-
[in] pSignatureIn Pointer to the signature to be verified. [in] SignatureSizeBytes Size of the signature (in bytes). [in] pMessageDataIn Pointer to the input data that was signed (same as given to the signing function). The size of the scatter/gather list representing the data buffer is limited to 128 entries, and the size of each entry is limited to 64KB (fragments larger than 64KB are broken into fragments <= 64KB). [in] messageSizeInBytes Size of the input data (in bytes).
Generated on Tue Aug 9 2022 00:37:29 by
1.7.2