GD32W51x User Manual
989
2.
Load the initial data into PKCAU RAM at offset address 0x400;
3.
Specify the operation to be performed in MODSEL[5:0] bits in PKCAU_CTL register, then
set START bit in PKCAU_CTL register;
4.
Wait for the ENDF bit set in PKCAU_STAT register;
5.
Read calculation result from the PKCAU RAM, then clear the ENDF bit by setting the
ENDFC bit in PKCAU_STATC register.
Operation process in fast mode
The fast mode computes the Montgomery parameter only once when calculating many
operations with the same modulus. When the operation is performed, the pre-calculated
Montgomery parameter is loaded to perform the calculation.
The flow of operation in fast mode is as follows:
1.
Load the initial data into PKCAU RAM at offset address 0x400;
2.
Select the Montgomery parameter calculation mode by configuring the MODSEL[5:0] as
“
000001
”
, then set START bit in PKCAU_CTL register;
3.
Wait for the ENDF bit set in PKCAU_STAT register;
4.
Read the Montgomery parameter from the PKCAU RAM, then clear the ENDF bit by
setting the ENDFC bit in PKCAU_STATC register;
5.
Load the initial data and Montgomery parameter into PKCAU RAM;
6.
Specify the operation to be performed in MODSEL[5:0] bits in PKCAU_CTL register, then
set START bit in PKCAU_CTL register;
7.
Wait for the ENDF bit set in PKCAU_STAT register;
8.
Read calculation result from the PKCAU RAM, then clear the ENDF bit by setting the
ENDFC bit in PKCAU_STATC register.
29.3.7.
Processing times
The following tables summarize the PKCAU computation times, expressed in clock cycles.
Table 29-9. Modular exponentiation computation times
Exponent
length (in bits)
Mode
Operand length (in bits)
1024
2048
3072
1024
Normal
6780000
-
-
Fast
6701000
-
-
CRT
1853000
-
-
2048
Normal
-
52196000
-
Fast
-
51910000
-