Modular Inversion; Table 150. Modular Exponentiation (Normal Mode); Table 151. Modular Exponentiation (Fast Mode); Table 152. Modular Inversion - ST STM32WL5 Series Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Hide thumbs Also See for STM32WL5 Series:
Table of Contents

Advertisement

RM0453
Parameters with direction
IN
IN
IN/OUT
IN
OUT
Parameters with direction
IN
IN
IN/OUT
IN
IN/OUT
OUT
24.4.7

Modular inversion

Modular inversion operation consists in the computation of multiplicative inverse A
If the modulus n is prime, for all values of A (1 ≤ A < n) modular inversion output is valid. If
the modulus n is not prime, A has an inverse only if the largest common divisor between A
and n is 1.
If the operand A is a divisor of the modulus n, the result is a multiple of a factor of n.
Operation instructions for modular inversion are summarized in
Parameters with direction
IN
OUT

Table 150. Modular exponentiation (normal mode)

MODE
0x00
Exponent length
(in bits, not null)
Operand length
(in bits, not null)
Operand A (base of
(0 ≤ A < n)
exponentiation)
Exponent e
(0 ≤ e < n)
Modulus value n
(Odd integer only, n < 2
e
Result: A
mod n
(0 ≤ result < n)

Table 151. Modular exponentiation (fast mode)

MODE
0x02
Exponent length
(in bits, not null)
Operand length
(in bits, not null)
Operand A (base of
(0 ≤ A < n)
exponentiation)
Exponent e
(0 ≤ e < n)
Modulus value n
(Odd integer only, n < 2
Montgomery param
(mandatory)
R2 mod n
e
Result: A
mod n
(0 ≤ result < n)

Table 152. Modular inversion

MODE
0x08
Operand length
(In bits, not null)
Operand A
(0 ≤ A < n)
Modulus value n
(Odd integer only, n < 2
-1
Result: A
mod n
0 < result < n
Value (Note)
3136
Value (Note)
3136
Value (Note)
3136
RM0453 Rev 1
Public key accelerator (PKA)
Storage
PKA_CR
RAM@0x400
RAM@0x404
RAM@0xA44
RAM@0xBD0
)
RAM@0xD5C
RAM@0x724
Storage
PKA_CR
RAM@0x400
RAM@0x404
RAM@0xA44
RAM@0xBD0
)
RAM@0xD5C
RAM@0x594
RAM@0x724
Table
152.
Storage
PKA_CR
RAM@0x404
RAM@0x8B4
)
RAM@0xA44
RAM@0xBD0
Size
6 bits
32 bits
ROS
Size
6 bits
32 bits
ROS
-1
mod n.
Size
6 bits
32 bits
ROS
709/1461
728

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents

Save PDF