Synergy Software Package User's Manual

#include <sf_crypto_signature_api.h>

Data Fields

ssp_err_t(* open )(sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_signature_cfg_t const *const p_cfg)
 
ssp_err_t(* close )(sf_crypto_signature_ctrl_t *const p_ctrl)
 
ssp_err_t(* contextInit )(sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_signature_mode_t operation_mode, sf_crypto_signature_algorithm_init_params_t *const p_algorithm_specific_params, sf_crypto_key_t const *const p_key)
 
ssp_err_t(* signUpdate )(sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_message)
 
ssp_err_t(* verifyUpdate )(sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_message)
 
ssp_err_t(* signFinal )(sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_message, sf_crypto_data_handle_t *const p_dest)
 
ssp_err_t(* verifyFinal )(sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_signature, sf_crypto_data_handle_t const *const p_message)
 
ssp_err_t(* versionGet )(ssp_version_t *const p_version)
 

Detailed Description

Shared Interface definition for the SSP Crypto Signature framework

Field Documentation

◆ close

ssp_err_t(* sf_crypto_signature_api_t::close) (sf_crypto_signature_ctrl_t *const p_ctrl)

Close SSP Crypto Signature framework module. This API will free any memory allocated when the signature framework module was opened.

Implemented as
Parameters
[in,out]p_ctrlPointer to Crypto Signature Framework control block structure.

◆ contextInit

ssp_err_t(* sf_crypto_signature_api_t::contextInit) (sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_signature_mode_t operation_mode, sf_crypto_signature_algorithm_init_params_t *const p_algorithm_specific_params, sf_crypto_key_t const *const p_key)

Perform Signature Module Context Initialization operation. This API initializes the signature module by setting operating mode, the message padding scheme and appropriate key for subsequent calls to signUpdate, verifyUpdate, signFinal and verifyFinal APIs. This API can be called only after this module has be opened using the open API. This API can be called after signFinal or verifyFinal API to initialize context for a new operation. This API sets up the internal context for sign/verify operation.

Implemented as
Parameters
[in]p_ctrlPointer to Crypto Signature Framework control block structure.
[in]operation_modeSelects Sign or Verify Operation enumeration.
[in]p_algorithm_specific_paramsAlgorithm specific parameters.
[in]p_keyPointer to a private key for Sign operation OR Pointer to a public key for Verify operation.
Note
p_key should be WORD aligned.

◆ open

ssp_err_t(* sf_crypto_signature_api_t::open) (sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_signature_cfg_t const *const p_cfg)

Open SSP Crypto Signature framework. This function sets up a control block of the framework module based on the configuration parameters such as the key type, key size and domain parameters. The module allows users to have multiple instances with different control blocks, if required. This API will allocate memory internally according to the cryptography algorithm selected through key_type and key_size parameters.

Implemented as
Parameters
[in,out]p_ctrlPointer to Crypto Signature Framework control block structure.
[in]p_cfgPointer to sf_crypto_signature_cfg_t configuration structure. All elements of this structure must be set by user.

◆ signFinal

ssp_err_t(* sf_crypto_signature_api_t::signFinal) (sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_message, sf_crypto_data_handle_t *const p_dest)

Perform Signature Module Signature-Final Operation. Call to this API generates signature and writes it to p_dest. p_message can be the pointer to last block of input message to be signed or can be passed as NULL if all of the input is passed through one or more signUpdate API call(s).

Implemented as
Parameters
[in]p_ctrlPointer to Crypto Signature Framework control block structure.
[in]p_messagePointer to data handle containing last block of data and its length. If there is no more data to be passed this param can be set to NULL.
[in,out]p_destPointer to data handle containing pointer to a buffer for storing signature. The data_length of this handle must be populated with the buffer length. Upon successful return this data_length will be updated with the number of bytes written to this buffer.
Note
p_message should be WORD aligned.
p_dest should be WORD aligned.
p_message can be set to NULL.
In case SF_CRYPTO_SIGNATURE_NO_PADDING is chosen as the padding scheme ensure p_message is a valid message digest in appropriate format.

◆ signUpdate

ssp_err_t(* sf_crypto_signature_api_t::signUpdate) (sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_message)

Perform Signature Module Signature-Update operation. This API can be called multiple times to accumulate the message to be signed. This API can be used when the input message to be signed is not available all at once in a byte array.

Implemented as
Parameters
[in]p_ctrlPointer to Crypto Signature Framework control block structure.
[in]p_messagePointer to input message to be signed.
Note
p_message should be WORD aligned.
In case SF_CRYPTO_SIGNATURE_NO_PADDING is chosen as the padding scheme ensure p_message is a valid message digest in appropriate format.

◆ verifyFinal

ssp_err_t(* sf_crypto_signature_api_t::verifyFinal) (sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_signature, sf_crypto_data_handle_t const *const p_message)

Perform Signature Module Signature-Verification-Final Operation. Call to this API performs signature verification operation. p_message can be the pointer to last block of message or can be passed as NULL if all of the message whose signature is to be verified is passed through one or more verifyUpdate API call(s).

Implemented as
Parameters
[in]p_ctrlPointer to Crypto Signature Framework control block structure.
[in]p_signaturePointer to Signature buffer to be verified.
[in]p_messagePointer to last block of message whose signature is being verified. If there is no more data to be passed this param can be set to NULL.
Note
p_message should be WORD aligned.
p_message can be set to NULL.

◆ verifyUpdate

ssp_err_t(* sf_crypto_signature_api_t::verifyUpdate) (sf_crypto_signature_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_message)

Perform Signature Module Signature-Verification-Update operation. This API can be called multiple times to accumulate the message whose signature is to be verified. This API can be used when the input message to be verified against a signature is not available all at once in a byte array.

Implemented as
Parameters
[in]p_ctrlPointer to Crypto Signature Framework control block structure.
[in]p_messagePointer to message whose signature is to be verified.
Note
p_message should be WORD aligned.

◆ versionGet

ssp_err_t(* sf_crypto_signature_api_t::versionGet) (ssp_version_t *const p_version)

Get version of SSP Crypto Signature framework.

Implemented as
Parameters
[out]p_versionPointer to the memory to store the module version.

The documentation for this struct was generated from the following file: