← Back to section · Post-Quantum Migration

Configuration-Driven Algorithm Switching: From One Config Release to a Completed Transition

'Swap the algorithm by changing configuration' is the acceptance test for agility — but configuration has a lifecycle of its own: the switching surface must be inventoried, rollout must be staged, rollback must be prepared in advance, and stored data survives on version markers. This article works through the engineering points in the order of one complete switch.

Published 22 November 2026 · 6 min read · PQ Frontier

Configuration-Driven Algorithm Switching: From One Config Release to a Completed Transition
AI-generated site artwork
Video explainer · Crypto Agility: Design for Change

First, inventory: four classes of switching surface

For “change the configuration, change the algorithm” to hold, one question must be answered first: what exactly is configuration? An algorithm transition usually touches four classes of switch, and any class not made into configuration is a hidden code change:

  • Algorithm choice: which algorithm family and which concrete algorithm — ML-KEM-768 or a hybrid construction for key encapsulation, for instance;
  • Parameter sets: the parameter tier inside one algorithm — ML-DSA-44/65/87, digest output lengths;
  • Keys and security parameters: numeric thresholds such as key lengths, iteration counts, nonce lengths;
  • Protocol versions and feature switches: protocol version, whether an extension is enabled, the signature algorithm of a certificate chain.

The most common inventory finding is asymmetry: algorithm choice made it into configuration, but the parameter set is compiled into a library default; or new data follows configuration while the path that verifies old data has the legacy algorithm hard-coded. Only when all four classes are checked item by item is the switching surface complete.

First distinction: key rotation is not algorithm switching

The most common misjudgement during a configuration inventory is mistaking key rotation for a rehearsal of algorithm switching. The two look alike in configuration terms — change a value, the system keeps running — but they differ completely in difficulty. Key rotation swaps key material inside the same algorithm: formats, sizes, and performance are unchanged, and the failure modes are singular. Algorithm switching changes sizes, performance characteristics, and peer compatibility at once, and pulls in data markers and negotiation. Many systems have rotated keys for a decade without ever switching algorithms, and so believe they possess switching capability. An inventory should register the two separately: which switches support rotation only, and which can truly change algorithms — only the latter constitute the switching surface.

The configuration substrate: from files to firmware

The words “change the configuration” mean wildly different things on different systems, so an inventory of the switching surface must also map the configuration substrate. Cloud services keep configuration in a config centre — effective in seconds, canaried and rollbackable, the ideal form. Traditional applications keep it in files and registries, effective on restart — still manageable. Hardest are embedded and firmware devices: their “configuration” is often baked into the firmware image, so changing configuration means shipping a firmware upgrade, with the risk of bricking on failed upgrades and long device-reach cycles. In post-quantum migration planning, such devices get their own column: their switching windows are scheduled by firmware release cadence, and transition mechanisms such as hybrid constructions must be kept alive longer for their sake. An unclear substrate makes every time estimate in the switching plan fiction.

Rollout: dual-stack in parallel, advanced in phases

Changing the configuration is not the same as completing the switch. A sound switch is almost always phased. Phase one: the system reads and writes dual-stack — newly produced ciphertexts and signatures use the new algorithm, while existing stock remains verifiable and decryptable. Phase two: watch telemetry and confirm the new algorithm path’s error rates and performance are within expectations. Phase three: the old algorithm becomes read-only — no new old-algorithm data may be produced. Phase four: once the stock is processed or confirmed no longer needed, the old algorithm is removed from the allow-list. Each phase is an independent configuration release with an observation window between phases, and any phase can fall back to the previous phase’s configuration if something goes wrong.

In this rhythm, rollback is not a failure contingency but a routine component: next to every switch there must be a rollback switch, with its target state defined in advance — back to dual-stack, back to old-algorithm read-only, or back to the origin. As the drills article notes, a rollback path only counts if it has actually been run.

The data layer: version markers keep the stock alive

Code can switch overnight; data cannot. Historical ciphertexts in databases, old signatures in archives, and certificates already issued all carry the algorithm of their creation. The data-layer counterpart of configuration-driven switching is the version marker: every piece of protected data records its algorithm identifier and key version at creation time (the key version in envelope encryption and the algorithm identifier field in signature formats are ready-made mechanisms), and readers dispatch by marker to the matching implementation. With markers, the coexistence period needs nobody to remember “which batch used which algorithm” — the system routes by marker itself.

Stock data without version markers is the biggest reef in a switch: either decrypt-and-re-encrypt everything (expensive and risky), or keep the old algorithm implementation forever (retirement indefinitely postponed). Version markers must therefore become a fixed field of data formats before any switch happens — the item in configuration work most often deferred and most expensive to defer.

Configuration becomes the new failure surface

Handing switching authority to configuration trades one class of risk for another: the fear used to be editing code wrongly; now it is writing configuration wrongly. The corresponding engineering discipline includes: schema validation before configuration goes live (algorithm names and parameter tiers must be members of the allow-list, values within sane ranges); a dry run in pre-production for critical switches — load the new configuration, run smoke cases, compare negotiation outcomes; and full traceability of configuration changes — who changed which switch to what, when, queryable and comparable, so an incident can be replayed precisely to the pre-change state. Defaults must also be conservative: a new system with no configuration written should land on the currently recommended algorithm, not on some historical default.

Closing

Configuration-driven switching is not finished by moving algorithm names out of code into YAML. It demands a complete switching surface, phased rollout, marked data, and disciplined configuration. Achieve all four and an algorithm swap is a plannable, observable, rollbackable release; miss any one and “just change the config” falls apart on switching day.

References

Tags: Crypto AgilityConfiguration ManagementAlgorithm SwitchingPost-Quantum Migration