RA Flexible Software Package Documentation  Release v5.2.0

 
Secure Key Injection (r_sce_key_injection)

Functions

fsp_err_t R_SCE_AES128_InitialKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_aes_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_AES192_InitialKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_aes_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_AES256_InitialKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_aes_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_KeyUpdateKeyWrap (const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_key_update_key_t *const key_update_key)
 
fsp_err_t R_SCE_AES128_EncryptedKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_aes_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_AES192_EncryptedKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_aes_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_AES256_EncryptedKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_aes_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_RSA2048_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_rsa2048_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_RSA3072_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_rsa3072_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_RSA4096_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_rsa4096_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_RSA2048_InitialPrivateKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_rsa2048_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_RSA2048_EncryptedPublicKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_rsa2048_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_RSA2048_EncryptedPrivateKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_rsa2048_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256r1_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256k1_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp384r1_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256r1_InitialPrivateKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256k1_InitialPrivateKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp384r1_InitialPrivateKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256r1_EncryptedPublicKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256k1_EncryptedPublicKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp384r1_EncryptedPublicKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256r1_EncryptedPrivateKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp256k1_EncryptedPrivateKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_secp384r1_EncryptedPrivateKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP256r1_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP256r1_InitialPrivateKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP384r1_InitialPublicKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP384r1_InitialPrivateKeyWrap (const uint8_t *const key_type, const uint8_t *const wrapped_user_factory_programming_key, const uint8_t *const initial_vector, const uint8_t *const encrypted_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP256r1_EncryptedPublicKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP256r1_EncryptedPrivateKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP384r1_EncryptedPublicKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_public_wrapped_key_t *const wrapped_key)
 
fsp_err_t R_SCE_ECC_brainpoolP384r1_EncryptedPrivateKeyWrap (const uint8_t *const initial_vector, const uint8_t *const encrypted_key, const sce_key_update_key_t *const key_update_key, sce_ecc_private_wrapped_key_t *const wrapped_key)
 

Detailed Description

Driver for the Secure Key Injection on RA MCUs.

Overview

This module provides SCE functions in PSA Crypto.

HW Overview

Crypto Peripheral version Devices
SCE9 RA6M5, RA6M4, RA4M3, RA4M2
SCE7 RA6M3, RA6M2, RA6M1, RA6T1
SCE5 RA4W1, RA4M1
SCE5B RA6T2

Features

The SCE Key Injection Module has two types of APIs, InitialKeyWrap and EncryptedKeyWrap. The available APIs differ depending on used SCE. 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

SCE Key Injection 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 SCE Driver > New > (*1), Add Key Injection for RSA Crypto (Optional) > New > Key Injection for RSA Crypto for PSA Crypto Module after adding MbedTLS. For information on how to import and update secure keys, refer to the Application Note R11AN0496.
(*1)

Crypto Peripheral version String displayed in the Stacks tab
SCE9 SCE Compatibility Mode
SCE7 SCE7
SCE5 SCE5
SCE5B SCE5B

Hardware Initialization

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

Function Documentation

◆ R_SCE_AES128_InitialKeyWrap()

fsp_err_t R_SCE_AES128_InitialKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_aes_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key128-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_AES192_InitialKeyWrap()

fsp_err_t R_SCE_AES192_InitialKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_aes_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key192-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_AES256_InitialKeyWrap()

fsp_err_t R_SCE_AES256_InitialKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_aes_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key256-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_KeyUpdateKeyWrap()

fsp_err_t R_SCE_KeyUpdateKeyWrap ( const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_key_update_key_t *const  key_update_key 
)

This API generates a key update key which is used for functions of the key updating.

Parameters
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]key_update_keyKey update key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_AES128_EncryptedKeyWrap()

fsp_err_t R_SCE_AES128_EncryptedKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_aes_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key128-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_AES192_EncryptedKeyWrap()

fsp_err_t R_SCE_AES192_EncryptedKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_aes_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key192-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_AES256_EncryptedKeyWrap()

fsp_err_t R_SCE_AES256_EncryptedKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_aes_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key256-bit AES wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_RSA2048_InitialPublicKeyWrap()

fsp_err_t R_SCE_RSA2048_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_rsa2048_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key2048-bit RSA wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_RSA3072_InitialPublicKeyWrap()

fsp_err_t R_SCE_RSA3072_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_rsa3072_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key3072-bit RSA wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_RSA4096_InitialPublicKeyWrap()

fsp_err_t R_SCE_RSA4096_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_rsa4096_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key4096-bit RSA wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_RSA2048_InitialPrivateKeyWrap()

