Which ML-DSA signing interface should your application call?
Applications should call the external interface of ML-DSA, the Section 5 functions of FIPS 204. The internal interface in Section 6 is lower-level and, according to NIST's PQC FAQ quoting FIPS 204, should not be made available to applications. If you have met the word "internal" in a library's documentation or in a vendor's signing claim, read it as a sign that the function sits below the layer your code should use, not as an alternative you can pick for convenience. Engineers wiring ML-DSA signing into a library, security leads reviewing what a vendor says it supports, and PKI teams deciding how certificates and signatures get produced all meet this question, usually in the same place: the function names a library exposes.
The distinction shows up most clearly in how libraries name their signing calls. OpenSSL's pure signing wraps the message with a prefix and context as in FIPS 204 Algorithm 2, which is the external path. Its mu parameter treats the input as an externally computed value from Algorithms 7 and 8 and omits message encoding, and its documentation says the fips-indicator returns 0 when test-entropy is supplied or message-encoding is set to 0, both of which are test-oriented controls. The mldsa-native README names signature_internal as the deterministic signing function with an all zero rnd, and also describes an external mu mode in which the application computes mu itself. RFC 9881 Appendix D describes that external mu mode as the route to pre-hash style signing with ML-DSA in PKIX. When a vendor says it supports ML-DSA, ask which of these entry points it calls and whether any test-oriented control is enabled in the build you run.
The internal and external ML-DSA interfaces side by side
This table sets the FIPS 204 internal and external signing interfaces against each other, one attribute per row. Read each row as the difference between the two interfaces, and check the library column to see where each one is exposed. The main takeaway is that NIST says internal interfaces should not be made available to applications, so applications should use the external interface unless a library documents otherwise.
| Attribute | Internal interface | External interface |
|---|---|---|
| What the interface is | Lower-level signing and key generation functions that operate on the message representative directly | Signing and verification functions that take the message and context as input and build the message representative from them |
| Defining section in FIPS 204 (13 August 2024) | Section 6 | Section 5 |
| Intended audience per the sources | NIST's PQC FAQ says internal interfaces should not be made available to applications | NIST's PQC FAQ says applications should use the Section 5 interfaces |
| Handling of the message | Takes the external mu value as input, so the message encoding step is not performed inside the function | Wraps the message with a prefix and context as in FIPS 204 Algorithm 2 step 10 before computing mu |
| Seed or private key input | Accepts a KeyGen seed as an alternative to the private key for signing, per NIST's PQC FAQ | Accepts the private key as the standard input form for signing |
| OpenSSL exposure | The mu parameter treats input as the external mu value from FIPS 204 Algorithms 7 and 8, omits message encoding and ignores the context string | Pure signing wraps the message with prefix and context, and message-encoding set to 0 skips that step for testing only |
| mldsa-native exposure | signature_internal is the function used for deterministic signing with an all zero rnd | External mu mode lets the application compute mu itself and pass it in, as cited to FIPS 204 Section 6 in the README |
What each interface is and where practitioners meet it
FIPS 204 Section 6 defines the internal interfaces of ML-DSA, the lower-level functions that the external signing functions are built on. NIST's PQC FAQ quotes the standard as saying that internal interfaces "should not be made available to applications," and states that applications should use the Section 5 interfaces instead. The internal layer still matters for module developers because it covers operations that the external layer does not expose, such as importing and exporting key pairs as seeds and computing the message representative mu outside the module.
- Section 6 scope: The internal functions include ML-DSA.KeyGen_internal and the signing path that takes a seed or a private key, as described in NIST's PQC FAQ.
- Seed handling: NIST's FAQ says a KeyGen seed is an acceptable alternative key format, and that seeds can be moved between modules through the internal key generation function.
- mldsa-native: The mldsa-native README names signature_internal as the function used for deterministic signing with an all zero rnd value.
- External mu mode: mldsa-native also supports a mode where the application computes mu itself, and its README cites Section 6 for that mode, linking to a NIST guidance document.
- Open question: NIST's FAQ asks whether the validation program will allow external computation of mu, and the answer sits in a linked document this page does not summarize.
Before exposing any internal function in a product, check the library's documentation for whether it is public API, and confirm with the validation authority how the module will be tested. Confirm the version you run.
FIPS 204 Section 5 defines the external signing interface, the pure signing path that NIST says applications should use. In the pure path, the message is wrapped with a domain prefix and the context string before signing, as described in Algorithm 2 of FIPS 204. OpenSSL implements this path as its default ML-DSA signing behavior, and its documentation sets the context string to the empty string by default in OpenSSL 3.5.
- Pure signing: OpenSSL's pure signing applies the prefix and context as in FIPS 204 Algorithm 2 step 10, which is the external interface.
- Default context: The ML-DSA context string is an octet string of up to 255 bytes, and it defaults to the empty string in OpenSSL 3.5.
- Matching context: The same context must be supplied when signing and verifying, or verification will fail.
- Test-only controls: OpenSSL's message-encoding parameter set to 0 skips the prefix step for testing, and its fips-indicator returns 0 when test-entropy is supplied or message-encoding is 0.
- External mu parameter: OpenSSL's mu parameter treats the input as the external mu value from Algorithms 7 and 8, omits message encoding and ignores the context string.
Confirm the OpenSSL version and its ML-DSA context handling in your deployment, and verify that signing and verification use the same context string.
RFC 9881 describes how ML-DSA from FIPS 204 is used in X.509 certificates and CRLs. Its Appendix D describes the external mu mode as the way to get pre-hash style signing with ML-DSA in PKIX. For architects reviewing certificate tooling, this is the point where the interface choice affects what a certificate authority or verifier must support.
- Object identifiers: RFC 9881 assigns id-ml-dsa-44, id-ml-dsa-65 and id-ml-dsa-87, and requires the parameters field to be absent.
- Key storage: RFC 9881 recommends the 32 byte seed as the stored private key form, which matches NIST's position that a KeyGen seed is an acceptable key format.
- External mu in PKIX: Appendix D describes the external mu mode as the route to pre-hash style signing in PKIX.
- Status: RFC 9881 was published in October 2025 as a Proposed Standard on the IETF Standards Track.
- Standard reference: The NIST FIPS 204 final standard was published on 13 August 2024, and NIST's planning note dated 31 July 2026 says an errata spreadsheet lists minor issues for a future update.
Check which interface your certificate tooling and verifiers call, and confirm the appendix and status of the RFC version you adopt.
Differences that change what a system does when it signs
The internal and external ML-DSA signing paths handle the message, context and key input differently, so the same call site can produce different results. The cards below cover the settings and mode choices that change signing behavior, and the checks to make before a system depends on one of them.
Message wrapping on the external path
The external signing path wraps the message with a prefix and the context string before signing, as in FIPS 204 Algorithm 2 step 10, while the internal path signs the value it is given without that wrapping. A system that calls the internal function directly will produce signatures that a verifier expecting the external format will reject. Confirm which path your library's default signing call uses before comparing outputs across systems.
OpenSSL ML-DSA docContext string must match on both sides
The context string is an octet string of up to 255 bytes, and the same value must be supplied when signing and when verifying. OpenSSL 3.5 defaults it to the empty string, so a signer that sets a context and a verifier that does not will fail to verify. Record the context value alongside the key configuration and test a signature round trip between the two systems.
OpenSSL ML-DSA docsSeed or private key as signing input
NIST's PQC FAQ allows ML-DSA.Sign to take the seed in place of the private key, and RFC 9881 recommends storing the 32 byte seed as the private key form. Systems that store seeds and systems that store expanded keys can therefore be made to produce matching outputs, but the import and export path must be confirmed. Ask each vendor which form it stores and which form it accepts when importing a key.
RFC 9881 textTest-only controls that clear the FIPS indicator
OpenSSL exposes a message-encoding parameter, which when set to 0 skips the wrapping step, and a test-entropy input for fixed randomness. Either control causes the fips-indicator to return 0, so the library reports that the operation is not in FIPS mode. Production signing configuration should be checked for both settings before any compliance claim is made from the indicator.
OpenSSL signature docsExternal mu mode and open validation question
External mu mode lets an application compute the value mu itself and pass it to the signing function, which the mldsa-native README supports and OpenSSL exposes as its mu parameter. NIST's PQC FAQ notes that the Section 5 interfaces cannot compute mu outside the module and asks whether the validation program will allow this, and the sources listed here do not settle that answer. Treat mu mode as unvalidated until the module's certificate or the current NIST guidance says otherwise.
NIST PQC FAQExternal mu for pre-hash style PKIX signing
RFC 9881 Appendix D describes external mu as the way to achieve pre-hash style signing with ML-DSA in PKIX. A certificate or CRL signer that uses this route must ensure the verifier applies the same mu construction, since the appendix is the reference for how the value is formed. Confirm with your PKI software vendor that it supports the external mu route before relying on it for certificate signing.
RFC 9881 textWhere the external and internal signing paths appear in libraries and PKIX
The external and internal signing paths of ML-DSA show up in three places a practitioner is likely to touch: the OpenSSL EVP signature interface, the mldsa-native library, and the X.509 and CRL profile in RFC 9881. Start by confirming which function your library exposes for signing. Library naming is not uniform, so a function that looks like the standard signing call may in fact be an internal entry point, and a parameter that looks like a message option may change what gets signed. Check the function names and parameter documentation in the exact version you deploy before relying on either path.
In OpenSSL 3.5, the EVP_SIGNATURE-ML-DSA interface exposes controls that map onto the two paths. The default signing behavior wraps the message with a prefix and context as in FIPS 204 Algorithm 2 step 10, which is the external interface. The message-encoding parameter set to 0 skips that step, and documentation describes it as a test control. The mu parameter treats the input as the external mu value from FIPS 204 Algorithms 7 and 8, omits message encoding and ignores the context string. The test-entropy parameter and a message-encoding value of 0 both cause the fips-indicator to return 0, so an application that sets either should not treat its output as a FIPS-indicated signature. The context string defaults to the empty string in OpenSSL 3.5 and must match between signing and verification.
mldsa-native names signature_internal as the function used for deterministic signing with an all zero rnd, and also offers an external mu mode in which the application computes mu itself. The README cites FIPS 204 Section 6 for external mu and pre-hashing, through a linked NIST guidance document. For certificates and CRLs, RFC 9881 describes the external mu mode as the way to get pre-hash style signing with ML-DSA in PKIX, and it was published in October 2025 as a Proposed Standard on the IETF Standards Track. Confirm with your PKI vendor and your library version whether they produce or verify the external mu form before assuming interoperability.
How to work out which interface applies to your system
This sequence establishes whether your application or vendor calls the FIPS 204 external signing path or an internal function, and records the evidence for each. The result is a written answer for your security review on which interface signs your messages, which test controls are active, and what the vendor has confirmed in writing.
Confirm whether your requirements call the external path
Start with your application's requirements and any vendor or contract obligations that describe how signing must work. Check whether they name the Section 5 interfaces that NIST's PQC FAQ says applications should use, or whether they reference the external mu mode for pre-hash style signing. Record each requirement with its source document. This step is done when you have a written statement, traceable to a requirement, that says which interface your system is expected to use.
Inspect library functions and external mu support
Read your cryptographic library's documentation to list the signing functions it exposes to application code. Look for whether it offers an external mu input, as OpenSSL's mu parameter does for the external mu value in FIPS 204 Algorithms 7 and 8, and whether it documents any test-only mode. Note which functions are public and which are described as internal. This step is done when you have a list of exposed functions, each marked as external, external mu, internal or test-only, with the documentation page cited.
Check test entropy, message encoding and fips-indicator
Determine whether test-entropy is supplied or message-encoding is set to 0 anywhere in your configuration or code paths, since OpenSSL documents that message-encoding set to 0 skips the prefix and context wrapping used in the external interface for testing. Then check what the fips-indicator reports for your build, because OpenSSL documents that it returns 0 when either test control is active. This step is done when you have confirmed the value of each control in your deployed configuration and recorded the fips-indicator result from the running system.
Confirm the context string matches at signing and verification
Verify that the context string supplied when signing is identical to the one supplied when verifying, since OpenSSL documents that the same context must be used on both sides and that it defaults to the empty string in version 3.5. Compare the configured value in the signing service with the value in each verifying component, including any third-party verifiers. Mismatches cause verification failures rather than silent acceptance, so test a signature end to end. This step is done when a signature produced by the signing side verifies successfully on every verifying component with the same context value recorded.
Check PKIX profiles for external mu use
If your organization issues or validates certificates using a PKIX profile, check whether the profile specifies external mu use for ML-DSA. RFC 9881 Appendix D describes external mu as the mode for pre-hash style signing with ML-DSA in PKIX. Record whether your profile requires, permits or does not address this mode, and identify the document that sets the rule. This step is done when you have a written note from the profile owner stating which signing mode the profile expects, with a reference to the relevant RFC section.
Ask the vendor in writing about internal reachability
Send the vendor a written question asking whether any internal signing function, including ML-DSA.Sign_internal or ML-DSA.KeyGen_internal, can be reached from application code through their product's API, configuration or extension points. NIST's PQC FAQ states that internal interfaces should not be made available to applications, so the answer matters for your review. Ask also which version and build the answer applies to. This step is done when you hold a signed or dated vendor response that names each reachable signing function, or states that none is reachable.
Common mix-ups between the internal and external interfaces
Libraries that implement ML-DSA expose more than one signing path, and the names of those paths are easy to confuse. The cards below cover the most frequent mistakes engineers make when they choose a function, a parameter or an input format. Each one names what to check in the standard, the RFC or the library documentation before the code ships.
Treating the internal signing call as the default
The internal signing function in FIPS 204 Section 6 is meant for module internals, and NIST's PQC FAQ says it "should not be made available to applications". Applications should call the Section 5 interfaces instead. A call to the internal function in application code bypasses the message wrapping that the external path applies, so the signature may not match what a verifier expects. Confirm which function your library exposes to application developers and whether it is the Section 5 path.
NIST PQC FAQReading message encoding set to 0 as production
In OpenSSL, the message-encoding parameter set to 0 skips the prefix and context wrapping of the external path, and the library documents it for testing. A build or configuration that sets this value to 0 may produce signatures that do not follow the external interface. The fips-indicator also returns 0 when this control or test entropy is in use. Check that no production profile sets this parameter, and confirm the setting in your deployment configuration.
OpenSSL ML-DSA docsAssuming external mu equals pre-hashing
The mldsa-native README cites FIPS 204 Section 6 for both external mu and pre-hashing, which can make the two look like the same feature. RFC 9881 Appendix D describes the external mu mode as the route to pre-hash style signing in PKIX, so the two are related in that context. They are not described as identical, and the library and RFC documents set out the exact inputs for each. Read the RFC and the library documentation for the mode you plan to use before treating them as interchangeable.
RFC 9881Assuming seed and private key inputs are interchangeable
NIST's PQC FAQ says a KeyGen seed is an acceptable key format and that ML-DSA.Sign may take the seed instead of the private key, with outputs matching the original algorithm. RFC 9881 recommends the 32 byte seed as the stored private key form. The seed, however, is only interchangeable where the library accepts both formats for the call you make. Confirm which input your library accepts for signing, and check that the stored format matches what the signing function expects.
- Seed size in RFC 9881
- 32 bytes
Treating mu like the external path
OpenSSL's mu parameter treats the input as the external mu value from FIPS 204 Algorithms 7 and 8. It omits message encoding and ignores the context string, so it does not behave like the external signing path that wraps the message and context. A caller who passes mu and expects context to apply will get a signature that does not verify under the context they intended. Read how the library handles mu and context before you assume the two paths match.
OpenSSL source docQuestions readers ask about ML-DSA internal and external signing
Are the internal and external ML-DSA signing interfaces the same function?
No. FIPS 204 defines them as separate interfaces, and the internal interface works at a lower level than the external one. The external interface takes a message and a context string and builds the signed input from them, including a prefix and the context, as described in FIPS 204 Algorithm 2. The internal interface takes an already-formatted input and skips that wrapping step. Library names alone do not tell you which one is being called, so check the documentation for each function. Confirm the mapping against FIPS 204 Sections 5 and 6 and your library's reference before relying on it.
Which ML-DSA signing interface should an application call according to NIST?
NIST's PQC FAQ quotes FIPS 204 Section 6 as saying that internal interfaces should not be made available to applications, and that applications should use the external interfaces defined in Section 5. An application that wraps the internal functions directly is working against that guidance. If a product exposes an internal function to users, ask the vendor why and whether the external interface is also available. The FAQ and FIPS 204 itself are the references to check for the exact wording.
Is the external mu value required or optional in ML-DSA signing?
Mu is optional, and it is used in a specific mode rather than in ordinary signing. The external mu mode lets an application compute the mu value outside the module and pass it to the signing function. NIST's PQC FAQ notes that the Section 5 interfaces alone do not let applications compute mu outside the module and pass it in, and asks whether the validation program will permit this. The FAQ points to a linked document for the answer, which this page does not cover. The mldsa-native README and RFC 9881 Appendix D describe external mu as the route to pre-hash style signing in PKIX, so check those sources and your validation scope before depending on it.
Can a seed be used in place of the private key when signing with ML-DSA?
NIST's PQC FAQ says ML-DSA.Sign may take the seed instead of the expanded private key, and that the outputs will match the original algorithm. It also says a KeyGen seed is an acceptable alternative format for a key pair, and that seeds can be imported or exported between modules through the internal key generation function. RFC 9881 recommends storing the 32-byte seed as the private key form, which is consistent with that position. Whether a given library accepts a seed in its signing call is a separate question, so check the library's documentation for the exact parameter. The CAVP testing status for seed-based signing should also be confirmed with the validation program.
What must the context string match when signing and verifying ML-DSA?
The context string must be identical when signing and when verifying. It is an octet string of up to 255 bytes. In OpenSSL 3.5 it defaults to the empty string, so a signature made with one context will not verify under another. Where a context is set, the same value has to be supplied on both sides of the exchange. The OpenSSL EVP_SIGNATURE-ML-DSA documentation describes how the parameter is passed, and the mu-based route ignores the context string entirely, which matters if you use that mode.
What should a buyer ask a vendor about which signing interface their product exposes?
Ask which functions the product calls for signing and whether they map to the external interface defined in FIPS 204 Section 5. Ask whether any internal interface is reachable by users, administrators or integrations, since NIST's PQC FAQ says those should not be made available to applications. Ask whether the product uses the seed or the expanded private key for signing, and whether it supports external mu mode and a context string. Ask which library and version it uses, and whether the signing path is covered by CAVP testing. Request the library's documentation and the test evidence rather than accepting a general statement.
Where do the FIPS 204 interface definitions and library notes come from?
FIPS 204 is the primary source. NIST published it as a final standard on 13 August 2024, and its page carries a planning note dated 31 July 2026 about minor errata that NIST intends to correct in a future update. For library behaviour, read the OpenSSL EVP_SIGNATURE-ML-DSA documentation and the mldsa-native README, both linked from this page. Check the version of each library you run, since parameter names and defaults can change between releases. Where a detail matters for your product, confirm it against the standard and the library's own reference rather than relying on a summary.
How DeployOpen helps teams configure ML-DSA signing safely
DeployOpen starts from the scope the organization needs, then configures and tests the ML-DSA signing path in the client's own environment, using the interface that FIPS 204 and the library documentation place outside applications. Each engagement is scoped in writing before work begins, and the client receives configuration, test results and documentation they can review with their own security and compliance teams.
How we scope
- We confirm which library, version and signing call sites the organization uses for ML-DSA.
- We record in the written scope whether signing goes through the FIPS 204 Section 5 interfaces or any internal function.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- We configure the library's external signing path and check that applications do not call internal interfaces directly.
- We review any seed import, export or external mu handling against the library documentation and NIST guidance.
- We test signing and verification with the same context string on both sides, and record the result of each check.
How we hand over
- You receive the configuration, the signing call inventory and the test evidence in documents your reviewers can check.
- The handover notes state which library version and parameter set each finding applies to.
- We list open questions, such as validation-program treatment of external mu, for you to confirm with the vendor or NIST.
How we support
- Ongoing support, library upgrades and continuous testing are available as retainers.
- We retest signing configuration after a library upgrade so you can see whether the interface behavior has changed.
- Before relying on a library update, confirm its compatibility and validation status with the vendor documentation for your version.

