AI Tools Free

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength)

Decode OpenSSH (`ssh-ed25519`, `ssh-rsa`, `ecdsa-sha2-nistp*`) and PEM (`BEGIN PUBLIC KEY`) public keys locally in your browser to inspect exact bit length, classical security strength (`bits`), and compliance status.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Check Public Key Size.

Processed 100% client-side. Never paste private keys; paste only public keys (.pub or PUBLIC KEY PEM).

Select the security baseline used to grade key strength.

Your result
Enter your details

Result will appear here

How Browser-Side OpenSSH & ASN.1 DER Key Inspection Works

Instead of guessing key size from string length, this checker decodes the binary Base64 payload and parses the internal cryptographic integers.

Wire Bytes = Base64Decode(KeyBody); For ssh-rsa: read mpint e, read mpint n -> BitLength = (ByteLen(n_unpadded) - 1) * 8 + floor(log2(MSB(n))) + 1

For Ed25519 and ECDSA keys, the parser verifies the curve identifier and exact public point byte length (32 bytes for Ed25519, 65 bytes uncompressed P-256, 97 bytes P-384, 133 bytes P-521).

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) workflow overview
Workflow overview for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

Public Key Bit Length vs. NIST SP 800-57 Security Strength Comparison

Compare asymmetric public key sizes, classical symmetric-equivalent security strength (`bits`), and OpenSSH wire payload sizes.

Algorithm & Key TypeNominal Key SizeClassical Security StrengthNIST SP 800-57 / SSH Status
**RSA-1024 (`ssh-rsa`)**`1024 bits` (`128 B` modulus)`80-bit` security**Deprecated / Reject** (Disallowed by NIST & OpenSSH 8.8+)
**RSA-2048 (`rsa-sha2-256/512`)**`2048 bits` (`256 B` modulus)`112-bit` security**Acceptable through 2030** (Upgrade to RSA-3072+ or Ed25519)
**RSA-3072 / RSA-4096**`3072 / 4096 bits` (`384 / 512 B`)`128-bit / ~140-bit` security**Recommended** (`>= 128-bit` classical strength)
**Ed25519 (`ssh-ed25519`, Default)**`256 bits` (`32 B` Curve25519 point)`128-bit` security**Gold Standard for SSH** (Fast, compact `51 B` wire blob, side-channel safe)
**ECDSA (`nistp256` / `nistp384` / `nistp521`)**`256 / 384 / 521 bits``128 / 192 / 256-bit` security**Recommended / High Assurance** (FIPS 186-5 & CNSA compliant)

How to Check Your Public Key Size & Security Level

Audit any SSH `.pub` line or X.509/PEM public key in three steps.

Paste your OpenSSH (.pub) or PEM public key

Copy the contents of '~/.ssh/id_ed25519.pub', '~/.ssh/id_rsa.pub', or a '-----BEGIN PUBLIC KEY-----' file into the input box.

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) step 1: Paste your OpenSSH (.pub) or PEM public key
Step 1 workflow overview for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

Select your target security policy (NIST 2030 or CNSA 128-bit+)

Pick NIST SP 800-57 (which allows 112-bit RSA-2048) or Strict Enterprise (>= 128-bit, requiring Ed25519, P-256+, or RSA-3072+).

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) step 2: Select your target security policy (NIST 2030 or CNSA 128-bit+)
Step 2 workflow overview for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

Review the decoded bit length, algorithm, and compliance verdict

Click Check Public Key Size to inspect the exact key bit length, symmetric security equivalent, wire byte length, and key comment.

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) step 3: Review the decoded bit length, algorithm, and compliance verdict
Step 3 workflow overview for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

Worked Public Key Audit Examples

See how common SSH and TLS public keys score.

Default OpenSSH Ed25519 Key (ssh-ed25519)

The default 'ssh-ed25519' key decodes to a 51-byte RFC 8709 wire packet containing the 11-byte 'ssh-ed25519' header and a 32-byte (256-bit) Edwards25519 public point—delivering 128-bit classical security strength and passing both NIST 2030 and Strict Enterprise policies.

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) example 1: Default OpenSSH Ed25519 Key (ssh-ed25519)
Worked example 1 for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

Legacy vs. Modern RSA Keys (RSA-1024 vs. RSA-2048 vs. RSA-4096)

