Qu4z4r
34 min read
29 Dec
29Dec

Post-quantum migration planning, what to do first

Post-quantum cryptography is no longer a research topic for embedded teams, it is a multi year engineering and product risk program. If you ship RISC-V based devices that must remain secure for many years, you need a migration plan that starts now, even if you do not deploy post-quantum algorithms in production immediately. The most urgent goal is not to pick a single algorithm, it is to make your platform crypto agile, inventory where classical cryptography is used, and design a safe transition that can run on constrained systems without breaking manufacturing, provisioning, update, or field diagnostics. QVLx Labs recommends treating post-quantum readiness as a lifecycle capability that spans hardware, firmware, cloud services, and the supply chain.

Start by assuming two pressures will arrive before your next major redesign. First, customers and regulators will demand a credible plan for “harvest now, decrypt later” threats against confidentiality. Second, ecosystem dependencies, including TLS stacks, PKI, and secure boot signing, will start adding post-quantum or hybrid requirements. Your planning must cover both: network protocols that protect data in transit, and device lifecycle primitives such as secure boot, device identity certificates, and signed over the air firmware updates.

Executive checklist for RISC-V embedded security teams

  • Inventory every cryptographic use, including boot ROM, secure boot chain, firmware update signing, TLS or DTLS, VPNs, secure channels to radios, storage encryption, key wrapping, and attestation.
  • Classify each use by security objective, confidentiality vs integrity vs authenticity, and by required security lifetime in years.
  • Decide where hybrid mechanisms are needed first, usually key exchange for network sessions and certificate based device identity.
  • Design crypto agility into firmware and protocols, algorithm identifiers, versioning, negotiation rules, and safe rollback prevention.
  • Benchmark post-quantum candidates on your real RISC-V cores, memory, RTOS, and power budget, including worst case stack usage.
  • Assess side channel exposure and decide which operations need masking, constant time code, or hardware acceleration.
  • Plan certificate and PKI updates, including larger signature sizes, new OIDs, chain length limits, and provisioning throughput.
  • Update your secure boot and OTA update format to allow new signature algorithms without bricking older boot ROMs.
  • Build test vectors, known answer tests, fuzzing, and negative tests for malformed keys and oversized messages.
  • Create a phased rollout plan with telemetry, fallback paths, and field recovery processes.

Key idea, crypto agility beats early algorithm bets

Algorithms and standards will evolve, but devices you ship may live for 10 to 20 years. The highest value engineering work is to ensure you can swap algorithms without redesigning the entire product. Crypto agility is not a single abstraction layer, it is a set of design decisions: stable interfaces for key exchange and signatures, explicit algorithm identifiers in messages, a capability discovery or negotiation model, and strict rules that prevent downgrade attacks. For embedded RISC-V products, agility also means you can move cryptographic operations between software, a secure element, and a hardware accelerator as you learn more about performance and side channel behavior.

What “post-quantum” means for embedded devices

Post-quantum cryptography aims to resist attackers with large scale quantum computers. It does not mean you need quantum hardware, it means your algorithms should not rely on factoring or discrete logarithms. In practice, migration focuses on replacing RSA and elliptic curve cryptography in two areas: public key encryption or key exchange, and digital signatures. Symmetric cryptography, such as AES and SHA-2, is impacted mainly by needing larger security margins, for example preferring AES-256 and SHA-384 or SHA-512 in some designs, depending on your threat model and performance limits.

For embedded systems, the post-quantum shift is mostly about cost and integration. Post-quantum schemes often have larger public keys, ciphertexts, and signatures. They can increase handshake sizes, certificate sizes, and flash consumption. They can stress small MTUs on radios, increase peak RAM usage during decoding, and add CPU time at exactly the wrong moment, such as during boot, provisioning, or reconnect storms. Migration planning is about aligning those costs with your product constraints.

Top migration risks specific to RISC-V embedded platforms

