Skip to content
Calcrivo

Digital Signature Size Calculator

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

Inputs

signatures

Encoded Signature Size

88bytes

Raw Signature Size

64bytes

Public Key Size

91bytes

Security Strength

128bits

Total Storage

83.92MiB

Assessment

Classically strong at 128 bits, but Shor-breakable

Step by step

  1. Values used

    Signature algorithm = ECDSA P-256; Wire encoding = Base64 / JWS; Signatures stored or transmitted = 1,000,000 signatures

  2. 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⌉.

  3. Encoded Signature Size

    = 88 bytes

  4. Raw Signature Size

    = 64 bytes

  5. Public Key Size

    = 91 bytes

  6. Security Strength

    = 128 bits

  7. Total Storage

    = 83.92 MiB

  8. Assessment

    = Classically strong at 128 bits, but Shor-breakable

How it works

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

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.

You might also need