Elliptic-curve key and point sizes by curve: the figures you need first
If you are sizing a buffer, a message or a stored key for an elliptic-curve algorithm, start with two figures. An X25519 public key is 32 bytes, as RFC 7748 defines it, and an Ed25519 signature is 64 octets, as RFC 8032 defines it. The tables on this page give the same kind of figure for the other curves in common use, including the private key, public key and encoded point lengths for the NIST curves P-256, P-384 and P-521, and for X448 and Ed448. Each figure is tied to the RFC or specification that defines it, so you can check the value against the source before you rely on it.
The primary readers of this table are engineers sizing TLS messages, certificates and key files. In TLS 1.3, the key_exchange value for X25519 is 32 bytes and for X448 it is 56 bytes, as RFC 8446 specifies. For the NIST curves, an uncompressed point is written as legacy_form = 4 followed by the X and Y coordinates, where each coordinate is 32 octets for P-256, 48 octets for P-384 and 66 octets for P-521. Certificate and key file parsers read these lengths directly, so a mismatch shows up as a parse failure rather than a warning. Check the length of your own key material against these figures when a handshake or key import fails.
These figures are the classical baseline that post-quantum sizes are compared against. When you read a post-quantum key or signature table, the classical row beside it is the reference for how much the size grows. The sizes here are fixed by the curve definitions, so they do not change with the implementation. Confirm the encoding your library produces for a given key, since some libraries and file formats add a prefix or wrap the raw value, and the ASN.1 structure in PKCS #8 or X.509 changes the total length of a stored key.
Private key, public key and point sizes in bytes for each curve
This table lists the private key, public key or point, shared secret or signature sizes, object identifier and defining document for each curve. Blank cells mean the sources listed here do not give a figure for that field. Read the NIST curves (P-256, P-384, P-521) in the point column, the Diffie-Hellman curves (X25519, X448) in the key columns, and the Edwards curves (Ed25519, Ed448) in the signature column. The main takeaway is that sizes grow with the security level, and the figures below are the ones to confirm before sizing buffers.
| Curve or algorithm | Private key and public key or point (bytes) | Shared secret or signature (bytes) | Object identifier and defining document |
|---|---|---|---|
| P-256 | Each coordinate 32 octets, uncompressed point with first octet 0x04 | Not applicable | secp256r1 1.2.840.10045.3.1.7, RFC 5480 Section 2.1.1.1 |
| P-384 | Each coordinate 48 octets, uncompressed point with first octet 0x04 | Not applicable | secp384r1 1.3.132.0.34, RFC 5480 Section 2.1.1.1 |
| P-521 | Each coordinate 66 octets, uncompressed point with first octet 0x04 | Not applicable | secp521r1 1.3.132.0.35, RFC 5480 Section 2.1.1.1 |
| X25519 | Private key 32 bytes, public key 32 bytes | Shared secret 32 bytes | id-X25519 1.3.101.110, RFC 8410 Section 3, RFC 7748 Section 5 |
| X448 | Private key 56 bytes, public key 56 bytes | Shared secret 56 bytes | id-X448 1.3.101.111, RFC 8410 Section 3, RFC 7748 Section 5 |
| Ed25519 | Private key 32 octets, public key 32 octets | Signature 64 octets | id-Ed25519 1.3.101.112, RFC 8410 Section 3, RFC 8032 Sections 5.1.5 and 5.1.6 |
| Ed448 | Private key 57 octets, public key 57 octets | Signature 114 octets | id-Ed448 1.3.101.113, RFC 8410 Section 3, RFC 8032 Sections 5.2.5 and 5.2.6 |
How to read the sizes in each column
The sizes in this table describe the components of elliptic-curve keys and signatures. A private key is the secret scalar a party keeps. A public key is the value derived from it and shared with the peer. In ECDH, the shared secret is the value both parties compute from their own private key and the other party's public key. In EdDSA, a signature is the fixed-length value produced when a message is signed, and it is verified against the public key. A point is the encoded form of a public value on the curve. The sources use octet and byte interchangeably, and for these curves one octet and one byte are the same unit, so a figure given in octets can be read as bytes.
Point sizes depend on the encoding, so check the encoding before comparing columns. For the NIST curves in RFC 5480 and RFC 8446, the uncompressed point is legacy_form = 4 followed by the X and Y coordinates, so the encoded length is one octet more than twice the coordinate length. The TLS 1.3 key_exchange value for X25519 and X448 is a different encoding: it is the 32-byte or 56-byte u-coordinate with no prefix byte and no Y coordinate. Do not compare a NIST point length with an X25519 or X448 key_exchange length as if they were the same kind of value. The RFC 8446 figures are in Section 4.2.8.2, the private, public and shared secret lengths for X25519 and X448 are in RFC 7748 Sections 4 and 5, and the Ed25519 and Ed448 lengths are in RFC 8032 Sections 5.1.5, 5.1.6, 5.2.5 and 5.2.6.
Where elliptic-curve key sizes affect your systems
Elliptic-curve key lengths are fixed per curve, but the same numbers reach your systems in different forms: as TLS key shares, as certificate public keys, as wrapped private keys and as fixed-length signature fields. Each card below names the source section that governs the size in that place, so you can check it against your own parsers and buffers.
TLS 1.3 key_exchange field
In a TLS 1.3 ClientHello and ServerHello, the key_exchange value carries the public key share for the negotiated group. For the NIST curves, the share is an uncompressed point: a legacy_form byte of 4 followed by the X and Y coordinates, where each coordinate is 32 octets for P-256, 48 octets for P-384 and 66 octets for P-521. For X25519 the value is 32 bytes and for X448 it is 56 bytes. Check that any proxy, load balancer or inspection appliance accepts these lengths for the groups you enable, because a fixed-size assumption built for one group can break when another is negotiated. Source: RFC 8446, Section 4.2.8.2.
RFC 8446 textX.509 ECPoint in public keys
In a certificate's SubjectPublicKeyInfo, the elliptic-curve public key is an ECPoint carried as an OCTET STRING. The uncompressed form, whose first octet is 0x04, MUST be supported. The compressed form, whose first octet is 0x02 or 0x03, MAY be supported. The hybrid form MUST NOT be used. Parsers and certificate tooling that only expect the uncompressed form will reject a compressed point, so confirm which forms your CA, validators and clients accept before issuing keys on a given curve. The named curve identifiers for secp256r1, secp384r1 and secp521r1 are fixed in the same section. Source: RFC 5480, Section 2.2.
RFC 5480 textPKCS #8 private key wrapping
For the Curve25519 family, PKCS #8 wraps the private key as a CurvePrivateKey, defined as an OCTET STRING. The RFC's Ed25519 example carries a 32-byte value inside that wrapper, which is the length your key-handling code should expect when it unwraps. Key stores, HSMs and backup tools that re-encode the outer structure can change how the inner octet string is framed, so test a round trip on every tool in the path. The object identifiers that select each algorithm are id-X25519 1.3.101.110, id-X448 1.3.101.111, id-Ed25519 1.3.101.112 and id-Ed448 1.3.101.113. Source: RFC 8410, Sections 7 and 10.3.
RFC 8410 textFixed-length Ed25519 and Ed448 signatures
Ed25519 signatures are 64 octets and Ed448 signatures are 114 octets, with private keys of 32 and 57 octets and public keys of the same lengths. Because these fields are fixed, a token, firmware image or signed record that reserves a shorter slot for the signature will truncate or fail verification. Size the signature field for the algorithm you select, and do not allocate a single slot shared with ECDSA or other formats. Confirm the lengths against your implementation's test vectors before you lock a format into firmware that cannot be updated in the field. Source: RFC 8032, Sections 5.1.5, 5.1.6, 5.2.5 and 5.2.6.
RFC 8032 textShared secret and key share buffers
X25519 and X448 each produce a shared secret equal in length to the key itself: 32 bytes for X25519 and 56 bytes for X448. Code that derives the TLS traffic secret or stores the shared value must allocate buffers that match the group, not a generic size. Check that your key derivation library and any key-management service return the full secret without padding or truncation. The RFC gives X25519 a security level of about 128 bits and X448 about 224 bits, which is useful when you record the strength each group provides in your inventory. Source: RFC 7748, Sections 5, 6.1 and 6.2.
RFC 7748 textCurve identifiers in configuration
Each curve appears in configuration and certificate profiles under a name or object identifier, such as secp256r1 at 1.2.840.10045.3.1.7, secp384r1 at 1.3.132.0.34 and secp521r1 at 1.3.132.0.35. A mismatch between the identifier a system expects and the one a certificate carries causes handshake or validation failures that look like size errors. Audit the curve names in each server, client and certificate profile, and map each one to the sizes above. SEC 2 lists these curves by their bit lengths, which helps you check that a configured name matches the intended key size. Source: SEC 2 v2, Sections 2.4 to 2.6, and RFC 5480, Section 2.1.1.1.
SEC 2 v2 documentSizes and rules for each curve family
The NIST prime curves are secp256r1, secp384r1 and secp521r1. In X.509, the public key is carried as an ECPoint, which is an OCTET STRING. RFC 5480 says the uncompressed form, whose first octet is 0x04, MUST be supported. The compressed form, whose first octet is 0x02 or 0x03, MAY be supported. The hybrid form MUST NOT be used. The named curve identifiers are 1.2.840.10045.3.1.7 for secp256r1, 1.3.132.0.34 for secp384r1 and 1.3.132.0.35 for secp521r1. SEC 2 version 2 places secp256r1 among the 256-bit curves over Fp, secp384r1 among the 384-bit curves and secp521r1 among the 521-bit curves.
- Uncompressed point in TLS 1.3: The uncompressed point is legacy_form = 4 followed by X and Y. Each coordinate takes 32 octets for P-256, 48 octets for P-384 and 66 octets for P-521, so the full point is 65, 97 and 133 octets respectively.
- Object identifiers: Use the OIDs above when you write the AlgorithmIdentifier parameters for a certificate or a key file. The parameter names the curve, so a parser that expects a different OID will reject the key.
- Compressed form: The compressed form is permitted in X.509 but is not required. Confirm that your verifier and any middlebox accept it before you rely on it, because the RFC does not oblige every peer to support it.
- Hybrid form: Do not emit the hybrid form in any ECPoint. A peer that receives it is not conforming to RFC 5480, so treat it as a configuration error.
- Buffer sizing: Size receive buffers from the uncompressed length for the curve you run. A P-521 point is substantially larger than a P-256 point, so a buffer sized for one family will truncate the other.
Check which curve your certificate chain and your TLS configuration each negotiate, and confirm the compressed-form support of every component that parses the key.
X25519 and X448 are the key-agreement curves in RFC 7748. X25519 uses a 32-byte private key, a 32-byte public key and a 32-byte shared secret, and the RFC rates its security level at about 128 bits. X448 uses a 56-byte private key, a 56-byte public key and a 56-byte shared secret, and the RFC rates its security level at about 224 bits. In TLS 1.3, the X25519 key_exchange value is 32 bytes and the X448 value is 56 bytes, as RFC 8446 defines them. The object identifiers are 1.3.101.110 for id-X25519 and 1.3.101.111 for id-X448, as RFC 8410 assigns them.
- X25519 lengths: The private key, public key and shared secret are each 32 bytes. A TLS key_exchange entry for X25519 carries 32 bytes of public value.
- X448 lengths: The private key, public key and shared secret are each 56 bytes. A TLS key_exchange entry for X448 carries 56 bytes of public value.
- Security level: RFC 7748 gives about 128 bits for X25519 and about 224 bits for X448. Treat these as the RFC's ratings, and do not read them as a guarantee for any particular deployment.
- PKCS #8 encoding: In PKCS #8, the Curve25519 family private key is wrapped as CurvePrivateKey ::= OCTET STRING. RFC 8410 gives an Ed25519 example that carries a 32-byte value, so expect a nested OCTET STRING in the key file.
- Key-share encoding in TLS: Because the TLS value is the raw public value and not a point with a form byte, do not apply the NIST uncompressed-point rules to X25519 or X448.
When you audit a key-agreement configuration, confirm the group named in the handshake matches the length of the key share you see on the wire, and confirm the identifier your key files use.
Ed25519 and Ed448 are the Edwards signature curves in RFC 8032. Ed25519 has a 32-octet private key, a 32-octet public key and a 64-octet signature. Ed448 has a 57-octet private key, a 57-octet public key and a 114-octet signature. The object identifiers are 1.3.101.112 for id-Ed25519 and 1.3.101.113 for id-Ed448, as RFC 8410 defines them. These curves are used for signatures, not for key agreement, so their lengths should not be confused with the X25519 and X448 values.
- Ed25519 lengths: The private key and public key are each 32 octets, and each signature is 64 octets. Plan storage and bandwidth for a signature of that length.
- Ed448 lengths: The private key and public key are each 57 octets, and each signature is 114 octets. The private key length differs from the 56-byte X448 private key, so do not reuse a key file across the two.
- Signature versus agreement: An Ed25519 key does not perform Diffie-Hellman. Ed25519 and X25519 share a base curve but use separate OIDs and separate key formats, so a key file generated for one purpose is not a drop-in replacement for the other.
- PKCS #8 for Ed25519: RFC 8410 gives an Ed25519 example that carries a 32-byte value inside the CurvePrivateKey OCTET STRING, which matches the 32-octet private key in RFC 8032.
- Verifier support: Confirm that every verifier in your chain accepts the OID you issue. A verifier that supports only one of the two identifiers will fail on the other.
Before you issue or deploy an Edwards key, confirm the OID in the certificate or key file against RFC 8410, and confirm the signature length your protocol or storage format expects.
How to use these figures when you size a system
This sequence lets you confirm that the curve in your system matches the sizes in this table, then check that your buffers, parsers and vendor outputs handle those lengths. Each step ends with a check you can record as evidence.
Confirm the curve and object identifier
Start by finding which named curve or algorithm your system negotiates or stores. For X.509 public keys, the named curve appears as an object identifier in the algorithm parameters: secp256r1 is 1.2.840.10045.3.1.7, secp384r1 is 1.3.132.0.34 and secp521r1 is 1.3.132.0.35, as defined in RFC 5480, Section 2.1.1.1. For Edwards and Curve25519 keys, the identifiers are id-X25519 1.3.101.110, id-X448 1.3.101.111, id-Ed25519 1.3.101.112 and id-Ed448 1.3.101.113, defined in RFC 8410, Sections 3 and 9. You are done when you have written down the identifier that appears in your own certificate, key file or handshake capture, and matched it to one row in the table.
Check the encoded public key length
Next, compare the encoded length of the public key or point against the figures for that curve. For TLS 1.3 NIST curves, the uncompressed point is legacy_form 4 followed by X and Y, with each coordinate taking 32 octets for P-256, 48 octets for P-384 and 66 octets for P-521, as set out in RFC 8446, Section 4.2.8.2. For X25519 and X448, the key_exchange values are 32 and 56 bytes respectively in the same section. For Ed25519 and Ed448, the public keys are 32 and 57 octets under RFC 8032, Sections 5.1.5 and 5.2.5. Record the observed length from a real key or handshake and confirm it matches the table. If it does not, check whether your system uses compressed or hybrid encoding, since RFC 5480, Section 2.2 says the hybrid form must not be used.
Check the point form your system accepts
Confirm which point form your system emits and accepts. RFC 5480, Section 2.2 states that the uncompressed form (first octet 0x04) must be supported, the compressed form (first octet 0x02 or 0x03) may be supported, and the hybrid form must not be used. A compressed point for a NIST curve is shorter than the uncompressed one, so a length check that assumes uncompressed will fail on compressed keys. Note which form your peers send and which form your parser rejects. You are done when you can state, for each interface, the single form it sends and the forms it accepts.
Check buffer and message field widths
Review each buffer and field in your parser that will hold a key, point or signature. Size fixed buffers to the maximum from the table for the curves you support, not to the smallest value you have seen in testing. For Ed448, the signature is 114 octets and the private key is 57 octets under RFC 8032, Sections 5.2.5 and 5.2.6, so a buffer sized for Ed25519's 64-octet signature will overflow. For PKCS #8 Curve25519-family keys, the private key is wrapped as an OCTET STRING under RFC 8410, Section 7, so add the wrapper overhead to the raw length when you size file or message fields. You are done when every field has a documented maximum that covers the largest curve you accept.
Test with keys from your own stack
Generate test keys with the same libraries and settings that your production system uses, then measure the encoded public key, private key and point lengths directly. Compare each measurement to the table and to the RFC section cited for that curve. Include at least one key per curve your system supports, and one per point form if you use more than one. Keep the outputs with the test record. You are done when every measured length matches a row in the table, or when you have documented each mismatch and traced its cause, for example a library that adds a length prefix or a different ASN.1 wrapper.
Ask your vendor for the encoding details
Send your vendor a written question asking which named curves their product generates and accepts, which point form they emit (uncompressed, compressed or hybrid), and which PKCS #8 encoding they use for private keys. Ask whether any private key is stored in a wrapper or container, and what the exact encoded length is for each curve. Request the answer in writing and tie it to the product version you run, since the vendor's documentation is the only authoritative source for their behavior. You are done when the vendor's answer matches your test measurements, or when any difference has been raised and resolved in writing.
What these sizes do not tell you
The lengths in this table are the raw key and point sizes that the RFCs define, such as 32 octets for an X25519 public key or 32 octets for an Ed25519 private key. They do not describe what you will find in a certificate, a PKCS #8 file or a TLS message. A public key in an X.509 certificate is carried as a BIT STRING whose contents are an ASN.1 structure, so the bytes you parse include tag, length and algorithm identifier octets around the raw key material. The DER length fields around the key also change size with the length of the value they describe. For NIST curves, the uncompressed form begins with the octet 0x04 followed by the X and Y coordinates, while the compressed form (0x02 or 0x03) carries only X, and RFC 5480 makes the compressed form optional for implementations to support. Before you size a buffer or estimate bandwidth, confirm which form your peers send and which form your library emits.
Encoded sizes also depend on the library, the encoding it uses and the protocol version in play. The same key can appear as a raw octet string, as a PKCS #8 wrapper with an algorithm identifier, or inside an X.509 SubjectPublicKeyInfo, and each wrapper adds its own octets. The sources listed on this page describe what the standards require, not how any particular library packs its output, so the exact encoded length is something to measure, not assume. Run the key generation and export path of the specific library and version you deploy, record the byte counts it produces for each curve you use, and compare them with the figures here. Do not treat a match or mismatch as proof of compatibility or of any certification; confirm both against the documentation for your exact build and against your peers' implementations.
Questions people ask about elliptic-curve key sizes
How big is an X25519 public key in bytes?
An X25519 public key is 32 bytes. The same length applies to the private key and to the shared secret that results from the exchange. In TLS 1.3, the X25519 key_exchange value is also 32 bytes, as set out in Section 4.2.8.2 of RFC 8446. RFC 7748 gives X25519 a security level of about 128 bits (Sections 4.1, 5 and 6.1). Check the key length your TLS library and any hardware security module actually emit before sizing buffers, since some implementations wrap the value in an encoding that adds bytes.
How big is an Ed25519 signature?
An Ed25519 signature is 64 octets. The private key is 32 octets and the public key is 32 octets. These figures come from Sections 5.1.5 and 5.1.6 of RFC 8032. Ed25519 is a signature scheme and is not used for key exchange, so these lengths do not apply to X25519 or to the key shares in a TLS handshake. When you size certificate or token fields, confirm the encoding your certificate profile uses, because the DER wrapper around these values adds bytes.
What is the uncompressed length of a P-256 point?
An uncompressed P-256 point is 65 octets: a leading 0x04 byte followed by the 32-octet X and 32-octet Y coordinates. TLS 1.3 encodes the same point as legacy_form 4 followed by X and Y, with each coordinate taking 32 octets for P-256 (RFC 8446, Section 4.2.8.2). For P-384 each coordinate is 48 octets and for P-521 each is 66 octets. Confirm the exact point encoding in your implementation's documentation, because the sources listed here describe the coordinate sizes and the form byte but not every wrapper an API may add.
Are compressed elliptic-curve points required?
No. In X.509 public keys, RFC 5480 (Section 2.2) requires implementations to support the uncompressed form, where the first octet is 0x04. Support for the compressed form, where the first octet is 0x02 or 0x03, is optional. The hybrid form must not be used. If a peer sends a compressed point and your stack does not support it, the connection or certificate parse can fail, so check what the peers you exchange keys with actually send and what your library accepts.
Which object identifier names each curve?
The named curve identifiers for the NIST curves are secp256r1 at 1.2.840.10045.3.1.7, secp384r1 at 1.3.132.0.34 and secp521r1 at 1.3.132.0.35, as listed in Section 2.1.1.1 of RFC 5480. For the Edwards and Montgomery curves, RFC 8410 assigns id-X25519 as 1.3.101.110, id-X448 as 1.3.101.111, id-Ed25519 as 1.3.101.112 and id-Ed448 as 1.3.101.113 (Sections 3 and 9). Check the identifier against the value in your certificate or key file, since a mismatch between the named curve and the key type is a common cause of parse failures.
How do these elliptic-curve sizes compare with post-quantum sizes?
The elliptic-curve figures on this page are far smaller than the public key and ciphertext sizes of post-quantum schemes. The post-quantum size tables for key encapsulation and signatures list those figures, so use them alongside this page when you plan buffers and bandwidth. The sibling pages give the key and signature lengths for each scheme. Compare the figures from the same source and the same encoding, because a raw key length and a length with a wrapper are not directly comparable.
Do these lengths tell me whether my system is ready for post-quantum migration?
No. These are size figures for classical curves taken from the RFCs, and they do not indicate whether a system is ready for migration. A migration assessment looks at where each algorithm is used, what each component supports, and how keys and certificates are issued and rotated. Ask a team that performs the assessment to map those dependencies, and confirm the sizes from the relevant standard or the vendor documentation for each product you run.
Where a curve's key and point travel in a TLS handshake
The diagram starts with the client's key_share extension in its ClientHello, which carries a 32-byte X25519 key_exchange value. The server answers in its ServerHello with its own key_exchange value, after which both sides derive the shared secret. For a NIST curve, the uncompressed point is legacy_form = 4 followed by X and Y, with each coordinate 32 octets for P-256, 48 for P-384 and 66 for P-521. The certificate's public key, encoded as an ECPoint OCTET STRING, is a separate hand-off from the key exchange, so check the two sizes independently.
Key exchange values and the certificate's ECPoint travel in separate handshake messages.
How DeployOpen works on this
DeployOpen starts from the key and point sizes your systems actually negotiate and store, then works through the configurations, key files and parsers that handle them. Each engagement is fixed-scope, with the size questions, the components involved and the deliverables agreed in writing before work starts.
How we scope
- We list which curves, key types and encodings your systems use, such as P-256, P-384, X25519 or Ed25519.
- We confirm which components parse or store these values, including TLS stacks, certificate tooling and key stores.
- The written scope names the systems covered, the deliverables and the timeline, and it is agreed before any work begins.
How we build
- We check that each system encodes points and keys in the forms the relevant RFCs require, such as the uncompressed NIST point form.
- We test buffer sizes and parser limits against the coordinate and key lengths listed for each curve in the sources.
- We document configuration changes and run tests against your own environment, since behavior varies by product version.
How we hand over
- You receive a written record of the curves, key lengths and configuration settings we reviewed and changed.
- The record links each size figure to its source document, so your security and platform teams can check it themselves.
- We walk your engineers through the findings and the open items that still need a decision on your side.
How we support
- Ongoing support and upgrade work can be arranged as a retainer after the initial engagement ends.
- Continuous testing can cover key and point handling when your libraries or TLS stacks are upgraded.
- Before relying on any size or compatibility figure, confirm it against the exact version you run.
Sources and further reading
- RFC 5480: Elliptic curve cryptography subject public key information ↗
- SEC 2 v2: Recommended elliptic curve domain parameters ↗
- RFC 8446: The Transport Layer Security (TLS) protocol version 1.3 ↗
- RFC 7748: Elliptic curves for security ↗
- RFC 8032: Edwards-curve digital signature algorithm (EdDSA) ↗
- RFC 8410: Algorithm identifiers for Ed25519, Ed448, X25519 and X448 in PKCS #8 and X.509 ↗

