-
Notifications
You must be signed in to change notification settings - Fork 0
ADR 026 Cryptographic Agility via Algorithm Profiles
Status: Accepted Date: 2026-05-17 Deciders: Michael Zargham Related: ADR-023 Cryptography by Composition of Battle-Tested Standards; ADR-016 Composable SHACL Profiles; ADR-022 External URI References as Open-Source Foundation; Signed Envelopes and Established Standards; RDFC-1.0 Canonicalization; Verifiable Self-Certification; Design Spec
Across the v0.1 wiki the phrase "SHA-256" appears in several load-bearing locations: the transcript's rtm:inputsHash / rtm:resultHash, the RDFC-1.0 canonical-form hash, rtm:hasContentHash examples, and the transcript-level Merkle commitment. Naming a specific algorithm in prose is convenient but invites a real failure mode: a reader (or worse, an implementer) takes "SHA-256" to be hardcoded into the data model rather than a default chosen by the active cryptographic suite. When SHA-256 — or the P-256 curve, or any other primitive — eventually retires from acceptable use, a hardcoded reading forces code surgery across the flexo-rtm codebase and invalidates every prior cert artifact's algorithm assumption.
ADR-023 Cryptography by Composition of Battle-Tested Standards already establishes that flexo-rtm does not invent crypto; it composes W3C VC Data Integrity 2.0, DSSE + in-toto, Sigstore cosign, Rekor, and git GPG/SSH commit signing. Each of these standards already carries its own algorithm-identifier mechanism: VC-DI suites are named (ecdsa-rdfc-2019, eddsa-rdfc-2022, future suites for post-quantum primitives), cosign embeds algorithm metadata in its signature bundles, DSSE envelopes carry algorithm IDs in their payload-type fields, and OCI image signatures follow the OCI signature specification's algorithm registry. The composition principle therefore extends naturally to algorithm choice: the algorithm is a suite parameter, not a hard pin in flexo-rtm core. See Design Spec §4.6 and the principle stated in Signed Envelopes and Established Standards.
The motivation for this ADR is to make that principle explicit, name the mechanism that delivers it, and align the wiki's prose so that "SHA-256" appears only as the v0.1 default — derived from the active suite — and never as an unconditional fact about the architecture.
flexo-rtm v0.1 treats hash-algorithm and signature-algorithm choice as a suite parameter, not a hard pin. The active cryptographic suite — VC-DI 2.0 cryptosuite ID for Data Integrity proofs, cosign's signature-bundle metadata for OCI / DSSE, the multihash-style algorithm prefix on rtm:hasContentHash — supplies the algorithm. Where the wiki currently names "SHA-256," it should be read as "the content-hash algorithm specified by the active suite; v0.1's default is SHA-256 because that is the W3C Data Integrity 2.0 default for the ecdsa-rdfc-2019 and eddsa-rdfc-2022 cryptosuites and the cosign default." Tooling is and remains established libraries — hashlib, cryptography, sigstore-python, libssl bindings — never hand-rolled primitives.
- Forward-compatibility: when SHA-256 or P-256 retire,
flexo-rtmrotates by updating the suite catalog and the SHACL profile defaults, not by surgery across the codebase - Tool footprint stays compact: one Python crypto stack (
hashlib+cryptography), one cosign install, one Sigstore client, one git signing setup — adding a new algorithm means a new suite ID, not a new dependency - Suite-driven framing aligns
flexo-rtmwith the surrounding ecosystem (W3C VC-DI, cosign, OCI signatures) — auditors recognise the pattern; no bespoke algorithm-negotiation vocabulary is introduced - Cert artifacts remain auditable across suite rotations: each artifact records the suite ID it was certified under, and verifiers locate the right primitive from that ID
- Wiki prose becomes slightly more verbose — "the content-hash algorithm specified by the active suite (default: SHA-256 per VC-DI 2.0 and cosign defaults)" instead of bare "SHA-256"; mitigated by the prose being clearer about what is variable and what is fixed
- A reader scanning quickly may still take "SHA-256" as the algorithm; mitigated by the agility framing being introduced up front in Signed Envelopes and Established Standards and recapped wherever a specific algorithm name appears
- Implementations MUST parse suite IDs from incoming artifacts rather than assuming SHA-256; this is established practice for VC-DI / cosign verifiers, so the cost is bounded
- The decision composes cleanly with ADR-016 Composable SHACL Profiles: a profile may pin a specific suite for a regulated context (e.g., a FIPS-only profile), while the default profile leaves the suite to whatever the artifact carries
- v0.1's empirical defaults — SHA-256, Ed25519, P-256 — are unchanged; only the framing is corrected
- Hard-pin SHA-256 + ECDSA-P-256 (or Ed25519) for v0.1 simplicity, defer agility to a later version: Rejected. Algorithm retirement (NIST deprecation, post-quantum migration, regulatory mandate) is a near-term reality on the same horizon as v0.1's expected adoption. A hard pin forces code surgery and invalidates prior artifacts' algorithm assumptions when retirement happens; agility is cheap if introduced at the design phase and expensive to retro-fit.
-
Define an
rtm:core vocabulary for algorithm negotiation: Rejected. W3C VC-DI 2.0 already supplies thesec:cryptosuitemechanism; cosign and OCI image-signature standards already supply theirs; DSSE carries algorithm IDs in its payload-type fields. Inventing a parallelrtm:cryptoAlgorithmpredicate duplicates standards work and creates a second, less-supported negotiation surface. Composition over invention (per ADR-023 Cryptography by Composition of Battle-Tested Standards) — read the algorithm from the suite, not from anrtm:-prefixed parallel. - Multi-algorithm bundled hashes (carry SHA-256 AND SHA-3 AND BLAKE3 simultaneously for every artifact): Rejected for v0.1. Multi-hashing adds storage and computation cost and answers a problem (algorithm consensus disagreement among verifiers) that does not arise in v0.1's adoption profile. The right time for multi-hashing is during a specific algorithm-retirement transition window, gated by a profile, not as a default.
- The wiki sites where this ADR governs prose: Signed Envelopes and Established Standards (new "Cryptographic agility" section near the top), RDFC-1.0 Canonicalization (replace bare "SHA-256" with suite-aware framing), Transcript Replay Semantics (the
rtm:inputsHash/rtm:resultHashalgorithm is suite-derived), Verifiable Self-Certification (canonical-form-hash algorithm comes from the active suite), External URI References (rtm:hasContentHashuses amultihash-style algorithm prefix), Lossless Roundtrip Definition (the byte-equality test references whatever hash the active suite specifies) - Active suite IDs are read from VC-DI proofs (
sec:cryptosuite), cosign bundles (signature-algorithm metadata), DSSE envelopes (payload-type / algorithm ID), and themultihashprefix onrtm:hasContentHash - The v0.1 ontology continues to declare SHA-256 as the default hash for the bundled
data-integrity-attestations,dsse-activities, andcosign-imagesprofiles, because those are the standards' own defaults; a future profile can override - Tool pin:
hashlib(stdlib),cryptography(PyCA),sigstore-python(Sigstore), systemopenssl/libsslbindings viacryptography. No hand-rolled primitives, no custom suite catalog - Profile registry sketch lives in
ontology/profiles/cryptosuites.ttl, enumerating VC-DI suite IDs flexo-rtm recognises; this is informational — verification reads the suite ID from the artifact and applies the matching standard primitive - No backward-incompatible RDF changes: existing artifacts that record raw SHA-256 hashes remain valid (the algorithm is unambiguously SHA-256 in those cases via the active-default suite at the time of cert)
- Design Spec §4.6 (Signed envelopes — composition of established standards), §4.9 (Reproducibility chain)
- Signed Envelopes and Established Standards — the canonical composition documentation; new "Cryptographic agility" section
- ADR-023 Cryptography by Composition of Battle-Tested Standards — composition principle this ADR extends to algorithm choice
- ADR-016 Composable SHACL Profiles — composability the suite catalog rides on
- W3C Verifiable Credentials Data Integrity 2.0 (
sec:cryptosuite): https://www.w3.org/TR/vc-data-integrity/ - W3C Data Integrity ECDSA Cryptosuite: https://www.w3.org/TR/vc-di-ecdsa/
- W3C Data Integrity EdDSA Cryptosuite: https://www.w3.org/TR/vc-di-eddsa/
- Sigstore cosign signature-bundle format: https://docs.sigstore.dev/
- OCI Image Signature Specification: https://github.com/opencontainers/image-spec/blob/main/signature.md
- Multihash: https://github.com/multiformats/multihash
- Closes flexo-rtm-research issue #1 (Cryptographic Agility)
- Flexo Git Coexistence
- ADCS Prototype Lessons
- MVC Pattern from RIME TRL ANT
- Human-AI Accountability
- Multi-Agent Discourse Graph Precedent
- OSLC RM and QM Review
- INCOSE V2 Review
- OMG SysMLv2
- PROV EARL GSN P-PLAN
- Dragon Architecture and Mission Enterprise
- Traditional Forward and Backward Analysis
- Attestation Infrastructure in v0.1
- Identity Boundaries and Policy Projections
- External URI References
- Signed Envelopes and Established Standards
- Aspect Coverage with Adequacy and Sufficiency
- Federated Audit and Composition
- Certification Predicate
- Gap Taxonomy
- Quantitative Outcomes
- Engineering Lifecycle Stages (v0.2)
- Topological Framework Future Work (research phase)
- Vertices Edges Faces (research phase)
- Three-Layer Architecture
- Operational Layer UX Discipline
- Storage Layer Flexo Conventions
- Analysis Layer Scope Algebra
- OSLC Roundtrip Acceptance
- Identity Adapter Contract
- Flexo REST Binding
- SysMLv2 Ingestion Contract
- External URI Rules
- Signed Envelope Shapes
- Parsimony Manifest
- Lossless Roundtrip Definition
- Vendor Extension Carry-Through
- OSLC RM Adapter Contract
- OSLC QM Adapter Contract
- ADR Template
- ADR-001 Foundations First Approach
- ADR-002 SysMLv2 Anchoring
- ADR-003 Topological Framework Documented as Future Work
- ADR-003a v0.1 Ships Traditional Analysis Only
- ADR-004 Quantitative Certification Outcome
- ADR-005 Adequacy and Sufficiency as Guidance Subtypes
- ADR-006 Three-Layer Architecture
- ADR-007 Scope as First-Class RDF Resource
- ADR-008 Repo Name and Org Transfer Plan
- ADR-009 Two-Repo Strategy
- ADR-010 OSLC-RM and OSLC-QM in v0.1
- ADR-011 Lossless Criterion A plus C
- ADR-012 Direct RDF Properties over Reified Edges
- ADR-013 Simplicial Complex as Derived View When Built
- ADR-014 Parsimony Layer Build-Time Extraction
- ADR-015 GSN Adoption for Adequacy and Sufficiency
- ADR-016 Composable SHACL Profiles
- ADR-017 knowledgecomplex as Optional Extras
- ADR-018 V minus F Invariant Deferred with Topological Framework
- ADR-019 Derived Binary View from Quantitative Metrics
- ADR-020 Vocabulary Alignment with Zargham 2026
- ADR-021 Three Attestation Subclasses Ship in v0.1
- ADR-022 External URI References as Open-Source Foundation
- ADR-023 Cryptography by Composition of Battle-Tested Standards
- ADR-024 Identity by Thin Projection of External Sources
- ADR-025 Reproducibility is Structural and Local
- ADR-026 Cryptographic Agility via Algorithm Profiles
- ADR-027 Bit-Exactness vs Numerical Tolerances Are Both First-Class
- ADR-028 Scope-Level Adequacy and Sufficiency for Federated Audit
- ADR-029 Engineering Lifecycle Stages as Scope Metadata
- ADR-030 Polycentric ASOT Authority Model
- ADR-031 Attestation Status Pass Fail Deferred Deprecated
- ADR-032 Methodology Agnosticism as Foundational Axiom
- ADR-033 Generalized ASOT Principle for All Identified Things