Pcornel
Security · Asymmetric Cryptography

ECC

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

Back to the Topic

Answer

ECC (elliptic-curve cryptography) gives the same security as RSA with much shorter keys — a 256-bit curve roughly matches 3072-bit RSA — so it is faster and used in TLS, SSH and modern certificates.

Remember

  • 256-bit ECC ≈ 3072-bit RSA.
  • Common curves: P-256, P-384, Curve25519.
  • Faster and smaller than RSA.

First checks

  • openssl ecparam -list_curves | head — curves
  • openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out ec.pem — generate
  • openssl pkey -in ec.pem -noout -text — inspect

Commands

openssl ecparam -name prime256v1 -genkey -noout -out ec.key

Verify in this order

curve + private scalar → public point

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=4698

Confirmation

Confirm action

Continue?