PLSM2ComputeZA
Cryptography
Description
Derives the SM2 user-ID digest ZA = SM3(ENTLA || IDA || a || b || Gx || Gy || xA || yA) with every curve part serialised as a 32-byte big-endian value
Syntax
Delphi
Function PLSM2ComputeZA(Const Curve: TPLSM2Curve; Const Px, Py: TPLSM2Int;
Const UserID: AnsiString): AnsiString;Parameters
| Curve | Curve parameters, normally the SM2P256V1 constant |
|---|---|
| Px | X coordinate of the signer public key point |
| Py | Y coordinate of the signer public key point |
| UserID | Distinguishing identifier; 1234567812345678 is the GB/T 32918 default used by the signing processes |
Return values
The raw 32-byte ZA digest in an AnsiString |
Remarks
Part of the pure-Pascal SM2 suite (GB/T 32918) covering 256-bit prime-field arithmetic, Jacobian point operations and the SM3-based ZA derivation; the recommended sm2p256v1 curve ships as the SM2P256V1 constant and the specification appendix curve as SM2ExampleCurve
ZA prefixes the message input of PLSM2Sign and PLSM2Verify
See also
PLSM2Sign, PLSM2Verify, SM3String, SetSignProcessSM2Identity