The following register bit-fields are used: LNME0_XBASE/LNME1_XBASE[10-1]
XBASE and [25-16] XDIGITS; LNME0_YBASE/LNME1_YBASE[10-1]
YBASE and [23-16] NPASSES; LNME0_NBASE/LNME1_NBASE[10-1]
NBASE and [25-16] NYDIGITS; LNME0_NZERO/LNME1_NZERO[7-0]
NZERO (or LNME0_NACC/LNME1_NACC[7-0]
NACC); LNME0_CONTROL/LNME1_CONTROL[0]
MMM_CMD, [1] MMMNEXT_CMD, and [2] EXP_CMD; LNME0_STATUS/LNME1_STATUS[1]
MMM_BUSY and [0] OVERFLOW.
- N is the modulus vector, the minimum amount of bits needed to represent its value is nbits.
- NBASE specifies its base address as 32 bits word offset in PKA RAM: (0 <= NBASE < 2048d, must be even).
- NYDIGITS specifies its length in 32-bit words, offset by 1:
NYDIGITS = round[(nbits + Alpha + 1) / Beta] – 1; (0 <= NYDIGITS < 131d).
The operand should be padded with zeros, if an extra overflow digit is required. - X is one operand vector of the modular multiplication with value < 2N, the minimum amount of bits needed to represent its value is xbits (should be <= nbits).
- XBASE specifies its base address as 32 bits word offset in PKA RAM: (0 <= XBASE < 2048d, must be even).
- NXDIGITS specifies its length in 32-bit words, offset by 1:
NXDIGITS = round[(xbits + 1) / Beta] – 1; (0 <= NXDIGITS < 131d).
The operand should be padded with zeros if an extra overflow digit is required. - Y is the other operand vector of the modular multiplication with value < 2N. YBASE specifies its base address where it is stored in PKA RAM: (0 <= YBASE < 2048d, must be even). This operand should be padded with zeros to the same number of words (NYDIGITS + 1) as the modulus vector N.
- nrOfPasses specifies the number of passes the Y- and N-operands have to pass the MMM data path:
- nrOfPasses = round[(max(nbits, xbits) + 2 + Alpha) / (Pe × Alpha)] (1 <= nrOfPasses < 128d)
- The NPASSES register field must be loaded with: nrOfPasses – 1; (0 <= NPASSES < 127d)
- NACC must contain the 8 least significant bits of N' in equation R × R–1 – N × N' = 1. Loading the NZERO register field with the least significant 8 bits of the N vector automatically performs the following algorithm to set NACC correctly:
- Set the 'MMM op' field of the LNME0_CONTROL/LNME1_CONTROL
register (bits [0] MMM_CMD, [1] MMMNEXT_CMD, and [2] EXP_CMD) to a non-zero
value to select the actual MMM operation and start it up. This field clears
automatically at the end of the operation.
- The MMM_BUSY register bit indicates that the MMM operation is busy. This bit clears automatically at the end of the operation.
- Upon completion of the MMM operation, the OVERFLOW register bit will be set to indicate whether or not there was an overflow. This bit is cleared at the start of the operation.
All numbers in the PKA RAM are stored least
significant word first. See Figure 7-105, PKA LNME Memory Map for MMM-type Operations, for the location of all
operands and the result vector for the different types of MMM operations.