RM0432
Public key accelerator (PKA) applied to STM32L4P5xx and STM32L4Q5xx only
36.4.11
Arithmetic multiplication
Arithmetic multiplication operation consists in the computation of AxB. Operation
instructions are summarized in
Parameters with direction
IN
OUT
36.4.12
Arithmetic comparison
Arithmetic comparison operation consists in the following computation:
•
If A=B then result=0x0
•
If A>B then result=0x1
•
If A<B then result=0x2
Operation instructions for arithmetic comparison are summarized in
Parameters with direction
IN
OUT
36.4.13
RSA CRT exponentiation
For efficiency many popular crypto libraries like OpenSSL RSA use the following
optimization for decryption and signing based on the Chinese remainder theorem (CRT):
•
p and q are precomputed primes, stored as part of the private key
•
d
= d mod (p -1)
P
•
d
= d mod (q -1) and
Q
•
q
= q
inv
Table
Table 253. Arithmetic multiplication
MODE
0x0B
Operand length M
(In bits, not null)
Operand A
(0 ≤ < A < 2
Operand B
(0 ≤ < B < 2
Result: AxB
(0 ≤ result < 2
Table 254. Arithmetic comparison
MODE
0x0C
Operand length M
(In bits, not null)
Operand A
(0 ≤ < A < 2
Operand B
(0 ≤ < B < 2
Result A?B
0x0, 0x1 or 0x02
-1
mod p
253.
Value (Note)
M
)
M
)
M
)
Value (Note)
M
)
M
)
RM0432 Rev 6
Storage
Size
PKA_CR
6 bits
RAM@0x404
32 bits
RAM@0x8B4
ROS
RAM@0xA44
RAM@0xBD0
2xROS
Table
254.
Storage
Size
PKA_CR
6 bits
RAM@0x404
32 bits
RAM@0x8B4
ROS
RAM@0xA44
RAM@0xBD0
32 bits
1179/2301
1196
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?