SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
The MODINV2m operation shown in Table 7-113, Point Add & Multiply on a Binary Field Curve, calculates the inverse of the given input value Z or returns an error, if the inverse does not exist. It can be used to convert the projective results from EC2mADDxyz or EC2mMULxyz back to affine, that is, (X, Y, Z) -> (X/Z, Y/Z). In general, this is more easily accomplished by using EC2mSCALExyz. The performance gained by only calculating X/Z (that is, skipping the conversion of Y) is negligible. Note that when doing ECDSA with a binary curve, the inversion of the per-signature value 'k' must be done with MODINVp since 'k' is a regular number and not a binary field value.
MODINV2m requires no additional WorkSpace beyond the space to store the result.
Function | Requirements |
---|---|
MODINV2m | 0 < ALen <= 18 0 < BLen <= 18 Z < p Modulus B must be odd (thta is, the least significant bit must be ONE). The highest word of the modulus vector, as indicated by BLen, may not be zero. |
Status Code | Description |
---|---|
0x01 | Command executed successfully |
0x03 | Modulus is even |
0x17 | No inverse exist |