Which ML-DSA signing mode your system uses and why it matters
You have met both names, pure ML-DSA and HashML-DSA, in a vendor document, a library setting or a certificate profile, and you need to know which one you are configuring. The short version: pure ML-DSA signs the full message under FIPS 204, while HashML-DSA signs a digest of the message. The distinction that matters most is whether the signature must be verifiable under standards that only allow pure ML-DSA. RFC 9881 says HashML-DSA MUST NOT be used in X.509 certificates, CRLs, OCSP and related PKIX protocols, mainly to improve interoperability. If your system issues or validates PKIX objects, the mode is largely decided for you.
PKI engineers meet this question first, in certificate profiles and CRL settings, where the signature algorithm identifier must match a pure ML-DSA object identifier. Library integrators meet it in signing APIs, where a function may take a message, a digest, or an external mu value, and where the wrong call can produce a signature that another party cannot verify. Security reviewers meet it when they check which mode a product uses. The answer should be confirmed in the product's own documentation and in the profile it issues.
Check three things. First, the certificate and CRL profiles: confirm they name pure ML-DSA with the RFC 9881 identifiers (for example, id-ml-dsa-65 as 2.16.840.1.101.3.4.3.18), and that the parameters field is absent. Second, the signing interface: find out whether the library's default is pure ML-DSA, and whether a pre-hash option exists and under which setting. OpenSSL's message-encoding parameter defaults to 1, meaning pure ML-DSA, and OpenSSL states it does not support pre-hash ML-DSA signature generation, so pre-hashing must be arranged outside the library. Third, the context string. RFC 9881 leaves it at the empty default, and OpenSSL 3.5 also defaults to the empty string, but the same context must be supplied when signing and verifying, so a mismatch will fail verification.
For CMS, RFC 9882 does not specify HashML-DSA and uses only pure ML-DSA, so signed data should follow that convention. Ask your vendor to state which mode each signing path uses, and to confirm it in writing for the versions you run.
Pure ML-DSA and HashML-DSA side by side
This table compares the two ML-DSA signing modes attribute by attribute, from what each mode signs to where each one is defined, permitted or exposed in libraries. Read each row as the sources state it, and check the version you run before relying on a row. The main takeaway is that pure ML-DSA is the mode the PKIX and CMS documents use, while HashML-DSA is handled differently in each context.
| Attribute | Pure ML-DSA | HashML-DSA |
|---|---|---|
| What the mode signs | The message itself, encoded internally with a context string under FIPS 204 | A digest of the message, which the caller computes before signing |
| Defining document | FIPS 204, the NIST standard for ML-DSA | FIPS 204, the NIST standard for ML-DSA |
| PKIX status in RFC 9881 | Used in X.509 certificates and CRLs | MUST NOT be used in X.509 certificates, CRLs, OCSP or related PKIX protocols |
| CMS position in RFC 9882 | The only ML-DSA form that RFC 9882 uses for CMS | Not specified for CMS in RFC 9882 |
| OpenSSL interface | Default mode, with message-encoding set to 1 | Not supported directly; OpenSSL suggests pre-hashing externally and setting message-encoding to 0 |
| mldsa-native interface | Pure signing and verification functions for the message | Pre-hash functions that take a digest, plus SHAKE256-only variants |
| External mu option | Not used for pure signing | Used in the mu route, which skips message encoding and ignores the context string |
| FIPS indicator in OpenSSL | Reports the pure ML-DSA operation as approved | Returns 0 when message-encoding is set to 0, so the pre-hash workaround is not reported as approved |
What pure ML-DSA and HashML-DSA are
Pure ML-DSA is the default signing mode of FIPS 204, the NIST standard published as final on 13 August 2024. The signer takes the full message and a context string, then the implementation builds an internal encoding before the signature is computed. In OpenSSL the internal encoding is 0x00 || len(ctx) || ctx || message, referenced to Algorithm 2 step 10 for signing and Algorithm 3 step 5 for verification in FIPS 204. The context string is an octet string of up to 255 bytes and defaults to the empty string in OpenSSL 3.5, and the same context must be supplied when signing and verifying.
- Defining document: FIPS 204 defines pure ML-DSA as the signing operation over the message.
- Encoding in OpenSSL: The message-encoding parameter defaults to 1, which selects pure ML-DSA.
- Context string: Up to 255 bytes, defaulting to the empty string in OpenSSL 3.5, and it must match at signing and verification.
- Where it appears: RFC 9881 specifies ML-DSA for X.509 certificates and CRLs and leaves the context string at its default, the empty string.
- Testing exception: Setting message-encoding to 0 skips the encoding, which OpenSSL documents as intended for testing.
Before relying on a deployment, confirm the library version, its message-encoding default, and the context string your verifiers expect.
HashML-DSA signs a pre-computed digest of the message rather than the message itself. The mldsa-native README exposes signature_pre_hash_internal and verify_pre_hash_internal, which take a digest and support 12 allowed hash functions, and signature_pre_hash_shake256 and verify_pre_hash_shake256, which support only SHAKE256. The README cites Algorithms 4 and 5 for these operations. Practitioners meet HashML-DSA mainly in library APIs and in discussions about large inputs or external hashing, and the sources do not show it being used as a default anywhere.
- Defining document: FIPS 204 defines HashML-DSA as a separate mode that accepts a digest, with Algorithms 4 and 5 covering its signing and verification.
- Supported hashes in mldsa-native: The README lists 12 allowed hash functions for the general pre-hash functions and SHAKE256 alone for the SHAKE-specific pair.
- OpenSSL position: OpenSSL states it does not support pre-hash ML-DSA signature generation and suggests pre-hashing externally with message encoding disabled.
- FIPS indicator: The OpenSSL fips-indicator returns 0 when message-encoding is set to 0, so that workaround is not reported as a FIPS approved operation by that indicator.
- PKIX restriction: RFC 9881 Section 8.3 says HashML-DSA MUST NOT be used in X.509 certificates, CRLs, OCSP and related PKIX protocols, mainly for interoperability reasons.
For any HashML-DSA deployment, check the exact hash function list in your library version and confirm whether your verifiers accept the pre-hashed form.
The two modes reach practitioners through different documents and different products. Pure ML-DSA is the mode named in RFC 9881 for certificates and CRLs and in the OpenSSL signing interface. HashML-DSA appears in the mldsa-native library and in the FIPS 204 text, while RFC 9881 uses an external mu mode in its Appendix D as the pre-hash style alternative. RFC 9882 uses only pure ML-DSA for CMS, because signed attributes are small and pre-hashing gives no meaningful size benefit.
- Certificates and CRLs: RFC 9881 describes ML-DSA in X.509 and CRLs and excludes HashML-DSA from PKIX protocols.
- CMS signing: RFC 9882 specifies pure ML-DSA only and requires SHA-512 support, with SHAKE256 recommended as the message-digest signed attribute digest.
- External mu mode: OpenSSL's mu parameter takes the external mu value from FIPS 204 Algorithms 7 and 8 and ignores the context string.
- Library APIs: Check whether the library exposes pure, pre-hash, or external mu entry points before choosing one.
- Standards status: RFC 9881 was published as a Proposed Standard on the IETF Standards Track in October 2025.
Confirm which mode your certificate profile, CMS profile and signing library use before writing configuration or evidence.
Differences that change how systems are built
Pure ML-DSA and HashML-DSA differ in more than the input they accept. The choice affects which standards allow each one, which libraries can produce it, and how a FIPS indicator reports the result. The cards below cover the decisions that follow from those differences.
PKIX forbids HashML-DSA
RFC 9881 says HashML-DSA MUST NOT be used in X.509 certificates, CRLs, OCSP and related PKIX protocols, mainly to improve interoperability. Any certificate issuance, revocation or status pipeline built for PKIX must therefore use pure ML-DSA. Check whether your CA, OCSP responder and validation libraries reject HashML-DSA objects before a pre-hash design reaches production.
RFC 9881 textCMS uses pure ML-DSA
RFC 9882 does not specify HashML-DSA for CMS and uses only pure ML-DSA. Its signed attributes are small, so pre-hashing gives no meaningful size benefit, which follows the same convention as EdDSA in RFC 8419 and SLH-DSA in RFC 9814. For CMS signing services, plan the message-digest attribute around SHA-512 support and SHAKE256 as RFC 9882 recommends.
RFC 9882 textExternal mu for pre-hash style signing
RFC 9881 says pre-hash style signing is supported through the external mu mode in its Appendix D, and that this route avoids the key commitment problem HashML-DSA creates. OpenSSL exposes the same idea through its mu parameter, which takes the external mu value from FIPS 204 Algorithms 7 and 8 and skips message encoding. Confirm with your library version how mu is computed and handled before relying on it.
RFC 9881 Appendix DFIPS indicator reports zero
OpenSSL's fips-indicator returns 0 when message-encoding is set to 0. That means the pre-hash workaround, which disables message encoding, is not reported as a FIPS approved operation by that indicator. If your compliance evidence depends on the indicator, record that result for every signing path, and ask your assessor how it treats an operation the indicator does not report as approved.
OpenSSL ML-DSA docsNo pre-hash generation in OpenSSL
OpenSSL states that it does not support Pre Hash ML-DSA Signature Generation. Its documentation suggests pre-hashing externally and then disabling message encoding, which is the workaround the FIPS indicator flags. Teams that need HashML-DSA signatures must either hash outside OpenSSL or choose a library that exposes pre-hash functions, and should verify the choice against their own test vectors.
OpenSSL source docContext strings must match
The ML-DSA context string is an octet string of up to 255 bytes and defaults to the empty string in OpenSSL 3.5. RFC 9881 also leaves the context at its default, the empty string. The same context must be supplied when signing and verifying, so a mismatch between signer and verifier causes failures. Record the context value in your signing configuration and test it across every system that verifies signatures.
OpenSSL ML-DSA docsWhere pure ML-DSA and HashML-DSA show up in libraries and standards
Before you configure signing, check which mode the standard you are implementing permits. For X.509 certificates, CRLs, OCSP and related PKIX protocols, RFC 9881 Section 8.3 says HashML-DSA MUST NOT be used, mainly to improve interoperability. Certificates and CRLs signed with ML-DSA therefore use the pure mode. RFC 9881 uses the ML-DSA context string at its default, the empty string, in Section 3. RFC 9881 was published in October 2025 as a Proposed Standard on the IETF Standards Track, and is available at RFC 9881. Confirm the version of RFC 9881 your PKI tooling implements before assuming full coverage.
For CMS, RFC 9882 does not specify HashML-DSA and uses only pure ML-DSA, because signed attributes are small and pre-hashing gives no meaningful size benefit. The same convention appears in RFC 8419 for EdDSA and RFC 9814 for SLH-DSA. RFC 9882 requires support for SHA-512 and recommends SHAKE256 as the digest for the message-digest signed attribute used with ML-DSA. The full text is at RFC 9882. Check that your CMS implementation supports the digest the standard requires before you select it.
At the library level, OpenSSL 3.5 defaults the message-encoding parameter to 1, which means pure ML-DSA. Setting it to 0 skips the encoding and is documented as intended for testing. OpenSSL states it does not support pre-hash ML-DSA signature generation and suggests pre-hashing externally with message encoding disabled, but the fips-indicator returns 0 in that case. Separately, the mldsa-native README exposes signature_pre_hash_internal for HashML-DSA with 12 allowed hash functions, and signature_pre_hash_shake256, which supports only SHAKE256. The sources listed here do not state support for pre-hash signing beyond these functions, so confirm the supported configuration for your library version before you deploy.
How to work out which mode applies to your system
This sequence establishes whether your PKI and signing stack sign the message with pure ML-DSA or a pre-hashed digest with HashML-DSA. It ends with a recorded, confirmed mode for each signing path before any signature is produced, so certificates and CMS signatures match the profile your environment is meant to follow.
Identify every place your PKI issues or verifies ML-DSA
List each certificate authority, CRL and OCSP responder, and any CMS signing service in your environment that uses ML-DSA. Note which of them issue X.509 certificates or CRLs, and which sign CMS objects. This inventory tells you which profile governs each path. Done when every ML-DSA signing or verification point is named, with its owner, and each one is tagged as X.509 or CMS.
Check the certificate profile against RFC 9881
Review the certificate profile your PKI uses for ML-DSA keys against RFC 9881, Section 8.3, which says HashML-DSA MUST NOT be used in X.509 certificates, CRLs, OCSP and related PKIX protocols. Confirm the profile specifies pure ML-DSA and that the object identifiers and absent parameters field match RFC 9881. Done when each X.509 profile is recorded as pure ML-DSA and you have noted any profile that does not state a mode.
Check the CMS profile against RFC 9882
Review the CMS profile used for ML-DSA signed objects against RFC 9882. The RFC does not specify HashML-DSA for CMS and uses only pure ML-DSA, so confirm your CMS profile matches that. Also confirm the message-digest signed attribute uses a digest RFC 9882 supports, which requires SHA-512 and recommends SHAKE256. Done when the CMS profile is recorded as pure ML-DSA with a supported digest, or any gap is flagged for the owner.
Review the signing library's message-encoding settings
In each signing library, find the message-encoding parameter and the mu parameter. In OpenSSL, message-encoding defaults to 1, which means pure ML-DSA, and setting it to 0 skips the encoding and is documented as intended for testing. The mu parameter lets a caller pass an external mu value, which skips message encoding and ignores the context string. Note the library version, since defaults depend on it. Done when you have written down the default for each library and whether any setting in your configuration changes it.
Read the vendor's pre-hash and FIPS indicator documentation
Check the vendor documentation for any pre-hash interface and for how its FIPS indicator reports the operation. OpenSSL states it does not support pre-hash ML-DSA signature generation and suggests pre-hashing externally with message encoding disabled, and its FIPS indicator returns 0 when message-encoding is set to 0, so that workaround is not reported as a FIPS approved operation by that indicator. For other products, the sources listed on this page do not say, so confirm with the vendor. Done when each pre-hash interface and its FIPS indicator behavior is recorded against the version you run.
Confirm the mode in your own configuration
Before signing anything, confirm in your own configuration which mode each signing path uses. Inspect the actual settings in the deployed build, not only the documentation, and check that message-encoding and any mu or pre-hash options match the profile recorded in the earlier steps. If a path uses an external mu workaround or a pre-hash interface, record it as a deviation to review. Done when each signing path has a written, confirmed mode and any mismatch has an owner.
Record the context string used for signing and verifying
Confirm the ML-DSA context string on each path. RFC 9881 Section 3 leaves the context string at its default, the empty string, and OpenSSL 3.5 defaults to the empty string as well. The same context must be supplied when signing and when verifying, so check that signing and verification components use an identical value. Done when the context string for each path is recorded and matches on both sides of every sign and verify pair.
Common mix-ups between the two modes
Pure ML-DSA signs the message with its own encoding, while HashML-DSA signs a digest and is handled differently in PKI and CMS. Most confusion comes from assuming that a standard, a library switch or an indicator settles which mode is in use, so the cards below cover the points worth checking before you configure or review a signing setup.
Listed in FIPS 204 does not mean allowed in X.509
FIPS 204 specifies HashML-DSA alongside pure ML-DSA, so it is easy to assume both can appear in certificates and revocation data. RFC 9881 Section 8.3 says HashML-DSA MUST NOT be used in X.509 certificates, CRLs, OCSP and related PKIX protocols, mainly to improve interoperability. Check any PKI profile or CA policy against that rule, and confirm which mode your issuing tooling produces before you rely on its output.
RFC 9881Disabling message encoding is not HashML-DSA
In OpenSSL, the message-encoding parameter defaults to 1, which means pure ML-DSA, and setting it to 0 skips the encoding. The OpenSSL documentation describes that setting as intended for testing, and it does not produce a HashML-DSA signature. OpenSSL also states it does not support pre-hash ML-DSA and suggests pre-hashing externally before disabling encoding. Treat that route as a separate design choice that needs its own review.
OpenSSL ML-DSA docsFIPS indicator is not an approval
OpenSSL's fips-indicator returns 0 when message-encoding is set to 0, so the pre-hash workaround is not reported as a FIPS approved operation by that indicator. A reader who sees a passing FIPS mode and assumes the external pre-hash path is approved has misread the signal. Confirm approval status against the standard and your validation scope, not against a single indicator value.
OpenSSL ML-DSA docsContext string is separate from the digest choice
The ML-DSA context string is an octet string of up to 255 bytes and defaults to the empty string in OpenSSL 3.5. It is a domain separation input, and it is not the same as choosing which digest is signed. The same context must be supplied when signing and verifying. RFC 9881 Section 3 also leaves the context string at its default, the empty string. Keep the two settings in separate config entries and verify both ends agree.
RFC 9881Questions people ask about pure ML-DSA and HashML-DSA
Are pure ML-DSA and HashML-DSA the same thing?
No. They are two different signing modes of the same ML-DSA family. Pure ML-DSA signs the message itself. HashML-DSA signs a digest of the message that has been computed with a hash function chosen by the caller. The two modes produce different encodings of the input to the signing operation, so a signature made in one mode does not verify in the other. OpenSSL's documentation describes pure ML-DSA as the default, citing FIPS 204 Algorithm 2 step 10 for signing and Algorithm 3 step 5 for verification, and it explains that the message is encoded internally as 0x00 || len(ctx) || ctx || message before signing. Engineers should confirm which mode a given library, certificate profile or protocol expects before generating keys or signatures, because mixing the two modes is an interoperability failure, not a subtle difference in strength.
Which of the two modes is the newer one?
The sources on this page do not establish an age ordering that would make one mode the successor of the other. FIPS 204, which NIST published as a final standard on 13 August 2024 after a draft released on 24 August 2023, specifies ML-DSA, and the pure signing path is the one that OpenSSL uses by default. RFC 9881, published in October 2025 as a Proposed Standard on the IETF Standards Track, describes the use of ML-DSA in X.509 certificates and CRLs, and it is the document that makes the HashML-DSA restriction for certificates explicit. Readers should read the dates as the dates of the documents, not as a statement about which mode is preferred. The sources do not rank the two modes, and any claim that one is more current in practice should be checked against the specific library and profile in use.
Can certificates use HashML-DSA?
RFC 9881 Section 8.3 states that HashML-DSA MUST NOT be used in X.509 certificates, CRLs, OCSP and related PKIX protocols. The stated reason is mainly interoperability. In practice this means a PKI operator issuing certificates under this profile should expect pure ML-DSA signatures, and a relying party that receives a certificate signed with HashML-DSA is outside what that RFC allows. Certificate and CRL profiles should therefore name the pure mode explicitly, and a procurement or vendor review should ask which signing mode the certificate authority uses. The restriction applies to the PKIX profile, so it governs certificates and revocation data, not every signing use in an organization.
Do organizations need both pure ML-DSA and HashML-DSA?
The sources do not say that every organization must deploy both modes. The sources do show where each mode fits. RFC 9882, which covers CMS signed data, does not specify HashML-DSA at all and uses only pure ML-DSA, because signed attributes are small and pre-hashing gives no meaningful size benefit. It follows the same convention as EdDSA in RFC 8419 and SLH-DSA in RFC 9814. For certificates, RFC 9881 prohibits HashML-DSA. Where a pre-hash workflow is genuinely needed, RFC 9881 Appendix D describes the external mu mode as the supported route, and it avoids the key commitment problem that HashML-DSA creates. Teams should first identify which protocols and products in their estate sign large inputs that they cannot hold in memory, and then check whether the protocol requires a specific mode before deciding whether a second mode is needed at all.
Does OpenSSL support pre-hash ML-DSA signing?
The OpenSSL documentation for EVP_SIGNATURE-ML-DSA says that OpenSSL does not support Pre Hash ML-DSA Signature Generation. The suggested workaround is to pre-hash the data externally and then set the message-encoding parameter to 0, which skips the internal encoding. The documentation describes that setting as being used for testing. The fips-indicator for OpenSSL returns 0 when message-encoding is set to 0, so this workaround is not reported as a FIPS approved operation by that indicator. Engineers who plan to use this path should confirm with their own compliance team whether they need a FIPS approved operation, and should test the external pre-hash against the verifier they will use in production. The workaround moves responsibility for correct encoding onto the caller.
What is the external mu mode in ML-DSA?
The external mu mode is an interface in which the caller passes in the external mu value defined in FIPS 204 Algorithms 7 and 8. In OpenSSL this is exposed through the mu parameter. Using it skips message encoding and ignores the context string, so the caller takes on the work of producing the mu value correctly. RFC 9881 Appendix D says that pre-hash style signing is supported through this external mu mode and that it avoids the key commitment problem that HashML-DSA creates. Engineers using the mu path should treat it as a lower-level interface: both signer and verifier must compute mu the same way, and a mismatch will cause verification to fail. Check the exact library version in use, because the availability and naming of the parameter depend on it.
What should I ask a vendor about pure ML-DSA and HashML-DSA?
Ask which signing mode the product uses for each function: certificates, CRLs, document or code signing, and any protocol message. Ask whether the product uses the pure mode by default, and whether it can be configured to use another mode. For certificate and revocation functions, ask for confirmation that HashML-DSA is not used, citing RFC 9881 Section 8.3 as the reference. Ask which library and version implements the signing operation, and whether the vendor relies on an external pre-hash workaround or the mu interface. Ask whether the vendor has tested interoperability with the verifiers your organization uses. Ask for the dated documentation that supports each answer. Where a vendor cannot answer a question, record that as a finding rather than assuming a default.
Does the context string change how these modes work?
Yes, the context string is an input that affects signing and verification. In OpenSSL 3.5, the ML-DSA context string is an octet string of up to 255 bytes and defaults to the empty string. RFC 9881 Section 3 also leaves the context string at its default, the empty string. The same context must be supplied when signing and when verifying, or verification will fail. Teams that use a non-empty context should document it in their configuration and test it with every verifier. The context is encoded into the message in pure mode, and the mu interface ignores it, so the two paths should not be assumed to be interchangeable when a context is present.
How DeployOpen works on this
DeployOpen approaches the choice between pure ML-DSA and HashML-DSA as a scoped engineering decision, not a default setting. We start from where your systems sign data, which libraries and protocols carry those signatures, and which profile your certificates, CMS messages or internal formats must follow. Each engagement is fixed-scope and ends with documented configuration and tests your team can rerun.
How we scope
- We inventory every signing path and record whether it signs raw messages or pre-hashed digests.
- We check which standards each path must follow, such as RFC 9881 for X.509 certificates and CRLs.
- The written scope names the libraries, versions and signing interfaces covered before any work starts.
How we build
- We configure pure ML-DSA signing with the context string set explicitly, and confirm the same context is used when verifying.
- Where a digest-based design is required, we document the external pre-hash approach and its library support before implementing it.
- We test sign and verify round trips across each library and version in the environment you actually run.
How we hand over
- You receive configuration records showing the signing mode, message encoding setting and context string for each path.
- The test suite and the signing interface map are delivered so your team can rerun verification after upgrades.
- Findings that depend on library behavior are listed with the version and documentation source they came from.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- We retest signing paths when a library, the FIPS 204 errata or a dependent profile changes.
- Before a quote, ask us to confirm the scope, deliverables and timeline in writing for your signing paths.

