Skip to content
ENExplore Calculators

Digital Signature Size Calculator

Compare signature and public-key sizes across RSA, ECDSA, Ed25519 and ML-DSA in raw, DER or Base64 encoding.

About Digital Signature Size Calculator

ECDSA and Ed25519 signatures are two field elements, so P-256 gives 64 raw bytes against RSA-2048's 256. ML-DSA-65 trades size for quantum resistance: a 3,309-byte signature and a 1,952-byte public key, roughly 50× an Ed25519 signature. Signature size lands directly in JWT headers, certificate chains, blockchain records and firmware images — the jump to post-quantum signatures is the main reason those formats need size headroom now.

Formula

Digital Signature Size

an ECDSA signature is 2 × ⌈field ÷ 8⌉ raw bytes, an RSA signature equals the modulus in bytes, and Base64 inflates any of them to 4 × ⌈bytes ÷ 3⌉.

raw
The bare signature value
DER
ASN.1 SEQUENCE of the two ECDSA integers, ~8 bytes of tags and lengths
Base64
JWS and PEM encoding, 33% larger

Worked example

With the default values below, Digital Signature Size Calculator returns Encoded Signature Size of 88. Change any input above and every figure here is recalculated in your browser.

Inputs used

Signature algorithmone of RSA-2048 (PKCS#1 v1.5), RSA-4096 (PKCS#1 v1.5), ECDSA P-256, ECDSA P-384, Ed25519, ML-DSA-65 (FIPS 204)
ECDSA P-256
Wire encodingone of Raw bytes, ASN.1 DER, Base64 / JWS
Base64 / JWS
Signatures stored or transmittedminimum 1 signatures
1,000,000 signatures

Results

Encoded Signature Size
88 bytes
Raw Signature Size
64 bytes
Public Key Size
91 bytes
Security Strength
128 bits
Total Storage
83.92 MiB
Assessment
Classically strong at 128 bits, but Shor-breakable

Step by step

  1. 1Values used
  2. 2Digital Signature Size
  3. 3Encoded Signature Size= 88 bytes
  4. 4Raw Signature Size= 64 bytes
  5. 5Public Key Size= 91 bytes
  6. 6Security Strength= 128 bits
  7. 7Total Storage= 83.92 MiB
  8. 8Assessment= Classically strong at 128 bits, but Shor-breakable

Assumptions and limits

  • The result is derived only from the 3 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 2 decimal places, 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

How is Digital Signature Size calculated?

an ECDSA signature is 2 × ⌈field ÷ 8⌉ raw bytes, an RSA signature equals the modulus in bytes, and Base64 inflates any of them to 4 × ⌈bytes ÷ 3⌉. ECDSA and Ed25519 signatures are two field elements, so P-256 gives 64 raw bytes against RSA-2048's 256. ML-DSA-65 trades size for quantum resistance: a 3,309-byte signature and a 1,952-byte public key, roughly 50× an Ed25519 signature.

Why does Digital Signature Size matter?

Signature size lands directly in JWT headers, certificate chains, blockchain records and firmware images — the jump to post-quantum signatures is the main reason those formats need size headroom now.

What values do I need to enter?

This calculator takes 3 inputs: Signature algorithm, Wire encoding, Signatures stored or transmitted. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Why do ECDSA signatures vary by a byte or two in DER?

DER encodes r and s as signed integers, so a leading zero is prepended when the high bit is set and stripped when the value is short. A P-256 DER signature is therefore usually 70–72 bytes, which is why parsers must not assume a fixed length.

Digital Signature Size Calculator | Calcrivo