Reinforcement Learning for Cryptographic Agility: An MDP Framework with Causal Migration-Timing Analysis Under Evolving Threats
Cryptographic agility---the operational capability to substitute one algorithm for another in response to evolving threats, performance constraints, and regulatory pressure---is widely recommended and rarely implemented well. The mechanical capability to swap algorithms is the easy half; the decision problem of when and which algorithm to adopt under uncertain threat evolution, multi-objective performance constraints, and lagged compliance regimes is the hard half, and the production literature treats it as configuration rather than as a problem requiring formal optimisation. This paper presents , a reinforcement learning framework that formalises cryptographic algorithm selection as a partially-observable Markov decision process (POMDP) over a state space combining threat intelligence, system performance telemetry, and compliance posture. The action space includes maintaining current algorithm, migrating to alternatives, deploying hybrid (classical+PQC) configurations, and adjusting key parameters. The reward function is decomposed across four operationally meaningful objectives: security risk reduction, performance impact, migration cost, and compliance alignment. We integrate a structural causal model (SCM) of migration timing that supports counterfactual reasoning about delayed-vs-early adoption, addressing the explanation gap that pure RL leaves open. The framework is evaluated against three baseline policies (static, rule-based, periodic) across four threat scenarios (gradual evolution, sudden cryptanalytic break, regulatory change, harvest-now-decrypt-later acceleration) using a calibrated simulation environment. The DQN-based RL policy achieves 41% lower cumulative risk exposure than the strongest static baseline while incurring 23% lower migration cost than the rule-based baseline---an outcome that is non-obvious because risk and cost objectives normally trade off rather than improve together. We are explicit about deployment limits: 90% of the framework's value comes from a human-in-the-loop recommendation mode rather than fully autonomous algorithm switching, and security teams' (correct) reluctance to let RL agents decide cryptography constrains realistic deployment to recommendation-and-justification rather than automation. Note: This preprint includes a Methodological Disclosure section (inserted after the abstract) identifying which specific quantitative claims in this paper are illustrative/simulated/unverified, not from a real deployment, human-subjects study, partner data, or hardware evaluation. See the PDF for the full disclosure text.
Authors
- Ezekiel Ologunde (ORCID: https://orcid.org/0009-0005-7207-8506)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-27
- DOI
- https://doi.org/10.5281/zenodo.24581154
- Primary Topic
- Cryptographic Implementations and Security
- Type
- preprint