Learn · Practitioner
Secrets Management & PQC
Master PQC migration for secrets managers: classify secrets by risk, simulate Vault transit with ML-KEM, design rotation policies, and integrate into CI/CD pipelines.
For you, every role: what this means
- Developer / Engineer
- Classify secret types by HNDL exposure, simulate Vault transit operations with PQC algorithms, and integrate PQC-safe secrets into Kubernetes, GitHub Actions and Terraform in the Pipeline Integration Lab.
- Security Architect
- The Rotation Policy Designer with automated TTL recommendations and the cloud provider comparison across AWS, Azure, GCP and Vault are the design decisions; a five-year rotation policy needs a plan now.
- Researcher / Academic
- The provider comparison records current PQC readiness of the secrets managers, and the Vault transit simulator shows the operations with PQC algorithms.
- IT Ops / DevOps
- The rotation policy designer and the pipeline integration steps are the operational changes; the classification step says which secrets go first.
Organizations manage two distinct categories of sensitive material: secrets (API keys, credentials, tokens, seed phrases) and cryptographic keys (KEKs, signing keys, DEKs). Understanding the distinction matters for PQC migration because they have different protection mechanisms and different risk profiles.
Secrets themselves are often not directly encrypted with asymmetric cryptography — they are stored in vaults that use envelope encryption. In envelope encryption, a Data Encryption Key (DEK) encrypts the secret, and a Key Encryption Key (KEK) protects the DEK. Which step is quantum-vulnerable depends on how the DEK is protected, so evaluate each boundary separately instead of replacing every KEK with ML-KEM:
| Boundary | Example | Quantum exposure | Migration step |
|---|---|---|---|
| Symmetric KEK | An AES key in a KMS wraps the DEK. AWS Secrets Manager supports only symmetric encryption KMS keys; Google documents AES-256 or AES-128 KEKs. | Shor's algorithm does not apply; only generic Grover search of the key. | No ML-KEM needed. Keep key length and access policy in view. |
| Asymmetric key transport | A DEK encrypted to a public key with RSA-OAEP or ECDH-ES. | Quantum-vulnerable: a recorded wrapped DEK can be attacked later. | Replace this step with a post-quantum or hybrid KEM, where your product supports one. |
| KEM-derived wrapping key | A shared secret from ML-KEM encapsulation, turned into a wrapping key with a KDF. | Post-quantum for this step, if implemented and reviewed correctly. | Only where the provider, plugin or product exposes it; it does not touch the secrets themselves. |
| Transport to the key service | The TLS connection that carries KMS or vault API calls. | The TLS key exchange has its own harvest-now-decrypt-later exposure. | Hybrid post-quantum TLS where the service offers it. |
| Secret Type | Classical Protection | PQC Protection | Priority |
|---|---|---|---|
| API Keys / Tokens | AES-256 DEK wrapped with RSA-OAEP (asymmetric transport) | ML-KEM-derived wrapping key (where supported); an AES-256 KEK stays as is | High |
| DB Credentials | Vault root key protected by its unseal key (Shamir shares or auto-unseal) | Dynamic secrets TTL 8h; a post-quantum seal only if the platform documents one | Critical |
| TLS Private Keys | PKCS#12 encrypted with 3DES/AES | ML-DSA key pair + HSM storage | Critical |
| Signing Keys | RSA-2048 / ECDSA P-256 | ML-DSA-65 or ML-DSA-87 | Critical |
| OAuth JWT Signing | RS256 (RSA-2048) | ML-DSA-65 JWK (JOSE PQC draft) | High |
| AES-256-GCM DEKs | AES-256-GCM (direct) | AES-256-GCM (unchanged, already safe) | Low |
Key insight: The "Secret Zero" problem — how do you securely introduce an application to the vault without hardcoding a first credential? — is addressed by SPIFFE/SPIRE injecting verified workload identity. For the vault itself, the seal protects the root key; moving the seal to a post-quantum mechanism depends on the platform documenting one (the provider list below records that Vault documents no ML-KEM seal).
Harvest Now, Decrypt Later (HNDL) applies differently to secrets than to general encrypted data. The risk depends on the secret's lifetime and the sensitivity of what it protects.
A long-lived API key harvested from a TLS session today remains valid for months or years. When a Cryptographically Relevant Quantum Computer (CRQC) arrives, the attacker can decrypt the harvested TLS session, extract the API key, and use it to access your systems if the key still works. A short-lived OAuth token limits later reuse of that token. Other confidential data in the same captured session can still be sensitive when it is decrypted.
Evaluate confidentiality and authentication separately. A recorded TLS session is decrypted by breaking its key exchange: static RSA key transport, where the client encrypts the premaster secret to the server certificate's public key (TLS 1.2 and earlier, RFC 5246), or the (EC)DH values of an ephemeral exchange. TLS 1.3 removed static RSA key transport (RFC 9846). The certificate's ECDSA or RSA signing key instead authenticates the handshake: recovering it later lets an attacker impersonate the server while the certificate is still accepted, but it does not recover past session keys. Replace or rotate signing keys to address authentication risk, and use hybrid post-quantum key exchange to address harvested traffic; neither substitutes for the other.
| Secret Type | Typical Lifetime | HNDL Exposure | Risk Level |
|---|---|---|---|
| Seed Phrases | Permanent | Immediate — direct use | Critical |
| Code Signing Keys | 1–2 years | Immediate — forgeable signatures | Critical |
| TLS Certificates | 90 days | Impersonation after a CRQC — recovering the signing key does not decrypt recorded sessions | Critical |
| API Keys | 90–365 days | Delayed — key still valid at CRQC arrival | High |
| Service Accounts | 1–2 years (static) | Delayed — broad access scope | High |
| Database Creds (dynamic) | 1–8 hours | Minimal — expired before CRQC | Low |
| OAuth Access Tokens | 1 hour | Minimal — expired immediately | Low |
Strategic insight: Switching static DB credentials to dynamic secrets (Vault DB engine, 8h TTL) eliminates their HNDL risk entirely — no algorithm migration needed. This "quick win" should be the first operational step before any cryptographic algorithm change.
Dynamic secrets are credentials generated on-demand with a Time-To-Live (TTL) and automatically revoked on expiry or lease revocation. HashiCorp Vault's database secrets engine is the canonical example: Vault creates a unique DB user for each requester, with configurable TTL (1h to 24h), then drops the user automatically.
The PQC consideration for dynamic secrets is not the secrets themselves (they expire too quickly to matter for HNDL) but the mechanisms that generate and deliver them. The TLS channel from Vault to the database backend must use hybrid ML-KEM, and the Vault token used by the application to request secrets must be issued via an ML-DSA-verified identity.
Vault Transit Engine performs crypto operations server-side. Migrating key types from rsa-4096 to ml-dsa-65 (an Enterprise-only transit key type in the Vault documentation) — with ml-kem-768 not among the documented transit key types — changes the internal transit key store without breaking the API surface. Applications simply update the key_type parameter during key creation, and Vault mechanically handles the larger PQC ciphertexts and nested encapsulation transparency.
Dynamic credential TTLs (e.g., 1-8 hour bounds) completely eliminate HNDL risk for the credential itself, as it expires long before a CRQC appears. Contrast this with PQC rotation bounds for static KEKs (30-90 days), which require complex re-wrapping operations. Short TTLs negate the need for PQC migration of the secret value itself.
Cloud secrets managers vary significantly in their PQC readiness. Understanding each provider's roadmap is essential for multi-cloud strategies and migration timeline planning.
- ‣Transit ml-dsa, slh-dsa and hybrid sign/verify key types — Enterprise only, per the Vault transit documentation
- ‣ML-KEM transit key types and PQC seal/unseal — not documented; we found none announced
- ‣Hybrid TLS (X25519MLKEM768) for the Vault API: the Vault 1.19.4 and 1.20.0 changelogs list X25519MLKEM768 key agreement in the Go TLS stack, so check your build and listener; TLS hybrid key-exchange groups are defined in RFC 10024 and RFC 9954, not by HPKE (RFC 9180)
- ‣No secrets-manager-native PQC: Secrets Manager encrypts each secret value with an AES-256 data key that AWS KMS generates and encrypts under a symmetric encryption KMS key, and it supports only symmetric encryption KMS keys, so it cannot use an ML-KEM or ML-DSA KMS key
- ‣AWS KMS itself has ML-DSA-44/65/87 signing key specs (documented June 2025) and ML-KEM key specs ML_KEM_512/768/1024 with Encapsulate and Decapsulate operations
- ‣AWS added ML-KEM keys to AWS KMS on 26 October 2026; they are not available in the China, Middle East (UAE) and Middle East (Bahrain) Regions.
- ‣AWS KMS imports key material under an RSA wrapping key (RSA_2048, RSA_3072 or RSA_4096), or an SM2 wrapping key in the China Regions, and cannot import key material into ML-DSA or ML-KEM KMS keys.
- ‣AWS SDK for Java 2.x can enable hybrid post-quantum key agreement by calling .postQuantumTlsEnabled(true) when building the AWS Common Runtime HTTP client
- ‣No native dynamic secrets — use Lambda rotation or Vault AWS auth
- ‣SymCrypt (underlying crypto library) already supports ML-KEM/ML-DSA internally
- ‣Key Vault API exposure is the remaining gap
- ‣Managed HSM HSM SKU required for PQC (Standard tier HSMs excluded)
- ‣No direct PQC — relies on Cloud KMS CMEK for secret encryption
- ‣Cloud KMS PQC: ML-DSA, SLH-DSA and ML-KEM generally available (Google’s 28 July 2026 announcement)
- ‣CMEK uses a symmetric AES-256 Cloud KMS key, which is already quantum-resistant; PQC keys cannot be used as CMEK
- ‣FIPS mode not available for Secret Manager
AWS Secrets Manager and Google's default encryption both use envelope encryption: a DEK encrypts the data and a KEK protects the DEK. In both documented designs the KEK is symmetric (AWS Secrets Manager supports only symmetric encryption KMS keys; Google wraps DEKs with AES-256 or AES-128 KEKs), and Shor's algorithm does not break a symmetric KEK. Migrate the boundary that is actually asymmetric, and use a provider KEM option only where its service accepts it.
BYOK lets you generate key material in your own HSM or Vault instance and import it into the provider's key service. Whether that gives you control of a post-quantum upgrade depends on the key types the provider accepts for import: AWS KMS imports symmetric encryption, HMAC and asymmetric keys except ML-DSA and ML-KEM keys, so an ML-KEM KMS key has to be generated inside AWS KMS. Check each provider's import documentation.
Kubernetes Secrets are base64-encoded, not encrypted — they are stored in etcd as plaintext unless encryption-at-rest is explicitly enabled. The CIS Kubernetes Benchmark v1.9 (section 1.2.33) mandates secrets encryption for production clusters. Without it, secret sprawl into etcd creates a massive HNDL attack surface.
By default the API server stores Secrets unencrypted in etcd. Configure --encryption-provider-config on kube-apiserver with a KMS provider and use KMS v2 (KMS v1 is deprecated since Kubernetes 1.28 and disabled by default since 1.29). The provider uses envelope encryption, so an attacker needs both etcd and the KMS. The key type is set by the KMS plugin: AWS KMS ML-KEM keys use Encapsulate and Decapsulate, while the Encrypt operation needs an ENCRYPT_DECRYPT key, so whether a given plugin can use an ML-KEM key is not verified here; check the plugin's documentation before claiming ML-KEM protection for etcd.
ESO's controller fetches secrets from an external store (Vault, AWS Secrets Manager, Azure Key Vault and others) and creates Kubernetes Secret objects that it keeps in sync. Those Secrets are stored in etcd like any other Secret, so etcd encryption at rest and RBAC on Secrets still apply. This sync pattern differs from direct delivery: Vault Agent Injector renders secrets to a shared memory volume mounted in the pod, and the Secrets Store CSI Driver mounts them as a volume (it can optionally also sync them as Kubernetes Secrets). GitOps repos need not contain secret values with either pattern. Protection of the stored value in the external store is that store's own design.
SPIFFE (Secure Production Identity Framework for Everyone) issues X.509-SVIDs (SPIFFE Verifiable Identity Documents) to workloads via short-lived certificates (TTL 5-60min). SPIRE (SPIFFE Runtime Environment) is the reference implementation. Migrating SVID signing from ECDSA to ML-DSA eliminates HNDL risk for workload identity entirely.
Modern CI/CD (GitHub Actions, GitLab CI, CircleCI) supports OIDC JWT tokens issued per job. These tokens authenticate to Vault or cloud IAM without static credentials. The OIDC JWT is currently RS256-signed (RSA). Migration to ML-DSA-signed OIDC tokens is pending provider roadmap. Short token TTL (15min per job) means HNDL risk is low despite classical signing.
Zero-trust secrets management eliminates static credentials entirely. Every workload authenticates via short-lived, dynamically issued credentials:
- No static API keys in environment variables or config files
- No downloaded service account key files (JSON credentials)
- All identities attested via SPIFFE/SPIRE or cloud-native workload identity
- All secret access via audited vault with per-request leases
- Few or no secret copies in Kubernetes etcd: volume or agent delivery avoids them, an ESO sync creates them, so encrypt etcd at rest either way
Classify secrets by risk, simulate Vault transit PQC, design rotation policies, and compare cloud providers.
Check off all sections and mark this reading done.
Try it
Step 3: Rotation Policy Designer
Design PQC-aware rotation policies with automated TTL recommendations.Step 1: Architecture Mapper
Classify your secret types by PQC risk level and HNDL exposure.Step 2: Vault Transit Simulator
Compare Vault transit examples with an executable application-side KEM envelope.
Your comments on Secrets Management & PQC(0)
Stored on this device only. A comment never counts toward your progress.
Related resources
- ModuleKMS & PQC Key ManagementEnvelope encryption, ML-KEM key wrapping, multi-provider KMS
- ModuleHSM & PQC OperationsPKCS#11 v3.2, HSM vendor migration, FIPS 140-3
- ModuleCrypto AgilityAlgorithm-agnostic design patterns for infrastructure
- ModulePlatform EngineeringCI/CD pipeline crypto, container signing, and policy enforcement
Loading terms, documents and more…
Production Tool Capabilities & Verification ChecklistDevSecOps, Platform Security & Vault Administrators
Capabilities to require in your production tools:
- Secrets manager (HashiCorp Vault Enterprise / OpenBao / cloud secrets manager) transit-engine PQC signing (ML-DSA; SLH-DSA experimental) and PKCS#11 HSM seal/unseal, verifying PQC mechanism support per product.
- Dynamic secret leasing and automated rotation of post-quantum TLS certificates, SSH keys, and database credentials.
- Quantum-safe replication and cluster mTLS (`X25519MLKEM768`) between vault nodes.
How to evaluate in your environment
Configure a staging Vault/OpenBao cluster with PKCS#11 auto-unseal and hybrid TLS 1.3, issue a dynamic PQC certificate, and verify lease revocation.
Production evidence to collect
Vault seal/transit status output, dynamic certificate lease audit log, and node-to-node TLS 1.3 handshake capture.
Completing this Hub module and its browser-based sample exercises teaches the technical and governance decision criteria for your role; it does not test, validate, or certify your deployed production systems.
Record evidence for your environment
Identify the tested build and configuration. Use reference IDs for observations. For a proposed exclusion, record the system boundary or rule and why it excludes this build.
Evidence missing. 0 of 3 requirements have a reference or scope rationale.
Learning module content can be inaccurate. Please double-check its information. Report inaccuracies in PQC Today GitHub Discussions.