Course contentsShow
← Security
Lesson 164 of 3,0524. Asymmetric Cryptography and PKIFree lesson

ECDSA (Elliptic Curve Digital Signature Algorithm)

Understanding how ECDSA generates and verifies digital signatures using elliptic curves.

ECDSA (Elliptic Curve Digital Signature Algorithm)

You'll learn how ECDSA creates and verifies digital signatures using elliptic curve mathematics to prove message authenticity and sender identity.

What is ECDSA?

ECDSA is the elliptic curve equivalent of traditional digital signature algorithms. Just as you learned that ECC offers similar security to RSA with smaller keys, ECDSA provides the same signature security as RSA signatures but with better performance and smaller signature sizes.

How ECDSA Signature Generation Works

When you want to sign a message with ECDSA:

  1. Generate a random number (called k) — this must be unique for every signature
  2. Perform elliptic curve point multiplication using k and the base point G to get a new point
  3. Extract the x-coordinate of that point and reduce it modulo the curve order (this becomes r, part of your signature)
  4. Combine the message hash, your private key, r, and k using modular arithmetic to create s (the second part of your signature)

Your signature is the pair (r, s).

How ECDSA Signature Verification Works

Anyone with your public key can verify your signature:

  1. Compute two values from the message hash and signature components
  2. Perform elliptic curve point operations using these values, your public key, and the base point
  3. Check if the x-coordinate of the resulting point matches the r value in your signature

If they match, the signature is valid!

The Critical Importance of k

Think of k as a one-time secret lottery ticket number. If you ever reuse the same k for two different messages, an attacker can calculate your private key from the two signatures — a catastrophic failure that has compromised real-world systems.

Key Takeaway: ECDSA uses elliptic curve point operations to create compact digital signatures (r, s) that prove message authenticity, but requires a unique random value for every signature to maintain security.