PLSM2PublicKeyFromPrivate
Cryptography
Description
Derives the public key point P = [d]G from a private scalar
Syntax
Delphi
Function PLSM2PublicKeyFromPrivate(Const Curve: TPLSM2Curve;
Const PrivateKey: TPLSM2Int; Out Px, Py: TPLSM2Int): Boolean;Parameters
| Curve | Curve parameters, normally the SM2P256V1 constant |
|---|---|
| PrivateKey | Private scalar d |
| Px | Receives the X coordinate of the public point |
| Py | Receives the Y coordinate of the public point |
Return values
| False | The private key is out of range |
|---|---|
| True | Px and Py hold the public key point |
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