ECDSA

Elliptic Curve Digital Signature Algorithm (ECDSA) as defined in FIPS 186-5.

ECDSA provides digital signature generation and verification using elliptic curve keys. The EC.Curve is selected when creating key decoders or generators via the inherited EC methods.

val keys = provider.get(ECDSA).keyPairGenerator(EC.Curve.P256).generateKey()
val signature = keys.privateKey.signatureGenerator(SHA256, ECDSA.SignatureFormat.DER).generateSignature(data)
keys.publicKey.signatureVerifier(SHA256, ECDSA.SignatureFormat.DER).verifySignature(data, signature)

For signatures using Edwards curves, see EdDSA.

Types

Link copied to clipboard
Link copied to clipboard

An ECDSA private key that provides signature generation via signatureGenerator.

Link copied to clipboard

An ECDSA public key that provides signature verification via signatureVerifier.

Link copied to clipboard

Encoding format for ECDSA signatures.

Properties

Link copied to clipboard
open override val id: CryptographyAlgorithmId<ECDSA>

The typed identifier that uniquely distinguishes this algorithm and is used to look it up from a CryptographyProvider.

Functions

Link copied to clipboard

Returns a KeyGenerator that generates EC key pairs on the given curve.

Link copied to clipboard

Returns a Decoder that decodes EC private keys on the given curve from the specified PrivateKey.Format.

Link copied to clipboard

Returns a Decoder that decodes EC public keys on the given curve from the specified PublicKey.Format.