nrfx 3.3
Macros | Enumerations | Functions
CRACEN HAL

Hardware access layer for managing the Crypto Accelerator Engine (CRACEN) peripheral. More...

Macros

#define NRF_CRACEN_SEED_COUNT   CRACEN_SEED_MaxCount
 Number of seed words for private key generation.
 

Enumerations

enum  nrf_cracen_event_t {
  NRF_CRACEN_EVENT_CRYPTOMASTER = offsetof(NRF_CRACEN_Type, EVENTS_CRYPTOMASTER) ,
  NRF_CRACEN_EVENT_RNG = offsetof(NRF_CRACEN_Type, EVENTS_RNG) ,
  NRF_CRACEN_EVENT_PKE_IKG = offsetof(NRF_CRACEN_Type, EVENTS_PKEIKG)
}
 CRACEN events. More...
 
enum  nrf_cracen_int_mask_t {
  NRF_CRACEN_INT_CRYPTOMASTER_MASK = CRACEN_INTENSET_CRYPTOMASTER_Msk ,
  NRF_CRACEN_INT_RNG_MASK = CRACEN_INTENSET_RNG_Msk ,
  NRF_CRACEN_INT_PKE_IKG_MASK = CRACEN_INTENSET_PKEIKG_Msk
}
 CRACEN interrupts. More...
 
enum  nrf_cracen_module_mask_t {
  NRF_CRACEN_MODULE_CRYPTOMASTER_MASK = CRACEN_ENABLE_CRYPTOMASTER_Msk ,
  NRF_CRACEN_MODULE_RNG_MASK = CRACEN_ENABLE_RNG_Msk ,
  NRF_CRACEN_MODULE_PKE_IKG_MASK = CRACEN_ENABLE_PKEIKG_Msk
}
 CRACEN modules mask. More...
 

Functions

NRF_STATIC_INLINE uint32_t nrf_cracen_event_address_get (NRF_CRACEN_Type const *p_reg, nrf_cracen_event_t event)
 Function for getting the address of the specified CRACEN event.
 
NRF_STATIC_INLINE void nrf_cracen_event_clear (NRF_CRACEN_Type *p_reg, nrf_cracen_event_t event)
 Function for clearing the specified CRACEN event.
 
NRF_STATIC_INLINE bool nrf_cracen_event_check (NRF_CRACEN_Type const *p_reg, nrf_cracen_event_t event)
 Function for checking the state of the specified CRACEN event.
 
