EasyManuals Logo

STMicroelectronics STM32WL5 Series User Manual

STMicroelectronics STM32WL5 Series
1450 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #701 background imageLoading...
Page #701 background image
RM0453 Rev 5 701/1450
RM0453 Public key accelerator (PKA)
720
Using precomputed Montgomery parameters (PKA fast mode)
As explained in Section 24.3.4, when computing many operations with the same modulus it
can be beneficial for the application to compute only once the corresponding Montgomery
parameter (see, for example, Section 24.4.5). This is know as “fast mode”.
To manage Fast Mode usage the recommended procedure is described below:
1. Load in PKA RAM the modulus size and value information. Such information is
compiled in Section 24.5.1.
2. Program in PKA_CR register the PKA in Montgomery parameter computation mode
(MODE=”0x1”) then assert the START bit.
3. Wait until the PROCENDF bit in the PKA_SR register is set to “1”, then read back from
PKA memory the corresponding Montgomery parameter, and then clear PROCENDF
bit by setting PROCENDFC bit in PKA_CLRFR.
4. Proceed with the required PKA operation, loading on top of regular input data the
Montgomery information R2 mod m. All addresses are indicated in Section 24.4.
24.3.7 PKA error management
When PKA is used some errors can occur:
The access to PKA RAM falls outside the expected range. In this case the Address
Error flag (ADDRERRF) is set in the PKA_SR register.
An AHB access to the PKA RAM occurred while the PKA core was using it. In this case
the RAM Error Flag (RAMERRF) is set in the PKA_SR register, reads to PKA RAM
return zero, while writes are ignored.
For each error flag above PKA generates an interrupt if the application sets the
corresponding bit in PKA_CR register (see Section 24.6 for details).
ADDRERRF and RAMERRF errors are cleared by setting the corresponding bit in
PKA_CLRFR.
The PKA can be re-initialized at any moment by resetting the EN bit in the PKA_CR register.
24.4 PKA operating modes
24.4.1 Introduction
The various operations supported by PKA are described in the following subsections,
clarifying the associated format of the input data and of the results, both stored in the PKA
RAM.
The following information applies to all PKA operations.
PKA core processes 32-bit words
Supported operand “Size” are:
ROS (RSA operand size): data size is (rsa_size/32+1) words, with rsa_size equal
to the chosen modulus length. For example, when computing RSA with an
operand size of 1024 bits, ROS is equal to 33 words, or 1056 bits.
EOS (ECC operand size): data size is (ecc_size/32+1) words, with ecc_size equal
to the chosen prime modulus length. For example, when computing ECC with an
operand size of 192 bits, EOS is equal to 7 words, or 224 bits.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM32WL5 Series and is the answer not in the manual?

STMicroelectronics STM32WL5 Series Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM32WL5 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals