SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
The PKA module contains a dual LNME unit, which is a high performance accelerator for Modular Montgomery Multiplication and Exponentiation functions. The LNME unit supports modulus lengths of up to 4160 bits. Some basic facts about the used method for modular multiplication are:
Table 7-105 below provides a summary of LNME basic commands.
Command | Mathematical operation | Vector X | Vector Y | Vector N | Reference |
---|---|---|---|---|---|
MMM | X×Y×R-1 (mod N) -> Y | Multiplier | Multiplicand and Result | Modulus N | Section 7.3.4.4.1.5.2 |
MMMNEXT | X×Y[0]×R-1 (mod N) -> Y[1] | Multiplier | Multiplicand and Result | Modulus N | |
MMM3A | X×Y×R-1 (mod N) -> B | Multiplier | Multiplicand | Modulus N | |
MEXP | AB×R (mod N) -> Y | X[0] = AR (mod N), X[1] = A3R (mod N), X[2] = A5R (mod N), etc. | Result | Modulus N | Section 7.3.4.4.1.5.3 |
In order to perform a valid operation, input vectors must be written to PKA RAM and the LNME registers must be loaded with appropriate values. After this, an operation can be initiated by writing a command code in the LNME control register (LNME0_CONTROL and/or LNME1_CONTROL, one per each LNME unit).
At the end of a computation, the result is written to the PKA RAM. The LNME0_STATUS/LNME1_STATUS status register contains an overflow bit, indicating the result is larger than the modulus. So when set to '1', the host must subtract the modulus from the result.
The PKA module always stores the modulus operand vector in PKA RAM. The LNME unit supports a software-controlled reset command that:
When the LNME is directly controlled from the Host (that is, by not making use of Sequencer controlled operations), make sure that the LNME_DATAPATH register is loaded with zeroes (its default state).