RISC-V introduces both opportunities and challenges. Because it is modular, you may have many variants in the field, from tiny RV32IMC microcontrollers to larger RV64GC application processors. A single PQ migration plan must consider that some SKUs will never have vector extensions, some will have vendor specific crypto accelerators, and some will be purely software. The open ecosystem means you must verify the provenance and correctness of cryptographic libraries, toolchains, and compiler flags across multiple vendors. You also need to plan for a world where your secure boot root of trust may be in a small boot ROM that cannot be updated.

Common RISC-V embedded pitfalls include: assuming constant time behavior when the compiler introduces data dependent branches, ignoring microarchitectural leakage in caches or branch predictors on higher end cores, and relying on optional ISA extensions that are not consistently available across your fleet. A practical migration plan standardizes a baseline and then layers acceleration options above it.

Prioritization, where post-quantum changes matter most

Not all cryptographic uses need post-quantum upgrades at the same time. Prioritize by the value of the data and the time horizon in which it must remain secret or verifiable.

  • High priority confidentiality: session key establishment for TLS, DTLS, or custom channels that protect data that remains sensitive for many years. Harvest now, decrypt later attacks target this first.
  • High priority authenticity: firmware update signing, secure boot verification, and attestation evidence. If signatures are broken later, attackers may be able to forge updates or counterfeit device identity, but the urgency depends on whether old signatures remain trusted.
  • Medium priority: device onboarding protocols, certificate based mutual authentication, and key wrapping used for provisioning.
  • Lower priority: ephemeral integrity checks inside a device, short lived tokens, and local authenticated messages that do not have long term replay value.

For many embedded products, a first deployment step is hybrid key exchange in TLS, paired with classical signatures for certificates until the certificate ecosystem stabilizes. For devices that must support offline verification of firmware images for many years, signature migration planning must start early, because secure boot roots are hard to change once shipped.

Algorithm landscape and what is most relevant today

Most teams align with NIST standardization outcomes and major ecosystem support. For planning purposes, you should distinguish two categories: key encapsulation mechanisms used for key agreement, and signature algorithms used for authenticity. Commonly referenced options include ML-KEM for key encapsulation and ML-DSA for signatures, plus hash based signatures such as SLH-DSA for conservative deployments with different tradeoffs. Even if your final selection differs, you can build agility around these categories. Do not hard code algorithm sizes, do not assume a single key format, and do not assume handshake messages fit within legacy limits.

Migration planning should also account for hybrid modes. Hybrid key exchange combines a classical mechanism like ECDHE with a post-quantum KEM, then derives keys from both so the session remains secure unless both are broken. This reduces risk during the transition and is often the most practical first step for network protocols.

Define your target security lifetimes and align them to product lifecycles

Post-quantum urgency is driven by how long data must remain secure and how long the device remains deployed. A consumer gadget that is replaced every two years has different requirements than industrial controllers that remain for 15 years, or medical devices with long certification cycles. Write down explicit security lifetime targets per asset class, for example:

  • Telemetry confidentiality, protect for 10 years.
  • Device private key secrecy, protect for 10 years.
  • Firmware authenticity, enforce for the full supported life, plus a decommission grace period.
  • Audit logs, integrity for 7 years.

Once lifetimes are explicit, you can justify where post-quantum controls are needed now, where hybrid is sufficient, and where classical is acceptable until a later hardware spin.

Build a cryptographic bill of materials, CBOM

You cannot migrate what you cannot find. Build a cryptographic bill of materials for each product and each firmware component. Include algorithms, key sizes, libraries, hardware accelerators, certificate profiles, and protocol versions. Track where keys live, in flash, in OTP, in secure RAM, in a secure element, or derived at runtime. Track dependencies, such as cloud endpoints that terminate TLS, mobile apps that pair with the device, and manufacturing fixtures that provision keys. The CBOM should be versioned and auditable, because you will update it repeatedly as the plan evolves.

For RISC-V fleets, include core type, ISA extensions, and any crypto related peripherals. Note whether you rely on RISC-V scalar crypto extensions, custom instructions, or a dedicated accelerator. A CBOM that includes hardware details helps you decide which SKUs can run post-quantum code in software and which need hardware support or a secure element.

Crypto agility architecture for constrained firmware

