|
4 | 4 |
|
5 | 5 | (meta |
6 | 6 | (version "0.1.0") |
7 | | - (last-updated "2026-03-20") |
| 7 | + (last-updated "2026-03-21") |
8 | 8 |
|
9 | 9 | (architecture-decisions |
10 | | - (adr "001-iser-pattern" |
| 10 | + (adr "001-attestation-envelope" |
11 | 11 | (status "accepted") |
12 | | - (context "Need to make powerful languages accessible without steep learning curves") |
13 | | - (decision "Use manifest-driven code generation: user describes WHAT, tool generates HOW") |
14 | | - (consequences "Users write zero target language code; all complexity in the -iser")) |
| 12 | + (context "Need a standard format for cryptographic attestation of arbitrary files") |
| 13 | + (decision "A2ML envelope: sidecar .a2ml file containing hash algorithm, digest, signature, timestamp, and optional parent reference for provenance chains") |
| 14 | + (consequences "Any file format can be attested without modification; verification is independent of file type")) |
15 | 15 |
|
16 | | - (adr "002-abi-ffi-standard" |
| 16 | + (adr "002-hash-algorithms" |
17 | 17 | (status "accepted") |
18 | | - (context "Need verified interop between Rust CLI, target language, and user code") |
19 | | - (decision "Idris2 ABI for formal proofs, Zig FFI for C-ABI bridge") |
20 | | - (consequences "Compile-time correctness guarantees; zero runtime overhead from proofs")) |
| 18 | + (context "Need fast and secure digest computation for attestation") |
| 19 | + (decision "Support BLAKE3 (default, faster) and SHA-256 (widely trusted). Both produce 32-byte digests.") |
| 20 | + (consequences "Uniform digest size simplifies envelope layout; BLAKE3 gives 3-10x speedup over SHA-256")) |
21 | 21 |
|
22 | | - (adr "003-rsr-template" |
| 22 | + (adr "003-signature-algorithm" |
23 | 23 | (status "accepted") |
24 | | - (context "Need consistent project structure across 29+ -iser repos") |
25 | | - (decision "All repos cloned from rsr-template-repo with full CI/CD and governance") |
26 | | - (consequences "17 workflows, SECURITY.md, CONTRIBUTING, bot directives from day one"))) |
| 24 | + (context "Need a modern, secure signing algorithm for attestation envelopes") |
| 25 | + (decision "Ed25519 as primary (32-byte keys, 64-byte signatures). Ed448 reserved for future high-security mode.") |
| 26 | + (consequences "Small keys and signatures keep envelopes compact; Ed25519 is widely supported")) |
| 27 | + |
| 28 | + (adr "004-abi-ffi-standard" |
| 29 | + (status "accepted") |
| 30 | + (context "Need verified interop between Rust CLI and crypto primitives") |
| 31 | + (decision "Idris2 ABI for formal proofs of signature correctness and chain validity; Zig FFI for C-ABI crypto implementation") |
| 32 | + (consequences "Compile-time correctness guarantees; zero runtime overhead from proofs; Zig gives access to std.crypto")) |
| 33 | + |
| 34 | + (adr "005-structure-aware-signing" |
| 35 | + (status "proposed") |
| 36 | + (context "Opaque-blob signing loses granularity — cannot attest individual config sections") |
| 37 | + (decision "Parse files into structural units (TOML tables, YAML documents, JSON objects) and sign at chosen granularity") |
| 38 | + (consequences "More complex implementation but enables partial verification and selective re-attestation")) |
| 39 | + |
| 40 | + (adr "006-provenance-chains" |
| 41 | + (status "proposed") |
| 42 | + (context "Single attestations cannot express chain-of-custody or successive modifications") |
| 43 | + (decision "Each envelope may reference a parent envelope hash, forming a DAG of trust from leaf to root") |
| 44 | + (consequences "Full audit trail for config evolution; can verify entire history or just latest state"))) |
27 | 45 |
|
28 | 46 | (development-practices |
29 | | - (language "Rust" (purpose "CLI and orchestration")) |
30 | | - (language "Idris2" (purpose "ABI formal proofs")) |
31 | | - (language "Zig" (purpose "FFI C-ABI bridge")) |
| 47 | + (language "Rust" (purpose "CLI orchestration, manifest parsing, codegen")) |
| 48 | + (language "Idris2" (purpose "ABI formal proofs — signature correctness, chain validity, memory layout")) |
| 49 | + (language "Zig" (purpose "FFI C-ABI bridge — crypto primitives (BLAKE3, SHA-256, Ed25519)")) |
32 | 50 | (build-tool "cargo") |
33 | 51 | (ci "GitHub Actions (17 workflows)")) |
34 | 52 |
|
35 | 53 | (design-rationale |
36 | | - (principle "Manifest-driven" |
37 | | - (explanation "User intent captured in TOML; all generation is deterministic and reproducible")) |
38 | | - (principle "Formally verified bridges" |
39 | | - (explanation "Idris2 dependent types prove interface correctness at compile time")) |
40 | | - (principle "Zero target language exposure" |
41 | | - (explanation "Users never write Chapel/Julia/Futhark/etc. — the -iser handles everything")))) |
| 54 | + (principle "Attestation is orthogonal to format" |
| 55 | + (explanation "Any file type can be attested. Format handlers parse structure; the attestation engine is format-agnostic.")) |
| 56 | + (principle "Formally verified crypto boundary" |
| 57 | + (explanation "Idris2 dependent types prove that signing and verification are consistent. The proof is erased at runtime.")) |
| 58 | + (principle "Provenance over point-in-time" |
| 59 | + (explanation "A single signature proves current state. A provenance chain proves history. Both are first-class.")))) |
0 commit comments