RM0453 Rev 1 711/1461
RM0453 Public key accelerator (PKA)
728
24.4.11 Arithmetic multiplication
Arithmetic multiplication operation consists in the computation of AxB. Operation
instructions are summarized in Table 156.
24.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 Table 157.
24.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
P
= d mod (p -1)
• d
Q
= d mod (q -1) and
• q
inv
= q
-1
mod p
Table 156. Arithmetic multiplication
Parameters with direction Value (Note) Storage Size
IN
MODE 0x0B PKA_CR 6 bits
Operand length M (In bits, not null) RAM@0x404 32 bits
Operand A (0 ≤ < A < 2
M
) RAM@0x8B4
ROS
Operand B (0 ≤ < B < 2
M
)RAM@0xA44
OUT Result: AxB (0 ≤ result < 2
M
) RAM@0xBD0 2xROS
Table 157. Arithmetic comparison
Parameters with direction Value (Note) Storage Size
IN
MODE 0x0C PKA_CR 6 bits
Operand length M (In bits, not null) RAM@0x404 32 bits
Operand A (0 ≤ < A < 2
M
)RAM@0x8B4
ROS
Operand B (0 ≤ < B < 2
M
)RAM@0xA44
OUT Result A=B or A>B or A<B 0x0, 0x1 or 0x02 RAM@0xBD0 32 bits