ecdsaPublicFromPrivate

fnECDSAPublicKey ecdsaPublicFromPrivate(ECDSAPrivateKey key)

Derives the ECDSA public key from a private scalar.

Computes Q = d * G over the private key's curve using the constant-time ladder. Container formats that carry only the scalar (SEC 1 ECPrivateKey without the optional public-key field, PKCS#8 without a public key) use this to recover the matching public key.

Parameters

keyThe ECDSA private key; its curve name must be known and the scalar must lie in [1, n-1].

Returns

The matching public key on the same curve.

Throws

CryptoException for a null key, unknown curve, or

out-of-range scalar.