GD32W51x User Manual
979
Figure 29-14. Montgomery multiplication
Modulus length M
PKCAU RAM
0x404
...
0x400
0xD5C
Modulus n
0x8B4
...
...
AxB mod n
0x408
...
Operand A
Operand B
0xA44
0xBD0
Offset address
input
output
Offset address
0≤A<n, 0≤B<n, 0<n<2
M
, 0<M≤3136 (n must be odd integer).
Modular exponentiation
Normal mode
The Modular exponentiation of normal mode operation is selected by configuring
MODSEL[5:0] in PKCAU_CTL register as "000000". The operation declaration is shown in
Figure 29-15. Modular exponentiation of normal mode
. The operation result is
“
result =
A
e
mod n
”
.
Figure 29-15. Modular exponentiation of normal mode
Modulus length M
Operand A
PKCAU RAM
0x404
Exponent e
0x408
Exponent length L
0x400
...
0xA44
0xBD0
0xD5C
...
Modulus n
...
A
e
mod n
...
0x724
Operand A
0xA44
Offset address
input
output
Offset address
0<L≤3136, 0<M≤3136, 0≤A<n, 0≤e<2
L
, 0≤result<n, 1<n<2
M
(n must be odd integer).
Fast mode
The Modular exponentiation of fast mode operation is selected by configuring MODSEL[5:0]