Crypto agility is easiest when you create a narrow, well tested interface around each primitive, KEM, signature, hash, and symmetric encryption. In embedded systems, this often means wrapping a vetted library in a minimal adapter that your application and protocols call. The adapter should carry an explicit algorithm identifier, and should validate that key sizes and parameter sets match what you allow. Avoid designing APIs that implicitly select algorithms based on key length, because that can cause ambiguous behavior when post-quantum keys have very different sizes.

Agility also means safe storage formats. Define a key container that includes: algorithm ID, parameter set ID, key usage flags, creation time, and a unique key ID. If you store certificates, define how you will handle certificate chains that may become much larger. Plan for flash and RAM overhead, and plan for fragmentation and wear leveling impacts if you store larger objects more frequently.

Secure boot and post-quantum readiness

Secure boot is often the hardest part of post-quantum migration because the root of trust may be in immutable ROM. If your ROM verifies a single classical signature algorithm and cannot be updated, then your ability to adopt new signature algorithms is limited. Migration planning must start with a boot chain diagram and a decision on where you can introduce an algorithm transition point.

Practical patterns include:

  • Two stage verification: ROM verifies a small first stage bootloader using a classical signature, then that bootloader verifies later stages using an agile policy that can add post-quantum or hybrid signatures over time.
  • Certificate based boot keys: ROM trusts a root public key, then the bootloader uses a certificate chain with explicit algorithm identifiers to validate firmware signing keys. This allows algorithm upgrades if the ROM trust anchor remains valid.
  • Dual signature images: firmware images contain both a classical and a post-quantum signature, allowing older devices to boot and newer devices to enforce post-quantum policy.

Dual signatures increase image size. Two stage verification increases complexity and boot time. Choose based on your constraints and your ability to update the bootloader. If you do nothing, you risk shipping devices that cannot adopt post-quantum signatures later without a board replacement.

Firmware update signing and OTA pipelines

Over the air update systems typically include: a signing service, an update manifest format, a transport protocol, and on device verification. Post-quantum migration planning should address each piece. Signing services must support new algorithms, HSM integration, and potentially larger keys. Update manifests must include algorithm IDs, multiple signatures if needed, and robust length checks. Device verification code must handle larger inputs without stack overflow or heap fragmentation. Transport protocols must handle larger manifests and metadata, and may need fragmentation support if you operate over small MTU links.

Plan for staged enforcement. A safe pattern is to accept both classical and post-quantum signatures during an initial window, then move to hybrid requirements, then later to post-quantum only when your entire fleet and tooling can support it. Always include downgrade prevention. If an attacker can trick a device into accepting an update signed only with a weaker algorithm, your transition can be bypassed.

Network protocols, TLS, DTLS, and custom secure channels

For many devices, the first real post-quantum deployment will be in network session establishment. The most common requirement is post-quantum key agreement, typically via a KEM. In embedded deployments, watch for handshake size and memory use. Larger ClientHello and ServerHello messages can exceed limits in older stacks. Certificates carrying post-quantum signatures can be much larger, and chain validation can become expensive.

If you use TLS or DTLS, plan your upgrade path in terms of: library support, cipher suite availability, certificate authority support, and server termination behavior. If you use custom protocols, consider whether you can adopt a hybrid KEM based key schedule without rewriting everything. In many cases, you can keep your symmetric record layer unchanged and only replace the key agreement.

Device identity, attestation, and certificate migration

Embedded security relies on long lived device identities, often X.509 certificates. Post-quantum planning here is as much a PKI and operations problem as a device problem. Larger keys and signatures affect manufacturing throughput, provisioning time, and certificate storage. You may need to revise certificate profiles, path length rules, and maximum handshake message sizes. If devices perform certificate chain validation, ensure they have enough flash for root and intermediate stores, and enough RAM for parsing.

Attestation adds additional complexity because it may involve constrained encoding formats and strict size budgets. If you use CBOR or compact attestation tokens, plan how to represent post-quantum public keys and signatures without blowing up message size. Consider whether attestation needs post-quantum immediately. If attestation evidence remains valuable for years, and might be stored and re verified later, signatures matter. If evidence is ephemeral and validated immediately, hybrid approaches may be sufficient for a while.

