From d0bbb264fe51b3540d9557bc4b9bac4d6e29cd1b Mon Sep 17 00:00:00 2001 From: Carl Niklas Rydberg Date: Sat, 17 Jan 2026 09:01:19 +0100 Subject: [PATCH] Tighten policy hash, offline root trust, and PER signature specs --- tier1/asl-offline-root-trust-1.md | 20 +++++++++++++++++--- tier1/asl-policy-hash-1.md | 24 +++++++++++++++++++----- tier1/per-signature-1.md | 19 ++++++++++++++----- 3 files changed, 50 insertions(+), 13 deletions(-) diff --git a/tier1/asl-offline-root-trust-1.md b/tier1/asl-offline-root-trust-1.md index da442d6..9cf43ea 100644 --- a/tier1/asl-offline-root-trust-1.md +++ b/tier1/asl-offline-root-trust-1.md @@ -43,10 +43,12 @@ OfflineRootSet { version : u32 root_keys[] : PublicKey threshold : u8 + reserved0 : u32 } ``` The root set is snapshot-pinned and rarely changed. +`reserved0` MUST be 0. --- @@ -65,6 +67,7 @@ Recommended size: **1 to 3** root keys. * Default threshold is 1. * If threshold > 1, it MUST be fixed and explicit. * Verification MUST be order-independent. +* Threshold MUST be <= number of `root_keys[]`. --- @@ -80,7 +83,18 @@ Roots MUST NOT sign artifacts, PERs, snapshots, or TGK edges. --- -## 6. Root Rotation +## 6. Root Set Validation (Normative) + +An OfflineRootSet is valid iff: + +1. `root_keys[]` contains unique entries (no duplicates). +2. `threshold` is between 1 and `len(root_keys[])`. +3. `version` is supported. +4. `reserved0` is 0. + +--- + +## 7. Root Rotation Root rotation is a constitutional change: @@ -91,7 +105,7 @@ Root rotation is a constitutional change: --- -## 7. Validation Algorithm +## 8. Validation Algorithm To validate authority: @@ -105,6 +119,6 @@ No timestamps or online checks are required. --- -## 8. Summary +## 9. Summary ASL/OFFLINE-ROOT-TRUST/1 defines a small, explicit offline root set that anchors authority and preserves deterministic replay. diff --git a/tier1/asl-policy-hash-1.md b/tier1/asl-policy-hash-1.md index a5cbe72..69af032 100644 --- a/tier1/asl-policy-hash-1.md +++ b/tier1/asl-policy-hash-1.md @@ -57,6 +57,7 @@ DomainPolicy { federation_policy : FederationPolicy retention_policy : RetentionPolicy visibility_policy : VisibilityPolicy + reserved0 : u32 } ``` @@ -94,7 +95,20 @@ VisibilityPolicy { --- -## 4. Canonicalization Rules (Normative) +## 4. Defaults and Validation (Normative) + +All fields MUST be present. Defaults apply only to explicit values: + +* `allowed_roles[]` MAY be empty (no roles allowed) +* `trusted_domains[]` MAY be empty (no domains trusted) +* `min_snapshot_retention` MAY be 0 (no minimum) +* `reserved0` MUST be 0 + +A policy is invalid if any boolean is outside {0,1} or if `version` is unsupported. + +--- + +## 5. Canonicalization Rules (Normative) The policy hash MUST be computed from canonical bytes: @@ -107,7 +121,7 @@ The policy hash MUST be computed from canonical bytes: --- -## 5. Hash Computation +## 6. Hash Computation ``` policy_bytes = CanonicalSerialize(DomainPolicy) @@ -118,7 +132,7 @@ The hash algorithm is SHA-256 unless explicitly overridden by domain policy. --- -## 6. Storage Locations +## 7. Storage Locations The policy hash SHOULD be stored in: @@ -129,7 +143,7 @@ The policy hash SHOULD be stored in: --- -## 7. Policy Evolution +## 8. Policy Evolution Policy changes MUST NOT mutate history. A new policy requires: @@ -140,6 +154,6 @@ Policy changes MUST NOT mutate history. A new policy requires: --- -## 8. Summary +## 9. Summary ASL/POLICY-HASH/1 defines a minimal, deterministic policy hash that binds domain rules to authority and snapshots without embedding mutable policy text into artifacts. diff --git a/tier1/per-signature-1.md b/tier1/per-signature-1.md index 62a6388..339157b 100644 --- a/tier1/per-signature-1.md +++ b/tier1/per-signature-1.md @@ -46,12 +46,21 @@ PERSignaturePayload { input_artifact_ids[] : ArtifactID (sorted) program_id : ProgramID logseq : u64 + reserved0 : u32 } ``` --- -## 3. Canonicalization Rules (Normative) +## 3. Payload Validation (Normative) + +* `reserved0` MUST be 0. +* `input_artifact_ids[]` MUST be unique and sorted. +* `logseq` MUST refer to the execution order in the domain log. + +--- + +## 4. Canonicalization Rules (Normative) 1. Byte order: big-endian 2. Arrays: sorted lexicographically by ArtifactID @@ -60,7 +69,7 @@ PERSignaturePayload { --- -## 4. Signature Object +## 5. Signature Object ```text PERSignature { @@ -73,7 +82,7 @@ PERSignature { --- -## 5. Validation Procedure (Normative) +## 6. Validation Procedure (Normative) To validate a PER: @@ -88,7 +97,7 @@ If any step fails, the PER MUST be rejected as authoritative. --- -## 6. Failure Modes +## 7. Failure Modes | Condition | Result | | ------------------ | ------------------------- | @@ -100,6 +109,6 @@ If any step fails, the PER MUST be rejected as authoritative. --- -## 7. Summary +## 8. Summary PER/SIGNATURE/1 defines a minimal, deterministic signature payload and validation procedure for PER artifacts.