verify-layer: verify-consistency names the signer of each head (or unsigned); identity: Travel Rule requires a replay store

- verify-consistency without --signer now says whether each head is signed and by which key, and that no expected signer was
  checked (verify-inclusion already did; the README said the output does)
- openMessage opens nothing without a replay store (seen: an object with has/add that keeps the ids for at least maxAgeS);
  before, the same signed and sealed message could be opened any number of times when no store was given

Tests: verify-layer tree 20/20, negative control 14/14; sidecar 44/44, 9/9; travel rule 19/19, negative control 19/19.
This commit is contained in:
Aere Network committed 2026-09-30 10:31:23 +03:00
1 parent 082b862d78
commit 8f5f0bd00d
9 files changed
+57 -14

No files matched your search

+5 -3
View File
@@ -120,7 +120,9 @@ import { generateKemKeys, bindKemKeys, acceptBeneficiary, sealMessage, openMessa
```
`openMessage` refuses a message not signed by the originator it names, sealed for another VASP or other keys, older or newer than 300
seconds on its clock, already received (`seen`), or whose originator is not proven a VASP. `travelRuleRecord` writes an AIP-23
seconds on its clock, already received, or whose originator is not proven a VASP. The replay store `seen` is required (a `Set`, or
any object with `has` and `add`, that keeps the ids for at least the 300 seconds): without one, `openMessage` opens nothing, since
the same signed and sealed message could otherwise be opened any number of times. `travelRuleRecord` writes an AIP-23
`compliance` envelope with no personal data and no amount: a pseudonymous transfer reference, the policy name, the result and a digest
of the exchange. What it does not do: validate the IVMS101 schema (it carries the object as given and requires `originator` and
`beneficiary`), find the beneficiary's VASP from an address (that is a discovery protocol's job), or say that a transfer is lawful.
@@ -139,8 +141,8 @@ node proba-identity.mjs # 43: the paths above, and each attack of t
node control-negativ-identity.mjs # on a copy, each of 46 guards removed -> its own named test turns red
node proba-conformitate.mjs # 14: compliance policies judged on real presentations, the record without personal data, the command line
node control-negativ-conformitate.mjs # on a copy, each of 13 guards removed -> its own named test turns red
node proba-travel-rule.mjs # 18: two VASPs with registry credentials, the whole exchange, and each attack of the review
node control-negativ-travel-rule.mjs # on a copy, each of 18 guards removed -> its own named test turns red
node proba-travel-rule.mjs # 19: two VASPs with registry credentials, the whole exchange, and each attack of the review
node control-negativ-travel-rule.mjs # on a copy, each of 19 guards removed -> its own named test turns red
```
The envelope test needs the AIP-23 reference verifier (`AERE_VERIFY_PROOF=<verify-proof.mjs>`); without it that test is reported as