SPRUJB6B November 2024 – May 2025 AM2612
This command is for debugging and extension purposes. Given an elliptic curve either in RAM or in ROM (as an enumeration), it performs the following commands:
Set up the RAM slots with stride equal to the modulus length
If the curve is enumerated in ROM, issue SET_ROM_SLOTS(romPtr, length) where romPtr is the base of the curve’s information structure in the MAU’s ROM.
Set the MAU’s modulus to the curve’s “p” modulus.
This will result in an error if p is even, which can only happen if the curve’s data comes from RAM, or if the enumeration is invalid.
This command is intended for driver use only, not public use. The structure of the MCG’s data ROM is shown in Table 7-144 and Table 7-145. Some of the data is stored in Montgomery form, modulo p, whereas other data is in standard form. For Ed448, the Edwards generator is on the 4-isogenous twisted curve 𝑦2 − 𝑥2 = 1 + (𝑑 − 1)𝑥2𝑦2; see (1)
.
| Slot | Name | Description | Present When? | Form |
|---|---|---|---|---|
| 0 | b | Elliptic curve’s b parameter | Always | Standard |
| 1 | gx | Generator’s x-coordinate | Always | Montgomery |
| 2 | gy | Generator’s y-coordinate | Always | Montgomery |
| 3 | q | Order of the group | Always | Standard |
| 4 | p | Field modulus | Modulus is not “special” or a != -3 | Standard |
| 5 | a | Elliptic curve’s a parameter | a != -3 | Montgomery |
| Slot | Name | Description | Present When? | Form |
|---|---|---|---|---|
| 0 | gu | Montgomery curve generator’s xcoordinate | Always | Montgomery |
| 1 | q | Order of the large prime subgroup | Always | Standard |
| 2 | magic | “Magic” Edwards x-coordinate for keygen and sign | Always | Standard |
| 3 | A24 | Montgomery value of (A-2)/4 | Always | Montgomery |
| 4 | ghnp | Generator’s half-Niels coordinate (y+x)/2. | Always | Montgomery |
| 5 | ghnm | Generator’s half-Niels coordinate (y-x)/2. | Always | Montgomery |
| 6 | -d | Negative of Edwards coefficient d | Curve25519 | Montgomery |
| 7 | p | Field modulus | Curve25519 | Standard |
| 8 | i | Sqrt(-1) mod p | Curve25519 | Standard |
Since the ROM is packed, indexing past the parameters which are present may give parameters for other supported curves.
Unlike other high-level commands, this command does not flush the MAU afterward. This is because the entire point of ECC_ROM_SETUP is to set the MAU’s state.
On error, this command clears slots 0 through 12. On success, it clears no registers.