HAL PKA Overview ¶
Introducing PKA ¶
- group PKA_Introduction
-
The PKA hardware abstraction layer provides a set of APIs to configure and control the PKA peripheral on STM32 microcontrollers.
PKA (public key accelerator) is intended for the computation of cryptographic public key primitives, specifically those related to RSA, Diffie-Hellman or ECC (elliptic curve cryptography) over GF(p) (Galois fields). To achieve high performance at a reasonable cost, these operations are executed in the Montgomery domain.
For a given operation, all needed computations are performed within the accelerator, so no further hardware/software elaboration is needed to process the inputs or the outputs.
When manipulating secrets, the PKA incorporates a protection against side-channel attacks (SCA), including differential power analysis (DPA), certified SESIP and PSA security assurance level 3.
Module and files ¶
The following diagram illustrates the PKA module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the PKA module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL PKA module, specifying their locations, default values, and descriptions:
- group PKA_Configuration_Table
-
¶
Configuration inside the PKA driver ¶
Config defines
Description
Default value
Note
PRODUCT
from IDE
NA
The selected device (ex stm32c5xx )
USE_ASSERT_DBG_PARAM
from IDE
None
Allows to use the assert check parameters.
USE_ASSERT_DBG_STATE
from IDE
None
Allows to use the assert check states.
USE_HAL_CHECK_PARAM
from hal_conf.h
0
Parameters run-time check.
USE_HAL_SECURE_CHECK_PARAM
from hal_conf.h
0
Parameters run-time check for sensitive APIs
USE_HAL_CHECK_PROCESS_STATE
from hal_conf.h
0
Allows to use the load and store exclusive.
USE_HAL_PKA_MODULE
from hal_conf.h
1
Allows to use HAL PKA module.
USE_HAL_PKA_CLK_ENABLE_MODEL
from hal_conf.h
HAL_CLK_ENABLE_NO
Allows to use the clock interface management for PKA.
USE_HAL_PKA_GET_LAST_ERRORS
from hal_conf.h
0
Allows to use error code mechanism.
USE_HAL_PKA_USER_DATA
from hal_conf.h
0
Allows to use user data.
USE_HAL_PKA_REGISTER_CALLBACKS
from hal_conf.h
0
Enable the register callbacks assert