SPRUJB6B November 2024 – May 2025 AM2612
The PKE takes as input from the AHB bus a 32-bit command word, with the following format:
| Bits | Name | Description |
|---|---|---|
| [6:0] | Opcode | An operation code for one of the commands described below |
| 7 | Special | Modulus is special; see below |
| 15 | ParamsInRom | Params are in ROM; see below |
| [14:8] | Enumeration | If Special is set, an enumeration of the special prime p, or of the parameter set in ROM |
| [17:8] | ModLen | If Special is not set, the length of the modulus p on N, measured in words. |
| [31:18] | Offset | Offset of inputs in RAM. |
The “special” and “ParamsInRom” bits are interpreted as follows:
The MCG will raise an error on all commands if
If a special prime or ROM parameters are used, then the modulus length will be computed as ceil(log2(p+1)/MAU_WORD), where p is the special prime or elliptic curve modulus.
The data inputs are organized in “slots” starting from memory address 0. Each slot has length equal to the modulus. So, slot 0 is SRAM[modlen-1:0]; slot 1 is SRAM[2*modlen-1:modlen]; etc.
MCG commands operating on elliptic curves support elliptic curve parameters in ROM. If the command is given with the Special and ParamsInRom bits set, then those parameters do not need to be given in RAM. This is indicated in the tables by the “in ROM?” column. In general, curve parameters such as gx, gy, p, q, a and b are stored in ROM, but public and private keys, nonces, hashes etc. are not.