RISC-V ISA choices and acceleration strategy

Performance is a common concern. RISC-V offers multiple paths: pure software on baseline integer cores, leveraging bit manipulation extensions, leveraging scalar crypto extensions where available, using vector extensions on higher end parts, or integrating a dedicated accelerator or secure element. Post-quantum algorithms involve operations like polynomial arithmetic and hashing. Different schemes stress different parts of the system. Some are compute heavy, some are bandwidth heavy.

Migration planning should produce a performance matrix for your SKUs that includes: key generation time, encapsulation and decapsulation time for KEMs, signature generation and verification times, peak RAM usage, flash code size, and energy per operation. Measure on your actual toolchain with realistic compiler flags. For secure boot and OTA, measure cold boot and verification time impacts. For network protocols, measure handshake latency and reconnection storm scenarios.

When considering acceleration, separate two goals: improving throughput, and reducing side channel risk. Hardware acceleration can help with both, but it also increases verification burden and can introduce new vulnerabilities if not designed carefully. For many embedded teams, a practical path is to implement post-quantum algorithms in constant time software first, then selectively accelerate high impact primitives such as hashing or symmetric operations, while keeping the post-quantum arithmetic in software until the ecosystem matures.

Memory, message size, and MTU planning

Post-quantum artifacts are bigger. That statement is true often enough that you should plan for it even before you settle on specific algorithms. Bigger keys and signatures mean bigger certificates, bigger handshake messages, and bigger update manifests. In constrained networks, you may need fragmentation and reassembly at the application layer. In constrained devices, you may need streaming parsers and verification routines that do not allocate large temporary buffers.

As part of migration planning, set explicit budgets:

  • Maximum handshake message size, by transport type.
  • Maximum certificate chain size, including intermediates.
  • Maximum OTA manifest size and maximum signed payload metadata size.
  • Maximum peak RAM during verification operations.

Then enforce those budgets with tests. Negative tests should include oversized lengths, truncated messages, duplicated fields, and malicious encodings. Many real world vulnerabilities come from parsers and length checks, not the math.

Side channel resistance and fault attacks

Embedded devices are often physically accessible, which changes the threat model. Post-quantum algorithms are not automatically side channel safe. You still need constant time code, careful memory access patterns, and robust randomness. Some post-quantum operations are more complex and may create new leakage surfaces. In addition, post-quantum private keys can be large and structured, which may affect how you store them and how you protect them against fault injection.

Migration planning should include a side channel review for each place private key operations occur: device identity signing, decapsulation in KEM based key exchange, and decryption or unwrapping. Decide whether you will rely on software countermeasures, hardware protections, or an external secure element. Plan for testability, such as using leakage detection in the lab and adding fault injection tests for critical verification logic. Also plan for safe error handling. Many KEMs and signature schemes require careful handling of invalid inputs to avoid oracle behavior.

Random number generation and entropy

Post-quantum algorithms can be sensitive to randomness quality. Some use randomness during key generation and signatures, others need it for encapsulation. If your entropy source is weak during early boot or manufacturing mode, you may produce weak keys at scale. As part of the migration plan, review your TRNG or entropy accumulation strategy, ensure health tests are in place, and ensure deterministic fallbacks are only used when appropriate and safe. For some signature schemes, deterministic variants exist, but you must understand their security assumptions and standard guidance.

On RISC-V systems, also verify that entropy is not compromised by low power modes, clock issues, or virtualization boundaries on more capable SoCs. Document how entropy is seeded, reseeded, and how you prevent state rollback across power cycles if that matters to your design.

Manufacturing and provisioning impacts

Device provisioning is where security meets throughput. Post-quantum keys and certificates may increase provisioning time, and larger objects may stress factory programming tools and test fixtures. If you generate keys on device, measure key generation time and ensure your entropy is sufficient in the factory environment. If you generate keys off device and inject them, revisit your secure injection process, because handling larger private keys increases exposure if your controls are weak.

Plan for serialization formats and transport. Some factory protocols have size limits. Some provisioning scripts assume RSA or ECDSA sizes. Update them early. Also plan for auditability. You may need to prove which algorithms were provisioned on which lot and when. A CBOM tied to manufacturing records can help.

