@JvmStatic fun publicKeyOnCurve(signatureScheme: SignatureScheme, publicKey: PublicKey): Boolean
Check if a point's coordinates are on the expected curve to avoid certain types of ECC attacks. Point-at-infinity is not permitted as well.
publicKey
- a PublicKey, usually used to validate a signer's public key in on the Curve.
signatureScheme
- a SignatureScheme object, retrieved from supported signature schemes, see Crypto.
IllegalArgumentException
- if the requested signature scheme or the key type is not supported.
Return
true if the point lies on the curve or false if it doesn't.