nRF5 SDK v13.0.0
Functions
crys_ecpki_ecdsa

Defines the APIs that support the ECDSA functions. More...

Functions

CRYSError_t CRYS_ECDSA_Sign (CRYS_RND_Context_t *pRndContext, 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

Defines the APIs that support the ECDSA functions.

Function Documentation

CRYSError_t CRYS_ECDSA_Sign ( CRYS_RND_Context_t pRndContext,
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
Returns
CRYS_OK on success.
A non-zero value on failure as defined crys_ecpki_error.h.
Parameters
[in,out]pRndContextPointer to the RND context buffer.
[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.

Returns
CRYS_OK on success.
A non-zero value on failure as defined crys_ecpki_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).

Documentation feedback | Developer Zone | Subscribe | Updated