Pcornel
Security · Asymmetric Cryptography

ECDSA

Cheat sheet · https://pcornel.dk/topic.php?topic=4699

Back to the Topic

Answer

ECDSA is the elliptic-curve digital signature algorithm, used in TLS certificates, SSH keys and code signing with curves such as P-256 and P-384. It needs a strong random nonce for every signature.

Remember

  • Each signature needs a unique random nonce.
  • Nonce reuse leaks the private key.
  • Deterministic nonces (RFC 6979) avoid that.

First checks

  • openssl dgst -sha256 -sign ec.pem -out sig.der file — sign
  • openssl dgst -sha256 -verify ec-pub.pem -signature sig.der file — verify
  • Deterministic nonces (RFC 6979) — implementation

Verify in this order

hash + private key + nonce → signature

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4699

Confirmation

Confirm action

Continue?