You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protocol-first restructure, TypeScript implementation, finalized URI scheme, and full CapsuleType conformance.
16
+
Protocol-first restructure, TypeScript implementation, finalized URI scheme, full CapsuleType conformance, Security Considerations in spec, cryptographic chain verification, and 11-framework compliance directory.
17
17
18
18
### Changed
19
19
@@ -24,19 +24,30 @@ Protocol-first restructure, TypeScript implementation, finalized URI scheme, and
24
24
- Protocol documentation at `docs/` (language-agnostic)
25
25
- Python-specific docs at `reference/python/docs/`
26
26
- No `pyproject.toml` at repo root — the repo is a protocol, not a package
27
+
-**Compliance restructured into per-framework directory** — `docs/compliance.md` replaced by `docs/compliance/` with individual documents per framework and a README index.
27
28
28
29
### Added
29
30
30
-
-**`capsule://` URI scheme (Active)**— content-addressable references to Capsule records via their SHA3-256 hash. Spec at `spec/uri-scheme.md`, finalized from Draft to Active. Supports hash references (`capsule://sha3_<hash>`), chain references (`capsule://chain/42`), ID references, and fragment syntax into the 6 sections. Includes URI conformance vectors at `conformance/uri-fixtures.json`.
31
-
-**TypeScript reference implementation** — full CPS-conformant implementation at `reference/typescript/`: Capsule model with factories, canonical JSON serializer (CPS Section 2 with float-path handling), SHA3-256 hashing, Ed25519 seal/verify, and chain verification. Passes all 16 golden fixtures. 101 tests, 100% coverage (v8). Uses `@noble/hashes` ^2.0.1, `@noble/ed25519` ^3.0.0, vitest ^4.0.0, TypeScript ^5.9.0. Node.js >= 20.19.0.
32
-
-**Implementor's Guide** (`docs/implementors-guide.md`) — step-by-step instructions for building a conformant CPS implementation in any language, with language-specific pitfalls for TypeScript, Go, and Rust.
33
-
-**Why Capsules** (`docs/why-capsules.md`) — the case for cryptographic AI memory, aimed at decision-makers and architects.
34
-
-**URI scheme security considerations** — `spec/uri-scheme.md` includes: URI injection validation, resolution trust model, denial-of-service mitigations, fragment path traversal safety, no ambient authority principle.
31
+
-**Security Considerations in CPS spec**(`spec/README.md` Section 7) — documents what CPS provides (integrity, authenticity, non-repudiation, ordering, quantum resistance) and what it does not (confidentiality, truthfulness, availability, identity binding). Covers signer key compromise, chain truncation, verification levels, replay, and timestamp trust.
32
+
-**Cryptographic chain verification** — `chain.verify(verify_content=True)` recomputes SHA3-256 from content and compares to stored hash. `chain.verify(seal=seal_instance)` also verifies Ed25519 signatures. Both Python and TypeScript implementations. Default structural-only behavior is unchanged (backward compatible).
33
+
-**11-framework compliance directory** (`docs/compliance/`) — per-framework regulatory mappings: NIST SP 800-53, NIST AI RMF, EU AI Act, SOC 2, ISO 27001, HIPAA, GDPR, PCI DSS, FedRAMP, FINRA, CMMC. Each document maps protocol-level capabilities to specific controls and lists complementary controls outside the protocol's scope.
34
+
-**NIST RFI submission archive** (`nist-submission/`) — exact artifacts submitted to NIST (Docket NIST-2025-0035), SHA-256 checksums, and README with normative/informative classification.
35
+
-**`capsule://`URI scheme (Active)** — content-addressable references to Capsule records via their SHA3-256 hash. Spec at `spec/uri-scheme.md`, finalized from Draft to Active. Supports hash references (`capsule://sha3_<hash>`), chain references (`capsule://chain/42`), ID references, and fragment syntax into the 6 sections.
35
36
-**URI conformance vectors** (`conformance/uri-fixtures.json`) — 10 valid and 11 invalid URI parsing test vectors for cross-language URI parser verification.
37
+
-**TypeScript reference implementation** — full CPS-conformant implementation at `reference/typescript/`: Capsule model with factories, canonical JSON serializer (CPS Section 2 with float-path handling), SHA3-256 hashing, Ed25519 seal/verify, and chain verification with `verifyContent` option. Passes all 16 golden fixtures. 101 tests, 100% coverage (v8). Uses `@noble/hashes` ^2.0.1, `@noble/ed25519` ^3.0.0, vitest ^4.0.0, TypeScript ^5.9.0. Node.js >= 20.19.0.
38
+
-**TypeScript release workflow** (`.github/workflows/typescript-release.yaml`) — npm publish with provenance on version tags, gated by conformance tests.
36
39
-**`vault` golden fixture** — conformance suite now covers all 8 CapsuleTypes (16 total fixtures, up from 15). The `vault_secret` fixture tests secret rotation with policy-based authority.
37
-
-**Protocol structure tests** (`reference/python/tests/test_protocol_structure.py`) — guards the protocol-first layout, spec completeness, conformance suite integrity, TypeScript type alignment with spec, markdown link resolution, CI configuration, and root-level file requirements.
40
+
-**Implementor's Guide** (`docs/implementors-guide.md`) — step-by-step instructions for building a conformant CPS implementation in any language, with URI parsing section and language-specific pitfalls.
41
+
-**Why Capsules** (`docs/why-capsules.md`) — the case for cryptographic AI memory.
42
+
-**Protocol structure tests** — guards the protocol-first layout, spec completeness (including Security Considerations), conformance suite integrity, URI vectors, compliance directory, TypeScript alignment, markdown links, CI configuration, and root-level files.
38
43
-**Dependabot for TypeScript** — npm dependency updates for `reference/typescript/`.
39
44
45
+
### Security
46
+
47
+
-`chain.verify()` now supports cryptographic verification (`verify_content=True`, `seal=`) in addition to structural-only checks. Structural verification alone trusts stored hash values; cryptographic verification recomputes from content.
48
+
- Hash computation in chain verification uses the canonical `compute_hash()` function (Python) and `computeHash(toDict())` (TypeScript) to prevent divergence from the sealing path.
49
+
- Spec Section 7 explicitly documents non-goals: no confidentiality, no content truthfulness, no availability guarantees, no identity binding.
4. Recomputes SHA3-256 from content and compares to stored hash
262
+
5. Optionally verifies Ed25519 signatures (when `seal=` is provided)
263
+
264
+
Structural verification trusts stored hash values. Cryptographic verification catches storage-level tampering where an attacker modifies content without the signing key. See [CPS Section 7.5](../spec/README.md) for the security rationale.
265
+
257
266
If any check fails, the result includes the Capsule ID where the chain broke and the number of Capsules verified before the break.
Copy file name to clipboardExpand all lines: docs/implementors-guide.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,13 +116,28 @@ Seal fields (`hash`, `signature`, `signature_pq`, `signed_at`, `signed_by`) are
116
116
117
117
## Step 6: Chain Verification
118
118
119
+
Implementations SHOULD support two verification levels (see [CPS Section 7.5](../spec/README.md)):
120
+
121
+
**Structural** (fast):
122
+
119
123
```
120
124
1. Load all Capsules in sequence order
121
125
2. Verify sequence numbers are consecutive: 0, 1, 2, ...
122
126
3. Verify genesis (sequence 0) has previous_hash = null
123
127
4. For each subsequent Capsule, verify previous_hash = hash of previous Capsule
124
128
```
125
129
130
+
**Cryptographic** (thorough):
131
+
132
+
```
133
+
All structural checks, plus:
134
+
5. For each Capsule, recompute SHA3-256 from content via to_dict() + canonicalize()
135
+
6. Compare recomputed hash to stored hash (detects storage-level tampering)
136
+
7. Optionally verify Ed25519 signature on each Capsule
137
+
```
138
+
139
+
Structural verification trusts stored hash values. Cryptographic verification catches content tampering where the attacker does not have the signing key.
0 commit comments