Tighten policy hash, offline root trust, and PER signature specs

This commit is contained in:
Carl Niklas Rydberg 2026-01-17 09:01:19 +01:00
parent 95e030d562
commit d0bbb264fe
3 changed files with 50 additions and 13 deletions

View file

@ -43,10 +43,12 @@ OfflineRootSet {
version : u32 version : u32
root_keys[] : PublicKey root_keys[] : PublicKey
threshold : u8 threshold : u8
reserved0 : u32
} }
``` ```
The root set is snapshot-pinned and rarely changed. 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. * Default threshold is 1.
* If threshold > 1, it MUST be fixed and explicit. * If threshold > 1, it MUST be fixed and explicit.
* Verification MUST be order-independent. * 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: 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: 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. ASL/OFFLINE-ROOT-TRUST/1 defines a small, explicit offline root set that anchors authority and preserves deterministic replay.

View file

@ -57,6 +57,7 @@ DomainPolicy {
federation_policy : FederationPolicy federation_policy : FederationPolicy
retention_policy : RetentionPolicy retention_policy : RetentionPolicy
visibility_policy : VisibilityPolicy 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: 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) 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: 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: 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. 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.

View file

@ -46,12 +46,21 @@ PERSignaturePayload {
input_artifact_ids[] : ArtifactID (sorted) input_artifact_ids[] : ArtifactID (sorted)
program_id : ProgramID program_id : ProgramID
logseq : u64 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 1. Byte order: big-endian
2. Arrays: sorted lexicographically by ArtifactID 2. Arrays: sorted lexicographically by ArtifactID
@ -60,7 +69,7 @@ PERSignaturePayload {
--- ---
## 4. Signature Object ## 5. Signature Object
```text ```text
PERSignature { PERSignature {
@ -73,7 +82,7 @@ PERSignature {
--- ---
## 5. Validation Procedure (Normative) ## 6. Validation Procedure (Normative)
To validate a PER: 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 | | 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. PER/SIGNATURE/1 defines a minimal, deterministic signature payload and validation procedure for PER artifacts.