Synergy Software Package User's Manual

#include <sf_crypto_key_api.h>

Data Fields

ssp_err_t(* open )(sf_crypto_key_ctrl_t *const p_ctrl, sf_crypto_key_cfg_t const *const p_cfg)
 
ssp_err_t(* close )(sf_crypto_key_ctrl_t *const p_ctrl)
 
ssp_err_t(* keyGenerate )(sf_crypto_key_ctrl_t *const p_ctrl, sf_crypto_key_t *const p_secret_key, sf_crypto_key_t *const p_public_key)
 
ssp_err_t(* EcdhSharedSecretCompute )(sf_crypto_key_ctrl_t *const p_ctrl, sf_crypto_key_t *const p_local_secret_key, sf_crypto_key_t *const p_remote_public_key, sf_crypto_key_t *const p_shared_secret)
 
ssp_err_t(* versionGet )(ssp_version_t *const p_version)
 

Detailed Description

Shared Interface definition for the SSP SSP Crypto framework

Field Documentation

◆ close

ssp_err_t(* sf_crypto_key_api_t::close) (sf_crypto_key_ctrl_t *const p_ctrl)

Close SSP Crypto Key framework.

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

◆ EcdhSharedSecretCompute

ssp_err_t(* sf_crypto_key_api_t::EcdhSharedSecretCompute) (sf_crypto_key_ctrl_t *const p_ctrl, sf_crypto_key_t *const p_local_secret_key, sf_crypto_key_t *const p_remote_public_key, sf_crypto_key_t *const p_shared_secret)

Perform scalar multiplication for ECC algorithms only. This is a blocking call.

Implemented as
  • SF_CRYPTO_KEY_EcdhSharedSecretCompute
Parameters
[in]p_ctrlPointer to Crypto Key Framework control block structure.
[in]p_local_secret_keyPointer to a secret key structure. The pointer to the secret key and it's length in bytes, are to be populated on input. Refer to r_ecc_api.h for ECC key sizes. p_secret_key should be WORD aligned. The memory allocation to store the secret key is user's responsibility.
[in]p_remote_public_keypointer to a point on the curve data. The pointer to the point on curve data and its length in bytes, are to be populated on input. Refer to r_ecc_api.h for ECC point on curve sizes. p_point_on_curve should be WORD aligned. The memory allocation to store the point on curve data is user's responsibility.
[in,out]p_shared_secretThe pointer to the buffer and it's length in bytes, are to be populated on input. On success the resultant point on curve data and it's length in bytes, are returned. Refer to r_ecc_api.h for ECC public key sizes. p_resultant_vector should be WORD aligned. The memory allocation to store the resultant point on curve data is user's responsibility.

◆ keyGenerate

ssp_err_t(* sf_crypto_key_api_t::keyGenerate) (sf_crypto_key_ctrl_t *const p_ctrl, sf_crypto_key_t *const p_secret_key, sf_crypto_key_t *const p_public_key)

Generate a key. This is a blocking call.

Implemented as
Parameters
[in]p_ctrlPointer to Crypto Key Framework control block structure.
[in,out]p_secret_keyPointer to a secret key structure. The pointer to the buffer and it's length in bytes, are to be populated on input. On success the key and it's length in bytes, are returned. Refer to r_rsa_api.h for RSA secret key sizes. Refer to r_aes_api.h for AES key sizes. Refer to r_ecc_api.h for ECC key sizes. p_secret_key should be WORD aligned. The memory allocation to store the secret key is user's responsibility.
[in,out]p_public_keyPointer to a public key structure. The pointer to the buffer and it's length in bytes, are to be populated on input. On success the key and it's length in bytes, are returned. Refer to r_rsa_api.h for RSA public key sizes. Refer to r_ecc_api.h for ECC public key sizes. Should set to NULL for AES. p_public_key should be WORD aligned. The memory allocation to store the public key is user's responsibility.

◆ open

ssp_err_t(* sf_crypto_key_api_t::open) (sf_crypto_key_ctrl_t *const p_ctrl, sf_crypto_key_cfg_t const *const p_cfg)

Open SSP Crypto Key framework for subsequent call / Key generation.

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

◆ versionGet

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

Get version of SSP Crypto Key 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: