Open-source library benchmark results for post-quantum algorithms

Benchmark cycle counts from pqm4 and the key, ciphertext and signature sizes from liboqs and the TLS hybrid draft, with the conditions each figure was measured under.

On this page

ML-KEM-768 and ML-DSA-65 benchmark figures and sizes for engineers

If you are sizing a server, device or protocol, the two numbers to start with are the cycle counts and byte sizes for ML-KEM-768. The pqm4 benchmarks report average cycles for ML-KEM-768 at 24 MHz on the m4fspeed build of 642,096 for key generation, 658,754 for encapsulation and 707,827 for decapsulation. The OQS liboqs datasheet gives the ML-KEM-768 public key as 1184 bytes and the ciphertext as 1088 bytes, with a 32-byte shared secret. Cycle counts describe the cost of each operation on one platform, and byte sizes describe what goes on the wire or into your buffers, so you need both to plan memory, bandwidth and CPU time.

This table is for engineers who choose an algorithm, set buffer sizes for a protocol, or estimate what a microcontroller or server can sustain. Read the cycle figures from pqm4 (documented in its README and benchmarks.md), where cycles are measured at 24 MHz to avoid memory-controller wait cycles, most schemes are reported over 100 executions, and published numbers use the Arm GNU Toolchain 11.3.Rel1. The pqm4 README does not give run dates, so confirm the build and toolchain you intend to deploy. The byte sizes come from the OQS liboqs ML-KEM and ML-DSA datasheets, which list the public key, secret key, ciphertext or signature for each parameter set.

The same reference covers ML-DSA-65 for signing. The pqm4 benchmarks.md lists ML-DSA-65 average cycles on the m4f build of 2,516,006 for key generation, 6,193,171 for signing and 2,415,944 for verification, and the liboqs datasheet gives a public key of 1952 bytes, a secret key of 4032 bytes and a signature of 3309 bytes. Before you rely on these numbers, confirm that your target platform and compiler match the pqm4 build, because cycle counts do not transfer directly to other hardware. For protocol-level sizes, check the IETF draft draft-ietf-tls-ecdhe-mlkem-05, which defines hybrid groups and their shares but makes no performance claims.

ML-KEM, ML-DSA and SLH-DSA figures by parameter set

This table lists the liboqs byte sizes for each ML-KEM, ML-DSA and SLH-DSA parameter set, and the pqm4 average cycle counts where the benchmark file gives them, at 24 MHz on Arm GNU Toolchain 11.3.Rel1. Cycle counts for ML-KEM are shown for the clean and m4fspeed builds, and ML-DSA cycles for the clean and m4f builds. Compare sizes within one family, and read cycle counts as relative figures for one platform, not as a prediction for your device.

Parameter setPublic key, secret key, ciphertext or signature (bytes)Average cycles, clean build (keygen, encaps or sign, decaps or verify)Average cycles, m4fspeed or m4f build (keygen, encaps or sign, decaps or verify)
ML-KEM-512Public key 800, secret key 1632, ciphertext 768, shared secret 32595,793, 700,605, 888,653392,423, 390,881, 428,167
ML-KEM-768Public key 1184, secret key 2400, ciphertext 1088, shared secret 32988,722, 1,138,225, 1,387,984642,096, 658,754, 707,827
ML-KEM-1024Public key 1568, secret key 3168, ciphertext 1568, shared secret 321,536,343, 1,708,071, 2,020,3271,018,976, 1,031,565, 1,094,008
ML-DSA-44Public key 1312, secret key 2560, signature 24201,874,405, 7,925,955, 2,063,0961,426,025, 3,943,121, 1,421,623
ML-DSA-65Public key 1952, secret key 4032, signature 33093,205,533, 12,359,056, 3,377,3052,516,006, 6,193,171, 2,415,944
ML-DSA-87Public key 2592, secret key 4896, signature 46275,341,863, 15,579,513, 5,610,2034,275,859, 7,947,380, 4,193,104
SLH-DSA-128sPublic key 32, secret key 64, signature 7856Not applicableNot applicable
SLH-DSA-128fPublic key 32, secret key 64, signature 17088Not applicableNot applicable
SLH-DSA-192s, 192f, 256s, 256fPublic key 48 to 64, secret key 96 to 128, signature 16224 to 49856Not applicableNot applicable

How to read the cycle counts and byte sizes

The pqm4 cycle counts in the table are average cycles per operation. Each row lists key generation, encapsulation or signing, and decapsulation or verification, and each column pair compares the clean build, a plain reference implementation, with the m4fspeed build (for ML-KEM) or the m4f build (for ML-DSA), which uses optimized code for the Arm Cortex-M4 with its floating-point unit. The gap between the two columns shows how much the optimized code changes the cost of each operation on the same scheme, so compare columns within a row rather than across rows of different parameter sets. The pqm4 README says cycle counts are taken at 24 MHz to avoid memory-controller wait cycles, and that most schemes report minimum, maximum and average over 100 executions. Use the average when you estimate typical load, and check the minimum and maximum when you plan for worst-case latency, since ML-DSA signing varies widely between runs.

The published numbers were built with Arm GNU Toolchain 11.3.Rel1, according to the pqm4 README. A different compiler version, optimization flag or board can change the counts, so confirm the toolchain and clock on your own target before relying on a figure. The pqm4 README also says that the benchmark pages give no run dates, so you cannot tell from the page when a given number was measured. Treat the results as a reference for relative cost, and re-run the benchmarks on your hardware if the figures will drive capacity decisions.

The byte sizes come from the liboqs datasheets. Each datasheet gives the public key, secret key, ciphertext or signature length, and a claimed NIST security level for each parameter set. ML-KEM-512 is claimed at level 1, ML-KEM-768 at level 3 and ML-KEM-1024 at level 5. ML-DSA-44 is claimed at level 2, ML-DSA-65 at level 3 and ML-DSA-87 at level 5. The SLH-DSA datasheet lists the 128, 192 and 256 parameter sets, with level 1, level 3 and level 5 claims respectively. These sizes are fixed by the parameter set and do not change with the platform, so they can be used directly for buffer and bandwidth planning, provided the liboqs version you deploy matches the one the datasheet describes.

Where the ML-KEM and ML-DSA sizes matter in practice

The benchmark numbers on this page only become decisions once they meet a byte limit, a flash budget or a clock rate. The cards below connect the published key, ciphertext and signature sizes and the pqm4 cycle counts to the parts of a deployment where they change what you build, and they name the checks to run before you commit.

Handshake messages grow per connection

A TLS client key share of 1216 bytes and a server share of 1120 bytes are what X25519MLKEM768 adds to the handshake: 1184 bytes of ML-KEM-768 public key plus 32 bytes of X25519 on the client side, and 1088 bytes of ML-KEM-768 ciphertext plus 32 bytes of X25519 on the server side. These messages are fixed length, so you can size buffers and estimate bandwidth from them directly. Check that load balancers, proxies and middleboxes in your path accept ClientHello messages of this size, and confirm the group is negotiated on the connections you actually measure.

IETF draft text

Certificate and signature storage

An ML-DSA-65 signature is 3309 bytes, against public keys of 1952 bytes and secret keys of 4032 bytes. Every certificate chain, signed firmware image and token that uses this scheme carries that signature, so storage and transfer budgets grow in proportion to the number of signatures stored or sent. Plan for the chain as a whole rather than a single leaf, and confirm with your certificate authority which ML-DSA parameter set it issues before you size stores or caches.

liboqs ML-DSA datasheet

Constrained devices and cycle budgets

The pqm4 results report average cycle counts at 24 MHz, the clock rate chosen to avoid memory-controller wait cycles, and they are taken as the minimum, maximum and average over most schemes. The ML-KEM-768 average for key generation is 642,096 cycles with the m4fspeed build and 988,722 with the clean build, so the build flags alone change the time budget. Convert cycles to seconds with your own clock and toolchain, and note that the published numbers use Arm GNU Toolchain 11.3.Rel1, which may not match your build.

pqm4 README

Signing time on microcontrollers

ML-DSA signing is the operation where the pqm4 numbers vary most. For ML-DSA-65 the average sign cost is 12,359,056 cycles in the clean build and 6,193,171 cycles in the m4f build, and the m4f sign minimum and maximum for ML-DSA-44 span 1,812,557 to 17,009,165 cycles. Signing is rejection-sampled, so a single operation can take much longer than the average. Size any signing deadline against the maximum you observe on your own device, not the average.

pqm4 benchmarks

Fixed-length keys and ciphertexts

The IETF draft states that every group it defines uses fixed-length public keys, ciphertexts and shared secrets, and it makes no performance claims. Fixed lengths let parsers reject malformed messages by size and simplify memory allocation, and they are the same across the hybrid groups in the draft, which share the 64-byte secret for X25519MLKEM768 and SecP256r1MLKEM768. Check that your parser enforces these exact lengths for each group you enable, and that no implementation pads or truncates them.

Hybrid shared secret
64 bytes
IETF draft text

Library versions and pinned sources

The OQS liboqs ML-KEM datasheet pins its source to a specific mlkem-native commit and lists the support tier as Tier 1, while the pqm4 results carry no run dates. A size or cycle figure is only as current as the code that produced it, so record the library version, commit or tag you test against next to every number you use. Confirm that the sizes you measure in your build match the datasheet values before you rely on them in a capacity plan.

liboqs ML-KEM datasheet

ML-KEM-512, ML-KEM-768 and ML-KEM-1024 figures and where each is named

ML-KEM-512 is the smallest of the three ML-KEM parameter sets, and the OQS liboqs datasheet lists it with a claimed NIST level 1. The byte sizes below are the ones the datasheet gives for each object, so they can be used to size buffers for this set.

  • Public key: 800 bytes.
  • Secret key: 1632 bytes.
  • Ciphertext: 768 bytes.
  • Shared secret: 32 bytes.
  • pqm4 cycle counts (clean build, average): 595,793 for key generation, 700,605 for encapsulation and 888,653 for decapsulation. With the m4fspeed build, the averages are 392,423, 390,881 and 428,167 for the same three operations.

The pqm4 README states that cycle counts are taken at 24 MHz to avoid memory-controller wait cycles, and that published numbers use Arm GNU Toolchain 11.3.Rel1. Confirm the build flags and toolchain for your target before comparing these numbers with your own measurements.

How to use these figures before you size a system

Following these five steps turns the published pqm4 cycle counts and liboqs byte sizes into a set of numbers you have checked against your own parameter set, build and hardware. The result is a sizing input you can defend, not a copy of a benchmark table.

  1. Confirm the parameter set and build

    Identify the exact algorithm and security level you plan to run, such as ML-KEM-768 or ML-DSA-65, and whether your target uses the clean build or the m4f build. The two builds report very different cycle counts for the same scheme, so a figure from one cannot be read as the other. Write down the parameter set and build in your sizing record before you read any table on this page. The step is done when every figure you intend to use is tagged with both values.

  2. Check buffers against published byte sizes

    Compare the public key, secret key, ciphertext, shared secret and signature sizes for your chosen parameter set against the buffers and message limits in your software and hardware. The liboqs datasheets list these sizes for each ML-KEM, ML-DSA and SLH-DSA variant, and the IETF draft lists the TLS 1.3 hybrid key share lengths. Flag any buffer that is smaller than the value it has to hold, and any fixed limit in a protocol or device that the larger values would exceed. The step is done when each buffer in your design has a recorded size and a recorded margin.

  3. Read the timing figures with their measurement settings

    When you use the pqm4 cycle counts, note that they are taken at 24 MHz to avoid memory-controller wait cycles, and that most schemes report minimum, maximum and average over 100 executions. Use the average for planning and the maximum for worst-case budgets, and record which toolchain the published numbers used. Do not convert cycle counts to time for your device without your own clock speed and wait-state configuration. The step is done when every timing figure you carry forward has its clock rate, statistic and toolchain noted beside it.

  4. Rerun the measurement on your own hardware

    Build the same library, parameter set and build option on the hardware and toolchain you will ship, then run the speed benchmark for key generation, encapsulation or signing, and verification. Compare your results with the published figures and record any gap, including the compiler, optimization flags, clock configuration and memory wait states. A large difference usually points to a configuration difference, so treat the published numbers as a reference point rather than your own result. The step is done when you hold a measured table from your own environment next to the published one.

  5. Ask the library or vendor for version and commit

    Ask the library maintainer or your vendor which version, release tag or commit they ship, and whether that is the code the published benchmark was taken from. The OQS datasheet, for example, names a pinned mlkem-native commit, and the pqm4 benchmarks are tied to the repository state at the time they were run. Ask whether the vendor's build matches that commit, and whether any patches or compiler settings differ. The step is done when you have a written version identifier for each component in your sizing record.

  6. Record the figures as a bounded estimate

    Write the final sizing inputs as ranges with their sources, marking which numbers come from published benchmarks, which from your own measurements and which from the byte-size tables. State that the published results reflect the listed sources and settings and are not a guarantee for your build, toolchain or hardware. Keep the record with the parameter set, build, version and date of your own run so that a later review can reproduce it. The step is done when the record can be checked by someone who did not run the tests.

