RSA signature size in octets for a 2048-bit key
If you are sizing a signature field for an RSA key, the answer depends on the modulus length, not the hash function. A 2048-bit modulus produces a 256-octet signature, a 3072-bit modulus produces 384 octets, and a 4096-bit modulus produces 512 octets (RFC 8017, Sections 8.1.1 and 8.2.1). Both RSASSA-PSS and RSASSA-PKCS1-v1_5 define the signature as an octet string whose length equals k, the modulus length in octets, and verification rejects any signature that is not k octets long. So a 2048-bit key gives 256 octets whether you use SHA-256, SHA-384 or SHA-512.
This table is the one to use when you size certificates, JWTs, DNSSEC records and firmware images. For JWTs, RS256 and PS256 with a 2048-bit key carry a 256-octet signature before base64url encoding, and RFC 7518 requires keys of at least 2048 bits for the RS and PS algorithms. For DNSSEC, RFC 5702 states that the signature length equals the signer's modulus length, so a 2048-bit zone key adds 256 octets of signature data to each signed record set. For firmware, the MCUboot imgtool supports rsa-2048 and rsa-3072 keys, so an image signed with rsa-2048 carries a 256-octet signature in its trailer.
Confirm the modulus length your signing tool actually generates before you fix a field width, because the signature length follows the key and not the algorithm name you configure. Check the exact encoding in each protocol specification, since base64url encoding, DNS record framing and firmware metadata add overhead on top of the raw octets. The sources listed on this page do not give encoded totals, so measure those in your own environment.
RSA signature and key sizes by modulus length
This table compares RSA modulus lengths against the signature length in octets, the padding schemes that produce it, and the JWS identifiers and DNSSEC algorithm numbers that the sources name for each. Read each row from the modulus length outward: the signature length follows the modulus length, so the hash function you pick does not change the signature size. For RSA keys of 2048 bits or larger, the JWS rules apply to the key size, and DNSSEC support is limited to a range of key sizes.
| Modulus length | Signature length (octets) | Padding schemes and JWS identifiers | DNSSEC algorithm numbers and key range |
|---|---|---|---|
| 2048 bits | 256 octets | RSASSA-PKCS1-v1_5 (RS256, RS384, RS512) and RSASSA-PSS (PS256, PS384, PS512). A key of 2048 bits or larger must be used with these identifiers. | Algorithm 8 (RSA/SHA-256) and algorithm 10 (RSA/SHA-512). Key length is within the 512 to 4096 bit range for algorithm 8 and 1024 to 4096 bits for algorithm 10. |
| 3072 bits | 384 octets | RSASSA-PKCS1-v1_5 (RS256, RS384, RS512) and RSASSA-PSS (PS256, PS384, PS512). The 2048-bit minimum in RFC 7518 is met. | Algorithm 8 (RSA/SHA-256) and algorithm 10 (RSA/SHA-512). The key is within both stated ranges. |
| 4096 bits | 512 octets | RSASSA-PKCS1-v1_5 (RS256, RS384, RS512) and RSASSA-PSS (PS256, PS384, PS512). The 2048-bit minimum in RFC 7518 is met. | Algorithm 8 (RSA/SHA-256) and algorithm 10 (RSA/SHA-512). This is the upper bound of both stated ranges. |
| Any length | Equal to the modulus length in octets | Both RSASSA-PSS and RSASSA-PKCS1-v1_5 reject a signature whose length is not k octets. Verify that your implementation performs this check. | Signature length equals the signer's modulus length, independent of hash function. Confirm the key size for your zone against your DNSSEC tooling. |
How to read the RSA signature size columns
Each row in the RSA signature size table gives a modulus length in bits, the signature length in octets, and the padding scheme used to produce the signature. The signature length is the number of octets in k, where k is the length in octets of the RSA modulus n. Both RSASSA-PSS and RSASSA-PKCS1-v1_5 produce a signature that is an octet string of length k, so the modulus length alone sets the size: a 2048-bit modulus gives a 256-octet signature, a 3072-bit modulus gives 384 octets and a 4096-bit modulus gives 512 octets. The conversion from bits to octets is the division of the bit length by eight, and it is the only arithmetic the reader needs to check a row against the table.
The signature length does not depend on the hash function. RFC 8017 defines the signature as k octets in Sections 8.1.1 and 8.2.1, and the verification step in both schemes rejects any signature whose length is not k octets. A 2048-bit key therefore produces a 256-octet signature whether the message is hashed with SHA-256, SHA-384 or SHA-512. RFC 5702 reaches the same conclusion for DNSSEC RSA/SHA-256 and RSA/SHA-512 in its Sections 3 and 4.2, where the signature length equals the signer's modulus length. Anyone sizing a certificate, token or DNS response from a hash choice should read the modulus column instead.
The padding scheme column tells you which verification rules apply, not how big the signature is. RSASSA-PKCS1-v1_5 and RSASSA-PSS share the same octet length for a given modulus, so a row marked with either scheme has the same signature size. The JWS identifiers RS256 and PS256 illustrate the naming: the first number is the hash and the letters identify the padding. The sources listed on this page do not assign a security category to each modulus size, so the table does not say which lengths meet a given strength target. Confirm any category or policy mapping against the standard, your compliance framework or your security team before relying on it.
Where a 256-octet RSA signature changes the design
An RSA signature is as long as its modulus, so a 2048-bit key produces a 256-octet signature whatever hash function is chosen. The cards below show where that fixed length affects protocol design, key configuration and device planning, each tied to the document that sets the rule.
DNSSEC response sizes for zone operators
RFC 5702 defines RSA/SHA-256 (algorithm 8) and RSA/SHA-512 (algorithm 10) for DNSSEC, and states that the signature length equals the signer's modulus length, not the hash. Each signed RRset therefore carries a signature of the modulus size, and that adds directly to response size. Zone operators should check the key length they choose for each zone and confirm how their resolvers and middleboxes handle larger DNS responses before rolling out a new key size. The key length range for algorithm 8 is 512 to 4096 bits, and algorithm 10 is 1024 to 4096 bits.
RFC 5702 textJWS RS and PS algorithms
RFC 7518 says a key of 2048 bits or larger MUST be used with the RS256, RS384, RS512, PS256, PS384 and PS512 algorithms. A 2048-bit key therefore sets a 256-octet signature inside every JWS, and the encoded token grows by about a third of that length once base64url encoding is applied. Teams issuing tokens should confirm their signing library rejects shorter keys, and should measure token size against any header limits in their gateways and clients before choosing RSA over an elliptic-curve algorithm.
RFC 7518 textConstrained devices with MCUboot keys
The MCUboot imgtool generates rsa-2048 and rsa-3072 keys through the keygen command and the -t type flag, for example ./scripts/imgtool.py keygen -k filename.pem -t rsa-2048. A 2048-bit key adds a 256-octet signature to every firmware image, and a 3072-bit key adds 384 octets. Embedded teams should record which key type each device was provisioned with, since the signature length is fixed by the key and cannot be changed in the field without reflashing the verification key.
DNS KEY record moduli
RFC 3110 limits the RSA modulus in a DNS KEY record to between 512 and 4096 bits. The record also encodes the exponent length in one octet when the exponent is 1 to 255 bytes, and otherwise as a zero octet followed by a two-octet length. Operators generating keys for DNS should confirm their tooling writes records in this format and stays within the modulus range, because a key outside it will not be valid under this specification.
RFC 3110 textRSA-2048, RSA-3072 and RSA-4096 signature sizes in detail
A 2048-bit RSA modulus produces a signature that is 256 octets long. RFC 8017 defines the signature as an octet string of length k, where k is the modulus length in octets, and both RSASSA-PSS and RSASSA-PKCS1-v1_5 apply that rule. The 256-octet figure holds whichever SHA-2 hash you pick, so SHA-256, SHA-384 and SHA-512 all give the same signature size at this modulus.
- Signature length: 256 octets, set by the modulus and not by the hash.
- JWS identifiers: RS256, RS384 and RS512 use RSASSA-PKCS1-v1_5, and PS256, PS384 and PS512 use RSASSA-PSS with MGF1 over the same hash.
- Minimum for JWS: RFC 7518 says a key of 2048 bits or larger MUST be used with both the RS and PS identifiers.
- DNSSEC: RSA/SHA-256 (algorithm 8) accepts keys from 512 to 4096 bits, and RSA/SHA-512 (algorithm 10) accepts keys from 1024 to 4096 bits, so a 2048-bit key is allowed under both.
- MCUboot: the imgtool supports an rsa-2048 key type, generated with the keygen command and the -t flag.
Before you size a token, zone or firmware header around 2048-bit RSA, confirm the signature length and key type against the RFC and the tool version you run.
A 3072-bit RSA modulus produces a signature that is 384 octets long. As with the 2048-bit case, the length is k octets where k is the modulus length, so it does not change with the hash function. The step up from 256 to 384 octets is the figure to budget for when a larger key replaces a 2048-bit one.
- Signature length: 384 octets for RSASSA-PSS and RSASSA-PKCS1-v1_5 alike.
- JWS identifiers: the RS and PS identifiers with SHA-256, SHA-384 or SHA-512 apply, and RFC 7518 requires a key of 2048 bits or larger, which a 3072-bit key meets.
- DNSSEC: a 3072-bit key falls within the 512 to 4096 bit range for RSA/SHA-256 and the 1024 to 4096 bit range for RSA/SHA-512, and the DNSSEC signature length equals the signer's modulus length.
- MCUboot: the imgtool documentation lists rsa-3072 as a supported key type alongside rsa-2048.
- Encoding: RFC 3110 encodes the modulus in DNS KEY records within the 512 to 4096 bit limit, so the key record grows with the modulus as well as the signature.
Check the signature and key record sizes in your own deployment, because the modulus also sets the size of the public key you distribute.
A 4096-bit RSA modulus produces a signature that is 512 octets long, the largest size among the three moduli covered here. The rule is the same for every hash, since the signature length is the modulus length in octets and not the digest length. The 4096-bit modulus is also the upper limit of the DNSSEC range in RFC 5702 and of the DNS KEY encoding in RFC 3110.
- Signature length: 512 octets, with SHA-256, SHA-384 and SHA-512 giving the same figure.
- JWS identifiers: RS256 to RS512 and PS256 to PS512 are permitted, since the key exceeds the 2048-bit minimum in RFC 7518.
- DNSSEC upper bound: RSA/SHA-256 (algorithm 8) and RSA/SHA-512 (algorithm 10) both accept a 4096-bit key as their maximum, which is also the largest value RFC 3110 allows for the modulus.
- MCUboot: the sources listed for this topic name rsa-2048 and rsa-3072 as supported imgtool key types and do not list rsa-4096, so confirm the key types your imgtool version accepts before you plan around this size.
- Response and token size: a 512-octet signature is double the 256-octet size at 2048 bits, which affects DNSSEC response sizes and the length of encoded tokens.
Confirm the imgtool key types in your version, and measure the response or token size in your own setup before you commit to this modulus.
Checking the RSA signature size before you deploy
This sequence confirms that the RSA key in use produces the signature length your certificate field, token buffer or firmware parser expects. It ends with a size you have checked against the modulus, the padding scheme and the library version rather than assumed from the hash function.
Confirm the modulus length in use
Generate or read the key and record its modulus length in bits, for example 2048, 3072 or 4096. Use the key generation command of the tool you deploy with, such as the MCUboot imgtool keygen command with the -t rsa-2048 or rsa-3072 type flag for firmware signing. Check the result with your tool's key inspection command or by reading the key file, and write down the bit length. This step is done when you have one recorded modulus length for each key that will sign or verify data.
Convert the modulus length to octets
Divide the modulus length in bits by 8 to get k, the length of the modulus in octets. Under RFC 8017, both RSASSA-PSS and RSASSA-PKCS1-v1_5 produce a signature that is an octet string of length k. A 2048-bit modulus therefore gives a 256-octet signature, a 3072-bit modulus gives 384 octets and a 4096-bit modulus gives 512 octets. This step is done when you have a written value of k for each key.
Confirm the padding scheme and JWS identifier
Identify whether the system uses RSASSA-PKCS1-v1_5 or RSASSA-PSS, and record the hash function. In JWS, RS256, RS384 and RS512 mean PKCS1-v1_5 with SHA-256, SHA-384 and SHA-512, while PS256, PS384 and PS512 mean PSS with the same hashes. Both schemes produce a k-octet signature, so the padding choice does not change the size, but it does change which identifier the verifier must accept. This step is done when the padding scheme and identifier are written down for each signing path.
Check the signature field or buffer length
Find every field, buffer or length limit that will hold the signature, such as a certificate field, a token header, a firmware header or a parser constant. Compare each one with the k value from the previous step. Under RFC 8017, verification rejects any signature whose length is not exactly k octets, so a buffer that is too small will fail and a fixed-length parser set to a different value will reject valid signatures. This step is done when each limit is confirmed to be at least k octets and matched to the parser where it is fixed.
Check key length against the algorithm minimum
Confirm that the modulus meets the minimum that the specification requires for the algorithm in use. RFC 7518 states that a key of 2048 bits or larger MUST be used with the RS256, RS384, RS512, PS256, PS384 and PS512 algorithms. For DNSSEC, RFC 5702 sets different limits: RSA/SHA-256 uses keys from 512 to 4096 bits and RSA/SHA-512 uses keys from 1024 to 4096 bits. This step is done when each key is shown to fall within the range for its algorithm identifier.
Ask the vendor for the output length of your version
Ask the library or product vendor to confirm, in writing, the signature output length for the exact version you will ship, and to state whether that length follows the modulus length as RFC 8017 describes. Ask for the version and build number, and for the padding and identifier options it supports. The sources listed on this page do not give a vendor-specific output length, so this answer must come from the vendor's documentation or release notes. This step is done when you hold a written answer that matches the k value you calculated.
Test one signature against the calculated length
Sign a test message with the chosen key, padding scheme and identifier in a non-production environment. Measure the length of the output signature in octets and compare it with the k value. Then run verification on the same signature to confirm that the length check passes. This step is done when the measured length equals k and the test signature verifies in the target parser or library.
What the RSA signature sizes do not tell you
The figures of 256, 384 and 512 octets for 2048, 3072 and 4096-bit moduli describe only the signature value itself. The sources above define the length of the RSASSA-PSS and RSASSA-PKCS1-v1_5 output as k octets, where k is the modulus length in octets, and they say nothing about what travels alongside that value. A certificate carries the public key, issuer and subject names, validity dates, extensions and the issuer's signature over all of it, so the certificate on the wire is much larger than the signature inside it. Before planning packet sizes, certificate chain lengths or token budgets, teams should measure the complete object they will transmit, not the signature alone, and confirm the overhead of the specific format in use.
Encoding also changes the length a reader sees. The octet count in RFC 8017 is the raw binary value, but transport formats often represent it differently. In a JWS, the signature is base64url-encoded, which expands it by a factor of about four thirds and removes padding, so a 256-octet signature becomes a longer ASCII string inside the token. In X.509 certificates the signature is carried in a DER-encoded BIT STRING with its own tag and length fields, and the DNSSEC RRSIG record adds its own header fields around the signature. The encoded length is the one that matters for buffers, logs and bandwidth budgets, so reviewers should check the encoding the library produces rather than assume the raw size carries through unchanged.
Confirm every figure against the version of the library, protocol and format in use. The sources listed on this page define the behavior of the RFCs at the time they were written, and the sources do not say how any particular product encodes or sizes its output. The signature length rule also depends on the key length, not the hash, so a configuration that changes the modulus changes the size even when the algorithm name looks the same. Check the output of the exact build you deploy, for example by generating a signature with the production key and measuring it, and review the product documentation for any encoding option that changes the on-wire form.
Frequently asked questions about RSA signature sizes
How big is an RSA-2048 signature in bytes?
An RSA-2048 signature is 256 octets (bytes). The signature length follows the modulus length: RSASSA-PSS and RSASSA-PKCS1-v1_5 both produce a signature that is an octet string of length k, where k is the length in octets of the RSA modulus n. For a 2048-bit modulus, k is 256. The same rule gives 384 octets for a 3072-bit modulus and 512 octets for a 4096-bit modulus. Verifiers reject any signature whose length is not k octets, so a signature of the wrong size fails validation. Before you size buffers or packets, confirm the modulus length of the key your system actually uses, since that is the only input that changes the signature size.
Does SHA-512 make the RSA signature larger?
No. The hash function does not change the RSA signature length. A 2048-bit key produces a 256-octet signature whether the signature uses SHA-256, SHA-384 or SHA-512. RFC 8017 defines the signature length from the modulus, and RFC 5702 states the same for DNSSEC: the RSA/SHA-256 and RSA/SHA-512 signature size depends on key length, not on the hash. If you are weighing SHA-512 against SHA-256 for size reasons, the choice will not move the signature length. It can still affect other properties, such as the digest length and the algorithm identifier you publish, so review those separately against your policy.
Which RSA key length does JWS require?
RFC 7518 requires a key of 2048 bits or larger for the RSA-based JWS algorithms. The RS256, RS384 and RS512 identifiers use RSASSA-PKCS1-v1_5 with SHA-256, SHA-384 and SHA-512, and the PS256, PS384 and PS512 identifiers use RSASSA-PSS with the same SHA-2 hash and MGF1 with that hash. Both families carry the same 2048-bit minimum, with a MUST for each. A 2048-bit key therefore gives a 256-octet signature in the encoded token. Check the algorithm your token library selects by default, because the identifier and the key length must both match the specification before you rely on the token in production.
Is RSA-3072 supported for firmware signing?
The MCUboot imgtool documentation states that it supports rsa-2048 and rsa-3072 keys. You generate a key with the keygen command and the -t type flag, for example ./scripts/imgtool.py keygen -k filename.pem -t rsa-2048. The same documentation shows the rsa-3072 type, so a 3072-bit modulus is accepted by that tool. Confirm the type name and the flag in the version of imgtool your build uses, since the options can change between releases. A 3072-bit key gives a 384-octet signature, which you should account for in your image header and flash layout. Check the bootloader configuration on your device as well, because the tool accepting a key does not by itself confirm what your bootloader verifies.
How is the DNSSEC RSA signature length set?
In DNSSEC the RSA signature length equals the signer's modulus length. RFC 5702 defines RSA/SHA-256 as algorithm number 8, with keys from 512 to 4096 bits, and RSA/SHA-512 as algorithm number 10, with keys from 1024 to 4096 bits. The signature size depends on key length, not on the hash function. RFC 3110 limits the RSA modulus in DNS KEY records to between 512 and 4096 bits. In practice the key length you choose for your zone sets the size of every RRSIG, and larger signatures increase response sizes. Confirm the algorithm number and key length against your DNS software and your zone signing policy before you change either.
How does RSA compare with ECDSA and Ed25519 signature sizes?
The sources give direct figures for the Edwards and ECDSA cases, and they show RSA sizes grow with the modulus. Ed25519 uses a 32-octet public key and produces a 64-octet signature, made of R (32 octets) and S (32 octets). Ed448 uses a 57-octet public key and produces a 114-octet signature. For JWS, the ECDSA signature is a fixed-length concatenation of R and S: ES256 gives 64 octets, ES384 gives 96 octets and ES512 gives 132 octets. A 2048-bit RSA signature is 256 octets, so it is several times larger than the Ed25519 or ES256 signatures. Check the figures for your specific algorithm and curve before you size a protocol.
How DeployOpen works on this
DeployOpen starts from the modulus length your systems use, since the RSA signature size follows the modulus and not the hash function. We scope the written work, build and test the configuration that produces those signatures, and hand over the sizing records your certificate, token and firmware teams need. Engagements are fixed-scope, and ongoing support is available as a retainer.
How we scope
- We list every system that produces RSA signatures, with its modulus length and signing algorithm.
- We record which RSASSA-PSS or RSASSA-PKCS1-v1_5 identifiers each system uses, such as PS256 or RS256.
- The written scope names the systems covered, the deliverables and the timeline before work starts.
How we build
- We check that each signing key meets the minimum length required by the relevant specification.
- We test the signature length each system produces and compare it with the modulus length in octets.
- We confirm that the verification path rejects signatures whose length differs from the modulus length.
How we hand over
- We deliver a table of modulus lengths, signature sizes in octets and the systems each one affects.
- We document the key generation commands and key type flags used for each signing component.
- We confirm with you the sizes each buffer, token and packet budget must accommodate before handover.
How we support
- Ongoing support can cover re-testing when a modulus length or signing identifier changes.
- Retainers can include updates to the sizing tables when your vendors release new firmware or libraries.
- Ask your vendors to confirm the signature length their version produces, since behavior varies by release.

