RM0453
PKA operating modes
The list of operations the PKA can perform is detailed in
respectively, for integer arithmetic functions and prime field (Fp) elliptic curve functions.
Each of these operating modes has an associated code that has to be written to the MODE
field in the PKA_CR register.
PKA_CR.MODE[5:0]
Hex
0x01
0x0E
0x0F
0x10
0x00
0x02
0x08
0x0D
0x09
0x0A
0x0B
0x0C
0x07
PKA_CR.MODE[5:0]
Hex
0x28
0x20
0x22
0x24
0x26
Montgomery space and fast mode operations
For efficiency reason the PKA internally performs modular multiply operations in the
Montgomery domain, automatically performing inward and outward transformations.
As Montgomery parameter computation is time consuming the application can decide to use
a faster mode of operation, during which the precomputed Montgomery parameter is
Table 144. PKA integer arithmetic functions list
Binary
000001
Montgomery parameter computation R2 mod n
001110
Modular addition (A+B) mod n
001111
Modular subtraction (A-B) mod n
010000
Montgomery multiplication (AxB) mod n
000000
Modular exponentiation A
000010
Modular exponentiation A
001000
Modular inversion A-1 mod n
001101
Modular reduction A mod n
001001
Arithmetic addition A+B
001010
Arithmetic subtraction A-B
001011
Arithmetic multiplication AxB
001100
Arithmetic comparison (A=B, A>B, A<B)
000111
RSA CRT exponentiation
Table 145. PKA prime field (Fp) elliptic curve functions list
Binary
101000
Point on elliptic curve Fp check
100000
ECC scalar multiplication kP
100010
ECC scalar multiplication kP (fast mode)
100100
ECDSA sign
100110
ECDSA verification
RM0453 Rev 5
Table 144
Performed operation
e
mod n
e
mod n (fast mode)
Performed operation
Public key accelerator (PKA)
and
Table
145,
Reference
Section 24.4.2
Section 24.4.3
Section 24.4.4
Section 24.4.5
Section 24.4.6
Section 24.4.7
Section 24.4.8
Section 24.4.9
Section 24.4.10
Section 24.4.11
Section 24.4.12
Section 24.4.13
Reference
Section 24.4.14
Section 24.4.15
Section 24.4.16
Section 24.4.17
697/1450
720
Need help?
Do you have a question about the STM32WL5 Series and is the answer not in the manual?
Questions and answers