Skip to content
ENExplore Calculators

SSH Key Length Calculator

Compare SSH key algorithm and bit-length strength across RSA, ECDSA and Ed25519.

About SSH Key Length Calculator

Different SSH key algorithms achieve comparable real-world security at very different key sizes, because RSA's security relies on integer factorization while elliptic-curve algorithms (Ed25519, ECDSA) rely on the discrete logarithm problem, which resists brute force far more efficiently per bit. NIST's estimated symmetric-equivalent security strength lets keys of very different byte lengths be compared on equal footing: RSA-2048 gives roughly 112 bits, RSA-3072/4096 and Ed25519/ECDSA-256 all give roughly 128 bits, despite Ed25519 keys being a fraction of the size.

Formula

RSA security strength estimate

security_bits ≈ (key_bits / 30)^(1/3) × 4.5 (NIST approximation: RSA-2048 ≈ 112 bits, RSA-3072 ≈ 128 bits)

key_bits
RSA modulus size in bits
security_bits
equivalent symmetric strength in bits

Worked example

With the default values below, SSH Key Length Calculator returns Algorithm of Ed25519. Change any input above and every figure here is recalculated in your browser.

Inputs used

SSH Key Algorithmone of RSA-2048, RSA-3072, RSA-4096, Ed25519, ECDSA (P-256), ECDSA (P-384)
Ed25519
Compare Againstone of RSA-2048, RSA-3072, RSA-4096, Ed25519, ECDSA (P-256), ECDSA (P-384)
RSA-4096

Results

Algorithm
Ed25519
Security Strength
128 bits
Key Size
256-bit
Notes
Fast, small, modern default
Comparison Algorithm
RSA-4096
Comparison Security Strength
128 bits
Comparison
Ed25519 and RSA-4096 offer equivalent security strength.

Step by step

  1. 1Values used
  2. 2RSA security strength estimate
  3. 3Algorithm= Ed25519
  4. 4Security Strength= 128 bits
  5. 5Key Size= 256-bit
  6. 6Notes= Fast, small, modern default
  7. 7Comparison Algorithm= RSA-4096
  8. 8Comparison Security Strength= 128 bits

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why is Ed25519 recommended over RSA for new SSH keys?

Ed25519 provides RSA-4096-equivalent security (128 bits) with a much smaller 256-bit key, which makes key generation, signing and verification significantly faster while keeping the public key short enough to paste inline in authorized_keys files.

Is RSA-2048 still safe to use for SSH?

RSA-2048 (112-bit security) is still considered acceptable by NIST guidance for now, but it offers a smaller security margin than RSA-3072+ or Ed25519, and many organizations are moving away from it as compute power increases and quantum-resistance planning begins.

What does 'bits of security' actually mean?

It is the estimated number of operations (as a power of two) an attacker would need to break the key via the best known attack, used as a common yardstick to compare fundamentally different algorithms like RSA and elliptic curves.

SSH Key Length Calculator | Calcrivo