SPRUJB6B November 2024 – May 2025 AM2612
This command decompresses an elliptic curve public key. Given x, this command finds y such that (x,y) is on the elliptic curve. The command takes an input sy indicating the sign (i.e. parity) of the desired y. Only the least-significant bit of sy is used.
Because ECC_DECOMPRESS is designed for public keys, its memory positions correspond to the ECDSA public key slot.
This command takes variable time. It works on any curve mod a prime number p. However, it is fastest when p is congruent to 3 mod 4, and much slower when p-1 is divisible by many powers of 2. In particular, it is very slow for the NIST curve secp224r1.
This command will raise an error if:
| Slot | Name | Description | In ROM? |
|---|---|---|---|
| 0 | x | x-coordinate of the public key | No |
| 1 | sy | Sign of y-coordinate | No |
| 10 | b | b-coefficient of the elliptic curve | Yes |
| 14 | p | Order of the finite field underlying the elliptic curve if it is not a supported special modulus. | Yes |
| 15 | a | a-coefficient of the elliptic curve | Yes |
On error, this command clears slots 5 through 12.
| Slot | Name | Description | |
|---|---|---|---|
| 1 | y | Y-coordinate of the public key |