RA Flexible Software Package Documentation  Release v5.3.0

 
Secure Key Injection (r_rsip_key_injection)

Functions

fsp_err_t R_RSIP_AES128_InitialKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_aes_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_AES192_InitialKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_aes_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_AES256_InitialKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_aes_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_RSA2048_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_rsa2048_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_RSA2048_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_rsa2048_private_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_RSA3072_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_rsa3072_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_RSA3072_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_rsa3072_private_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_RSA4096_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_rsa4096_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_RSA4096_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_rsa4096_private_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_secp256r1_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_secp256r1_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_private_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_secp384r1_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_secp384r1_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_private_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_secp256k1_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_secp256k1_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_private_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_brainpoolP256r1_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_brainpoolP256r1_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_private_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_brainpoolP384r1_InitialPublicKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_public_wrapped_key_t *const p_wrapped_key)
 
fsp_err_t R_RSIP_ECC_brainpoolP384r1_InitialPrivateKeyWrap (rsip_key_injection_type_t const key_injection_type, uint8_t const *const p_wrapped_user_factory_programming_key, uint8_t const *const p_initial_vector, uint8_t const *const p_user_key, rsip_ecc_private_wrapped_key_t *const p_wrapped_key)
 

Detailed Description

Driver for the Secure Key Injection on RA MCUs.

Overview

This module provides RSIP functions in PSA Crypto.

HW Overview

Crypto Peripheral version Devices
RSIP-E51A RA8M1

Features

The RSIP Key Injection Module has two types of APIs, InitialKeyWrap and EncryptedKeyWrap. The available APIs differ depending on used RSIP. Please refer to the following for details.

Configuration

Clock Configuration

This module does not require a specific clock configuration.

Pin Configuration

This module does not use I/O pins.

Usage Notes

Module activation

RSIP Key Umport for PSA Crypto Module is off by default. To use it, please On the Stacks tab, add New > Security > MbedTLS or MbedTLS (Crypto Only), Add Requires RSIP Driver > New > (*1), Add Key Injection for RSA Crypto (Optional) > New > Key Injectin for RSA Crypto for PSA Crypto Module after adding MbedTLS. For information on how to injection and update secure keys, refer to the Application Note R11AN0496.

Hardware Initialization

Please refer to Hardware Initialization in Mbed Crypto H/W Acceleration (rm_psa_crypto).

Function Documentation

◆ R_RSIP_AES128_InitialKeyWrap()

fsp_err_t R_RSIP_AES128_InitialKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_aes_wrapped_key_t *const  p_wrapped_key 
)

This API generates 128-bit AES key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key128-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_AES192_InitialKeyWrap()

fsp_err_t R_RSIP_AES192_InitialKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_aes_wrapped_key_t *const  p_wrapped_key 
)

This API generates 192-bit AES key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key192-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_AES256_InitialKeyWrap()

fsp_err_t R_RSIP_AES256_InitialKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_aes_wrapped_key_t *const  p_wrapped_key 
)

This API generates 256-bit AES key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key256-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_RSA2048_InitialPublicKeyWrap()

fsp_err_t R_RSIP_RSA2048_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_rsa2048_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 2048-bit RSA public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key2048-bit RSA wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_RSA2048_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_RSA2048_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_rsa2048_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 2048-bit RSA private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key2048-bit RSA wrapped private key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_RSA3072_InitialPublicKeyWrap()

fsp_err_t R_RSIP_RSA3072_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_rsa3072_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 3072-bit RSA public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key3072-bit RSA wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_RSA3072_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_RSA3072_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_rsa3072_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 3072-bit RSA private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key3072-bit RSA wrapped private key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_RSA4096_InitialPublicKeyWrap()

fsp_err_t R_RSIP_RSA4096_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_rsa4096_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 4096-bit RSA public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key4096-bit RSA wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_RSA4096_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_RSA4096_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_rsa4096_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 4096-bit RSA private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key4096-bit RSA wrapped private key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_secp256r1_InitialPublicKeyWrap()

fsp_err_t R_RSIP_ECC_secp256r1_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 256-bit ECC public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key256-bit ECC wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_secp256r1_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_ECC_secp256r1_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 256-bit ECC private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key256-bit ECC wrapped private key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_secp384r1_InitialPublicKeyWrap()

fsp_err_t R_RSIP_ECC_secp384r1_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 384-bit ECC public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key384-bit ECC wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_secp384r1_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_ECC_secp384r1_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 384-bit ECC private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key384-bit ECC wrapped private key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_secp256k1_InitialPublicKeyWrap()

fsp_err_t R_RSIP_ECC_secp256k1_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 256-bit ECC public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key256-bit ECC wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_secp256k1_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_ECC_secp256k1_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 256-bit ECC private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key256-bit ECC wrapped private key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_brainpoolP256r1_InitialPublicKeyWrap()

fsp_err_t R_RSIP_ECC_brainpoolP256r1_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 256-bit brainpool ECC public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key256-bit ECC wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_brainpoolP256r1_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_ECC_brainpoolP256r1_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 256-bit brainpool ECC private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key256-bit ECC wrapped private key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_brainpoolP384r1_InitialPublicKeyWrap()

fsp_err_t R_RSIP_ECC_brainpoolP384r1_InitialPublicKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_public_wrapped_key_t *const  p_wrapped_key 
)

This API generates 384-bit brainpool ECC public key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key384-bit ECC wrapped public key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.

◆ R_RSIP_ECC_brainpoolP384r1_InitialPrivateKeyWrap()

fsp_err_t R_RSIP_ECC_brainpoolP384r1_InitialPrivateKeyWrap ( rsip_key_injection_type_t const  key_injection_type,
uint8_t const *const  p_wrapped_user_factory_programming_key,
uint8_t const *const  p_initial_vector,
uint8_t const *const  p_user_key,
rsip_ecc_private_wrapped_key_t *const  p_wrapped_key 
)

This API generates 384-bit brainpool ECC private key within the user routine.

Parameters
[in]key_injection_typeSelection key injection type when generating wrapped key
[in]p_wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key injection type is plain, this is not required and any value can be specified.
[in]p_initial_vectorInitialization vector when generating encrypted key. When key injection type is plain, this is not required and any value can be specified.
[in]p_user_keyUser key. If key injection type is not plain, it is encrypted and MAC appended
[out]p_wrapped_key128-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_ASSERTION A required parameter is NULL.
  • FSP_ERR_CRYPTO_SCE_FAIL MAC anomaly detection.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT Resource conflict.
  • FSP_ERR_CRYPTO_UNKNOWN An unknown error occurred.
  • FSP_ERR_INVALID_STATE Internal state is illegal.
Note
The pre-run state is RSIP Enabled State. After the function runs the state transitions to RSIP Enabled State.