fsp_err_t R_SCE_RSA2048_InitialPrivateKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_rsa2048_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key2048-bit RSA wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_RSA2048_EncryptedPublicKeyWrap()

fsp_err_t R_SCE_RSA2048_EncryptedPublicKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_rsa2048_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key2048-bit RSA wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_RSA2048_EncryptedPrivateKeyWrap()

fsp_err_t R_SCE_RSA2048_EncryptedPrivateKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_rsa2048_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key2048-bit RSA wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256r1_InitialPublicKeyWrap()

fsp_err_t R_SCE_ECC_secp256r1_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256k1_InitialPublicKeyWrap()

fsp_err_t R_SCE_ECC_secp256k1_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp384r1_InitialPublicKeyWrap()

fsp_err_t R_SCE_ECC_secp384r1_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key364-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256r1_InitialPrivateKeyWrap()

fsp_err_t R_SCE_ECC_secp256r1_InitialPrivateKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256k1_InitialPrivateKeyWrap()

fsp_err_t R_SCE_ECC_secp256k1_InitialPrivateKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp384r1_InitialPrivateKeyWrap()

fsp_err_t R_SCE_ECC_secp384r1_InitialPrivateKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key384-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256r1_EncryptedPublicKeyWrap()

fsp_err_t R_SCE_ECC_secp256r1_EncryptedPublicKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256k1_EncryptedPublicKeyWrap()

fsp_err_t R_SCE_ECC_secp256k1_EncryptedPublicKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp384r1_EncryptedPublicKeyWrap()

fsp_err_t R_SCE_ECC_secp384r1_EncryptedPublicKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key384-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256r1_EncryptedPrivateKeyWrap()

fsp_err_t R_SCE_ECC_secp256r1_EncryptedPrivateKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp256k1_EncryptedPrivateKeyWrap()

fsp_err_t R_SCE_ECC_secp256k1_EncryptedPrivateKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_secp384r1_EncryptedPrivateKeyWrap()

fsp_err_t R_SCE_ECC_secp384r1_EncryptedPrivateKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key384-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP256r1_InitialPublicKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP256r1_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP256r1_InitialPrivateKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP256r1_InitialPrivateKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP384r1_InitialPublicKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP384r1_InitialPublicKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key364-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP384r1_InitialPrivateKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP384r1_InitialPrivateKeyWrap ( const uint8_t *const  key_type,
const uint8_t *const  wrapped_user_factory_programming_key,
const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

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

Parameters
[in]key_typeSelection key type when generating wrapped key (0: for encrypted key, 1: for plain key)
[in]wrapped_user_factory_programming_keyWrapped user factory programming key by the Renesas Key Wrap Service. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]initial_vectorInitialization vector when generating encrypted_key. When key_type is 1 as plain key, this is not required and any value can be specified.
[in]encrypted_keyEncrypted user key and MAC appended
[in,out]wrapped_key384-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP256r1_EncryptedPublicKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP256r1_EncryptedPublicKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

This API wraps 256-bit Brainpool ECC key within the user routine.

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP256r1_EncryptedPrivateKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP256r1_EncryptedPrivateKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

This API wraps 256-bit Brainpool ECC key within the user routine.

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key256-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP384r1_EncryptedPublicKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP384r1_EncryptedPublicKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_public_wrapped_key_t *const  wrapped_key 
)

This API wraps 384-bit Brainpool ECC key within the user routine.

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key384-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.

◆ R_SCE_ECC_brainpoolP384r1_EncryptedPrivateKeyWrap()

fsp_err_t R_SCE_ECC_brainpoolP384r1_EncryptedPrivateKeyWrap ( const uint8_t *const  initial_vector,
const uint8_t *const  encrypted_key,
const sce_key_update_key_t *const  key_update_key,
sce_ecc_private_wrapped_key_t *const  wrapped_key 
)

This API wraps 384-bit Brainpool ECC key within the user routine.

Parameters
[in]initial_vectorInitialization vector when generating encrypted_key
[in]encrypted_keyUser key encryptedand MAC appended
[in]key_update_keyKey update keyring
[in,out]wrapped_key384-bit ECC wrapped key
Return values
FSP_SUCCESSNormal termination.
FSP_ERR_UNSUPPORTEDAPI not supported.
Returns
If an error occurs, the return value will be as follows.
  • FSP_ERR_CRYPTO_SCE_FAIL Internal I/O buffer is not empty.
  • FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT A resource conflict occurred because a hardware resource needed.
Note
The pre-run state is SCE Enabled State. After the function runs the state transitions to SCE Enabled State.