What these benchmark figures do not tell you

The cycle counts on this page come from pqm4, which runs on a Cortex-M4 microcontroller with the clock fixed at 24 MHz. The project fixes the clock to avoid memory-controller wait cycles, so the figures describe compute cost on that platform, not on a server CPU or a phone. The published numbers were built with the Arm GNU Toolchain 11.3.Rel1, and a different compiler version, optimization setting or clock speed will move the results. The pqm4 README does not give run dates for the benchmark pages, so you cannot tell when a given result was measured or whether it reflects the current code. Before you rely on a figure for capacity planning, confirm the toolchain, clock and code version on your own hardware and rerun the measurement.

The byte sizes on this page come from liboqs, not from pqm4. Cycle counts and key, ciphertext and signature sizes therefore describe two different builds and two different sources, and they should not be combined into one estimate without checking that both apply to the same algorithm version. liboqs pins its ML-KEM source to a specific mlkem-native commit, and that commit may differ from the code in your own build. If your library version or vendored source differs, confirm the sizes and the speed against what you actually ship.

The IETF draft for the hybrid TLS key exchange makes no performance or benchmark claims. It fixes the lengths of the public keys, ciphertexts and shared secrets for each group, but it says nothing about how long any operation takes. Do not read the draft as evidence that a hybrid group is fast or slow. Handshake latency and CPU use depend on the implementation and the platform, so measure them in your own environment before you size servers or devices around them.

Frequently asked questions about these sizes and cycle counts

What are the public key and ciphertext sizes for ML-KEM-768?

ML-KEM-768 (NIST level 3) has a public key of 1184 bytes and a ciphertext of 1088 bytes, according to the Open Quantum Safe liboqs ML-KEM datasheet. Its shared secret is 32 bytes and its secret key is 2400 bytes. Because these lengths are fixed for the parameter set, you can size buffers from them directly. Confirm the values against the version of liboqs or other library you deploy, since the datasheet describes the liboqs build. The OQS liboqs ML-KEM datasheet lists the full table for all three ML-KEM parameter sets.

How large is the ML-DSA-65 signature in bytes?

The ML-DSA-65 signature is 3309 bytes at NIST level 3, according to the Open Quantum Safe liboqs ML-DSA datasheet. The same datasheet gives a 1952-byte public key and a 4032-byte secret key for that parameter set. Signature size matters most where certificates, firmware images or tokens carry the signature, because it adds to every message that includes one. Check the figure against the library version you run, and compare it with the parameter set your policy names.

Does the X25519MLKEM768 TLS key share fit typical packet limits?

The sources give the sizes but do not state whether they fit any packet limit. The IETF draft draft-ietf-tls-ecdhe-mlkem-05 defines X25519MLKEM768 with a 1216-byte client share and a 1120-byte server share, and a 64-byte shared secret. Whether a ClientHello of that size passes your network path depends on your MTU, middleboxes and any fragmentation handling, none of which the sources cover. Test the handshake in your own environment and check the path characteristics you control. The IETF draft also makes no performance claims.

