SPRUJB6B November 2024 – May 2025 AM2612
The SM2DSA_VERIFY command verifies a signature using the SM2 Digital Signature Algorithm.
| Slot | Name | Description | In ROM? |
|---|---|---|---|
| 0 | Px | x-coordinate of the public verification key | No |
| 1 | Py | y-coordinate of the public verification key | No |
| 2 | h | Hash of the message to be verified | No |
| 3 | r | r-component of the SM2DSA signature | No |
| 4 | s | s-component of the SM2DSA signature | No |
| 10 | b | b-coefficient of the elliptic curve | Yes |
| 11 | gx | x-coordinate of the elliptic curve’s generator | Yes |
| 12 | gy | y-coordinate of the elliptic curve’s generator | Yes |
| 13 | q | Order of the subgroup generated by (gx,gy). Must be odd. | 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 |
The SM2DSA_VERIFY command will succeed if the signature is correct. It will fail if the signature is incorrect, or if the parameters are invalid in the following ways:
On error, this command clears slots 6 through 10 and 16. On success, it clears slots 6 through 10 and 16, and, if the parameters are not in ROM, also 11 and 12.
| Slot | Name | Description |
|---|---|---|
| 3 | r | r-component of the signature, preserved from input |
| 5 | r’ | Computed r-component of the signature. This will be equal to r, but it is left in memory to support software fault countermeasures. |