Interoperability planning across the full system

Devices rarely operate alone. Your migration plan must include mobile apps, gateways, cloud endpoints, certificate authorities, and monitoring systems. Hybrid key exchange requires both sides to implement it correctly. Certificate changes require servers and clients to parse and validate them. Logging and observability systems may need to accept larger fields or new identifiers. Security operations teams need new telemetry, such as which algorithms are negotiated in sessions, and how often fallbacks occur.

Write interoperability tests that include the full matrix of old and new devices, old and new servers, and any intermediaries such as proxies or gateways. For constrained networks, test under packet loss and reordering. For OTA, test update interruption and resume behaviors with larger manifests.

Migration phases and deliverables

A realistic post-quantum migration plan for RISC-V embedded security usually spans several phases. Each phase should produce concrete deliverables that reduce risk even if later phases are delayed.

  • Phase 0, discovery: CBOM, threat model updates, security lifetime targets, and a gap analysis of immutable roots of trust.
  • Phase 1, agility foundation: algorithm ID plumbing, key container formats, negotiation logic, updated OTA manifest schema, and a build system that can compile in multiple algorithm options.
  • Phase 2, prototype: bench implementations of KEM and signatures on representative RISC-V SKUs, plus memory and power profiling.
  • Phase 3, pilot: limited fleet deployment with hybrid key exchange, telemetry collection, and operational playbooks.
  • Phase 4, rollout: broader enablement, stricter policies, and removal of legacy algorithms where possible.
  • Phase 5, maintenance: monitoring of standards changes, vulnerability response processes, and periodic crypto refresh exercises.

Each phase should include explicit exit criteria. For example, you do not exit prototype until you can complete a TLS handshake under worst case RAM limits, or verify an OTA package within boot time constraints.

Testing strategy, correctness, robustness, and security

Post-quantum migration adds new parsing and arithmetic code paths, which increases the need for strong testing. Plan for multiple test layers: known answer tests, differential testing against another implementation, fuzzing for input validation, and long run stress tests for memory leaks and fragmentation. Include tests for malformed certificates and adversarial handshake messages. For secure boot and OTA, include power loss and interruption tests, and ensure rollback protection still works across algorithm transitions.

For RISC-V specifically, compile with multiple compilers or versions when possible and compare outputs, because code generation can affect constant time properties. Review assembly output for critical routines. Use static analysis and sanitizers in host based builds. Track performance regressions as part of CI, because a post-quantum algorithm might meet requirements at first, then drift as code evolves.

Governance, policy, and long term support

Migration is not only technical. You need policy decisions: which algorithms are allowed, which are deprecated, how you handle exceptions, and how you communicate changes to customers. Define a cryptographic policy document that maps security objectives to approved primitives, key sizes, and modes. Include a schedule for deprecation. Make sure your policy includes downgrade resistance rules, for example: never allow negotiation to a legacy algorithm if the peer claims post-quantum capability.

Long term support plans should include how you will deliver updates to older devices. If some devices cannot support post-quantum due to immutable boot ROM limitations or extreme constraints, decide how you will segment them, for example by limiting what data they handle, placing them behind gateways, or sunsetting them earlier.

Common design patterns for a safer transition

Several patterns show up repeatedly in successful migrations:

  • Hybrid key establishment first: deploy hybrid KEM plus classical ECDHE for session keys, keep symmetric ciphers unchanged, and gather field data.
  • Dual signature artifacts: sign firmware and critical metadata with both algorithms so you can enforce stronger verification on new devices without breaking old ones.
  • Split trust anchors: keep a minimal classical root for backward compatibility, introduce a post-quantum root for forward security, and manage policy in an updatable stage.
  • Gateway termination for tiny nodes: if endpoints cannot handle post-quantum handshakes, use a gateway to terminate post-quantum sessions and secure the last hop with strong symmetric keys and device specific credentials.

Each pattern has tradeoffs. Gateways introduce trust concentration. Dual signatures increase size. Split anchors increase PKI complexity. The migration plan should document why you chose a pattern and how you mitigate its weaknesses.

