@attested-intelligence/aga-mcp-server 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/DEPLOYMENT.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGA MCP Server — Deployment & Hardening Guide
2
2
 
3
- Practical guidance for running `@attested-intelligence/aga-mcp-server` (3.0.0-rc) in a defensible configuration. Scope is the **MCP server boundary** — see `THREAT_BOUNDARY.md` for the full claim/limitation surface this guide operationalizes.
3
+ Practical guidance for running `@attested-intelligence/aga-mcp-server` (3.0.1) in a defensible configuration. Scope is the **MCP server boundary** — see `THREAT_BOUNDARY.md` for the full claim/limitation surface this guide operationalizes.
4
4
 
5
5
  The hardened posture in one line: **stdio upstream + a persisted, well-protected gateway key + network isolation + verifiers that pin the gateway key.**
6
6
 
@@ -59,7 +59,7 @@ Call the `get_server_info` tool → **`gateway_public_key`**. That 64-hex value
59
59
  ```bash
60
60
  # reference verifier (zero deps)
61
61
  node aga-receipt-spec/verify/verify-sep.mjs evidence-bundle.json --pubkey <gateway_public_key>
62
- # or the published CLI (2.0.0 — publish pending)
62
+ # or the published CLI (@attested-intelligence/aga-verify 2.0.0)
63
63
  aga-verify evidence-bundle.json --pubkey <gateway_public_key>
64
64
  ```
65
65
  Or via the tool: `verify_bundle_offline(bundle, pinned_public_key=<gateway_public_key>)`. **Without a pin you get an integrity-only result** (`issuerVerified=false`, summary says "NOT provenance"). See §3.7 of the boundary doc.
