@agledger/verify-core 1.0.1 → 1.0.2
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/README.md +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The shared offline verification core for AGLedger audit chains. Decodes
|
|
4
4
|
canonical **COSE_Sign1** envelopes (RFC 9052, tag 18, EdDSA) over in-toto v1
|
|
5
5
|
Statement payloads, walks the per-record hash chain, and verifies the Ed25519
|
|
6
|
-
signature over each `Sig_structure
|
|
6
|
+
signature over each `Sig_structure`, with no engine, no database, and no
|
|
7
7
|
network.
|
|
8
8
|
|
|
9
9
|
This is the single body of logic that underpins the SDK `/verify` subpath
|
|
@@ -37,13 +37,13 @@ if (!result.valid) {
|
|
|
37
37
|
|
|
38
38
|
## What it verifies
|
|
39
39
|
|
|
40
|
-
- **`chainPosition` monotonicity
|
|
41
|
-
- **`payload_hash` = sha256(cose_sign1)
|
|
40
|
+
- **`chainPosition` monotonicity**: gap-free, in order.
|
|
41
|
+
- **`payload_hash` = sha256(cose_sign1)**: the visible row hash binds the
|
|
42
42
|
signed envelope bytes.
|
|
43
|
-
- **`previous_hash` linkage
|
|
44
|
-
- **Signed chain-claim cross-check
|
|
43
|
+
- **`previous_hash` linkage**: each entry chains to its predecessor.
|
|
44
|
+
- **Signed chain-claim cross-check**: the chain position and linkage claimed in
|
|
45
45
|
the COSE protected header match the row columns.
|
|
46
|
-
- **Ed25519 signature
|
|
46
|
+
- **Ed25519 signature**: over the reconstructed `Sig_structure`, against the
|
|
47
47
|
matched verification key.
|
|
48
48
|
|
|
49
49
|
## Out-of-band keys
|
|
@@ -51,19 +51,19 @@ if (!result.valid) {
|
|
|
51
51
|
`options.publicKeys` accepts either of two shapes:
|
|
52
52
|
|
|
53
53
|
- a **`Record<keyId, base64SpkiDer>`** map (compact, keyed by key id), or
|
|
54
|
-
- an **`OutOfBandKeyEntry[]`** array
|
|
54
|
+
- an **`OutOfBandKeyEntry[]`** array, the natural shape returned by
|
|
55
55
|
`client.verificationKeys.list().data` and SCITT COSE_KeySet listings, where
|
|
56
56
|
each entry is `{ keyId, publicKey, activatedAt?, retiredAt? }` (`publicKey`
|
|
57
57
|
is SPKI DER base64).
|
|
58
58
|
|
|
59
59
|
Both are normalized at the boundary; anything else throws `TypeError`
|
|
60
|
-
(fail-closed
|
|
60
|
+
(fail-closed: the verifier never silently falls back to embedded keys).
|
|
61
61
|
|
|
62
62
|
## Canonical failure taxonomy
|
|
63
63
|
|
|
64
64
|
Every failure is a canonical SCREAMING_SNAKE `FailureCode`. Importing the
|
|
65
65
|
taxonomy from one place keeps every verifier reporting the same code for the
|
|
66
|
-
same fault
|
|
66
|
+
same fault, so an auditor reads `CHAIN_LINK_BROKEN` whether the
|
|
67
67
|
chain was checked by the SDK, the CLI, the MCP tool, or `@agledger/verify`.
|
|
68
68
|
|
|
69
69
|
## Key provenance
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agledger/verify-core",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Shared offline verification core for AGLedger audit chains
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Shared offline verification core for AGLedger audit chains: COSE_Sign1 (RFC 9052) decode/verify, Ed25519, hash-chain walk, Merkle proofs, and the canonical failure taxonomy. One dependency (cborg); no network. The single source of truth the SDK, CLI, MCP server, and @agledger/verify all build on.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|