Which ML-DSA parameter set does a rule that names ML-DSA-65 require?

A rule that names ML-DSA-65 requires that parameter set specifically, which the Open Quantum Safe liboqs ML-DSA datasheet describes as NIST level 3. The sources do not say what any particular rule or regulation requires, so read the wording of your policy or contract. Other ML-DSA sets in the same datasheet are ML-DSA-44 at level 2 and ML-DSA-87 at level 5, with different key and signature sizes. Confirm which set your rule means before you size anything, because the sizes differ across the three.

What do the pqm4 cycle counts measure?

The pqm4 README states that cycle counts are taken at 24 MHz to avoid memory-controller wait cycles. Most schemes report minimum, maximum and average over 100 executions, and the published numbers use the Arm GNU Toolchain 11.3.Rel1. The benchmarks.md file lists average cycles for key generation, encapsulation and decapsulation for ML-KEM, and for key generation, signing and verification for ML-DSA. The sources give no run dates, so confirm the results against your own hardware and toolchain before you rely on them for capacity planning.

Are ML-KEM-768 and ML-DSA-65 cycle counts the same on every device?

No, the sources do not show that they are, and they do not establish one figure for all devices. The pqm4 benchmarks.md lists separate average cycle counts for a clean build and an m4fspeed build for ML-KEM-768 (988,722 key generation for clean, 642,096 for m4fspeed). These results come from a single microcontroller setup at 24 MHz with a specific toolchain. Treat them as the results for that configuration only, and benchmark your target device to get figures that apply to your deployment.

What are the SLH-DSA signature sizes for each parameter set?

The Open Quantum Safe liboqs SLH-DSA datasheet lists the same figures for both the SHA2 and SHAKE pure variants. The 128s set (NIST level 1) has a 7856-byte signature, 128f has 17088 bytes, 192s has 16224 bytes, 192f has 35664 bytes, 256s has 29792 bytes and 256f has 49856 bytes. Public keys are 32 to 64 bytes across these sets. The fast (f) variants have larger signatures than the small (s) variants at the same level. Confirm the values against your library version, since they apply to the liboqs build the datasheet describes.

Where the ML-KEM key share travels in a TLS 1.3 handshake

The diagram starts with the client, which generates its X25519MLKEM768 key share and sends it in the ClientHello. The share is 1216 bytes: 1184 bytes of ML-KEM plus 32 bytes of X25519. The server replies with its own share in the ServerHello, 1120 bytes: 1088 bytes of ML-KEM plus 32 bytes of X25519. Both sides then derive a 64-byte shared secret. Check that both ends agree on the group codepoint 0x11EC (4588) and that your buffers and packet limits accept these sizes, since the draft is still a draft.

Key share sizes for X25519MLKEM768 in the TLS 1.3 handshake, per the IETF draft.

How DeployOpen works on this

DeployOpen helps teams apply open-source post-quantum library benchmark results to their own hardware and workloads. We scope the target platforms and library builds, run measurements under settings you agree on, and document the results so your engineers can reproduce and act on them. Engagements are fixed-scope, with the scope agreed in writing before work starts.

How we scope

  • Confirm which algorithms, parameter sets and library builds your team needs to size.
  • Agree the target hardware, clock settings and toolchain versions in the written scope.
  • Define which published benchmark figures you want checked against your own environment.

How we build

  • Set up the benchmark environment using the pqm4 or liboqs builds named in the scope.
  • Run key generation, encapsulation, decapsulation, signing and verification on your targets.
  • Record minimum, maximum and average results, noting any settings that differ from published runs.

How we hand over

  • Deliver a results report with the platform, toolchain, build settings and raw measurement data.
  • Document how each published figure compares with your measured results and where they differ.
  • Provide scripts so your own engineers can rerun the measurements after changes or upgrades.

How we support

  • Ongoing support is available as a retainer for upgrades, library version changes and retesting.
  • Retesting can follow library releases so sizing figures stay tied to the versions you run.
  • Ask us to confirm compatibility of any library version before you depend on its benchmark numbers.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.