An 'ssh-rsa' key with a 256-byte modulus measures 2048 bits (112-bit security strength, PASS under NIST 2030, WARN under >=128-bit policy), while a 512-byte modulus measures 4096 bits (~140-bit security strength, PASS across both).

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) example 2: Legacy vs. Modern RSA Keys (RSA-1024 vs. RSA-2048 vs. RSA-4096)
Worked example 2 for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

ECDSA NIST P-384 Key (ecdsa-sha2-nistp384)

An 'ecdsa-sha2-nistp384' key carries a 97-byte uncompressed SEC1 elliptic curve point (0x04 || X_48B || Y_48B), providing 384-bit key size and 192-bit security strength—passing even the High Assurance (>=192-bit) tier.

Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) example 3: ECDSA NIST P-384 Key (ecdsa-sha2-nistp384)
Worked example 3 for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

How to Interpret Key Size vs. Classical Security Strength

Never compare RSA bit counts directly against elliptic curve bit counts.

The primary output badge highlights the Algorithm Family, Nominal Bit Length (e.g. 256-bit Ed25519 or 2048-bit RSA), Symmetric Security Equivalent (e.g. 128-bit security), and Policy Verdict (PASS / UPGRADE RECOMMENDED).

The detailed audit lists the raw decoded byte size, key format (RFC 4253 OpenSSH or RFC 5280 ASN.1 DER), RSA exponent or curve name, and key comment.

How to interpret Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) results
Result interpretation guide for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

OpenSSH 'ssh-rsa' SHA-1 Signature Deprecation Note

Distinguish between an RSA key's modulus size and the SSH signature hash algorithm.

Even if an 'ssh-rsa' public key file has a strong 3072-bit or 4096-bit modulus, the prefix 'ssh-rsa' on disk simply denotes an RSA public key; modern OpenSSH 8.8+ clients automatically negotiate 'rsa-sha2-256' or 'rsa-sha2-512' signatures over the wire instead of deprecated SHA-1.

All key parsing happens 100% inside your browser tab; private keys ('BEGIN ... PRIVATE KEY') are explicitly rejected.

Scope limits and assumptions for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength)
Assumptions and input boundaries for Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength).

Frequently Asked Questions About Public Key Sizes

Answers about using Public Key Size Checker (SSH, PEM & ASN.1 Bit Length & NIST Strength) and understanding its results.

Why is a 256-bit Ed25519 or ECDSA P-256 key stronger than a 2048-bit RSA key?

RSA security relies on integer factorization, which can be attacked by sub-exponential algorithms (General Number Field Sieve), giving a 2048-bit RSA modulus approximately 112 bits of symmetric security strength and a 3072-bit RSA key 128 bits. Elliptic curve cryptography (Ed25519 and NIST P-256) relies on the Elliptic Curve Discrete Logarithm Problem (ECDLP), where the best classical attack (Pollard's rho) requires ~2^(n/2) operations—giving a 256-bit curve full 128-bit security strength.

How does this tool determine the exact bit size of an 'ssh-rsa' key without uploading it?

An OpenSSH 'ssh-rsa' line Base64-encodes three length-prefixed fields defined in RFC 4253: the string 'ssh-rsa', the public exponent 'e' (usually 65537 = 0x010001), and the big-endian multiprecision integer modulus 'n' (with a leading 0x00 sign-padding byte if the top bit is set). Our browser parser strips the leading 0x00 byte and counts the exact bit position of the most significant '1' bit.

What happens if I accidentally paste a private key?

The tool immediately detects 'PRIVATE KEY' headers and refuses to parse or display the material, prompting you to provide only the public '.pub' or 'PUBLIC KEY' block. Because all execution runs locally in your browser's JavaScript runtime, nothing is ever transmitted over the network.

What is the minimum RSA and ECC key size recommended by NIST SP 800-57?

NIST SP 800-57 Part 1 Rev. 5 deprecates RSA-1024 (< 80-bit strength), allows RSA-2048 (112-bit strength) as legacy-acceptable through 2030, and recommends at least 128-bit security strength (RSA-3072, RSA-4096, ECDSA P-256/P-384, or Ed25519) for systems deployed beyond 2030.

Try your own values

Choose another tool for your next calculation, conversion, or text task.

Check Public Key Size