Seed vs expanded key: which one your ML-KEM and ML-DSA keys use
When a vendor, library or certificate profile names a seed or an expanded key for ML-KEM or ML-DSA, the question is what the stored private key material actually is. The seed is a compact value of 32 bytes for ML-DSA and 64 bytes for ML-KEM from which the full private key can be regenerated. The expanded form is the full private key itself, which is much larger, for example 2560, 4032 or 4896 bytes for ML-DSA-44, -65 and -87 under RFC 9881. The distinction that matters operationally is whether a discarded seed can be recovered: if the seed was thrown away and only an expanded key survives, the seed cannot be rebuilt from it, so the key pair cannot be reconstructed in seed form.
PKI engineers, platform teams and auditors meet this question wherever private keys are serialized. It appears in the private key field of a PKCS#8 container, where RFC 9881 and RFC 9935 define a choice between a seed, an expanded key, or both, and in OpenPGP, where RFC 9980 gives secret key sizes that match the seed lengths. Confirm which form your library writes by default, since defaults differ by release.
OpenSSL 3.5 illustrates how defaults shape this in practice. It retains the seed for generated ML-DSA keys and writes it to PKCS#8 output by default, and its ml-dsa.output_formats setting defaults to seed-priv followed by priv-only, so the expanded key is written only when no seed is available. Keys can be converted to expanded-only form with openssl pkey -provparam ml-dsa.retain_seed=no. For PKCS#8 files that hold both forms, ml-dsa.prefer_seed decides which one is used. For ML-KEM, setting ml-kem.retain_seed to a false value leaves only the 1632, 2400 or 3168 byte decapsulation key in output.
Before accepting a key store or backup design, ask the vendor which form is written, whether the seed is retained at generation, import and export, and how a file holding both forms is handled. The seed-only draft draft-rosomakho-lamps-mldsa-mlkem-seed-only-00 notes that a seed can reconstruct the full private key, so it needs the same protection in backups and transfers as an expanded key. Do not assume that keeping only the seed reduces handling requirements.
Seed and expanded key side by side for ML-KEM and ML-DSA
This table compares the seed and expanded private key formats for ML-DSA and ML-KEM across size, defining document, recommended status and recoverability. Read each row to see what a stored key contains and where each format appears in the RFCs. The main takeaway is that RFC 9881 and RFC 9935 recommend the seed, and a discarded seed cannot be rebuilt from an expanded key.
| Attribute | Seed format | Expanded private key format |
|---|---|---|
| What the format is | A 32-byte seed for ML-DSA or a 64-byte seed for ML-KEM from which the private key is regenerated | The full private key stored as an expandedKey: 2560, 4032 or 4896 bytes for ML-DSA, and 1632, 2400 or 3168 bytes for ML-KEM |
| Defining documents and date | RFC 9881 (October 2025) for ML-DSA and RFC 9935 (March 2026) for ML-KEM | RFC 9881 (October 2025) for ML-DSA and RFC 9935 (March 2026) for ML-KEM |
| Recommended status | Recommended by RFC 9881 and RFC 9935, with RFC 9935 calling it the most compact format | Permitted but not recommended by RFC 9881 and RFC 9935 |
| Where it appears in RFC 9881 and RFC 9935 | RFC 9881 defines the seed as context tag [0] in the private key CHOICE; RFC 9935 defines it as a 64-octet seed with tag [0] and byte 0x80 | RFC 9881 defines the expandedKey as a CHOICE option; RFC 9935 defines it as an expandedKey OCTET STRING |
| Where it appears in RFC 9964 and RFC 10073 | RFC 9964 requires the priv parameter to be the 32-byte seed; RFC 10073 states the ML-DSA component of a composite is a 32-byte seed | RFC 9964 does not use this format; RFC 10073 does not describe an expanded key for the ML-DSA component |
| Recoverable if discarded | Not applicable: the seed is the source from which the key is regenerated | No, a seed discarded earlier cannot be recovered from an expanded key, per the seed-only draft of 21 October 2026 |
| Protection needed | Needs the same protection as an expanded key, including in backups and transfers, per the seed-only draft | Needs the same protection as a seed, since the full key is held in the file |
| What to confirm | Check your library's default retention and whether the seed is written to output files | Check whether your library stores only the expanded key and confirm consistency checks when both forms are present |
What the seed format and the expanded private key format are
The seed format stores a short random value from which the full private key can be regenerated. RFC 9881 defines a 32-byte seed for ML-DSA as one choice of the private key structure, and RFC 9935 defines a 64-octet seed for ML-KEM. RFC 9881 and RFC 9935 both recommend the seed format, and RFC 9935 calls the ML-KEM seed the most compact form.
- What it stores: A 32-byte ML-DSA seed or a 64-octet ML-KEM seed, tagged [0] in the private key CHOICE.
- Which document defines it: RFC 9881 for ML-DSA and RFC 9935 for ML-KEM, with RFC 9964 requiring the seed for ML-DSA in JOSE and COSE.
- Where practitioners meet it: In PKCS#8 files, where OpenSSL 3.5 keeps the seed by default for generated ML-DSA keys.
- Composite keys: RFC 10073 states that the ML-DSA component of a composite private key is a 32-byte seed.
- Consistency checks: When a PKCS#8 file holds both a seed and an expanded key, RFC 9881 says the recipient must reject the key if the two do not match.
Check which form your PKCS#8 files, composite keys and JOSE or COSE objects use, and confirm that your tooling reads the seed tag rather than inferring the variant from length.
The expanded format stores the full private key material as produced by the algorithm, rather than the seed it was derived from. RFC 9881 defines an expandedKey for ML-DSA, and RFC 9935 defines an expandedKey OCTET STRING for ML-KEM. Both are available as alternatives to the seed, and either can appear alone or alongside the seed.
- What it stores: An ML-DSA expandedKey of 2560, 4032 or 4896 bytes for ML-DSA-44, -65 and -87, or an ML-KEM expandedKey of 1632, 2400 or 3168 octets.
- Which document defines it: RFC 9881 for ML-DSA and RFC 9935 for ML-KEM, both as a second private key option beside the seed.
- Where practitioners meet it: In PKCS#8 output when OpenSSL 3.5 is configured to write the expanded key, and in PKCS#8 files that hold both forms.
- Retention trade-off: The Internet-Draft draft-rosomakho-lamps-mldsa-mlkem-seed-only-00 notes that a seed discarded earlier cannot be recovered from an expanded key, so seed-only systems would need new key pairs for such keys.
- Parser behavior: RFC 9935 says parsers should identify the ML-KEM variant by tag rather than by length.
Confirm which expanded key sizes your software writes and reads, and whether a given PKCS#8 file contains the seed, the expanded key or both.
Six differences between seed and expanded keys that change system behavior
A seed and an expanded private key can both describe the same ML-KEM or ML-DSA key, but they behave differently in recovery, backup, storage and validation. The cards below cover the consequences a system team has to plan for, and the points where the RFCs and the draft differ.
Recovery after the seed is gone
If a system keeps only the expanded key and the seed is discarded, the seed cannot be rebuilt from the expanded key. The seed-only draft says such systems would need a new key pair and replacement of the certificates or bindings tied to that key. Before discarding a seed, confirm which certificates and bindings depend on the key and whether a replacement path exists.
Seed-only draftBackup and transfer protection
A seed can regenerate the full private key, so the draft says it needs the same protection as an expanded key, including in backups and transfers. Treat every backup copy and export of a seed-format key as sensitive key material, with the same access control and encryption you apply to the expanded form.
Seed-only draftSize on disk
The ML-KEM seed is 64 bytes, while expanded ML-KEM decapsulation keys are 1632, 2400 and 3168 bytes for ML-KEM-512, -768 and -1024. The ML-DSA seed is 32 bytes, while the expanded ML-DSA-44, -65 and -87 private keys are 2560, 4032 and 4896 bytes. Storage and transfer budgets for large fleets of keys should be calculated with the format each system actually writes.
OpenSSL 3.5 ML-KEMSeed format required by RFC 9964
RFC 9964 defines ML-DSA serializations for JOSE and COSE and uses only the seed private key format, so the priv parameter must be the 32-byte seed. Systems that sign JOSE or COSE objects therefore cannot use the expanded key form under that RFC. Confirm the library you use can load and write the seed form before you rely on it.
RFC 9964 textSeed format recommended by RFC 9881 and RFC 9935
RFC 9881 for ML-DSA and RFC 9935 for ML-KEM both name the seed as the recommended private key format, and RFC 9935 calls the seed the most compact form. The RFCs still define the expanded key as a valid option, so a system may accept both. Check the recommendation against the requirements of your own deployment before choosing one form.
RFC 9881 textConsistency check for keys holding both forms
RFC 9881 defines a private key that can hold both a seed and an expanded key. It says a recipient should check that the two forms are consistent and must reject the key if they are not. OpenSSL 3.5 exposes settings that decide which form wins when both are present. Set those options deliberately and test the rejection path.
OpenSSL 3.5 ML-DSAWhere the seed and expanded formats show up in certificates, libraries and protocols
Architects choosing a storage form for ML-KEM and ML-DSA keys should first check what each format specification says, because the specifications do not all make the same choice. In X.509, RFC 9881 defines the ML-DSA private key as a CHOICE of a 32-byte seed, an expanded key, or both, and recommends the seed format. RFC 9935 does the same for ML-KEM, describes the 64-octet seed as the most compact form, and says parsers should identify the variant by its tag rather than by length. For CMS signing, RFC 9882 places the ML-DSA identifiers in the SignerInfo, and the sources listed on this page do not say which private key form it expects, so confirm this in the RFC before relying on it.
For JOSE and COSE, RFC 9964 uses only the seed form, and the priv parameter must be the 32-byte seed. For OpenPGP, RFC 9980 uses 32-octet secret keys for ML-DSA components and 64-octet secret keys for ML-KEM components, the same sizes as the seeds. For composite keys, RFC 10073 states that the ML-DSA component of a composite is a 32-byte seed.
OpenSSL 3.5 is where defaults matter most for day-to-day operations. It retains the seed by default for generated ML-DSA keys and writes it to PKCS#8 output by default. Its ml-dsa.output_formats setting defaults to seed-priv followed by priv-only. The command openssl pkey -provparam ml-dsa.retain_seed=no converts a seed-format ML-DSA key to an expanded-only key. For ML-KEM, ml-kem.prefer_seed defaults to regenerating the key from the seed. Before deploying, confirm these settings in the OpenSSL 3.5 ML-DSA and OpenSSL 3.5 ML-KEM documentation for the version you run.
How OpenSSL 3.5 handles seed retention by default and how to change it
This sequence shows which seed-related settings OpenSSL 3.5 applies by default for ML-DSA and ML-KEM keys, and how to change them to convert, prefer or discard the seed. Each step ends with the output or check that confirms the setting took effect, so you can verify the behavior in your own build before relying on it.
Confirm the OpenSSL 3.5 build in use
Check that the OpenSSL binary and library on the host are version 3.5 or later, because the seed settings described here are documented for OpenSSL 3.5. Run the version command and confirm the reported release string. If an older or distributed build is in use, the defaults and parameter names below may differ, so confirm them against the documentation for that build before continuing. The check is complete when the reported version matches the 3.5 series.
Review the default seed retention for ML-DSA
OpenSSL 3.5 retains the seed by default for generated ML-DSA keys and for keys loaded from seed-format PKCS#8 files, and writes the seed into PKCS#8 output by default. Generate a test ML-DSA key and inspect the PKCS#8 output to see whether a seed is present. The check is complete when you can state, from your own output, whether the seed was written.
Check the ml-dsa.output_formats default
The ml-dsa.output_formats setting defaults to seed-priv followed by priv-only. Under this default, OpenSSL writes the seed and the FIPS 204 secret key (sk) when the seed is available, and writes only the sk otherwise. Confirm the effective value in your build and check that a key loaded from a seed-only source produces the expected output. The check is complete when the written format matches the documented default for that input.
Convert a seed-format ML-DSA key to sk format
To convert a seed-format ML-DSA key to a key that holds only the FIPS 204 sk, run the openssl pkey command with the provider parameter ml-dsa.retain_seed=no. Point the command at your existing key file and write to a new output file so the original is not overwritten. Inspect the new file to confirm it no longer carries the seed. The check is complete when the converted key holds the sk without the seed.
Set ml-dsa.prefer_seed for PKCS#8 files holding both keys
When a PKCS#8 file contains both a seed and a companion sk key for ML-DSA, ml-dsa.prefer_seed decides which one OpenSSL uses. The documented behavior is that the seed wins by default, and setting this option to false makes OpenSSL use the companion sk key instead. Set the value you need on a test file and confirm which key is used with a signing or key-inspection operation. The check is complete when the behavior matches the setting you chose.
Set ml-kem.prefer_seed for ML-KEM keys
The ml-kem.prefer_seed setting defaults to regenerating the ML-KEM key from the seed and ignoring the companion dk key. Review the effective value in your build and, if you need the companion dk key used instead, set the option explicitly and test it against a sample file. The check is complete when you can confirm which key material OpenSSL applied for your chosen value.
Stop ML-KEM seed retention with ml-kem.retain_seed
Setting ml-kem.retain_seed to a false value stops seed retention and leaves only the dk key in PKCS#8 output. Write a test key with this setting, then inspect the output to confirm that no seed is present. Expanded dk keys are documented at 1632, 2400 and 3168 bytes, while the ML-KEM seed is 64 bytes, so the file size can be used as a rough check. The check is complete when the output carries only the dk key and the file matches the expected expanded size for the parameter set.
Whether seed and expanded forms are used together in one key
RFC 9881 and RFC 9935 both define a "both" form for private keys, in which a seed and an expanded key sit together in one structure. For ML-DSA, RFC 9881 defines the private key as a CHOICE of a 32-byte seed (context tag [0]), an expandedKey of 2560, 4032 or 4896 bytes for ML-DSA-44, -65 and -87, or both. For ML-KEM, RFC 9935 defines a DER CHOICE of a 64-octet seed (tag [0], byte 0x80), an expandedKey OCTET STRING of 1632, 2400 or 3168 octets, or both as a SEQUENCE. RFC 9935 also says parsers should identify the variant by tag and not by length, so a reviewer checking a key should confirm which variant a parser reads rather than inferring it from the size of the blob.
The consistency check is the point a recipient must act on. RFC 9881 says a recipient should check that the seed and expanded key in the both form are consistent, and must reject the key if they are not. Any system that accepts both-form keys from another party, a backup, or a vendor export should therefore confirm that it performs this check and fails closed on a mismatch. The sources listed on this page do not say how mismatches are resolved beyond rejection, so teams should not assume a fallback to either component. Ask the vendor or project to document its behavior for a mismatched both-form key, and test it with a deliberately inconsistent key in a non-production environment.
In OpenSSL 3.5, the companion key behavior is controlled by the ml-dsa.prefer_seed and ml-kem.prefer_seed settings. For ML-DSA, setting ml-dsa.prefer_seed makes the seed win over the companion sk key in a PKCS#8 file that holds both, and setting it false uses the companion key instead. For ML-KEM, ml-kem.prefer_seed defaults to regenerating the key from the seed and ignoring the companion dk key. Operators reviewing a deployment should record which setting their OpenSSL build uses, because the two settings have different defaults and the choice determines which component is actually used at runtime.
How to work out which format applies to your keys
Which RFC profile do my certificates follow for ML-DSA and ML-KEM keys?
Check the profile your certificate authority or PKI product documents. RFC 9881 defines ML-DSA private keys in X.509 and recommends the seed format, using a 32-byte seed in a CHOICE alongside an expandedKey or both. RFC 9935 defines the ML-KEM private key the same way, with a 64-octet seed recommended as the most compact form. Both RFCs are Proposed Standards. Confirm which form your issuing and consuming systems accept, because a profile that prefers the seed does not mean every tool produces or reads it. Read the relevant RFC 9881 and RFC 9935 and compare them with your vendor's documentation.
Does my cryptographic library keep the seed by default?
For OpenSSL 3.5, the answer depends on the operation and the key type. It retains the seed by default for generated ML-DSA keys and for keys loaded from seed-format PKCS#8 files, and it writes the seed in PKCS#8 output by default. Its ml-dsa.output_formats setting defaults to seed-priv followed by priv-only, so it writes the seed and the FIPS 204 sk when a seed is available, and only the sk otherwise. For ML-KEM, retention is controlled by ml-kem.retain_seed, and ml-kem.prefer_seed defaults to regenerating the key from the seed. Check each setting in the OpenSSL 3.5 ML-DSA and OpenSSL 3.5 ML-KEM documentation against the version you run, since other libraries may differ.
Can I recover a key if the seed was discarded earlier?
Not from an expanded key alone. The seed-only draft draft-rosomakho-lamps-mldsa-mlkem-seed-only-00 states that a seed discarded earlier cannot be recovered from an expanded key. If your systems keep only expanded keys, a seed-only design would need a new key pair and replacement of the certificates or bindings tied to the old one. That draft is an Internet-Draft dated 21 October 2026 and is not a published standard, so confirm its status before relying on it. Ask your vendor whether an expanded-only key can be rebuilt into a seed format, and what that would require in practice.
What backup protection does a seed need compared with an expanded key?
A seed needs the same protection as an expanded key. The seed-only draft says that a seed can reconstruct the private key, so it must be protected in backups and transfers exactly as an expanded key would be. Storing a 32-byte or 64-byte seed in a less protected location than the expanded form is therefore not a saving in security. Review your backup encryption, access controls and key custody procedures to confirm they cover seeds as well as expanded keys, and check that restore procedures handle both forms.
What does my vendor's documentation say about the format it stores?
Ask the vendor to state, in writing, which private key form it writes by default, which forms it can read, and whether a seed can be retained or converted. Documentation that says only "post-quantum key support" does not answer this. For OpenSSL, the relevant settings are ml-dsa.retain_seed, ml-dsa.prefer_seed, ml-kem.retain_seed and ml-kem.prefer_seed, and the conversion command openssl pkey -provparam ml-dsa.retain_seed=no converts a seed-format ML-DSA key to an sk-format key. Compare each vendor's answer with the RFC format your certificates use, and record the version you tested.
Does the seed format change how I should handle a key that holds both forms?
Yes, you should verify it. RFC 9881 says a recipient should check that a seed and expanded key in the both form are consistent and must reject the key if they are not. OpenSSL 3.5 uses ml-dsa.prefer_seed to decide whether the seed or the companion key wins when a PKCS#8 file holds both. Check whether your tooling performs this consistency check and how it resolves a conflict, since a silent choice between two keys that disagree would be a serious fault. Test this with a deliberately mismatched pair in your own environment before you rely on it.
Common mix-ups between seed format and expanded key format
Seed and expanded private key formats hold the same key material in different shapes, so the same key can look like two different objects in two tools. The cards below cover the mix-ups that cause the most confusion when architects, engineers and reviewers compare what a key file contains, how long it is, and what happens to it during storage, export and review.
ML-DSA seed is not ML-KEM seed
A seed for ML-DSA is 32 bytes, while a seed for ML-KEM is 64 bytes. Both are called seeds, so a reviewer who sees a 64-byte value in an ML-DSA context, or a 32-byte value in an ML-KEM context, may assume a file is malformed when it is not. Check the algorithm identifier in the container before comparing lengths, because the length alone does not identify the algorithm. RFC 10073 uses the 32-byte ML-DSA seed for composite component keys, and RFC 9935 uses the 64-byte ML-KEM seed as the most compact private key form.
RFC 9935 textExpanded key is not the public key
An expanded private key is a larger encoding of the private key, not the public key that is published in a certificate. The ML-DSA expandedKey is 2560, 4032 or 4896 bytes depending on the parameter set, and the ML-KEM expanded decapsulation key is 1632, 2400 or 3168 bytes. Public keys for these algorithms are much smaller, for example 1312 bytes for ML-DSA-44. Treating the expanded key as the public key can lead to publishing secret material in a certificate or sharing a file that should stay private.
RFC 9881 textSmall seed is still secret
A 32-byte or 64-byte seed looks small, so it may seem less sensitive than a larger key file. The draft draft-rosomakho-lamps-mldsa-mlkem-seed-only-00 states that a seed can reconstruct the private key and therefore needs the same protection as an expanded key, including in backups and transfers. Storage, access control, logging and backup handling should be the same for a seed file as for an expanded key file. Size is not a measure of protection.
Seed-only draftRetain seed is an output setting
The OpenSSL 3.5 setting retain_seed controls whether a seed is kept in the output of a key operation, not how strongly the key is protected. Setting ml-dsa.retain_seed=no converts a seed-format key to an sk-format key, and ml-kem.retain_seed set to a false value leaves only the dk key in PKCS#8 output. Reviewers should read this setting as a choice about what gets written, and then check the storage controls on the resulting file separately.
OpenSSL 3.5 ML-DSA docsSeed-only systems cannot recover discarded seeds
The seed-only draft notes that a seed discarded earlier cannot be recovered from an expanded key. For systems that move to seed-only handling, this means a key pair created without retaining the seed may need replacement, along with its associated certificates or bindings. Before changing how keys are retained, teams should inventory which key files hold seeds and which hold only expanded keys, so they know which keys would require new pairs.
Questions people ask about seed and expanded private key formats
Are a seed and an expanded private key the same thing?
No. They are two different encodings of private key material for the same key pair, and they do not carry the same data. The seed is a short value from which the full private key can be regenerated. The expanded key is the full private key as the algorithm uses it. RFC 9881 defines the ML-DSA private key as a CHOICE of a 32-byte seed (context tag [0]), an expandedKey of 2560, 4032 or 4896 bytes for ML-DSA-44, -65 and -87, or both together. RFC 9935 defines the ML-KEM private key with the same three options, using a 64-octet seed and expanded keys of 1632, 2400 or 3168 octets. Because the seed can rebuild the expanded key, the two forms are not interchangeable: a system that stores only one of them must be able to derive or read the other when it needs the key. Confirm which form each library in your stack produces and accepts, since a parser that expects one form may reject the other.
Which private key format is recommended for ML-DSA and ML-KEM?
The seed is the recommended format. RFC 9881 recommends the seed format for ML-DSA private keys, and RFC 9935 describes the 64-octet ML-KEM seed as the most compact format. RFC 9964 goes further for JOSE and COSE: it uses only the seed, and the priv parameter must be the 32-byte seed. RFC 10073 states that the ML-DSA component of a composite private key is a 32-byte seed. The practical result is that the compact form is the default expectation in current IETF profiles, and an implementation that emits only the expanded form may face interoperability questions. The seed is smaller to store and move, but it is equally sensitive, because it can reconstruct the full key. A recommendation for the seed does not reduce the need to protect it. Check the profile your protocol or certificate authority follows, and confirm with the vendor whether it writes the seed, the expanded key, or both.
Can a discarded seed be recovered from an expanded key?
No. The Internet-Draft draft-rosomakho-lamps-mldsa-mlkem-seed-only-00, dated 21 October 2026, states that a seed discarded earlier cannot be recovered from an expanded key. This matters in practice. If a system keeps only the expanded key and later decides it needs the seed, for example to move the key to a seed-only platform, the seed cannot be produced from the stored material. The draft says that seed-only systems would then need a new key pair and replacement of the associated certificates or bindings for those keys. Before an upgrade, inventory which keys were generated or stored without a seed, because those keys cannot be converted to seed-only storage without re-keying. Plan re-issuance of certificates, updates to trust stores and any signed bindings that refer to the old public key.
Do I need to keep both the seed and the expanded key?
Not always. RFC 9881 allows a third option, the both form, in which the seed and the expanded key are stored together. The RFC says a recipient should check that the seed and expanded key are consistent and must reject the key if they are not. Storing both gives a system the option of using either form and makes the expanded key available to software that cannot derive it, but it doubles the amount of sensitive material that must be protected. The Internet-Draft draft-rosomakho-lamps-mldsa-mlkem-seed-only-00 would instead require implementations to retain the seed when decoding seed or both keys or generating keys, unless the key will never be exported. If you are designing storage, decide which form you need for each consumer, then limit each key to the smallest set of forms that meets that need. Each extra copy of the key material is another item for your key management, backup and access review.
What should I ask a vendor about seed and expanded key handling?
Ask a small set of specific questions and request written answers. First, which private key form does the product generate: seed, expanded, or both? Second, does it retain the seed after key generation, and under what settings? Third, which form does it export, and in which container (for example PKCS#8 or a raw format)? Fourth, can it import keys in each form, and does it check consistency when both are present? Fifth, how are seeds and expanded keys protected at rest, in backups and during transfers? The Internet-Draft notes that a seed can reconstruct the private key and so needs the same protection as an expanded key. Sixth, if the product ever discards a seed, can it still produce a seed-only key later? Ask for the product version and the standard or profile it follows, because behaviour changes between releases. Record the answers so that your key inventory and audit evidence match what the product actually does.
Does OpenSSL 3.5 keep the seed by default?
Yes, for the cases the OpenSSL 3.5 documentation describes. OpenSSL 3.5 retains the seed by default for generated ML-DSA keys and for keys loaded from seed-format PKCS#8 files, and it writes the seed in PKCS#8 output by default. The ml-dsa.output_formats setting defaults to seed-priv followed by priv-only, so it writes the seed and the FIPS 204 sk when a seed is available and only the sk otherwise. To stop retention for an ML-DSA key, the documentation gives the command openssl pkey -provparam ml-dsa.retain_seed=no, which converts a seed-format key to an sk-format key. For ML-KEM, ml-kem.prefer_seed defaults to using the seed to regenerate the key and ignoring the companion dk key, and setting ml-kem.retain_seed to a false value leaves only the dk key in PKCS#8 output. Check the exact behaviour of your OpenSSL build against the documentation for the version you run.
How DeployOpen works on this
DeployOpen helps teams decide whether to store post-quantum keys as a seed, an expanded private key or both, and then configures the chosen format in the systems that create, load and back up those keys. The work covers the libraries, PKCS#8 handling and key lifecycle controls your environment depends on, and it ends with documentation your security and compliance reviewers can check.
How we scope
- We list every system that generates, imports, exports or backs up ML-KEM and ML-DSA keys in your environment.
- We record which key format each system produces today and which formats its certificate and signing standards accept.
- The written scope states which systems change, which stay as they are, and what it does not cover, before any work starts.
How we build
- We configure the chosen key format in your libraries and tools, such as OpenSSL 3.5 retain_seed and output_formats settings where they apply.
- We test that seed and expanded keys in a both-form PKCS#8 file are consistent, and that inconsistent keys are rejected.
- We review backup, transfer and access controls, since a seed can rebuild the full private key and needs the same protection.
How we hand over
- We deliver a written record of the format chosen for each key type, with the library versions and settings used.
- We document how key loading, conversion and retention are set, so a reviewer can trace each key back to its configuration.
- We walk your engineers through the procedures for generating, converting and rotating keys in the chosen format.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- We can recheck key format settings when a library, standard or draft changes the recommended format for your keys.
- Ask any quote for the specific libraries, systems and key types in scope, since those set the effort involved.

