![]() |
RA Flexible Software Package Documentation
Release v5.9.0
|
|
Functions | |
fsp_err_t | R_RSIP_Open (rsip_ctrl_t *const p_ctrl, rsip_cfg_t const *const p_cfg) |
fsp_err_t | R_RSIP_Close (rsip_ctrl_t *const p_ctrl) |
fsp_err_t | R_RSIP_RandomNumberGenerate (rsip_ctrl_t *const p_ctrl, uint8_t *const p_random) |
fsp_err_t | R_RSIP_KeyGenerate (rsip_ctrl_t *const p_ctrl, rsip_key_type_t const key_type, rsip_wrapped_key_t *const p_wrapped_key) |
fsp_err_t | R_RSIP_KeyPairGenerate (rsip_ctrl_t *const p_ctrl, rsip_key_pair_type_t const key_pair_type, rsip_wrapped_key_t *const p_wrapped_public_key, rsip_wrapped_key_t *const p_wrapped_private_key) |
fsp_err_t | R_RSIP_EncryptedKeyWrap (rsip_ctrl_t *const p_ctrl, rsip_key_update_key_t const *const p_key_update_key, uint8_t const *const p_initial_vector, rsip_key_type_t const key_type, uint8_t const *const p_encrypted_key, rsip_wrapped_key_t *const p_wrapped_key) |
fsp_err_t | R_RSIP_RFC3394_KeyWrap (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_kek, rsip_wrapped_key_t const *const p_wrapped_target_key, uint8_t *const p_rfc3394_wrapped_target_key) |
fsp_err_t | R_RSIP_RFC3394_KeyUnwrap (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_kek, rsip_key_type_t const key_type, uint8_t const *const p_rfc3394_wrapped_target_key, rsip_wrapped_key_t *const p_wrapped_target_key) |
fsp_err_t | R_RSIP_InjectedKeyImport (rsip_key_type_t const key_type, uint8_t const *const p_injected_key, rsip_wrapped_key_t *const p_wrapped_key, uint32_t const wrapped_key_buffer_length) |
fsp_err_t | R_RSIP_PublicKeyExport (rsip_wrapped_key_t const *const p_wrapped_public_key, uint8_t *const p_raw_public_key) |
fsp_err_t | R_RSIP_AES_Cipher_Init (rsip_ctrl_t *const p_ctrl, rsip_aes_cipher_mode_t const mode, rsip_wrapped_key_t const *const p_wrapped_key, uint8_t const *const p_initial_vector) |
fsp_err_t | R_RSIP_AES_Cipher_Update (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_input, uint8_t *const p_output, uint32_t const length) |
fsp_err_t | R_RSIP_AES_Cipher_Finish (rsip_ctrl_t *const p_ctrl) |
fsp_err_t | R_RSIP_AES_AEAD_Init (rsip_ctrl_t *const p_ctrl, rsip_aes_aead_mode_t mode, rsip_wrapped_key_t const *const p_wrapped_key, uint8_t const *const p_nonce, uint32_t const nonce_length) |
fsp_err_t | R_RSIP_AES_AEAD_LengthsSet (rsip_ctrl_t *const p_ctrl, uint32_t const total_aad_length, uint32_t const total_text_length, uint32_t const tag_length) |
fsp_err_t | R_RSIP_AES_AEAD_AADUpdate (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_aad, uint32_t const aad_length) |
fsp_err_t | R_RSIP_AES_AEAD_Update (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_input, uint32_t const input_length, uint8_t *const p_output, uint32_t *const p_output_length) |
fsp_err_t | R_RSIP_AES_AEAD_Finish (rsip_ctrl_t *const p_ctrl, uint8_t *const p_output, uint32_t *const p_output_length, uint8_t *const p_tag) |
fsp_err_t | R_RSIP_AES_AEAD_Verify (rsip_ctrl_t *const p_ctrl, uint8_t *const p_output, uint32_t *const p_output_length, uint8_t const *const p_tag, uint32_t const tag_length) |
fsp_err_t | R_RSIP_AES_MAC_Init (rsip_ctrl_t *const p_ctrl, rsip_aes_mac_mode_t const mode, rsip_wrapped_key_t const *const p_wrapped_key) |
fsp_err_t | R_RSIP_AES_MAC_Update (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_message, uint32_t const message_length) |
fsp_err_t | R_RSIP_AES_MAC_SignFinish (rsip_ctrl_t *const p_ctrl, uint8_t *const p_mac) |
fsp_err_t | R_RSIP_AES_MAC_VerifyFinish (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_mac, uint32_t const mac_length) |
fsp_err_t | R_RSIP_ECDSA_Sign (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, uint8_t const *const p_hash, uint8_t *const p_signature) |
fsp_err_t | R_RSIP_ECDSA_Verify (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, uint8_t const *const p_hash, uint8_t const *const p_signature) |
fsp_err_t | R_RSIP_PKI_ECDSA_CertVerify (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, uint8_t const *const p_hash, uint8_t const *const p_signature) |
fsp_err_t | R_RSIP_ECDH_KeyAgree (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, rsip_wrapped_key_t const *const p_wrapped_public_key, rsip_wrapped_secret_t *const p_wrapped_secret) |
fsp_err_t | R_RSIP_ECDH_PlainKeyAgree (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, uint8_t const *const p_plain_public_key, rsip_wrapped_secret_t *const p_wrapped_secret) |
fsp_err_t | R_RSIP_PureEdDSA_Sign (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, rsip_wrapped_key_t const *const p_wrapped_public_key, uint8_t const *const p_message, uint64_t const message_length, uint8_t *const p_signature) |
fsp_err_t | R_RSIP_PureEdDSA_Verify (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, uint8_t const *const p_message, uint64_t const message_length, uint8_t const *const p_signature) |
fsp_err_t | R_RSIP_KDF_SHA_Init (rsip_ctrl_t *const p_ctrl, rsip_hash_type_t const hash_type) |
fsp_err_t | R_RSIP_KDF_SHA_ECDHSecretUpdate (rsip_ctrl_t *const p_ctrl, rsip_wrapped_secret_t const *const p_wrapped_secret) |
fsp_err_t | R_RSIP_KDF_SHA_Update (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_message, uint32_t const message_length) |
fsp_err_t | R_RSIP_KDF_SHA_Finish (rsip_ctrl_t *const p_ctrl, rsip_wrapped_dkm_t *const p_wrapped_dkm) |
fsp_err_t | R_RSIP_KDF_SHA_Suspend (rsip_ctrl_t *const p_ctrl, rsip_kdf_sha_handle_t *const p_handle) |
fsp_err_t | R_RSIP_KDF_SHA_Resume (rsip_ctrl_t *const p_ctrl, rsip_kdf_sha_handle_t const *const p_handle) |
fsp_err_t | R_RSIP_KDF_SHA_DKMConcatenate (rsip_wrapped_dkm_t *const p_wrapped_dkm1, rsip_wrapped_dkm_t const *const p_wrapped_dkm2, uint32_t const wrapped_dkm1_buffer_length) |
fsp_err_t | R_RSIP_KDF_SHA_DerivedKeyImport (rsip_ctrl_t *const p_ctrl, rsip_wrapped_dkm_t const *const p_wrapped_dkm, rsip_key_type_t const key_type, uint32_t const position, rsip_wrapped_key_t *const p_wrapped_key) |
fsp_err_t | R_RSIP_KDF_SHA_DerivedIVWrap (rsip_ctrl_t *const p_ctrl, rsip_wrapped_dkm_t const *const p_wrapped_dkm, rsip_initial_vector_type_t const initial_vector_type, uint32_t const position, uint8_t const *const p_tls_sequence_num, uint8_t *const p_wrapped_initial_vector) |
fsp_err_t | R_RSIP_KDF_MACKeyImport (rsip_ctrl_t *const p_ctrl, rsip_key_type_t const key_type, rsip_wrapped_mac_t const *const p_wrapped_mac, uint32_t const key_length, rsip_wrapped_key_t *const p_wrapped_key) |
fsp_err_t | R_RSIP_KDF_ECDHSecretKeyImport (rsip_ctrl_t *const p_ctrl, rsip_key_type_t const key_type, rsip_wrapped_secret_t const *const p_wrapped_secret, rsip_wrapped_key_t *const p_wrapped_key) |
fsp_err_t | R_RSIP_KDF_HMAC_Init (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_key) |
fsp_err_t | R_RSIP_KDF_HMAC_MACUpdate (rsip_ctrl_t *const p_ctrl, rsip_wrapped_mac_t const *const p_wrapped_mac) |
fsp_err_t | R_RSIP_KDF_HMAC_ECDHSecretUpdate (rsip_ctrl_t *const p_ctrl, rsip_wrapped_secret_t const *const p_wrapped_secret) |
fsp_err_t | R_RSIP_KDF_HMAC_Update (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_message, uint32_t const message_length) |
fsp_err_t | R_RSIP_KDF_HMAC_SignFinish (rsip_ctrl_t *const p_ctrl, rsip_wrapped_mac_t *const p_wrapped_mac) |
fsp_err_t | R_RSIP_KDF_HMAC_Suspend (rsip_ctrl_t *const p_ctrl, rsip_kdf_hmac_handle_t *const p_handle) |
fsp_err_t | R_RSIP_KDF_HMAC_Resume (rsip_ctrl_t *const p_ctrl, rsip_kdf_hmac_handle_t const *const p_handle) |
fsp_err_t | R_RSIP_KDF_MACConcatenate (rsip_wrapped_mac_t *const p_wrapped_mac1, rsip_wrapped_mac_t const *const p_wrapped_mac2, uint32_t const wrapped_mac1_buffer_length) |
fsp_err_t | R_RSIP_KDF_DerivedKeyImport (rsip_ctrl_t *const p_ctrl, rsip_wrapped_mac_t const *const p_wrapped_mac, rsip_key_type_t const key_type, uint32_t const position, rsip_wrapped_key_t *const p_wrapped_key) |
fsp_err_t | R_RSIP_KDF_DerivedIVWrap (rsip_ctrl_t *const p_ctrl, rsip_wrapped_mac_t const *const p_wrapped_mac, rsip_initial_vector_type_t const initial_vector_type, uint32_t const position, uint8_t const *const p_tls_sequence_num, uint8_t *const p_wrapped_initial_vector) |
fsp_err_t | R_RSIP_OTF_Init (rsip_ctrl_t *const p_ctrl, rsip_otf_channel_t const channel, rsip_wrapped_key_t *const p_wrapped_key, uint8_t const *const p_seed) |
fsp_err_t | R_RSIP_PKI_VerifiedCertInfoExport (rsip_ctrl_t *const p_ctrl, rsip_verified_cert_info_t *const p_verified_cert_info) |
fsp_err_t | R_RSIP_PKI_VerifiedCertInfoImport (rsip_ctrl_t *const p_ctrl, rsip_verified_cert_info_t const *const p_verified_cert_info) |
fsp_err_t | R_RSIP_PKI_CertKeyImport (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_cert, uint32_t const cert_length, rsip_key_type_t const key_type, uint8_t const *const p_key_param1, uint32_t const key_param1_length, uint8_t const *const p_key_param2, uint32_t const key_param2_length, rsip_hash_type_t const hash_function, rsip_wrapped_key_t *const p_wrapped_public_key) |
fsp_err_t | R_RSIP_RSA_Encrypt (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, uint8_t const *const p_plain, uint8_t *const p_cipher) |
fsp_err_t | R_RSIP_RSA_Decrypt (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, uint8_t const *const p_cipher, uint8_t *const p_plain) |
fsp_err_t | R_RSIP_RSAES_PKCS1_V1_5_Encrypt (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, uint8_t const *const p_plain, uint32_t const plain_length, uint8_t *const p_cipher) |
fsp_err_t | R_RSIP_RSAES_PKCS1_V1_5_Decrypt (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, uint8_t const *const p_cipher, uint8_t *const p_plain, uint32_t *const p_plain_length, uint32_t const plain_buffer_length) |
fsp_err_t | R_RSIP_RSAES_OAEP_Encrypt (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, rsip_hash_type_t const hash_function, rsip_mgf_type_t const mask_generation_function, uint8_t const *const p_label, uint32_t const label_length, uint8_t const *const p_plain, uint32_t const plain_length, uint8_t *const p_cipher) |
fsp_err_t | R_RSIP_RSAES_OAEP_Decrypt (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, rsip_hash_type_t const hash_function, rsip_mgf_type_t const mask_generation_function, uint8_t const *const p_label, uint32_t const label_length, uint8_t const *const p_cipher, uint8_t *const p_plain, uint32_t *const p_plain_length, uint32_t const plain_buffer_length) |
fsp_err_t | R_RSIP_RSASSA_PKCS1_V1_5_Sign (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, rsip_hash_type_t const hash_function, uint8_t const *const p_hash, uint8_t *const p_signature) |
fsp_err_t | R_RSIP_RSASSA_PKCS1_V1_5_Verify (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, rsip_hash_type_t const hash_function, uint8_t const *const p_hash, uint8_t const *const p_signature) |
fsp_err_t | R_RSIP_RSASSA_PSS_Sign (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_private_key, rsip_hash_type_t const hash_function, rsip_mgf_type_t const mask_generation_function, uint32_t const salt_length, uint8_t const *const p_hash, uint8_t *const p_signature) |
fsp_err_t | R_RSIP_RSASSA_PSS_Verify (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_public_key, rsip_hash_type_t const hash_function, rsip_mgf_type_t const mask_generation_function, uint32_t const salt_length, uint8_t const *const p_hash, uint8_t const *const p_signature) |
fsp_err_t | R_RSIP_SHA_Compute (rsip_ctrl_t *const p_ctrl, rsip_hash_type_t const hash_type, uint8_t const *const p_message, uint32_t const message_length, uint8_t *const p_digest) |
fsp_err_t | R_RSIP_SHA_Init (rsip_ctrl_t *const p_ctrl, rsip_hash_type_t const hash_type) |
fsp_err_t | R_RSIP_SHA_Update (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_message, uint32_t const message_length) |
fsp_err_t | R_RSIP_SHA_Finish (rsip_ctrl_t *const p_ctrl, uint8_t *const p_digest) |
fsp_err_t | R_RSIP_SHA_Suspend (rsip_ctrl_t *const p_ctrl, rsip_sha_handle_t *const p_handle) |
fsp_err_t | R_RSIP_SHA_Resume (rsip_ctrl_t *const p_ctrl, rsip_sha_handle_t const *const p_handle) |
fsp_err_t | R_RSIP_HMAC_Compute (rsip_ctrl_t *const p_ctrl, const rsip_wrapped_key_t *p_wrapped_key, uint8_t const *const p_message, uint32_t const message_length, uint8_t *const p_mac) |
fsp_err_t | R_RSIP_HMAC_Verify (rsip_ctrl_t *const p_ctrl, const rsip_wrapped_key_t *p_wrapped_key, uint8_t const *const p_message, uint32_t const message_length, uint8_t const *const p_mac, uint32_t const mac_length) |
fsp_err_t | R_RSIP_HMAC_Init (rsip_ctrl_t *const p_ctrl, rsip_wrapped_key_t const *const p_wrapped_key) |
fsp_err_t | R_RSIP_HMAC_Update (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_message, uint32_t const message_length) |
fsp_err_t | R_RSIP_HMAC_SignFinish (rsip_ctrl_t *const p_ctrl, uint8_t *const p_mac) |
fsp_err_t | R_RSIP_HMAC_VerifyFinish (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_mac, uint32_t const mac_length) |
fsp_err_t | R_RSIP_HMAC_Suspend (rsip_ctrl_t *const p_ctrl, rsip_hmac_handle_t *const p_handle) |
fsp_err_t | R_RSIP_HMAC_Resume (rsip_ctrl_t *const p_ctrl, rsip_hmac_handle_t const *const p_handle) |
fsp_err_t | R_RSIP_FSBL_OEM_BL_Digest_Generate (rsip_ctrl_t *const p_ctrl, uint8_t const *const p_key_cert, uint32_t const key_cert_max_length, uint8_t const *const p_code_cert, uint32_t const code_cert_max_length, uint32_t *const p_mac) |
Driver for the Renesas Secure IP on RA MPUs. This module implements the RSIP Interface.
This module provides RSIP functions in protected mode.
Crypto Peripheral version | Devices |
---|---|
RSIP-E11A | RA4L1 |
RSIP-E51A | RA8M1, RA8D1, RA8T1 |
The RSIP module supports for the following features.
The following algorithms are available on each devices.
Key type (rsip_key_type_t) | RSIP-E11A | RSIP-E51A |
---|---|---|
RSIP_KEY_TYPE_AES_128 | Supported | Supported |
RSIP_KEY_TYPE_AES_192 | Not Supported | Supported |
RSIP_KEY_TYPE_AES_256 | Supported | Supported |
RSIP_KEY_TYPE_XTS_AES_128 | Not Supported | Supported |
RSIP_KEY_TYPE_XTS_AES_256 | Not Supported | Supported |
RSIP_KEY_TYPE_HMAC_SHA224 | Supported | Supported |
RSIP_KEY_TYPE_HMAC_SHA256 | Supported | Supported |
RSIP_KEY_TYPE_HMAC_SHA384 | Not Supported | Supported |
RSIP_KEY_TYPE_HMAC_SHA512 | Not Supported | Supported |
Cipher mode (rsip_aes_cipher_mode_t) | RSIP-E11A | RSIP-E51A |
---|---|---|
RSIP_AES_CIPHER_MODE_ECB_ENC | Supported | Supported |
RSIP_AES_CIPHER_MODE_ECB_DEC | Supported | Supported |
RSIP_AES_CIPHER_MODE_CBC_ENC | Supported | Supported |
RSIP_AES_CIPHER_MODE_CBC_DEC | Supported | Supported |
RSIP_AES_CIPHER_MODE_CTR | Supported | Supported |
RSIP_AES_CIPHER_MODE_XTS_ENC | Not Supported | Supported |
RSIP_AES_CIPHER_MODE_XTS_DEC | Not Supported | Supported |
AEAD mode (rsip_aes_aead_mode_t) | RSIP-E11A | RSIP-E51A |
---|---|---|
RSIP_AES_AEAD_MODE_GCM_ENC | Supported | Supported |
RSIP_AES_AEAD_MODE_GCM_DEC | Supported | Supported |
RSIP_AES_AEAD_MODE_CCM_ENC | Supported | Supported |
RSIP_AES_AEAD_MODE_CCM_DEC | Supported | Supported |
MAC mode (rsip_aes_mac_mode_t) | RSIP-E11A | RSIP-E51A |
---|---|---|
RSIP_AES_MAC_MODE_CMAC | Supported | Supported |
Hash Function (rsip_hash_type_t) | RSIP-E11A | RSIP-E51A |
---|---|---|
RSIP_HASH_TYPE_SHA224 | Supported | Supported |
RSIP_HASH_TYPE_SHA256 | Supported | Supported |
RSIP_HASH_TYPE_SHA384 | Not Supported | Supported |
RSIP_HASH_TYPE_SHA512 | Not Supported | Supported |
RSIP_HASH_TYPE_SHA512_224 | Not Supported | Supported |
RSIP_HASH_TYPE_SHA512_256 | Not Supported | Supported |
Key Derivation Function | RSIP-E11A | RSIP-E51A |
---|---|---|
SHA-256 | Supported | Not Supported |
HMAC-SHA256 | Not Supported | Supported |
HMAC-SHA384 | Not Supported | Supported |
HMAC-SHA384 | Not Supported | Supported |
Configuration | Options | Default | Description |
---|---|---|---|
Selection of algorithms to enable | |||
AES-128 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-192 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-ECB CBC CTR |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
XTS-AES-128 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
XTS-AES-256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
XTS-AES |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-GCM |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-CCM |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-CMAC | Enabled | Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP256R1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP384R1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP521R1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP256K1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC BRAINPOOLP256R1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC BRAINPOOLP384R1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC BRAINPOOLP512R1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC EDWARDS25519 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
RSA-2048 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
RSA-3072 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
RSA-4096 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-224 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-384 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-512 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-512_224 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-512_256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA224 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA384 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA512 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
Configuration | Options | Default | Description |
---|---|---|---|
Selection of algorithms to enable | |||
AES-128 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-192 | Disabled | config.driver.rsip.algorithms_enable.aes192.disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-ECB CBC CTR |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
XTS-AES-128 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
XTS-AES-256 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
XTS-AES | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-GCM |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-CCM |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
AES-CMAC | Enabled | Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP256R1 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP384R1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP521R1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC SECP256K1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC BRAINPOOLP256R1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC BRAINPOOLP384R1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC BRAINPOOLP512R1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
ECC EDWARDS25519 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
RSA-2048 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
RSA-3072 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
RSA-4096 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-224 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-384 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-512 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-512_224 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
SHA-512_256 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA1 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA224 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA256 |
| Enabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA384 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
HMAC_SHA512 | Disabled | Disabled | If the application uses only some of the algorithm in the function, the code size can be reduced by disabling the unused algorithms. This configuration is provided only for the functions for which it works effectively. |
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
Configuration | Options | Default | Description |
---|---|---|---|
General | |||
Name | Name must be a valid C symbol | g_rsip | Module name. |
This module does not require a specific clock configuration.
This module does not use I/O pins.
Start by creating a new project in e² studio or RASC. On the Stacks tab, add New > Security > RSIP Protected Mode (r_rsip_protected).
This driver has the following states.
State Name | Details |
---|---|
STATE_INITIAL | Driver is not open. |
STATE_MAIN | Ready to Compute. |
STATE_AES | Computing AES (unauthenticated cipher) |
STATE_AES_AEAD | Computing AES (AEAD). |
STATE_AES_MAC | Computing AES (MAC). |
STATE_SHA | Computing SHA. |
STATE_HMAC | Computing HMAC. |
STATE_KDF_SHA | Computing KDF SHA. |
STATE_KDF_HMAC | Computing KDF HMAC. |
There are two types of APIs provided by the RSIP driver for accelerating cryptographic operations: those that provide cryptographic operations in a single API and those that provide them in multiple APIs. In this document, the former is referred to as single-part operations and the latter as multi-part operations. Each corresponds to the following algorithms:
Multi-part operations are APIs which split a single cryptographic operation into a sequence of separate steps (e.g. Init-Update-Finish). This enables fine control over the configuration of the cryptographic operation, and allows the message data to be processed in fragments instead of all at once.
Due to the above characteristics, it is necessary to manage the operational states in the multi-part operations.
This is an example of AES-CBC encryption/decryption.
This is an example of AES-GCM encryption/decryption.
This is an example of AES-GMAC signature/verification.
This is an example of AES-CCM encryption/decryption.
This is an example of AES-CMAC signature/verification.
This is an example of ECDSA signature generation/verification.
This is an example of RSA encryption/decryption (RSAES-OAEP) and RSA signature generation/verification (RSASSA-PSS).
This is an example of calculating the SHA-256 message digest.
This is an example of HMAC signature/verification.
Data Structures | |
struct | rsip_instance_ctrl_t |
Macros | |
#define | FSP_ERR_SB_INTERNAL_FAIL |
An internal failure. | |
#define | FSP_ERR_SB_INVALID_ARG |
An invalid argument was entered. | |
#define | FSP_ERR_SB_UNSUPPORTED_FUNCTION |
Unsupported function executed. | |
#define | FSP_ERR_SB_INVALID_ALIGNMENT |
Data entered with incorrect alignment. | |
#define | FSP_ERR_SB_SAME_IMAGE_VERSION |
Same image version. | |
#define | FSP_ERR_SB_LOWER_IMAGE_VERSION |
Lower image version. | |
#define | FSP_ERR_SB_MANI_INVALID_MAGIC |
An invalid magic number is set. | |
#define | FSP_ERR_SB_MANI_UNSUPPORTED_VERSION |
Unsupported version is set. | |
#define | FSP_ERR_SB_MANI_OUT_OF_RANGE_LEN |
Out of range TLV Length is set. | |
#define | FSP_ERR_SB_MANI_TLV_FIELD_ERR |
Missing required TLV field. | |
#define | FSP_ERR_SB_MANI_TLV_INVALID_LEN |
The length exceeding the end of the manifest is specified in length of the TLV field. | |
#define | FSP_ERR_SB_MANI_INVALID_IMAGE_LEN |
An invalid image length is set. | |
#define | FSP_ERR_SB_MANI_MISMATCH_SIGN_ALGORITHM |
There is a wrong combination of signature algorithms. | |
#define | FSP_ERR_SB_MANI_UNSUPPORTED_ALGORITHM |
An algorithm was specified that the manifest does not support. | |
#define | FSP_ERR_SB_CRYPTO_FAIL |
Cryptographic processing failure. | |
#define | FSP_ERR_SB_CRYPTO_AUTH_FAIL |
Verification failed. | |
#define | FSP_ERR_SB_CRYPTO_UNSUPPORTED_ALGORITHM |
Unsupported algorithm. | |
#define | FSP_ERR_SB_CRYPTO_RESOURCE_CONFLICT |
CryptoIP is in use. | |
#define | FSP_ERR_SB_CRYPTO_PARAM_ERR |
Parameter error. | |
struct rsip_instance_ctrl_t |
RSIP private control block. DO NOT MODIFY. Initialization occurs when R_RSIP_Open() is called.
fsp_err_t R_RSIP_Open | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_cfg_t const *const | p_cfg | ||
) |
Enables use of Renesas Secure IP functionality.
Implements rsip_api_t::open.
This API can only be executed in STATE_INITIAL, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_ALREADY_OPEN | Module is already open. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Internal key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Hardware initialization is failed. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption or hardware fault is detected. |
fsp_err_t R_RSIP_Close | ( | rsip_ctrl_t *const | p_ctrl | ) |
Disables use of Renesas Secure IP functionality.
Implements rsip_api_t::close.
This API can be executed in except STATE_INITIAL, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_INITIAL |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RandomNumberGenerate | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t *const | p_random | ||
) |
Generates a 128-bit random number.
Implements rsip_api_t::randomNumberGenerate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KeyGenerate | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_key_type_t const | key_type, | ||
rsip_wrapped_key_t *const | p_wrapped_key | ||
) |
Generates a wrapped symmetric key from a random number. In this API, user key input is unnecessary. By encrypting data using the wrapped key is output by this API, dead copying of data can be prevented.
Implements rsip_api_t::keyGenerate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KeyPairGenerate | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_key_pair_type_t const | key_pair_type, | ||
rsip_wrapped_key_t *const | p_wrapped_public_key, | ||
rsip_wrapped_key_t *const | p_wrapped_private_key | ||
) |
Generates a wrapped asymmetric key pair from a random number. In this API, user key input is unnecessary. By encrypting data using the wrapped key is output by this API, dead copying of data can be prevented.
Implements rsip_api_t::keyPairGenerate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_EncryptedKeyWrap | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_key_update_key_t const *const | p_key_update_key, | ||
uint8_t const *const | p_initial_vector, | ||
rsip_key_type_t const | key_type, | ||
uint8_t const *const | p_encrypted_key, | ||
rsip_wrapped_key_t *const | p_wrapped_key | ||
) |
Decrypts an encrypted user key with Key Update Key (KUK) and wrap it with the Hardware Unique Key (HUK).
Implements rsip_api_t::encryptedKeyWrap.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RFC3394_KeyWrap | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_kek, | ||
rsip_wrapped_key_t const *const | p_wrapped_target_key, | ||
uint8_t *const | p_rfc3394_wrapped_target_key | ||
) |
This function provides Key Wrap algorithm compliant with RFC3394. Using p_wrapped_kek to wrap p_wrapped_target_key, and output the result to p_rfc3394_wrapped_target_key.
Implements rsip_api_t::rfc3394_KeyWrap.
<Usage Precautions>
Key Type of p_wrapped_kek | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
Key Type of p_wrapped_target_key | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
<Operational State>
This API can only be executed in the STATE_MAIN, and there are no state transitions.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type or mode is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
This function provides Key Wrap algorithm compliant with RFC3394. Using p_wrapped_kek to wrap p_wrapped_target_key, and output the result to p_rfc3394_wrapped_target_key.
Implements rsip_api_t::rfc3394_KeyWrap.
<Usage Precautions>
Key Type of p_wrapped_kek | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
Key Type of p_wrapped_target_key | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
<Operational State>
This API can only be executed in the STATE_MAIN, and there are no state transitions.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type or mode is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RFC3394_KeyUnwrap | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_kek, | ||
rsip_key_type_t const | key_type, | ||
uint8_t const *const | p_rfc3394_wrapped_target_key, | ||
rsip_wrapped_key_t *const | p_wrapped_target_key | ||
) |
This function provides Key Unwrap algorithm compliant with RFC3394. Using p_wrapped_kek to unwrap p_rfc3394_wrapped_target_key, and output the result to p_wrapped_target_key.
Implements rsip_api_t::rfc3394_KeyUnwrap.
<Usage Precautions>
Key Type of p_wrapped_kek | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
Key Type of p_rfc3394_wrapped_target_key | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
<Operational State>
This API can only be executed in the STATE_MAIN, and there are no state transitions.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type or mode is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
This function provides Key Unwrap algorithm compliant with RFC3394. Using p_wrapped_kek to unwrap p_rfc3394_wrapped_target_key, and output the result to p_wrapped_target_key.
Implements rsip_api_t::rfc3394_KeyUnwrap.
<Usage Precautions>
Key Type of p_wrapped_kek | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
Key Type of p_rfc3394_wrapped_target_key | Corresponding Parameter |
---|---|
AES-128 | RSIP_KEY_TYPE_AES_128 |
AES-256 | RSIP_KEY_TYPE_AES_256 |
<Operational State>
This API can only be executed in the STATE_MAIN, and there are no state transitions.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type or mode is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_InjectedKeyImport | ( | rsip_key_type_t const | key_type, |
uint8_t const *const | p_injected_key, | ||
rsip_wrapped_key_t *const | p_wrapped_key, | ||
uint32_t const | wrapped_key_buffer_length | ||
) |
Generates structure data "rsip_wrapped_key_t" from injected key value. Refer "Key Size Table" for supported key types.
Implements rsip_api_t::injectedKeyImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_UNSUPPORTED | Selected key type is not supported. |
FSP_ERR_INVALID_SIZE | Buffer length is too short. |
fsp_err_t R_RSIP_PublicKeyExport | ( | rsip_wrapped_key_t const *const | p_wrapped_public_key, |
uint8_t *const | p_raw_public_key | ||
) |
Exports public key parameters from a wrapped key.
Implements rsip_api_t::publicKeyExport.
Relative position of each elements in p_raw_public_key is shown in below:
bit length | Qx | Qy |
---|---|---|
256 | 0 | 32 |
384 | 0 | 48 |
512 | 0 | 64 |
521 | 0 | 66 |
modulus | n | e |
---|---|---|
1024 | 0 | 128 |
2048 | 0 | 256 |
3072 | 0 | 384 |
4096 | 0 | 512 |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
fsp_err_t R_RSIP_AES_Cipher_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_aes_cipher_mode_t const | mode, | ||
rsip_wrapped_key_t const *const | p_wrapped_key, | ||
uint8_t const *const | p_initial_vector | ||
) |
Starts AES cipher operation in confidentiality mode (ECB/CBC/CTR) or XTS mode.
Implements rsip_api_t::aesCipherInit.
Key type of p_wrapped_key must be one of the following:
Argument mode must be the following:
Argument p_initial_vector must be the following:
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_AES |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type or mode is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
Starts AES cipher operation in confidentiality mode (ECB/CBC/CTR) or XTS mode.
Implements rsip_api_t::aesCipherInit.
Key type of p_wrapped_key must be one of the following:
Argument mode must be the following:
Argument p_initial_vector must be the following:
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_AES |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type or mode is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_Cipher_Update | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_input, | ||
uint8_t *const | p_output, | ||
uint32_t const | length | ||
) |
Encrypts plaintext or decrypts ciphertext.
Implements rsip_api_t::aesCipherUpdate.
length
.This API can only be executed in STATE_AES, and does not cause any state transitions.
In XTS mode, if once an integer other than 0 or a multiple of 16 is input, this API can no longer be called.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | Input length is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Internal error. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_Cipher_Finish | ( | rsip_ctrl_t *const | p_ctrl | ) |
Finishes AES operation.
Implements rsip_api_t::aesCipherFinish.
This API can only be executed in STATE_AES, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Internal error. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_AEAD_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_aes_aead_mode_t | mode, | ||
rsip_wrapped_key_t const *const | p_wrapped_key, | ||
uint8_t const *const | p_nonce, | ||
uint32_t const | nonce_length | ||
) |
Starts AES AEAD function.
Implements rsip_api_t::aesAeadInit.
Key type of p_wrapped_key must be one of the following:
Argument mode accepts any member of enumeration rsip_aes_aead_mode_t.
Argument nonce_length must be the following:
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_AES_AEAD |
Others | No change |
The next callable API functions in STATE_AES_AEAD are as below.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | nonce_length is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
Starts AES AEAD function.
Implements rsip_api_t::aesAeadInit.
Key type of p_wrapped_key must be one of the following:
Argument mode accepts any member of enumeration rsip_aes_aead_mode_t.
Argument nonce_length must be the following:
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_AES_AEAD |
Others | No change |
The next callable API functions in STATE_AES_AEAD are as below.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | nonce_length is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_ARGUMENT | Input key type is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_AEAD_LengthsSet | ( | rsip_ctrl_t *const | p_ctrl, |
uint32_t const | total_aad_length, | ||
uint32_t const | total_text_length, | ||
uint32_t const | tag_length | ||
) |
Sets text and tag lengths for CCM mode.
Implements rsip_api_t::aesAeadLengthsSet.
Argument total_aad_length must be equal to the length of AAD and must be 110 or less.
Argument total_test_length must be equal to the length of the plaintext or ciphertext.
Argument tag_length must be 4, 6, 8, 10, 12, 14, or 16.
This API can only be executed in STATE_AES_AEAD, and does not cause any state transitions.
The next callable API functions in STATE_AES_AEAD are as below.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_SIZE | Input length is illegal. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
fsp_err_t R_RSIP_AES_AEAD_AADUpdate | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_aad, | ||
uint32_t const | aad_length | ||
) |
Inputs Additional Authentication Data (AAD).
Implements rsip_api_t::aesAeadAadUpdate.
This API can only be executed in STATE_AES_AEAD, and does not cause any state transitions.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | aad_length is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_CRYPTO_RSIP_FAIL | Internal error. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
fsp_err_t R_RSIP_AES_AEAD_Update | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_input, | ||
uint32_t const | input_length, | ||
uint8_t *const | p_output, | ||
uint32_t *const | p_output_length | ||
) |
Encrypts plaintext or decrypts ciphertext.
Implements rsip_api_t::aesAeadUpdate.
This API can only be executed in STATE_AES_AEAD, and does not cause any state transitions.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_SIZE | Input length is illegal. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
fsp_err_t R_RSIP_AES_AEAD_Finish | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t *const | p_output, | ||
uint32_t *const | p_output_length, | ||
uint8_t *const | p_tag | ||
) |
Finalizes an AES AEAD encryption.
Implements rsip_api_t::aesAeadFinish.
Output length to p_output (p_output_length) is the remaining calculated text length.
Output length to p_tag as below.
This API can only be executed in STATE_AES_AEAD, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Internal error. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_AEAD_Verify | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t *const | p_output, | ||
uint32_t *const | p_output_length, | ||
uint8_t const *const | p_tag, | ||
uint32_t const | tag_length | ||
) |
Finalizes an AES AEAD decryption.
If there is 16-byte fractional data indicated by the total data length of the value of p_cipher that was input by R_RSIP_AES_GCM_DecryptUpdate(), this API will output the result of decrypting that fractional data to p_cipher. Here, the portion that does not reach 16 bytes will be padded with zeros.
Implements rsip_api_t::aesAeadVerify.
This API can only be executed in STATE_AES_AEAD, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | tag_length is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Internal error. |
FSP_ERR_CRYPTO_RSIP_AUTHENTICATION | Authentication is failed. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_MAC_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_aes_mac_mode_t const | mode, | ||
rsip_wrapped_key_t const *const | p_wrapped_key | ||
) |
Starts an AES MAC operation.
Implements rsip_api_t::aesMacInit.
Key type of p_wrapped_key must be one of the following:
Argument mode accepts any member of enumeration rsip_aes_aead_mode_t.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_AES_MAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
Starts an AES MAC operation.
Implements rsip_api_t::aesMacInit.
Key type of p_wrapped_key must be one of the following:
Argument mode accepts any member of enumeration rsip_aes_aead_mode_t.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_AES_MAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_MAC_Update | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_message, | ||
uint32_t const | message_length | ||
) |
Inputs message.
Implements rsip_api_t::aesMacUpdate.
Inside this function, the data that is input by the user is buffered until the input value of p_message exceeds 16 bytes. If the input value, p_message, is not a multiple of 16 bytes, it will be padded within the function.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
fsp_err_t R_RSIP_AES_MAC_SignFinish | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t *const | p_mac | ||
) |
Outputs AES MAC.
Implements rsip_api_t::aesMacSignFinish.
This API can only be executed in STATE_AES_MAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Internal error. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_AES_MAC_VerifyFinish | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_mac, | ||
uint32_t const | mac_length | ||
) |
Verifies AES MAC.
Implements rsip_api_t::aesMacVerifyFinish.
This API can only be executed in STATE_AES_MAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | mac_length is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Internal error. |
FSP_ERR_CRYPTO_RSIP_AUTHENTICATION | Authentication is failed. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_ECDSA_Sign | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
uint8_t const *const | p_hash, | ||
uint8_t *const | p_signature | ||
) |
Generates an ECDSA signature.
Implements rsip_api_t::ecdsaSign.
Key type of p_wrapped_private_key must be one of the following:
Message hash p_hash should be computed in advance. In the case of hash length is less than the key length, padding is required to make it the same as the key length.
For secp521r1 operation, the length of p_hash must be set to 64 bytes.
For secp521r1 operation, the length of the argument p_signature must be set as 132 byte. Since 521 bit is not a 8-bit multiple, zero padding is required and the data format is as follows:
Data Format for secp521r1 (132 byte) | |||
---|---|---|---|
zero padding (7 bit) | signature r (521 bit) | zero padding (7 bit) | signature s (521 bit) |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL |
|
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_ECDSA_Verify | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
uint8_t const *const | p_hash, | ||
uint8_t const *const | p_signature | ||
) |
Verifies an ECDSA signature.
Implements rsip_api_t::ecdsaVerify.
Key type of p_wrapped_public_key must be one of the following:
Message hash p_hash should be computed in advance. In the case of hash length is less than the key length, padding is required to make it the same as the key length.
For secp521r1 operation, the length of p_hash must be set to 64 bytes.
For secp521r1 operation, the length of the argument p_signature must be set as 132 byte. Since 521 bit is not a 8-bit multiple, zero padding is required and the data format is as follows:
Data Format for secp521r1 (132 byte) | |||
---|---|---|---|
zero padding (7 bit) | signature r (521 bit) | zero padding (7 bit) | signature s (521 bit) |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL |
|
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_PKI_ECDSA_CertVerify | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
uint8_t const *const | p_hash, | ||
uint8_t const *const | p_signature | ||
) |
Verifies a public key certificate with ECDSA.
Implements rsip_api_t::pkiEcdsaCertVerify.
Key type of p_wrapped_public_key must be one of the following:
Message hash p_hash should be computed in advance. In the case of hash length is less than the key length, padding is required to make it the same as the key length.
For secp521r1 operation, the length of p_hash must be set to 64 bytes.
For secp521r1 operation, the length of the argument p_signature must be set as 132 byte. Since 521 bit is not a 8-bit multiple, zero padding is required and the data format is as follows:
Data Format for secp521r1 (132 byte) | |||
---|---|---|---|
zero padding (7 bit) | signature r (521 bit) | zero padding (7 bit) | signature s (521 bit) |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL |
|
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_ECDH_KeyAgree | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
rsip_wrapped_secret_t *const | p_wrapped_secret | ||
) |
Computes ECDH secret with wrapped private key and wrapped public key.
Implements rsip_api_t::ecdhKeyAgree.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_ECDH_PlainKeyAgree | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
uint8_t const *const | p_plain_public_key, | ||
rsip_wrapped_secret_t *const | p_wrapped_secret | ||
) |
Computes ECDH secret with wrapped private key and plain public key.
Implements rsip_api_t::ecdhPlainKeyAgree.
Key type of p_wrapped_private_key must be one of the following:
For secp521r1 operation, the length of the argument p_plain_public_key must be set as 132 byte. Since 521 bit is not a 8-bit multiple, zero padding is required and the data format is as follows:
Data Format for secp521r1 (132 byte) | |||
---|---|---|---|
zero padding (7 bit) | public_key Qx (521 bit) | zero padding (7 bit) | public_key Qy (521 bit) |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_PureEdDSA_Sign | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
uint8_t const *const | p_message, | ||
uint64_t const | message_length, | ||
uint8_t *const | p_signature | ||
) |
Generates an EdDSA signature.
Implements rsip_api_t::eddsaSign.
Key type of p_wrapped_private_key must be one of the following:
Key type of p_wrapped_public_key must be one of the following:
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_SIZE | Input length is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_PureEdDSA_Verify | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
uint8_t const *const | p_message, | ||
uint64_t const | message_length, | ||
uint8_t const *const | p_signature | ||
) |
Verifies an EdDSA signature.
Implements rsip_api_t::eddsaVerify.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_INVALID_SIZE | Input length is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_SHA_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_hash_type_t const | hash_type | ||
) |
Prepares a SHA generation.
Implements rsip_api_t::kdfshaInit.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_KDF_SHA |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_ECDHSecretUpdate | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_secret_t const *const | p_wrapped_secret | ||
) |
Inputs wrapped ECDH secret as a message. Input the messages required to perform the SHA operation using this API and R_RSIP_KDF_SHA_Update() in the desired order.
Implements rsip_api_t::kdfshaEcdhSecretUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_Update | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_message, | ||
uint32_t const | message_length | ||
) |
Inputs message. Input the messages required to perform the SHA operation using this API and R_RSIP_KDF_SHA_ECDHSecretUpdate() in the desired order.
The total message length that can be input is up to 64 bytes before and after calling R_RSIP_KDF_SHA_ECDHSecretUpdate().
Implements rsip_api_t::kdfshaUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | Input message_length is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_Finish | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_dkm_t *const | p_wrapped_dkm | ||
) |
Finalizes a SHA operation and generate DKM (Derived Keying Material).
Implements rsip_api_t::kdfshaFinish.
This API can only be executed in STATE_KDF_SHA, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_Suspend | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_kdf_sha_handle_t *const | p_handle | ||
) |
Suspends SHA operation.
This API releases RSIP resource and outputs intermediate results. Therefore, it can be used in the following cases:
Implements rsip_api_t::kdfshaSuspend.
This API can only be executed in STATE_KDF_SHA, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_Resume | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_kdf_sha_handle_t const *const | p_handle | ||
) |
Resumes SHA operation suspended by R_RSIP_KDF_SHA_Suspend().
Implements rsip_api_t::kdfshaResume.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_KDF_SHA |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_DKMConcatenate | ( | rsip_wrapped_dkm_t *const | p_wrapped_dkm1, |
rsip_wrapped_dkm_t const *const | p_wrapped_dkm2, | ||
uint32_t const | wrapped_dkm1_buffer_length | ||
) |
Concatenates two wrapped DKMs.
DKM1 || DKM2 is output to p_wrapped_dkm1.
Implements rsip_api_t::kdfshaDkmConcatenate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_DerivedKeyImport | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_dkm_t const *const | p_wrapped_dkm, | ||
rsip_key_type_t const | key_type, | ||
uint32_t const | position, | ||
rsip_wrapped_key_t *const | p_wrapped_key | ||
) |
Outputs a wrapped key from DKM information.
Implements rsip_api_t::kdfshaDerivedKeyImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_SHA_DerivedIVWrap | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_dkm_t const *const | p_wrapped_dkm, | ||
rsip_initial_vector_type_t const | initial_vector_type, | ||
uint32_t const | position, | ||
uint8_t const *const | p_tls_sequence_num, | ||
uint8_t *const | p_wrapped_initial_vector | ||
) |
Outputs a initial vector from DKM information.
Implements rsip_api_t::kdfshaDerivedIvWrap.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_KDF_MACKeyImport | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_key_type_t const | key_type, | ||
rsip_wrapped_mac_t const *const | p_wrapped_mac, | ||
uint32_t const | key_length, | ||
rsip_wrapped_key_t *const | p_wrapped_key | ||
) |
Converts wrapped data to wrapped HMAC key for KDF.
Implements rsip_api_t::kdfMacKeyImport.
Argument key_type must be one of the following:
The argument p_wrapped_mac must be input the result of R_RSIP_KDF_HMAC_SignFinish().
Argument kdf_data_length depends on key type.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Converts wrapped data to wrapped HMAC key for KDF.
Implements rsip_api_t::kdfMacKeyImport.
Argument key_type must be one of the following:
The argument p_wrapped_mac must be input the result of R_RSIP_KDF_HMAC_SignFinish().
Argument kdf_data_length depends on key type.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_ECDHSecretKeyImport | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_key_type_t const | key_type, | ||
rsip_wrapped_secret_t const *const | p_wrapped_secret, | ||
rsip_wrapped_key_t *const | p_wrapped_key | ||
) |
Converts wrapped ECDH secret to wrapped HMAC key for KDF.
Implements rsip_api_t::kdfEcdhSecretKeyImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Converts wrapped ECDH secret to wrapped HMAC key for KDF.
Implements rsip_api_t::kdfEcdhSecretKeyImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_HMAC_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_key | ||
) |
Prepares a HMAC generation.
Implements rsip_api_t::kdfhmacInit.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_KDF_HMAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Prepares a HMAC generation.
Implements rsip_api_t::kdfhmacInit.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_KDF_HMAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
fsp_err_t R_RSIP_KDF_HMAC_MACUpdate | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_mac_t const *const | p_wrapped_mac | ||
) |
Inputs wrapped MAC as a message.
Implements rsip_api_t::kdfhmacMacUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Inputs wrapped MAC as a message.
Implements rsip_api_t::kdfhmacMacUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
fsp_err_t R_RSIP_KDF_HMAC_ECDHSecretUpdate | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_secret_t const *const | p_wrapped_secret | ||
) |
Inputs wrapped ECDH secret as a message.
Implements rsip_api_t::kdfhmacEcdhSecretUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Inputs wrapped ECDH secret as a message.
Implements rsip_api_t::kdfhmacEcdhSecretUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_HMAC_Update | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_message, | ||
uint32_t const | message_length | ||
) |
Inputs message.
Implements rsip_api_t::kdfhmacUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Inputs message.
Implements rsip_api_t::kdfhmacUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_HMAC_SignFinish | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_mac_t *const | p_wrapped_mac | ||
) |
Finalizes a HMAC generation.
Implements rsip_api_t::kdfhmacSignFinish.
This API can only be executed in STATE_KDF_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Finalizes a HMAC generation.
Implements rsip_api_t::kdfhmacSignFinish.
This API can only be executed in STATE_KDF_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_HMAC_Suspend | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_kdf_hmac_handle_t *const | p_handle | ||
) |
Suspends HMAC operation.
This API releases RSIP resource and outputs intermediate results. Therefore, it can be used in the following cases:
Implements rsip_api_t::kdfhmacSuspend.
This API can only be executed in STATE_KDF_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Suspends HMAC operation.
This API releases RSIP resource and outputs intermediate results. Therefore, it can be used in the following cases:
Implements rsip_api_t::kdfhmacSuspend.
This API can only be executed in STATE_KDF_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_HMAC_Resume | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_kdf_hmac_handle_t const *const | p_handle | ||
) |
Resumes HMAC operation suspended by R_RSIP_KDF_HMAC_Suspend().
Implements rsip_api_t::kdfhmacResume.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_KDF_HMAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Resumes HMAC operation suspended by R_RSIP_KDF_HMAC_Suspend().
Implements rsip_api_t::kdfhmacResume.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_KDF_HMAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
fsp_err_t R_RSIP_KDF_MACConcatenate | ( | rsip_wrapped_mac_t *const | p_wrapped_mac1, |
rsip_wrapped_mac_t const *const | p_wrapped_mac2, | ||
uint32_t const | wrapped_mac1_buffer_length | ||
) |
Concatenates two wrapped MACs.
MAC1 || MAC2 is output to p_wrapped_mac1.
Implements rsip_api_t::kdfMacConcatenate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Concatenates two wrapped MACs.
MAC1 || MAC2 is output to p_wrapped_mac1.
Implements rsip_api_t::kdfMacConcatenate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
fsp_err_t R_RSIP_KDF_DerivedKeyImport | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_mac_t const *const | p_wrapped_mac, | ||
rsip_key_type_t const | key_type, | ||
uint32_t const | position, | ||
rsip_wrapped_key_t *const | p_wrapped_key | ||
) |
Outputs a wrapped key from KDF output.
Implements rsip_api_t::kdfDerivedKeyImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Outputs a wrapped key from KDF output.
Implements rsip_api_t::kdfDerivedKeyImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_KDF_DerivedIVWrap | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_mac_t const *const | p_wrapped_mac, | ||
rsip_initial_vector_type_t const | initial_vector_type, | ||
uint32_t const | position, | ||
uint8_t const *const | p_tls_sequence_num, | ||
uint8_t *const | p_wrapped_initial_vector | ||
) |
Outputs a initial vector from KDF output.
Implements rsip_api_t::kdfDerivedIvWrap.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
Outputs a initial vector from KDF output.
Implements rsip_api_t::kdfDerivedIvWrap.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_OTF_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_otf_channel_t const | channel, | ||
rsip_wrapped_key_t *const | p_wrapped_key, | ||
uint8_t const *const | p_seed | ||
) |
Initialize on-the-fly decryption on RSIP. Implements rsip_api_t::otfInit.
<Usage Precautions>
Channel | Corresponding Parameter |
---|---|
CH-0 | RSIP_OTF_CHANNEL_0 |
CH-1 (*) | RSIP_OTF_CHANNEL_1 |
<Operational State>
This API can only be executed in the STATE_MAIN, and there are no state transitions.
[in,out] | p_ctrl | Pointer to control block. |
[in] | channel | Channel number. |
[in] | p_wrapped_key | Pointer to wrapped AES key. |
[in] | p_seed | Pointer to seed. |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled or selected channel is invalid. |
FSP_ERR_INVALID_ARGUMENT | Input key type is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
Initialize on-the-fly decryption on RSIP. Implements rsip_api_t::otfInit.
<Usage Precautions>
Channel | Corresponding Parameter |
---|---|
CH-0 | RSIP_OTF_CHANNEL_0 |
CH-1 (*) | RSIP_OTF_CHANNEL_1 |
<Operational State>
This API can only be executed in the STATE_MAIN, and there are no state transitions.
[in,out] | p_ctrl | Pointer to control block. |
[in] | channel | Channel number. |
[in] | p_wrapped_key | Pointer to wrapped AES key. |
[in] | p_seed | Pointer to seed. |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled or selected channel is invalid. |
FSP_ERR_INVALID_ARGUMENT | Input key type is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_PKI_VerifiedCertInfoExport | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_verified_cert_info_t *const | p_verified_cert_info | ||
) |
Exports verified certificate information stored in this driver.
The certificate is last called function R_RSIP_PKI_ECDSA_CertVerify(), R_RSIP_PKI_RSASSA_PKCS1_V1_5_CertVerify(), R_RSIP_PKI_RSASSA_PSS_CertVerify(), or R_RSIP_PKI_VerifiedCertInfoImport().
Implements rsip_api_t::pkiVerifiedCertInfoExport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
fsp_err_t R_RSIP_PKI_VerifiedCertInfoImport | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_verified_cert_info_t const *const | p_verified_cert_info | ||
) |
Imports verified certificate information.
Implements rsip_api_t::pkiVerifiedCertInfoImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
fsp_err_t R_RSIP_PKI_CertKeyImport | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_cert, | ||
uint32_t const | cert_length, | ||
rsip_key_type_t const | key_type, | ||
uint8_t const *const | p_key_param1, | ||
uint32_t const | key_param1_length, | ||
uint8_t const *const | p_key_param2, | ||
uint32_t const | key_param2_length, | ||
rsip_hash_type_t const | hash_function, | ||
rsip_wrapped_key_t *const | p_wrapped_public_key | ||
) |
Wraps the public key in the verified public key certificate.
Implements rsip_api_t::pkiCertKeyImport.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSA_Encrypt | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
uint8_t const *const | p_plain, | ||
uint8_t *const | p_cipher | ||
) |
Encrypts plaintext with raw RSA.
Implements rsip_api_t::rsaEncrypt.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSA_Decrypt | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
uint8_t const *const | p_cipher, | ||
uint8_t *const | p_plain | ||
) |
Decrypts ciphertext with raw RSA.
Implements rsip_api_t::rsaDecrypt.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSAES_PKCS1_V1_5_Encrypt | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
uint8_t const *const | p_plain, | ||
uint32_t const | plain_length, | ||
uint8_t *const | p_cipher | ||
) |
Encrypts plaintext with RSAES-PKCS1-v1_5.
Implements rsip_api_t::rsaesPkcs1V15Encrypt.
Key type of p_wrapped_public_key must be one of the following:
mLen (plain_length) and k (modulus length) must meet the following condition.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSAES_PKCS1_V1_5_Decrypt | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
uint8_t const *const | p_cipher, | ||
uint8_t *const | p_plain, | ||
uint32_t *const | p_plain_length, | ||
uint32_t const | plain_buffer_length | ||
) |
Decrypts with RSAES-PKCS1-v1_5.
Implements rsip_api_t::rsaesPkcs1V15Decrypt.
Key type of p_wrapped_private_key must be one of the following:
plain_buffer_length must be greater than or equal to mLen(plaintext length).
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSAES_OAEP_Encrypt | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
rsip_hash_type_t const | hash_function, | ||
rsip_mgf_type_t const | mask_generation_function, | ||
uint8_t const *const | p_label, | ||
uint32_t const | label_length, | ||
uint8_t const *const | p_plain, | ||
uint32_t const | plain_length, | ||
uint8_t *const | p_cipher | ||
) |
Encrypts plaintext with RSAES-OAEP.
Implements rsip_api_t::rsaesOaepEncrypt.
Key type of p_wrapped_public_key must be one of the following:
mLen (plain_length), hLen (hash length of hash_function), and k (modulus length) must meet the following condition.
Argument hash_function accepts any member of enumeration rsip_hash_type_t.
Argument mask_generation_function accepts any member of enumeration rsip_mgf_type_t.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSAES_OAEP_Decrypt | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
rsip_hash_type_t const | hash_function, | ||
rsip_mgf_type_t const | mask_generation_function, | ||
uint8_t const *const | p_label, | ||
uint32_t const | label_length, | ||
uint8_t const *const | p_cipher, | ||
uint8_t *const | p_plain, | ||
uint32_t *const | p_plain_length, | ||
uint32_t const | plain_buffer_length | ||
) |
Decrypts ciphertext with RSAES-OAEP.
Implements rsip_api_t::rsaesOaepDecrypt.
Key type of p_wrapped_private_key must be one of the following:
hLen (hash length of hash_function) and k (modulus length) must meet the following condition.
plain_buffer_length must be greater than or equal to mLen(plaintext length).
Argument hash_function accepts any member of enumeration rsip_hash_type_t.
Argument mask_generation_function accepts any member of enumeration rsip_mgf_type_t.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSASSA_PKCS1_V1_5_Sign | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
rsip_hash_type_t const | hash_function, | ||
uint8_t const *const | p_hash, | ||
uint8_t *const | p_signature | ||
) |
Signs message with RSASSA-PKCS1-v1_5.
Implements rsip_api_t::rsassaPkcs1V15Sign.
Key type of p_wrapped_private_key must be one of the following:
Argument hash_function accepts any member of enumeration rsip_hash_type_t.
Message hash p_hash should be computed in advance with hash_function.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSASSA_PKCS1_V1_5_Verify | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
rsip_hash_type_t const | hash_function, | ||
uint8_t const *const | p_hash, | ||
uint8_t const *const | p_signature | ||
) |
Verifies signature with RSASSA-PKCS1-v1_5.
Implements rsip_api_t::rsassaPkcs1V15Verify.
Key type of p_wrapped_public_key must be one of the following:
Argument hash_function accepts any member of enumeration rsip_hash_type_t.
Message hash p_hash should be computed in advance with hash_function.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSASSA_PSS_Sign | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_private_key, | ||
rsip_hash_type_t const | hash_function, | ||
rsip_mgf_type_t const | mask_generation_function, | ||
uint32_t const | salt_length, | ||
uint8_t const *const | p_hash, | ||
uint8_t *const | p_signature | ||
) |
Signs message with RSASSA-PSS.
Implements rsip_api_t::rsassaPssSign.
Key type of p_wrapped_private_key must be one of the following:
Argument hash_function accepts any member of enumeration rsip_hash_type_t.
Argument mask_generation_function accepts any member of enumeration rsip_mgf_type_t.
Message hash p_hash should be computed in advance with hash_function.
Salt length salt_length must be one of the following:
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_RSASSA_PSS_Verify | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_public_key, | ||
rsip_hash_type_t const | hash_function, | ||
rsip_mgf_type_t const | mask_generation_function, | ||
uint32_t const | salt_length, | ||
uint8_t const *const | p_hash, | ||
uint8_t const *const | p_signature | ||
) |
Verifies signature with RSASSA-PSS. Implements rsip_api_t::rsassaPssVerify.
Key type of p_wrapped_public_key must be one of the following:
Argument hash_function accepts any member of enumeration rsip_hash_type_t.
Argument mask_generation_function accepts any member of enumeration rsip_mgf_type_t.
Message hash p_hash should be computed in advance with hash_function.
Salt length salt_length must be one of the following:
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | Input parameter is invalid. |
FSP_ERR_INVALID_SIZE | Any length is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_SHA_Compute | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_hash_type_t const | hash_type, | ||
uint8_t const *const | p_message, | ||
uint32_t const | message_length, | ||
uint8_t *const | p_digest | ||
) |
Generates SHA message digest. (Total input message must be less than 2^64 bits.)
Implements rsip_api_t::shaCompute.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
fsp_err_t R_RSIP_SHA_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_hash_type_t const | hash_type | ||
) |
Starts SHA operation.
Implements rsip_api_t::shaInit.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_SHA |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
fsp_err_t R_RSIP_SHA_Update | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_message, | ||
uint32_t const | message_length | ||
) |
Inputs SHA message. (Total input message must be less than 2^64 bits.)
Implements rsip_api_t::shaUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_SHA_Finish | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t *const | p_digest | ||
) |
Outputs SHA message digest.
Implements rsip_api_t::shaFinish.
This API can only be executed in STATE_SHA, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_SHA_Suspend | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_sha_handle_t *const | p_handle | ||
) |
Suspends SHA operation.
This API releases RSIP resource and outputs intermediate results. Therefore, it can be used in the following cases:
Implements rsip_api_t::shaSuspend.
This API can only be executed in STATE_SHA, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_SHA_Resume | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_sha_handle_t const *const | p_handle | ||
) |
Resumes SHA operation suspended by R_RSIP_SHA_Suspend().
Implements rsip_api_t::shaResume.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_SHA |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
fsp_err_t R_RSIP_HMAC_Compute | ( | rsip_ctrl_t *const | p_ctrl, |
const rsip_wrapped_key_t * | p_wrapped_key, | ||
uint8_t const *const | p_message, | ||
uint32_t const | message_length, | ||
uint8_t *const | p_mac | ||
) |
Generates HMAC. (Total input message must be less than 2^64 bits.)
Implements rsip_api_t::hmacCompute.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_HMAC_Verify | ( | rsip_ctrl_t *const | p_ctrl, |
const rsip_wrapped_key_t * | p_wrapped_key, | ||
uint8_t const *const | p_message, | ||
uint32_t const | message_length, | ||
uint8_t const *const | p_mac, | ||
uint32_t const | mac_length | ||
) |
Verifies HMAC. (Total input message must be less than 2^64 bits.)
Implements rsip_api_t::hmacVerify.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | mac_length is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key value is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | MAC verification is failed. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_HMAC_Init | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_wrapped_key_t const *const | p_wrapped_key | ||
) |
Starts HMAC operation.
Implements rsip_api_t::hmacInit.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_HMAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_NOT_ENABLED | Input key type is disabled in this function by configuration. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
fsp_err_t R_RSIP_HMAC_Update | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_message, | ||
uint32_t const | message_length | ||
) |
Inputs HMAC message. (Total input message must be less than 2^64 bits.)
Implements rsip_api_t::hmacUpdate.
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_HMAC_SignFinish | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t *const | p_mac | ||
) |
Outputs HMAC.
Implements rsip_api_t::hmacSignFinish.
This API can only be executed in STATE_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_HMAC_VerifyFinish | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_mac, | ||
uint32_t const | mac_length | ||
) |
Verifies HMAC.
Implements rsip_api_t::hmacVerifyFinish.
This API can only be executed in STATE_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
FSP_ERR_ASSERTION | No change |
FSP_ERR_NOT_OPEN | No change |
FSP_ERR_INVALID_STATE | No change |
FSP_ERR_INVALID_SIZE | No change |
Others | STATE_MAIN |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_INVALID_SIZE | mac_length is illegal. |
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL | Input key is illegal. |
FSP_ERR_CRYPTO_RSIP_FAIL | MAC verification is failed. |
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT | A resource conflict occurred because a hardware resource required by the processing is in use by other processing. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
fsp_err_t R_RSIP_HMAC_Suspend | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_hmac_handle_t *const | p_handle | ||
) |
Suspends HMAC operation.
This API releases RSIP resource and outputs intermediate results. Therefore, it can be used in the following cases:
Implements rsip_api_t::hmacSuspend.
This API can only be executed in STATE_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
Suspends HMAC operation.
This API releases RSIP resource and outputs intermediate results. Therefore, it can be used in the following cases:
Implements rsip_api_t::hmacSuspend.
This API can only be executed in STATE_HMAC, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_MAIN |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_CRYPTO_RSIP_FATAL | Software corruption is detected. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_HMAC_Resume | ( | rsip_ctrl_t *const | p_ctrl, |
rsip_hmac_handle_t const *const | p_handle | ||
) |
Resumes HMAC operation suspended by R_RSIP_HMAC_Suspend().
Implements rsip_api_t::hmacResume.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_HMAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
Resumes HMAC operation suspended by R_RSIP_HMAC_Suspend().
Implements rsip_api_t::hmacResume.
This API can only be executed in STATE_MAIN, and causes state transition.
Return value | Next state |
---|---|
FSP_SUCCESS | STATE_HMAC |
Others | No change |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |
fsp_err_t R_RSIP_FSBL_OEM_BL_Digest_Generate | ( | rsip_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_key_cert, | ||
uint32_t const | key_cert_max_length, | ||
uint8_t const *const | p_code_cert, | ||
uint32_t const | code_cert_max_length, | ||
uint32_t *const | p_mac | ||
) |
Verifies a Manifest signature and outputs the MAC of image and code certificate. The hash algorithm only supports HMAC-SHA256. The signature algorithm only supports ECDSA secp256r1.
[in,out] | p_ctrl | Pointer to control block. |
[in] | p_key_cert | Pointer to key certificate. |
[in] | key_cert_max_length | Maximum length of key certificate. |
[in] | p_code_cert | Pointer to key code certificate. |
[in] | code_cert_max_length | Maximum length of code certificate. |
[out] | p_mac | Pointer to output MAC. It is output in TLV format and consists of a 4-byte Type-Length and a 32-byte Value. |
FSP_SUCCESS | Normal termination. |
FSP_ERR_ASSERTION | A required parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Internal state is illegal. |
FSP_ERR_SB_INTERNAL_FAIL | An internal failure. |
FSP_ERR_SB_INVALID_ARG | An invalid argument was entered. |
FSP_ERR_SB_UNSUPPORTED_FUNCTION | Unsupported function executed. |
FSP_ERR_SB_INVALID_ALIGNMENT | Data entered with incorrect alignment. |
FSP_ERR_SB_SAME_IMAGE_VERSION | An image of the same version as the current version is input. (verification completed successfully) |
FSP_ERR_SB_LOWER_IMAGE_VERSION | Image version lower than the current image version is installed. |
FSP_ERR_SB_MANI_INVALID_MAGIC | An invalid magic number is set. |
FSP_ERR_SB_MANI_UNSUPPORTED_VERSION | Unsupported version is set. |
FSP_ERR_SB_MANI_OUT_OF_RANGE_LEN | Out of range TLV Length is set. |
FSP_ERR_SB_MANI_TLV_FIELD_ERR | Missing required TLV field. |
FSP_ERR_SB_MANI_TLV_INVALID_LEN | The length exceeding the end of the manifest is specified in length of the TLV field. |
FSP_ERR_SB_MANI_INVALID_IMAGE_LEN | An invalid image length is set. |
FSP_ERR_SB_MANI_MISMATCH_SIGN_ALGORITHM | There is a wrong combination of signature algorithms. |
FSP_ERR_SB_MANI_UNSUPPORTED_ALGORITHM | An algorithm was specified that the manifest does not support. |
FSP_ERR_SB_CRYPTO_FAIL | Cryptographic processing failure. |
FSP_ERR_SB_CRYPTO_AUTH_FAIL | Verification failed. |
FSP_ERR_SB_CRYPTO_PARAM_ERR | Parameter error. |
FSP_ERR_SB_CRYPTO_RESOURCE_CONFLICT | CryptoIP is in use. |
FSP_ERR_UNSUPPORTED | This API is not supported on this device. |