DRAFT 0.1.0-draft Todo lo que hay aquí es un borrador sin revisar. Nada está listo para producción. Estado y hoja de ruta

CCSAX Labs · L3

Provably safe crypto-agility

Status: open question · CCSAX 0.1.0-draft · unreviewed

Question

spec/CCSAX-0006-agility-migration.md defines suites with states experimental | active | deprecated | forbidden, binds each key to exactly one suite to prevent downgrade, and describes a resumable, logged migration process (detect → plan → rewrap or re-encrypt → verify → log).

The question: can we state and prove, in a formal model, that (a) CCSAX's agility rules prevent downgrade, and (b) a migration run is correct? Concretely:

  • Downgrade resistance: no adversary who controls storage and can replay or edit envelopes can make a decryptor accept data under a suite weaker than the one policy requires for that key, nor use a forbidden suite.
  • Migration correctness: after a migration completes (possibly after crashes and restarts), every object is readable, under the target suite/key, with the same plaintext and context; no object is lost, duplicated with divergent contents, or left readable only under a deprecated key that has been destroyed.
  • Log consistency: the CVL record (spec/CCSAX-0007-cvl.md) of the migration matches what actually happened.

Why it matters

  • Agility is how a system survives a broken algorithm, but agility mechanisms are a classic source of downgrade attacks: negotiation or version fields that an attacker can influence.
  • In storage, there is no handshake: the "negotiation" is a suite id in a stored header. Downgrade here looks like replaying old ciphertexts, swapping suite ids, or exploiting a window where both old and new keys are accepted.
  • Migration is a long-running, crash-prone process over millions of objects. Bugs here cause data loss or leave data protected by keys that were believed retired. Testing alone does not cover the interleavings; a model can.

Prior art

Downgrade and agility:

  • K. Bhargavan, C. Brzuska, C. Fournet, M. Green, M. Kohlweiss, S. Zanella-Béguelin, "Downgrade Resilience in Key-Exchange Protocols", IEEE Symposium on Security and Privacy 2016.
  • B. Beurdouche, K. Bhargavan, A. Delignat-Lavaud, C. Fournet, M. Kohlweiss, A. Pironti, P.-Y. Strub, J. K. Zinzindohoue, "A Messy State of the Union: Taming the Composite State Machines of TLS", IEEE Symposium on Security and Privacy 2015.
  • T. Acar, M. Belenkiy, M. Bellare, D. Cash, "Cryptographic Agility and Its Relation to Circular Encryption", EUROCRYPT 2010, LNCS.
  • R. Housley, RFC 7696 (BCP 201), "Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms", November 2015.
  • D. Ott, C. Peikert, et al., "Identifying Research Challenges in Post Quantum Cryptography Migration and Cryptographic Agility", Computing Community Consortium workshop report, arXiv:1909.07353, 2019.
  • NIST CSWP 39, "Considerations for Achieving Crypto Agility: Strategies and Practices", final 19 December 2025; updated as CSWP 39upd1, 29 June 2026. Author list (to verify).

Tools:

  • S. Meier, B. Schmidt, C. Cremers, D. Basin, "The TAMARIN Prover for the Symbolic Analysis of Security Protocols", CAV 2013, LNCS.
  • B. Blanchet, "Modeling and Verifying Security Protocols with the Applied Pi Calculus and ProVerif", Foundations and Trends in Privacy and Security, 2016.
  • G. Barthe, F. Dupressoir, B. Grégoire, C. Kunz, B. Schmidt, P.-Y. Strub, "EasyCrypt: A Tutorial", Foundations of Security Analysis and Design VII (FOSAD), LNCS, 2014.

Method (proposed)

  1. Extract the state machine. From spec/CCSAX-0006-agility-migration.md, write the decryptor's acceptance rule and the migration engine's steps as an explicit transition system: per-object state, per-key state, per-suite state, and the log.
  2. Symbolic model (Tamarin or ProVerif). Model an adversary that controls storage (read, write, replay, reorder envelopes) and can trigger crashes. Encode the security properties as lemmas:
    • no-downgrade: if a decryptor accepts envelope e for key k, then e.suite = suite(k) and state(suite(k)) ≠ forbidden at that time;
    • no-resurrection: once a key is destroyed, no later acceptance uses it;
    • log-agreement: every completed migration step has a matching CVL entry, and vice versa.
  3. Migration correctness (model checking). Model the resumable migration as a concurrent process and check, for small bounded instances, that every crash/restart interleaving ends in a state where every object decrypts to its original plaintext under the target key. TLA+ or a Tamarin restriction-based model are both candidates; choose the one reviewers can most easily check.
  4. Computational step (optional, later). If the symbolic results hold, state what they assume about CEF (from L2) and, if worthwhile, lift the no-downgrade property to a computational statement in EasyCrypt.
  5. Feed back. Every counterexample becomes a spec issue and a regression test in the conformance suite.

Status

Open question. No result exists yet: no model has been written and no property has been checked. The agility rules in Core are engineering decisions based on known downgrade lessons; this line would give them a formal argument. Nothing from Labs protects production data until promoted through idea → specified → analysed → reviewed → audited → core.

How to help

  • Tamarin: write a Tamarin model of the CEF decryptor's suite-acceptance rule with an adversary that can rewrite the suite id and replay old envelopes; prove (or break) no-downgrade.
  • ProVerif: the same property in ProVerif, so the two models can be cross-checked.
  • Migration model: write a TLA+ (or similar) specification of the rewrap/re-encrypt loop with crash points, and check that no object is lost or left only under a destroyed key.
  • Spec review: find any state in spec/CCSAX-0006-agility-migration.md where two suites or two key versions are simultaneously acceptable for the same object, and describe the window it opens.
  • Literature: summarise which parts of the downgrade-resilience framework of Bhargavan et al. transfer to stored data (no handshake) and which do not.

This document is licensed under CC BY 4.0.