Mistake on this page?
Report an issue in GitHub or email us
Functions
CryptoCell ECDSA APIs

Functions

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. More...
 
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. More...
 

Detailed Description

Function Documentation

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_ptrPointer to the RND state structure.
[in]rndGenerateVectFuncPointer to the random vector generation function.
[in,out]pSignUserContextPointer to the user buffer for signing the database.
[in]pSignerPrivKeyA pointer to a user private key structure.
[in]hashModeOne of the supported SHA-x HASH modes, as defined in CRYS_ECPKI_HASH_OpMode_t.
Note
MD5 is not supported.
Parameters
[in]pMessageDataInPointer 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]messageSizeInBytesSize of message data in bytes.
[in]pSignatureOutPointer to a buffer for output of signature.
[in,out]pSignatureOutSizePointer 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).
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]pVerifyUserContextPointer to the user buffer for signing the database.
[in]pUserPublKeyPointer to a user public key structure.
[in]hashModeOne of the supported SHA-x HASH modes, as defined in CRYS_ECPKI_HASH_OpMode_t.
Note
MD5 is not supported.
Parameters
[in]pSignatureInPointer to the signature to be verified.
[in]SignatureSizeBytesSize of the signature (in bytes).
[in]pMessageDataInPointer 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]messageSizeInBytesSize of the input data (in bytes).
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.