verify-layer: signed heads. keygen makes the operator's ML-DSA-65 head key; attest-head --sign-key signs the head statement in the form the AIP-23 reference verifier checks at its signature level (outside the statement, so the statementHash and its notarization are unchanged); verify-log --attested --signer requires the expected key, and without it says who signed and that no expected signer was compared. A signature says who vouches for the head, not when and not that the history is true. Tests 44/44 with the reference verifier (39 run and 5 skipped without it); negative control 9/9 here.
This commit is contained in:
1 parent
6e62b1ad1a
commit
35d711fa55
5 files changed
+122
-24
No files matched your search
+21
-12
@@ -22,8 +22,14 @@ Node.js 24, no dependencies; `notarize-head` alone needs `ethers` (`npm install`
|
||||
proof of `firstSeen[statementHash]`). `verify-log --attested <head.json>` requires that today's log **continues** that head:
|
||||
the same first `count` entries, the entry `count - 1` hashing to the attested head. A rewritten or shortened history fails.
|
||||
|
||||
So: publish heads often (every deployment, or on a timer), and judge a log against the latest head you hold from outside the
|
||||
host, never on its own.
|
||||
- **A head can be signed (2026-09-29).** `keygen` makes an ML-DSA-65 key for the operator; `attest-head --sign-key` signs the
|
||||
head statement in the form the AIP-23 reference verifier checks at its `signature` level; `verify-log --attested head.json
|
||||
--signer head.pub.pem` then requires that the head was signed by that key. A signature says **who** vouches for the head, not
|
||||
**when** (the notarization says when) and not that the history is true: whoever holds the key can sign the head of a rewritten
|
||||
history, and without `--signer` a head signed by anyone passes, which the output says.
|
||||
|
||||
So: publish heads often (every deployment, or on a timer), sign them with the operator's key, and judge a log against the latest
|
||||
head you hold from outside the host, with the signer you expect, never on its own.
|
||||
|
||||
## Commands
|
||||
|
||||
@@ -31,8 +37,9 @@ host, never on its own.
|
||||
node sidecar.mjs record --kind deployment --name <name> --version <v> --content-file <file> [--host h] [--log p] [--at T]
|
||||
node sidecar.mjs record --kind proof --proof-file <envelope.json> # any AIP-23 envelope, after checking its form and hash
|
||||
node sidecar.mjs scan --source docker|kubernetes --input <export.json> [--host h] [--log p]
|
||||
node sidecar.mjs verify-log --log p [--attested head.json] # 0 intact (and continues the head), 1 broken or not continued
|
||||
node sidecar.mjs attest-head --log p [--host h] [--out head.json] # the head of the chain as an aere-audit-head envelope
|
||||
node sidecar.mjs verify-log --log p [--attested head.json [--signer head.pub.pem]] # 0 intact (and continues the head), 1 broken or not continued
|
||||
node sidecar.mjs attest-head --log p [--host h] [--out head.json] [--sign-key head.key.pem] # the head as an aere-audit-head envelope
|
||||
node sidecar.mjs keygen --out <dir> # the operator's ML-DSA-65 head key (head.key.pem 0600, head.pub.pem)
|
||||
node sidecar.mjs notarize-head --head head.json --rpc <url> --key-file <file> [--notary 0x..] [--out notarized.json]
|
||||
node sidecar.mjs bundle --log p [--out bundle.json] # {host, count, head, chainOk, entries[]} for a console
|
||||
|
||||
@@ -80,26 +87,28 @@ post-quantum` under a certified anchor of the testnet, and `VALID`.
|
||||
|
||||
## Tests
|
||||
|
||||
node proba-sidecar.mjs # 34 checks
|
||||
node proba-sidecar.mjs # 44 checks
|
||||
node control-negativ-sidecar.mjs # puts each guard back to its absent form and requires the named check to fail
|
||||
|
||||
`proba-sidecar.mjs` records runtime, deployment and envelope entries; checks that a modified entry breaks the chain at its
|
||||
seq, a changed hash is caught, and nothing is appended to a broken chain; that a chain **rebuilt from genesis** passes
|
||||
`verify-log` alone (the stated limit) but fails against the attested head, as do a shortened log and a modified attestation,
|
||||
while a log that only grew passes; that two writers appending 150 entries each at the same time leave an intact chain of 300;
|
||||
while a log that only grew passes; that a signed head passes the verifier's signature level and `--signer`, while a head
|
||||
signed by another key, an unsigned head with `--signer`, and a damaged signature are refused; that two writers appending 150 entries each at the same time leave an intact chain of 300;
|
||||
that a line that is not JSON is reported as broken at its seq; that the Docker and Kubernetes adapters record only running
|
||||
containers and no secret value; and that every envelope is `VALID` for the AIP-23 reference verifier. The verifier is looked
|
||||
for at `AERE_VERIFY_PROOF` (for example `verify-proof.mjs` from the `aere-node` repository, after `npm install` there); without
|
||||
it, the four checks that need it are reported as skipped and the exit code is 2, not 0.
|
||||
it, the five checks that need it are reported as skipped and the exit code is 2, not 0.
|
||||
|
||||
`control-negativ-sidecar.mjs` measured 7 of 7 on 2026-09-29: the version before the review (taken from the development
|
||||
history, skipped where that history is absent) and six plantings, each disabling one guard (the writer lock, the head
|
||||
comparison, the length check, the attestation hash check, the handling of an unreadable line, the digest check of `--attested`).
|
||||
`control-negativ-sidecar.mjs` measured 10 of 10 on 2026-09-29: the version before the review (taken from the development
|
||||
history, skipped where that history is absent) and nine plantings, each disabling one guard (the writer lock, the head
|
||||
comparison, the length check, the attestation hash check, the handling of an unreadable line, the digest check of `--attested`,
|
||||
the head signature check, the comparison with `--signer`, the refusal of an unsigned head when `--signer` is given).
|
||||
`proba-notarizare-testnet.mjs --key-file <testnet key>` repeats the on-chain run above (9 checks, it needs a funded testnet key).
|
||||
|
||||
## What it is not (yet)
|
||||
|
||||
It does not report to a live console over the network, and it has no per-cloud adapters that read deployments from the AWS,
|
||||
Azure or GCP APIs with credentials: the runtime adapter above, without credentials, is the first one. It does not sign entries
|
||||
with a host key, so it cannot tell two hosts apart by itself; the host name in an entry is also a declaration. No third party
|
||||
Azure or GCP APIs with credentials: the runtime adapter above, without credentials, is the first one. It signs heads, not
|
||||
each entry, and the host name in an entry is still a declaration. No third party
|
||||
has reviewed it.
|
||||
Reference in new issue
Block a user