NRF_STATIC_INLINE void nrf_cracen_int_enable (NRF_CRACEN_Type *p_reg, uint32_t mask)
 Function for enabling the specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_cracen_int_enable_check (NRF_CRACEN_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE void nrf_cracen_int_disable (NRF_CRACEN_Type *p_reg, uint32_t mask)
 Function for disabling the specified interrupts.
 
NRF_STATIC_INLINE void nrf_cracen_module_enable (NRF_CRACEN_Type *p_reg, uint32_t modules)
 Function for enabling CRACEN modules.
 
NRF_STATIC_INLINE void nrf_cracen_module_disable (NRF_CRACEN_Type *p_reg, uint32_t modules)
 Function for disabling CRACEN modules.
 
NRF_STATIC_INLINE uint32_t nrf_cracen_module_get (NRF_CRACEN_Type const *p_reg)
 Function for getting enabled CRACEN modules.
 
NRF_STATIC_INLINE void nrf_cracen_seedram_lock_enable_set (NRF_CRACEN_Type *p_reg, bool enable)
 Function for enabling or disabling lock on access to the RAM used for the seed.
 
NRF_STATIC_INLINE bool nrf_cracen_seedram_lock_check (NRF_CRACEN_Type const *p_reg)
 Function for checking if access to the RAM used for the seed is locked.
 
NRF_STATIC_INLINE void nrf_cracen_seed_set (NRF_CRACEN_Type *p_reg, uint8_t idx, uint32_t value)
 Function for setting specified seed word for private key generation.
 

Detailed Description

Hardware access layer for managing the Crypto Accelerator Engine (CRACEN) peripheral.

Enumeration Type Documentation

◆ nrf_cracen_event_t

CRACEN events.

Enumerator
NRF_CRACEN_EVENT_CRYPTOMASTER 

Interrupt triggered at Cryptomaster.

NRF_CRACEN_EVENT_RNG 

Interrupt triggered at RNG.

NRF_CRACEN_EVENT_PKE_IKG 

Interrupt triggered at PKE or IKG.

◆ nrf_cracen_int_mask_t

CRACEN interrupts.

Enumerator
NRF_CRACEN_INT_CRYPTOMASTER_MASK 

Interrupt on CRYPTOMASTER event.

NRF_CRACEN_INT_RNG_MASK 

Interrupt on RNG event.

NRF_CRACEN_INT_PKE_IKG_MASK 

Interrupt on PKEIKG event.

◆ nrf_cracen_module_mask_t

CRACEN modules mask.

Enumerator
NRF_CRACEN_MODULE_CRYPTOMASTER_MASK 

Cryptomaster module.

NRF_CRACEN_MODULE_RNG_MASK 

RNG module.

NRF_CRACEN_MODULE_PKE_IKG_MASK 

PKE and IKG module.

Function Documentation

◆ nrf_cracen_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_cracen_event_address_get ( NRF_CRACEN_Type const *  p_reg,
nrf_cracen_event_t  event 
)

Function for getting the address of the specified CRACEN event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventCRACEN event.
Returns
Address of the specified event register.

◆ nrf_cracen_event_check()

NRF_STATIC_INLINE bool nrf_cracen_event_check ( NRF_CRACEN_Type const *  p_reg,
nrf_cracen_event_t  event 
)

Function for checking the state of the specified CRACEN event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventCRACEN event to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrf_cracen_event_clear()

NRF_STATIC_INLINE void nrf_cracen_event_clear ( NRF_CRACEN_Type *  p_reg,
nrf_cracen_event_t  event 
)

Function for clearing the specified CRACEN event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventCRACEN event to be cleared.

◆ nrf_cracen_int_disable()

NRF_STATIC_INLINE void nrf_cracen_int_disable ( NRF_CRACEN_Type *  p_reg,
uint32_t  mask 
)

Function for disabling the specified interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_cracen_int_mask_t values for bit masking.

◆ nrf_cracen_int_enable()

NRF_STATIC_INLINE void nrf_cracen_int_enable ( NRF_CRACEN_Type *  p_reg,
uint32_t  mask 
)

Function for enabling the specified interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_cracen_int_mask_t values for bit masking.

◆ nrf_cracen_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_cracen_int_enable_check ( NRF_CRACEN_Type const *  p_reg,
uint32_t  mask 
)

Function for checking if the specified interrupts are enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_cracen_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_cracen_module_disable()

NRF_STATIC_INLINE void nrf_cracen_module_disable ( NRF_CRACEN_Type *  p_reg,
uint32_t  modules 
)

Function for disabling CRACEN modules.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]modulesMask of modules to be disabled. See nrf_cracen_module_mask_t.

◆ nrf_cracen_module_enable()

NRF_STATIC_INLINE void nrf_cracen_module_enable ( NRF_CRACEN_Type *  p_reg,
uint32_t  modules 
)

Function for enabling CRACEN modules.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]modulesMask of modules to be enabled. See nrf_cracen_module_mask_t.

◆ nrf_cracen_module_get()

NRF_STATIC_INLINE uint32_t nrf_cracen_module_get ( NRF_CRACEN_Type const *  p_reg)

Function for getting enabled CRACEN modules.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Mask of enabled modules. See nrf_cracen_module_mask_t.

◆ nrf_cracen_seed_set()

NRF_STATIC_INLINE void nrf_cracen_seed_set ( NRF_CRACEN_Type *  p_reg,
uint8_t  idx,
uint32_t  value 
)

Function for setting specified seed word for private key generation.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxIndex of the seed word.
[in]valueSeed value to be set.

◆ nrf_cracen_seedram_lock_check()

NRF_STATIC_INLINE bool nrf_cracen_seedram_lock_check ( NRF_CRACEN_Type const *  p_reg)

Function for checking if access to the RAM used for the seed is locked.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueAccess to the RAM used for the seed is locked.
falseAccess to the RAM used for the seed is unlocked.

◆ nrf_cracen_seedram_lock_enable_set()

NRF_STATIC_INLINE void nrf_cracen_seedram_lock_enable_set ( NRF_CRACEN_Type *  p_reg,
bool  enable 
)

Function for enabling or disabling lock on access to the RAM used for the seed.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if lock is to be enabled, false otherwise.

Documentation feedback | Developer Zone | Subscribe | Updated