package/README.md CHANGED
@@ -5,9 +5,10 @@ Cryptographic runtime governance for AI agents and autonomous systems.
5
5
  [![npm](https://img.shields.io/npm/v/@attested-intelligence/aga-mcp-server)](https://www.npmjs.com/package/@attested-intelligence/aga-mcp-server)
6
6
  [![PyPI](https://img.shields.io/pypi/v/aga-governance)](https://pypi.org/project/aga-governance/)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
- [![status](https://img.shields.io/badge/status-3.0.0--rc-blue)](https://github.com/attestedintelligence/aga-mcp-server)
8
+ [![release](https://img.shields.io/badge/release-3.2.0-brightgreen)](https://www.npmjs.com/package/@attested-intelligence/aga-mcp-server)
9
+ [![npm provenance](https://img.shields.io/badge/npm-SLSA%20provenance-brightgreen)](https://www.npmjs.com/package/@attested-intelligence/aga-mcp-server)
9
10
 
10
- > **Status 3.0.0-rc.** This release candidate emits the **canonical SEP evidence bundle** from both the server tools and the `aga-proxy`, verifiable offline by `@attested-intelligence/aga-verify` and the reference verifier `aga-receipt-spec/verify/verify-sep.mjs`. The **currently-published npm release (2.2.2) still emits a legacy continuity-chain bundle** that does *not* verify under the SEP verifier upgrade to 3.0 once published. Claim scope and residual attack surface are documented honestly in `THREAT_BOUNDARY.md`.
11
+ > **Status: 3.2.0 (published to npm with SLSA build provenance).** The server tools and the `aga-proxy` emit the **canonical SEP evidence bundle**, verifiable offline by the published `@attested-intelligence/aga-verify` and the reference verifier `aga-receipt-spec/verify/verify-sep.mjs`. **As of 3.2.0 the verifier is algorithm-agile and ships a post-quantum profile:** v1 `Ed25519-SHA256-JCS` (the default the gateway emits) and v2 `ML-DSA-65+Ed25519-SHA256-JCS` (a NIST FIPS-204 ML-DSA-65 + RFC-8032 Ed25519 **composite**, both must verify), selected per-bundle by the `algorithm` field with a `VERIFIED / FAILED / UNSUPPORTED_PROFILE` trichotomy. Pre-3.0 releases (a legacy continuity-chain bundle that does *not* verify under the SEP verifier) are deprecated; use `^3.0.0`. Claim scope and residual attack surface are documented honestly in `THREAT_BOUNDARY.md`.
11
12
 
12
13
  ```bash
13
14
  # This package IS the AGA MCP server (TypeScript, runs over stdio). Use it from any MCP client:
@@ -16,13 +17,27 @@ npx -y @attested-intelligence/aga-mcp-server
16
17
 
17
18
  A Python companion SDK (`aga-governance`) is documented in the Python SDK section below.
18
19
 
20
+ ## Verify this yourself (no trust required)
21
+
22
+ You do not have to take any of this on faith. The repo ships the reference verifier, the canonical vectors, and sample bundles, so you can check one offline right now with no network and no dependency on us:
23
+
24
+ ```bash
25
+ git clone https://github.com/attestedintelligence/aga-mcp-server
26
+ cd aga-mcp-server
27
+ # A canonical SEP bundle verifies; a one-byte-tampered copy is rejected.
28
+ node aga-receipt-spec/verify/verify-sep.mjs fixtures/valid_minimal.json # OVERALL: VERIFIED (integrity only; no key pinned)
29
+ node aga-receipt-spec/verify/verify-sep.mjs fixtures/tampered.json # OVERALL: FAILED
30
+ ```
31
+
32
+ The published `@attested-intelligence/aga-verify@2.0.0` CLI renders the identical verdict, and `npm run conformance:cross-stack` proves six v1 verifier configurations — spanning **three independent toolchains (JavaScript, Go, and Python, including a pure-stdlib, no-third-party-crypto path)** — agree on all **57** cross-stack cases; `npm run conformance:cross-stack-v2` proves **two genuinely independent-language oracles (@noble/JS and CIRCL/Go)** agree on the v2 composite corpus. For a full trust-free reproduction (build the package yourself, reproduce the published tarball byte-for-byte, re-run every gate), see the **[REVIEWER_GUIDE.md](REVIEWER_GUIDE.md)** (a command-by-command self-service path), **[REPRODUCIBILITY.md](REPRODUCIBILITY.md)**, and the step-by-step **[SKEPTICAL_AUDITOR.md](SKEPTICAL_AUDITOR.md)**. The 3.2.0 npm release carries SLSA build provenance, checkable with `npm audit signatures`.
33
+
19
34
  ## What This Does
20
35
 
21
36
  Every tool call an AI agent makes passes through the AGA gateway. Each call is evaluated against policy, and the decision (PERMITTED or DENIED) is recorded as a signed, hash-linked governance receipt. Receipts are collected into evidence bundles that any third party can verify offline using standard cryptography.
22
37
 
23
38
  **Record. Prove. Verify.**
24
39
 
25
- **Scope:** a verified bundle proves the *integrity of the receipts present* — each is authentic, correctly ordered, Merkle-included, and (when a key is pinned) provenance-bound. It does **not** prove non-omission (that every action the agent took was logged); completeness is bounded by the tamper-evidence of the interception point, which is outside the bundle.
40
+ **Scope:** a verified bundle proves the *integrity of the receipts present* — each is authentic, correctly ordered, Merkle-included, and (when a key is pinned) provenance-bound. It does **not** prove non-omission (that every action the agent took was logged); completeness is bounded by the tamper-evidence of the interception point, which is outside the bundle. See **[KNOWN_LIMITATIONS.md](https://github.com/attestedintelligence/aga-mcp-server/blob/main/KNOWN_LIMITATIONS.md)** for the full honest boundary, and `THREAT_BOUNDARY.md` for the per-field detail.
26
41
 
27
42
  ## Use with Claude Desktop
28
43
 
@@ -41,6 +56,31 @@ Add to your Claude Desktop MCP config (`claude_desktop_config.json`):
41
56
 
42
57
  Claude can then seal artifacts, measure integrity, generate evidence bundles, and verify compliance through natural language.
43
58
 
59
+ ### Persist the signing key (do this first)
60
+
61
+ By default the gateway signs with an **ephemeral** key that rotates on every restart. That is fine for a first look, but evidence-bundle provenance cannot be pinned across restarts (and the server warns about it on stderr). Set one stable 64-hex Ed25519 seed so provenance stays pinnable:
62
+
63
+ ```bash
64
+ # generate a seed once (32 random bytes, hex)
65
+ node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))"
66
+ ```
67
+
68
+ Provide it via `AGA_GATEWAY_KEY`, or `AGA_GATEWAY_KEY_FILE` (a path to the seed). In Claude Desktop, add an `env` block:
69
+
70
+ ```json
71
+ {
72
+ "mcpServers": {
73
+ "aga": {
74
+ "command": "npx",
75
+ "args": ["-y", "@attested-intelligence/aga-mcp-server"],
76
+ "env": { "AGA_GATEWAY_KEY": "<your-64-hex-seed>" }
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ Keep the seed secret and out of version control; see `DEPLOYMENT.md` for key handling.
83
+
44
84
  ## MCP Tools (15)
45
85
 
46
86
  | Category | Tools |
@@ -64,9 +104,9 @@ A bundle this package emits (via the `generate_evidence_bundle` tool, or `aga-pr
64
104
  node aga-receipt-spec/verify/verify-sep.mjs evidence-bundle.json --pubkey <gateway-public-key>
65
105
  ```
66
106
 
67
- The published `@attested-intelligence/aga-verify` CLI mirrors this reference (2.0.0 publish pending; the npm registry currently has the older 1.0.0). Without `--pubkey` you get an **integrity-only** result (`issuerVerified=false`); pin the key to also prove *who* issued it — see `THREAT_BOUNDARY.md` §3.7. A hosted browser verifier is linked under [Links](#links).
107
+ The published `@attested-intelligence/aga-verify` CLI mirrors this reference (**2.0.0**, published on npm; the older forgeable 1.0.0 is deprecated). Without `--pubkey` you get an **integrity-only** result (`issuerVerified=false`); pin the key to also prove *who* issued it — see `THREAT_BOUNDARY.md` §3.7. A hosted browser verifier is linked under [Links](#links).
68
108
 
69
- The reference §6 algorithm is implemented in **three languages** — JavaScript (`aga-receipt-spec/verify/verify-sep.mjs`), Go (`verify.go`, stdlib `crypto/ed25519`), and Python (`verify.py`, pure-stdlib RFC-8032 Ed25519) — and a cross-stack harness (`npm run conformance:cross-stack`) proves all three, plus the in-server engine and `aga-verify`, render **identical verdicts** on the canonical vectors (valid, adversarial, and every small-order forgery).
109
+ The reference §6 algorithm is implemented in **three languages** — JavaScript (`aga-receipt-spec/verify/verify-sep.mjs`), Go (`verify.go`, stdlib `crypto/ed25519`), and Python (`verify.py`, pure-stdlib RFC-8032 Ed25519) — and a cross-stack harness (`npm run conformance:cross-stack`) proves all three, plus the in-server engine and `aga-verify`, render **identical verdicts** on the canonical vectors (valid, adversarial, and every small-order forgery). The **v2 composite** profile (`ML-DSA-65+Ed25519-SHA256-JCS`) is held to the same bar by a second harness (`npm run conformance:cross-stack-v2`): a `@noble`/JavaScript engine and a CIRCL/Go oracle — two genuinely independent toolchains — render identical verdicts on the pinned v2 corpus, and a v1-only verifier returns `UNSUPPORTED_PROFILE` (exit 3) on a v2 bundle rather than a misleading FAILED.
70
110
 
71
111
  ## How It Works
72
112
 
@@ -165,19 +205,19 @@ with AgentSession(gateway_id="my-gateway") as session:
165
205
 
166
206
  Automated tests across TypeScript and Python, plus a conformance corpus:
167
207
 
168
- - **TypeScript MCP server:** 248 tests (vitest) including provable-denial and behavioral-monitor regressions
208
+ - **TypeScript MCP server:** 297 tests (vitest), including provable-denial and behavioral-monitor regressions
169
209
  - **SEP conformance corpus:** `npm run test:conformance` (valid → VERIFIED, negatives → FAILED)
170
- - **Python companion SDK:** pytest suite (`aga-python`)
210
+ - **Python companion SDK:** the separately-published `aga-governance` PyPI package (pytest)
171
211
 
172
212
  ```bash
173
213
  npm test # TypeScript tests (vitest)
174
214
  npm run test:conformance # SEP conformance corpus
175
- cd aga-python && python -m pytest # Python companion tests
215
+ pip install aga-governance && python -m pytest --pyargs aga # Python companion tests
176
216
  ```
177
217
 
178
218
  ## Benchmarks
179
219
 
180
- Performance baseline (signature primitives, storage overhead, the end-to-end measurement cycle, and post-quantum cadence feasibility) is documented in [BENCHMARKS.md](BENCHMARKS.md), matching Section 4.7 of the paper. Receipt-format determinism is reproducible here via the cross-language vectors (`npm test`).
220
+ Receipt-format determinism is reproducible here: `npm test` runs the cross-language vectors, and `npm run conformance:cross-stack` shows the six v1 verifier configurations (across three independent toolchains — JS, Go, Python) agree on the canonical 57-case corpus, while `npm run conformance:cross-stack-v2` shows the two independent-language v2 oracles agree on the composite corpus.
181
221
 
182
222
  ## Project Structure
183
223
 
@@ -188,10 +228,9 @@ src/
188
228
  crypto/ # Internal continuity-chain crypto: Ed25519 (node:crypto), SHA-256/blake2b, salt
189
229
  proxy/ # MCP governance proxy (transparent interception + policy enforcement; emits SEP bundles)
190
230
  middleware/ # Governance PEP wrapper (records a signed PERMITTED/DENIED receipt per governed call)
191
- aga-python/ # Python companion SDK (PyPI: aga-governance)
192
231
  independent-verifier/ # @attested-intelligence/aga-verify — standalone SEP verifier, zero AGA imports
193
232
  scenarios/ # Demo scenarios (SCADA, autonomous vehicle, AI agent) — emit SEP bundles
194
- tests/ # TypeScript test suite (248 tests)
233
+ tests/ # TypeScript test suite (297 tests)
195
234
  ```
196
235
 
197
236
  ## Links
@@ -210,7 +249,7 @@ See [SECURITY.md](SECURITY.md) for vulnerability reporting.
210
249
 
211
250
  ## Contributing
212
251
 
213
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
252
+ See [CONTRIBUTING.md](https://github.com/attestedintelligence/aga-mcp-server/blob/main/CONTRIBUTING.md) for development setup and guidelines.
214
253
 
215
254
  ## License
216
255
 
@@ -1,6 +1,6 @@
1
1
  # AGA MCP Server — Threat Boundary & Bypass Surface (honest audit)
2
2
 
3
- **Scope:** `@attested-intelligence/aga-mcp-server` 3.0.0-rc. Written for Sprint 3 CP3.
3
+ **Scope:** `@attested-intelligence/aga-mcp-server` 3.0.1 (npm `latest`). Written for Sprint 3 CP3.
4
4
  **Stance:** defensibility through honesty. This documents what the package **does** guarantee, what it **does not**, and the **residual attack surface** that remains by design or is deferred. Per the project discipline: better a precisely-stated boundary than an overclaim.
5
5
 
6
6
  ---
@@ -13,11 +13,11 @@ A denial **cannot be silently erased by the agent**:
13
13
 
14
14
  | Attack | Defense | Test |
15
15
  |---|---|---|
16
- | Tamper a receipt | Ed25519 signature + leaf-recompute fail | `acceptance.test.ts 9.3`, `_validation/sep-gate.mjs` |
17
- | Drop the DENIED receipt (truncation) | signed checkpoint binds `leaf_count` + head | `_validation/sep-gate.mjs` (SC4) |
18
- | Reorder to bury it | `previous_receipt_hash` chain + non-decreasing timestamp | `_validation/sep-gate.mjs` (SC5) |
16
+ | Tamper a receipt | Ed25519 signature + leaf-recompute fail | `acceptance.test.ts 9.3`, `fixtures/cross-stack` |
17
+ | Drop the DENIED receipt (truncation) | signed checkpoint binds `leaf_count` + head | `fixtures/cross-stack` (SC4) |
18
+ | Reorder to bury it | `previous_receipt_hash` chain + non-decreasing timestamp | `fixtures/cross-stack` (SC5) |
19
19
  | Re-attest to wipe history | SEP ledger is **not** reset on `attest_subject` | `tests/integration/provable-denial.test.ts` |
20
- | Forge under a different key | receipts checked vs **pinned** key; **all** small-order encodings (10 canonical + non-canonical `y≥p`) rejected | `_validation/sep-gate.mjs` (SC6), `tests/sep/reaudit-fixes.test.ts` |
20
+ | Forge under a different key | receipts checked vs **pinned** key; **all** small-order encodings (10 canonical + non-canonical `y≥p`) rejected | `fixtures/cross-stack` (SC6), `tests/sep/reaudit-fixes.test.ts` |
21
21
  | Crash the recorder to erase a decision (deeply-nested arg "depth bomb") | `canonicalize` is **depth-bounded**; the governance wrapper + proxy **fail closed** — an uncanonicalizable call is DENIED *and recorded*, never silently dropped or forwarded | `tests/proxy/dos-failclosed.test.ts`, `tests/sep/reaudit-fixes.test.ts` |
22
22
 
23
23
  Claim scope is **integrity-of-present-receipts, NOT non-omission**: a PASS proves every *present* receipt is authentic and complete-as-a-set under the checkpoint; it does **not** prove the gateway logged every action it took. Completeness is bounded by the tamper-evidence of the interception point, which is outside the bundle.
@@ -43,20 +43,20 @@ Claim scope is **integrity-of-present-receipts, NOT non-omission**: a PASS prove
43
43
 
44
44
  ## 3. Residual attack surface (honest, deferred, or deployment-dependent)
45
45
 
46
- 1. **Proxy — mandatory mediation is a deployment property.** `GovernanceProxy` governs the path *through it*; if the agent can reach the upstream MCP server **directly** (network), it bypasses governance entirely. `upstreamUrl` (HTTP) is directly reachable. → **Deployment requirement:** the agent must be network-isolated so the proxy is its *only* route to tools. Documented, not code-enforceable here. *(Empirically demonstrated in CP3 A7: `_validation/redteam/a7-proxy-bypass.mjs` — a direct POST to the upstream fired a side effect with no receipt.)* **See `DEPLOYMENT.md` §1: stdio-upstream is the hardened default — the upstream is a non-network-reachable child process, closing this bypass by construction; HTTP-upstream mode now warns on stderr.**
47
- 2. **Proxy — only `method === "tools/call"` is policy-evaluated; partially mitigated in 3.0-rc.** Other JSON-RPC methods are still forwarded (not policy-evaluated), but they are now recorded as **signed passthrough receipts** in the evidence bundle for auditability — so a side-effecting non-`tools/call` method is no longer *invisible* (the CP3 A7 `admin/deleteAllData` would now appear as a `(passthrough)` receipt with `method` set and `reason: forwarded, not policy-evaluated`). Benign protocol methods (`initialize`, `ping`, `tools/list`, `*/list`, `notifications/*`, …) are excluded by default; an optional `denyMethods` denylist rejects known side-effecting methods (a **DENIED** passthrough receipt, not forwarded). **What this closes:** invisibility — every forwarded non-benign method is now in the tamper-evident, checkpoint-bound bundle. **What it does NOT close:** the method is not policy-evaluated and still *executes* unless explicitly denylisted (this is *visibility, not governance*), and a direct-to-upstream call (§3.1) still bypasses the proxy entirely. Full per-method policy evaluation remains future work.
46
+ 1. **Proxy — mandatory mediation is a deployment property.** `GovernanceProxy` governs the path *through it*; if the agent can reach the upstream MCP server **directly** (network), it bypasses governance entirely. `upstreamUrl` (HTTP) is directly reachable. → **Deployment requirement:** the agent must be network-isolated so the proxy is its *only* route to tools. Documented, not code-enforceable here. *(Empirically demonstrated in CP3 A7 — a direct POST to the upstream fired a side effect with no receipt; the red-team scripts are maintained in the private validation tree, not shipped in this package.)* **See `DEPLOYMENT.md` §1: stdio-upstream is the hardened default — the upstream is a non-network-reachable child process, closing this bypass by construction; HTTP-upstream mode now warns on stderr.**
47
+ 2. **Proxy — only `method === "tools/call"` is policy-evaluated; partially mitigated in 3.0.** Other JSON-RPC methods are still forwarded (not policy-evaluated), but they are now recorded as **signed passthrough receipts** in the evidence bundle for auditability — so a side-effecting non-`tools/call` method is no longer *invisible* (the CP3 A7 `admin/deleteAllData` would now appear as a `(passthrough)` receipt with `method` set and `reason: forwarded, not policy-evaluated`). Benign protocol methods (`initialize`, `ping`, `tools/list`, `*/list`, `notifications/*`, …) are excluded by default; an optional `denyMethods` denylist rejects known side-effecting methods (a **DENIED** passthrough receipt, not forwarded). **What this closes:** invisibility — every forwarded non-benign method is now in the tamper-evident, checkpoint-bound bundle. **What it does NOT close:** the method is not policy-evaluated and still *executes* unless explicitly denylisted (this is *visibility, not governance*), and a direct-to-upstream call (§3.1) still bypasses the proxy entirely. Full per-method policy evaluation remains future work.
48
48
  3. **Proxy — denial is observable.** A DENIED call returns a distinctive `-32600` error, which an adversary can use as a policy-probing oracle. Low severity; structured denial metadata could be tightened later.
49
- 4. **Key persistence — mitigated in 3.0-rc.** The gateway signing key can be **persisted** via `AGA_GATEWAY_KEY` (64-hex seed) or `AGA_GATEWAY_KEY_FILE` (`DEPLOYMENT.md` §2), so `gateway_public_key` is stable and **pinnable across restarts**. The default remains an ephemeral key (warned on stderr). HSM/KMS backing remains future work. A verifier MUST still pin the key it expects.
49
+ 4. **Key persistence — mitigated in 3.0.** The gateway signing key can be **persisted** via `AGA_GATEWAY_KEY` (64-hex seed) or `AGA_GATEWAY_KEY_FILE` (`DEPLOYMENT.md` §2), so `gateway_public_key` is stable and **pinnable across restarts**. The default remains an ephemeral key (warned on stderr). HSM/KMS backing remains future work. A verifier MUST still pin the key it expects.
50
50
  5. **Storage durability (Sprint 5).** Default storage is in-memory → the live chain is lost on **process restart**. The cryptographic record survives via the **exported signed bundle**; durable cross-restart retention needs the SQLite/persistent backend (Sprint 5). The raw quarantine forensic buffer is in-memory by design (only the `arguments_hash` commitment is signed — privacy-preserving and sufficient to *prove* a capture).
51
51
  6. **Out of scope entirely (not what AGA does).** AGA does not prevent: model jailbreaks, model-weight theft, credential compromise, or infrastructure compromise. It provides *accountability and provenance* for governed decisions, not prevention of those classes. If an attacker holds the gateway signing key, they can author receipts — protect the key (Sprint 4).
52
- 7. **Verifier-UX / unpinned consumers (NEW — CP3 A5).** A consumer that verifies a bundle **without pinning** the gateway key gets an integrity-only `VERIFIED` with `issuerVerified=false` — *even on a forged, attacker-signed, denial-free bundle*. This is correct (integrity-of-present-receipts ≠ provenance, and the result object/CLI say so explicitly), but a UI that shows a bare "VERIFIED" without prominently propagating `issuerVerified=false` could mislead a non-expert. → Downstream consumers (esp. the website demo) MUST pin the gateway key and never present an unpinned PASS as proof of *who* issued the bundle. **Mitigated in 3.0-rc:** the verify result now carries a prominent `summary` — `VERIFIED (provenance verified …)` vs `VERIFIED (integrity only — NOT provenance …)` — surfaced by `verify_bundle_offline` and the reference/`aga-verify` CLIs; key-pinning ergonomics are in `DEPLOYMENT.md` §2. Consumers must still pin.
53
- 8. **Cross-stack verifier conformance (CLOSED — 2026-06-07).** Earlier in the 3.0 hardening only `src/sep/verify.ts` carried the full strict floor; the reference `verify-sep.mjs`, the published `aga-verify`, Go, and Python lagged. **That asymmetry is now closed.** All six verifiers — engine (`src/sep`), reference (`verify-sep.mjs`), `aga-verify`, Go (`verify.go`), and Python (audited library + pure-stdlib) — apply the identical strict floor and return **byte-identical verdicts**. The shared floor: strict field allowlist; `envelope_consistency` (binds the unsigned `gateway_id`/`merkle_root`/`generated_at` to the signed/recomputed values); checkpoint-algorithm binding; lexicographic-string canonicalization with RFC-8785 integral-number normalization; complete small-order/non-canonical-key rejection; **one library-free canonical-timestamp rule** (exact `.sssZ` UTC form via an ASCII regex + integer-arithmetic calendar + lexicographic ordering — no native date parser); merkle-direction-token strictness (`left`/`right` only, length-matched); unpaired-UTF-16-surrogate rejection; depth-bounded never-throw; and whole-document parse (trailing content rejected). Verified by `npm run conformance:cross-stack` — six verifiers agree on every case in the committed corpus (55 cases incl. raw-byte/file-parse), confirmed across multiple rounds of independent blind differential re-audit. See `fixtures/cross-stack/README.md`. **Residual (by design, not a divergence):** the bundle envelope still carries four *unsigned* metadata fields with no signed counterpart — `bundle_id`, `schema_version`, `policy_reference`, `offline_capable`. They are informational and are **not** security-identity fields (the identity fields `gateway_id`/`merkle_root`/`generated_at` ARE bound); a relying party must still trust only signed/verified values and pin the gateway key (§3.7). Of the four, **`policy_reference` is the only identity-grade one** — but the governing policy IS captured and cryptographically verified inside **every signed receipt's own `policy_reference` field** (one of the 15 signed fields), so the unsigned *envelope* `policy_reference` is only a convenience mirror, not the source of truth. Binding the envelope copy is a recommended near-term (3.1) format revision; a coordinated verifier-output flag that marks these four envelope fields as unsigned/not-verified is a recommended enhancement, deliberately deferred here to avoid adding an untested cross-language output surface immediately after the cross-stack-consistency campaign (the verdict surface already attests only the steps it runs, and never claims these fields). One further residual is **unreachable by construction:** SEP signed fields are strings plus the single integer `leaf_count` (the emit guard `assertSignedReceiptFieldsAreStrings` forbids any other number in a signed field), so a verifier's canonicalization of a *non-integer / exponential* number placed in a signed field — which no conformant gateway can emit — is intentionally left unspecified and MAY differ across language stdlibs; it cannot affect any bundle a conformant gateway produces. Reachable string content is fully cross-stack-consistent (an exhaustive 0..0x10FFFF code-point sweep confirms the only ever-divergent characters, `U+2028`/`U+2029`, are normalized identically by every verifier).
52
+ 7. **Verifier-UX / unpinned consumers (NEW — CP3 A5).** A consumer that verifies a bundle **without pinning** the gateway key gets an integrity-only `VERIFIED` with `issuerVerified=false` — *even on a forged, attacker-signed, denial-free bundle*. This is correct (integrity-of-present-receipts ≠ provenance, and the result object/CLI say so explicitly), but a UI that shows a bare "VERIFIED" without prominently propagating `issuerVerified=false` could mislead a non-expert. → Downstream consumers (esp. the website demo) MUST pin the gateway key and never present an unpinned PASS as proof of *who* issued the bundle. **Mitigated in 3.0:** the verify result now carries a prominent `summary` — `VERIFIED (provenance verified …)` vs `VERIFIED (integrity only — NOT provenance …)` — surfaced by `verify_bundle_offline` and the reference/`aga-verify` CLIs; key-pinning ergonomics are in `DEPLOYMENT.md` §2. Consumers must still pin.
53
+ 8. **Cross-stack verifier conformance (CLOSED — 2026-06-07).** Earlier in the 3.0 hardening only `src/sep/verify.ts` carried the full strict floor; the reference `verify-sep.mjs`, the published `aga-verify`, Go, and Python lagged. **That asymmetry is now closed.** All six verifiers — engine (`src/sep`), reference (`verify-sep.mjs`), `aga-verify`, Go (`verify.go`), and Python (audited library + pure-stdlib) — apply the identical strict floor and return **byte-identical verdicts**. The shared floor: strict field allowlist; `envelope_consistency` (binds the unsigned `gateway_id`/`merkle_root`/`generated_at` to the signed/recomputed values); checkpoint-algorithm binding; lexicographic-string canonicalization with RFC-8785 integral-number normalization; complete small-order/non-canonical-key rejection; **one library-free canonical-timestamp rule** (exact `.sssZ` UTC form via an ASCII regex + integer-arithmetic calendar + lexicographic ordering — no native date parser); merkle-direction-token strictness (`left`/`right` only, length-matched); unpaired-UTF-16-surrogate rejection; depth-bounded never-throw; and whole-document parse (trailing content rejected). Verified by `npm run conformance:cross-stack` — six verifiers agree on every case in the committed corpus (56 cases incl. raw-byte/file-parse, incl. an uppercase-Merkle-sibling cross-stack case), confirmed across multiple rounds of independent blind differential re-audit. See `fixtures/cross-stack/README.md`. **Residual (by design, not a divergence):** the bundle envelope still carries four *unsigned* metadata fields with no signed counterpart — `bundle_id`, `schema_version`, `policy_reference`, `offline_capable`. They are informational and are **not** security-identity fields (the identity fields `gateway_id`/`merkle_root`/`generated_at` ARE bound); a relying party must still trust only signed/verified values and pin the gateway key (§3.7). Of the four, **`policy_reference` is the only identity-grade one** — but the governing policy IS captured and cryptographically verified inside **every signed receipt's own `policy_reference` field** (one of the 15 signed fields), so the unsigned *envelope* `policy_reference` is only a convenience mirror, not the source of truth. Binding the envelope copy is a recommended near-term (3.1) format revision; a coordinated verifier-output flag that marks these four envelope fields as unsigned/not-verified is a recommended enhancement, deliberately deferred here to avoid adding an untested cross-language output surface immediately after the cross-stack-consistency campaign (the verdict surface already attests only the steps it runs, and never claims these fields). One further residual is **unreachable by construction:** SEP signed fields are strings plus the single integer `leaf_count` (the emit guard `assertSignedReceiptFieldsAreStrings` forbids any other number in a signed field), so a verifier's canonicalization of a *non-integer / exponential* number placed in a signed field — which no conformant gateway can emit — is intentionally left unspecified and MAY differ across language stdlibs; it cannot affect any bundle a conformant gateway produces. Reachable string content is fully cross-stack-consistent (an exhaustive 0..0x10FFFF code-point sweep confirms the only ever-divergent characters, `U+2028`/`U+2029`, are normalized identically by every verifier).
54
54
 
55
55
  ---
56
56
 
57
57
  ## 4. CP3 adversarial verification results (2026-06-06)
58
58
 
59
- A focused adversarial workflow ran **7 independent red-team attacks** on the core claim. Each was attempted *concretely* against the real in-process MCP server / proxy and the **pinned** reference verifier (`verify-sep.mjs`) and published-sound `aga-verify@2.0.0`. A1–A5 were fully adjudicated + agreed in the original workflow. **A6 and A7 — whose original adjudication hit a session usage cap — were re-adjudicated first-hand on 2026-06-07 from the source:** **A6 HELD** — `src/middleware/governance.ts` shows `UNGOVERNED_TOOLS` contains only read/bootstrap/evidence/monitor tools (no mutating agent-action), a tool is GOVERNED iff absent from that set, and every GOVERNED call that is blocked emits a signed DENIED receipt via the `deny()` path (including the fail-closed branch for uncanonicalizable arguments); **A7 RESIDUAL** — the only upstream-reach bypasses are exactly the documented §3.1 (direct upstream HTTP, a deployment/network-isolation property) and §3.2 (non-`tools/call` methods, now recorded as signed passthrough receipts); no new bypass was found. Scripts: `_validation/redteam/`.
59
+ A focused adversarial workflow ran **7 independent red-team attacks** on the core claim. Each was attempted *concretely* against the real in-process MCP server / proxy and the **pinned** reference verifier (`verify-sep.mjs`) and published-sound `aga-verify@2.0.0`. A1–A5 were fully adjudicated + agreed in the original workflow. **A6 and A7 — whose original adjudication hit a session usage cap — were re-adjudicated first-hand on 2026-06-07 from the source:** **A6 HELD** — `src/middleware/governance.ts` shows `UNGOVERNED_TOOLS` contains only read/bootstrap/evidence/monitor tools (no mutating agent-action), a tool is GOVERNED iff absent from that set, and every GOVERNED call that is blocked emits a signed DENIED receipt via the `deny()` path (including the fail-closed branch for uncanonicalizable arguments); **A7 RESIDUAL** — the only upstream-reach bypasses are exactly the documented §3.1 (direct upstream HTTP, a deployment/network-isolation property) and §3.2 (non-`tools/call` methods, now recorded as signed passthrough receipts); no new bypass was found. (Red-team scripts are maintained in the private validation tree, not shipped in this package.)
60
60
 
61
61
  | # | Attack | Result | Why |
62
62
  |---|---|---|---|
@@ -65,7 +65,7 @@ A focused adversarial workflow ran **7 independent red-team attacks** on the cor
65
65
  | A3 | Reorder to bury the denial | **HELD** | `previous_receipt_hash` chain + checkpoint fail |
66
66
  | A4 | Re-attest to erase | **HELD** | SEP ledger is not reset on `attest_subject`; the denial is still present in the export |
67
67
  | A5 | Key-forge (attacker re-signs a denial-free bundle) | **HELD** | pinned to the real key → FAIL `gateway_key_match` on **both** verifiers; unpinned → integrity-only PASS with `issuerVerified=false` (by design; see §3.7) |
68
- | A6 | PEP bypass (ungoverned mutating action) | **HELD** | all 16 tools censused; no ungoverned mutating agent-action; even blocked governed calls emit a DENIED receipt; `measure_behavior` enforcement is coupled to a signed receipt |
68
+ | A6 | PEP bypass (ungoverned mutating action) | **HELD** | all 15 tools censused; no ungoverned mutating agent-action; even blocked governed calls emit a DENIED receipt; `measure_behavior` enforcement is coupled to a signed receipt |
69
69
  | A7 | Proxy bypass | **RESIDUAL** | every governed `tools/call` gets a receipt (PERMITTED+DENIED; DENIED never reaches upstream); the two bypasses are the already-documented §3.1 (direct upstream reach) and §3.2 (non-`tools/call` methods) |
70
70
 
71
71
  **Verdict: 0 guarantee-broken — 6 HELD, 1 RESIDUAL (out-of-claim, already documented).** The core claim — *denials cannot be silently erased by the agent through tampering, truncation, reordering, or re-attestation, and forgery is caught when the gateway key is pinned* — **holds under the tested adversarial pressure**, on both the reference verifier and the published-sound `aga-verify@2.0.0`.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * AGA Governance Proxy - Tool Policy Evaluator
3
- * Ported from aga-mcp-gateway/src/governance/policy.ts with rate limiting.
3
+ * Ported from the internal AGA governance gateway's policy engine, with rate limiting.
4
4
  *
5
5
  * Copyright (c) 2026 Attested Intelligence Holdings LLC
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * AGA Governance Proxy - Tool Policy Evaluator
3
- * Ported from aga-mcp-gateway/src/governance/policy.ts with rate limiting.
3
+ * Ported from the internal AGA governance gateway's policy engine, with rate limiting.
4
4
  *
5
5
  * Copyright (c) 2026 Attested Intelligence Holdings LLC
6
6
  * SPDX-License-Identifier: MIT
@@ -24,7 +24,7 @@ function checkRateLimit(toolName, maxPerMinute) {
24
24
  export function resetRateLimits() {
25
25
  rateLimits.clear();
26
26
  }
27
- // ── Path Utilities (from aga-mcp-gateway) ───────────────────
27
+ // ── Path Utilities ────────────────────────────────
28
28
  export function cleanPath(p) {
29
29
  p = p.replace(/\\/g, '/');
30
30
  p = p.replace(/\/+/g, '/');
@@ -1 +1 @@
1
- {"version":3,"file":"evaluator.js","sourceRoot":"","sources":["../../src/proxy/evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,UAAU,GAAG,IAAI,GAAG,EAAsB,CAAC;AAEjD,SAAS,cAAc,CAAC,QAAgB,EAAE,YAAoB;IAC5D,MAAM,GAAG,GAAG,IAAI,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,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;QAC5D,CAAC;QACD,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;IAC3E,CAAC;IAED,gBAAgB;IAChB,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QACtC,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,yBAAyB,EAAE,CAAC;IACxE,CAAC;IAED,kEAAkE;IAClE,IAAI,UAAU,EAAE,oBAAoB,EAAE,CAAC;QACrC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC;YAC/D,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,wBAAwB,UAAU,CAAC,oBAAoB,MAAM,EAAE,CAAC;QAC5G,CAAC;IACH,CAAC;IAED,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;AAC/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AA8OH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5E,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAiPH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5E,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
@@ -190,7 +190,10 @@ program
190
190
  console.log(`\n${result.summary}`);
191
191
  if (!opts.pin)
192
192
  console.log('(no --pin given: integrity only, NOT provenance — pass --pin <gateway_public_key> to prove who issued it)');
193
- process.exit(result.verdict === 'VERIFIED' ? 0 : 1);
193
+ // Honor the verdict trichotomy (ALGORITHM_AGILITY_SPEC / UNIFIED_SEP_SPEC §3): VERIFIED=0,
194
+ // FAILED=1, UNSUPPORTED_PROFILE=3 (a registered profile this build does not implement — NOT a
195
+ // failure of the bundle's content; must not be collapsed with FAILED).
196
+ process.exit(result.verdict === 'VERIFIED' ? 0 : result.verdict === 'UNSUPPORTED_PROFILE' ? 3 : 1);
194
197
  });
195
198
  // ── policy ───────────────────────────────────────────────────
196
199
  const policyCmd = program.command('policy').description('Policy management');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,2GAA2G;AAC3G,MAAM,GAAG,GAAG,IAAI,C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,CAAC;IAChB,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACjC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * AGA Governance Proxy - Types
3
- * Adapted from aga-mcp-gateway/src/governance/types.ts
3
+ * Adapted from the internal AGA governance gateway's type definitions.
4
4
  *
5
5
  * Copyright (c) 2026 Attested Intelligence Holdings LLC
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * AGA Governance Proxy - Types
3
- * Adapted from aga-mcp-gateway/src/governance/types.ts
3
+ * Adapted from the internal AGA governance gateway's type definitions.
4
4
  *
5
5
  * Copyright (c) 2026 Attested Intelligence Holdings LLC
6
6
  * SPDX-License-Identifier: MIT
@@ -1,5 +1,5 @@
1
1
  import { newId } from './crypto.js';
2
- import { SEP_ALGORITHM, buildReceipt, leafHash, } from './receipt.js';
2
+ import { buildReceipt, leafHash, } from './receipt.js';
3
3
  import { merkleRoot, merkleProof } from './merkle.js';
4
4
  import { buildCheckpoint } from './checkpoint.js';
5
5
  export class SepGateway {
@@ -58,7 +58,7 @@ export class SepGateway {
58
58
  return {
59
59
  schema_version: '2.0',
60
60
  bundle_id: this.idGen(),
61
- algorithm: SEP_ALGORITHM,
61
+ algorithm: this.signer.algorithm,
62
62
  generated_at,
63
63
  gateway_id: this.gatewayId,
64
64
  public_key: this.signer.publicKeyHex,
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/sep/bundle.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EACL,aAAa,EAAE,YAAY,EAAE,QAAQ,GAEtC,MAAM,cAAc,CAAC;AACtB,OAAO,EAA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AAM,CAAC;YACrF,eAAe,EAAE,IAAI;SACtB,CAAC;IACJ,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../src/sep/checkpoint.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAA2B,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAGxE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,sGAAsG;AACtG,eAAO,MAAM,qBAAqB,kHAExB,CAAC;AAEX,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,UAAU,EAAE,EACtB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,SAAS,GAChB,gBAAgB,CAYlB"}
1
+ {"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../src/sep/checkpoint.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,sGAAsG;AACtG,eAAO,MAAM,qBAAqB,kHAExB,CAAC;AAEX,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,UAAU,EAAE,EACtB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,SAAS,GAChB,gBAAgB,CAYlB"}
@@ -5,7 +5,7 @@
5
5
  * (the reference verifier compares it numerically; small integers are RFC-8785-stable).
6
6
  */
7
7
  import { canonicalize } from './canonical.js';
8
- import { SEP_ALGORITHM, leafHash } from './receipt.js';
8
+ import { leafHash } from './receipt.js';
9
9
  import { merkleRoot } from './merkle.js';
10
10
  /** The EXACT canonical field set of a signed SEP checkpoint (strict-schema floor in the verifier). */
11
11
  export const SEP_CHECKPOINT_FIELDS = [
@@ -16,7 +16,7 @@ export function buildCheckpoint(receipts, gatewayId, generatedAt, signer) {
16
16
  throw new Error('Cannot checkpoint an empty receipt set');
17
17
  const leaves = receipts.map(leafHash);
18
18
  const body = {
19
- algorithm: SEP_ALGORITHM,
19
+ algorithm: signer.algorithm,
20
20
  gateway_id: gatewayId,
21
21
  generated_at: generatedAt,
22
22
  head_leaf_hash: leaves[leaves.length - 1],
@@ -1 +1 @@
1
- {"version":3,"file":"checkpoint.js","sourceRoot":"","sources":["../../src/sep/checkpoint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAmB,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAYzC,sGAAsG;AACtG,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW;CAC7F,CAAC;AAEX,MAAM,UAAU,eAAe,CAC7B,QAAsB,EACtB,SAAiB,EACjB,WAAmB,EACnB,MAAiB;IAEjB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,C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AAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACzC,UAAU,EAAE,QAAQ,CAAC,MAAM;QAC3B,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;KAChC,CAAC;IACF,OAAO,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACjE,CAAC"}
@@ -1,6 +1,8 @@
1
1
  export declare function sha256Hex(s: string): string;
2
2
  export declare function isHex(h: unknown, n: number): boolean;
3
3
  export interface SepSigner {
4
+ /** Profile algorithm id this signer emits — v1 'Ed25519-SHA256-JCS' or v2 'ML-DSA-65+Ed25519-SHA256-JCS'. */
5
+ readonly algorithm: string;
4
6
  readonly publicKeyHex: string;
5
7
  sign(message: string): string;
6
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/sep/crypto.ts"],"names":[],"mappings":"AAeA,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAK1D;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,IAAI;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAGxE;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAInD;AAwCD,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAUnD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAYlF;AAED,wBAAgB,KAAK,CAAC,MAAM,SAAS,GAAG,MAAM,CAE7C"}
1
+ {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/sep/crypto.ts"],"names":[],"mappings":"AAeA,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,MAAM,WAAW,SAAS;IACxB,6GAA6G;IAC7G,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAK1D;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,IAAI;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAGxE;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAInD;AAwCD,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAUnD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAYlF;AAED,wBAAgB,KAAK,CAAC,MAAM,SAAS,GAAG,MAAM,CAE7C"}
@@ -20,7 +20,7 @@ export function signerFromSeed(seed) {
20
20
  throw new Error(`Ed25519 seed must be 32 bytes, got ${seed.length}`);
21
21
  const sk = createPrivateKey({ key: Buffer.concat([PKCS8, Buffer.from(seed)]), format: 'der', type: 'pkcs8' });
22
22
  const publicKeyHex = createPublicKey(sk).export({ format: 'der', type: 'spki' }).subarray(-32).toString('hex');
23
- return { publicKeyHex, sign: (m) => nodeSign(null, Buffer.from(m, 'utf8'), sk).toString('hex') };
23
+ return { algorithm: 'Ed25519-SHA256-JCS', publicKeyHex, sign: (m) => nodeSign(null, Buffer.from(m, 'utf8'), sk).toString('hex') };
24
24
  }
25
25
  /** Generate a fresh signer; returns the seed so callers can persist it. */
26
26
  export function generateSigner() {
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/sep/crypto.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EACtE,IAAI,IAAI,QAAQ,EAAE,MAAM,IAAI,UAAU,GACvC,MAAM,aAAa,CAAC;AAErB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC,CAAC,sCAAsC;AACnG,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC,CAAC,4BAA4B;AAElG,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,CAAU,EAAE,CAAS;IACzC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAI,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAOD,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,IAAgB;IAC7C,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE;QAA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;QACH,OAAO,UAAU,CACf,IAAI,EACJ,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAC5B,eAAe,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EACxG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAC3B,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,MAAM,GAAG,MAAM;IACnC,OAAO,GAAG,MAAM,IAAI,UAAU,EAAE,EAAE,CAAC;AACrC,CAAC"}
@@ -0,0 +1,60 @@
1
+ import type { SepSigner } from './crypto.js';
2
+ /** The composite algorithm identifier, shared with AGA Go + VerifyBundle. */
3
+ export declare const ALG_HYBRID = "ML-DSA-65+Ed25519-SHA256-JCS";
4
+ /** FIPS 204 ML-DSA-65 component byte lengths. */
5
+ export declare const MLDSA65_PUBLIC_KEY_BYTES = 1952;
6
+ export declare const MLDSA65_SECRET_KEY_BYTES = 4032;
7
+ export declare const MLDSA65_SIGNATURE_BYTES = 3309;
8
+ export declare const MLDSA65_SEED_BYTES = 32;
9
+ /** Ed25519 component byte lengths (RFC 8032). */
10
+ export declare const ED25519_PUBLIC_KEY_BYTES = 32;
11
+ export declare const ED25519_SEED_BYTES = 32;
12
+ export declare const ED25519_SIGNATURE_BYTES = 64;
13
+ /** An ephemeral composite secret key. `mldsa` is the expanded ML-DSA-65 secret key; `ed` the 32-byte seed. */
14
+ export interface HybridSecretKey {
15
+ mldsa: Uint8Array;
16
+ ed: Uint8Array;
17
+ }
18
+ /** Encode two byte strings as len32(a) || a || len32(b) || b (4-byte big-endian lengths). */
19
+ export declare function encodeComposite(a: Uint8Array, b: Uint8Array): Uint8Array;
20
+ /**
21
+ * Decode len32(a) || a || len32(b) || b into [a, b]. Fails closed: throws on a short buffer, a length
22
+ * prefix that overruns the data, or trailing bytes after b (extra bytes are rejected to remove a
23
+ * malleability surface — matches the Go DecodeComposite trailing-byte reject).
24
+ */
25
+ export declare function decodeComposite(data: Uint8Array): [Uint8Array, Uint8Array];
26
+ /** Lower-hex composite public key for a hybrid secret key. */
27
+ export declare function hybridPublicKeyHex(sk: HybridSecretKey): string;
28
+ /** Generate a fresh ephemeral hybrid keypair. The secret key never leaves the caller. */
29
+ export declare function generateHybridKeypair(): {
30
+ secretKey: HybridSecretKey;
31
+ publicKeyHex: string;
32
+ };
33
+ /** Deterministically derive a hybrid keypair from two 32-byte seeds (used by the cross-verify fixtures). */
34
+ export declare function hybridKeypairFromSeeds(mldsaSeed: Uint8Array, edSeed: Uint8Array): {
35
+ secretKey: HybridSecretKey;
36
+ publicKeyHex: string;
37
+ };
38
+ /** Sign raw message bytes, returning the composite signature bytes (trusted-input signing path). */
39
+ export declare function signHybridBytes(message: Uint8Array, sk: HybridSecretKey): Uint8Array;
40
+ /** Sign a UTF-8 message; returns the lower-hex composite signature. */
41
+ export declare function signHybrid(message: string, sk: HybridSecretKey): string;
42
+ /**
43
+ * Verify a composite signature over raw message bytes under a composite public key. Returns true only
44
+ * if BOTH the ML-DSA-65 and the Ed25519 components verify. Fails closed on any malformed/short/over-long
45
+ * composite or wrong component length.
46
+ */
47
+ export declare function verifyHybridBytes(compositePub: Uint8Array, message: Uint8Array, compositeSig: Uint8Array): boolean;
48
+ /**
49
+ * Verify a lower-hex composite signature over a UTF-8 message under a lower-hex composite public key.
50
+ * Rejects malformed hex before touching the curve/lattice; never throws.
51
+ */
52
+ export declare function verifyHybrid(pubHex: unknown, message: string, sigHex: unknown): boolean;
53
+ /** A v2 composite SepSigner from two 32-byte seeds (deterministic; for the producer + cross-verify tests). */
54
+ export declare function hybridSignerFromSeeds(mldsaSeed: Uint8Array, edSeed: Uint8Array): SepSigner;
55
+ /** A v2 composite SepSigner from a fresh ephemeral keypair (the secret key is returned for persistence). */
56
+ export declare function generateHybridSigner(): {
57
+ signer: SepSigner;
58
+ secretKey: HybridSecretKey;
59
+ };
60
+ //# sourceMappingURL=hybrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hybrid.d.ts","sourceRoot":"","sources":["../../src/sep/hybrid.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,6EAA6E;AAC7E,eAAO,MAAM,UAAU,iCAAiC,CAAC;AAEzD,iDAAiD;AACjD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,iDAAiD;AACjD,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,8GAA8G;AAC9G,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,CAAC;IAClB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,UAAU,CAQxE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAa1E;AASD,8DAA8D;AAC9D,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,eAAe,GAAG,MAAM,CAE9D;AAED,yFAAyF;AACzF,wBAAgB,qBAAqB,IAAI;IAAE,SAAS,EAAE,eAAe,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAI5F;AAED,4GAA4G;AAC5G,wBAAgB,sBAAsB,C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