Compliance and certification considerations

Many embedded markets require compliance, such as FIPS validations, Common Criteria, or industry specific requirements. Post-quantum standards may arrive in waves, and certification programs often lag. Plan for a period where you deploy hybrid mechanisms while certification guidance catches up. Ensure your cryptographic module boundaries are well defined, because changes in algorithms can trigger revalidation. If you use third party modules, coordinate roadmaps with vendors early. Keep evidence, test reports, and configuration management artifacts, because auditors will ask how you control algorithm selection and how you prevent unauthorized changes.

Supply chain and third party dependencies

Your embedded security depends on upstream libraries, protocol stacks, certificate tooling, and sometimes secure elements. Post-quantum migration planning should include a supplier readiness review. Ask vendors what algorithms they support, their performance data on RISC-V, their approach to side channel resistance, and their maintenance commitments. Avoid being locked into a single library without an escape path. For open source components, evaluate project health, test coverage, and responsiveness to security issues.

Also review your toolchain. Compiler updates can change constant time behavior. Link time optimizations can introduce unexpected transformations. Document your build reproducibility strategy and include cryptographic components in your software bill of materials, with versions pinned and verified.

Operational telemetry and incident response during the transition

When you deploy hybrid or post-quantum features, you need visibility. Add telemetry for: negotiated algorithms, handshake failures broken down by cause, certificate validation errors, and update verification failures. For privacy sensitive products, ensure telemetry is aggregated and does not leak secrets. Use telemetry to detect ecosystem problems early, such as a server fleet that does not support the new handshake variant, or a gateway that fragments messages incorrectly.

Incident response must include algorithm rollback procedures that do not re enable insecure modes. For example, if a post-quantum implementation bug is found, you may need to disable it quickly. Do so by switching to a safe hybrid mode or a patched implementation, not by falling back to legacy only modes unless you have a clearly justified and time limited exception.

Example roadmap for a RISC-V embedded product line

A concrete example helps. Consider a product line with an RV32 microcontroller SKU and an RV64 gateway SKU. A practical roadmap could be:

  • Update OTA manifest format to support multiple signatures and explicit algorithm IDs.
  • Introduce a two stage boot flow where the first stage can update verification policy for later stages.
  • Deploy hybrid key establishment on the gateway first, then on the microcontroller if resources allow, otherwise terminate at the gateway.
  • Keep device certificates classical initially, but prepare PKI for post-quantum capable intermediates and new certificate profiles.
  • After field validation, begin issuing dual certificate sets for new devices, one classical and one post-quantum, and support both in servers.
  • Move firmware signing to dual signatures immediately, then enforce post-quantum capable verification in new firmware releases.

This approach spreads risk, avoids a single big bang change, and ensures older devices remain functional while you increase security for new shipments.

How QVLx Labs approaches post-quantum migration planning

QVLx Labs recommends a plan that is engineering realistic and audit ready. The core artifacts are: a cryptographic bill of materials, a migration threat model with explicit security lifetimes, an agility architecture with strict downgrade resistance rules, and performance and memory benchmarks on representative RISC-V targets. From there, we drive a phased implementation that prioritizes high value confidentiality first via hybrid key establishment, then tackles long lived authenticity via secure boot and OTA signing transitions, and finally updates PKI and attestation formats as ecosystem support matures.

We also recommend treating post-quantum readiness as a quality program. That means adding continuous tests, fuzzing, and telemetry, not only implementing new math. The teams that succeed are the ones that invest in robust parsing, safe memory handling, and operational controls around algorithm selection.

Final guidance, make the transition survivable

Post-quantum migration for RISC-V embedded security is a multi constraint problem. You are balancing security lifetimes, CPU time, RAM and flash, radio MTUs, factory throughput, and long term maintainability. The most important step is to design for change. If your devices can safely support multiple algorithms, negotiate and enforce policies without downgrade, and update critical verification code over time, you can track standards and ecosystem shifts without redesigning your entire product line. Start with the inventory and agility foundations, then prototype with real constraints, then roll out hybrid capabilities with strong observability. This is how you reduce post-quantum risk without betting your product on a single early decision.