#include <nrf_cc3xx_platform_kmu.h>
Write a 128 bit key into a KMU slot.
This writes a key to KMU with the destination of the subsequent push operation set to the address of the AES or ChaChaPoly key registers in Arm CryptoCell.
- Note
- The default mask for permissions is recommended to use. Please see NRF_CC3XX_PLATFORM_KMU_DEFAULT_PERMISSIONS.
-
AES keys of 128 bits can use NRF_CC3XX_PLATFORM_KMU_AES_ADDR as the key_addr. ChaChaPoly keys of 128 bits can use NRF_CC3XX_PLATFORM_KMU_CHACHAPOLY_ADDR as the key addr. Keys larger than 128 bits must be split up to use two KMU slots. For AES (only applicable to nRF5340): Use NRF_CC3XX_PLATFORM_KMU_AES_ADDR_1 for the first 128 bits of the key. Use NRF_CC3XX_PLATFORM_KMU_AES_ADDR_2 for the subsequent bits of the key. For ChaChaPoly: Use NRF_CC3XX_PLATFORM_KMU_CHACHAPOLY_ADDR_1 for the first 128 bits of the key. Use NRF_CC3XX_PLATFORM_KMU_CHACHAPOLY_ADDR_2 for the subsequent bits of the key.
- Parameters
-
| [in] | slot_id | KMU slot ID for the new key (2 - 127). |
| [in] | key_addr | Destination address in CryptoCell used for key push. |
| [in] | key_perm | Permissions to set for the KMU slot. |
| [in] | key | Array with the 128 bit key to put in the KMU slot. |
- Returns
- NRF_CC3XX_PLATFORM_SUCCESS on success, otherwise a negative value.