identity: the Travel Rule between VASPs, post-quantum - IVMS101 data sealed for the receiving VASP (X25519 + ML-KEM-768), signed, bound to the transfer and acknowledged; both VASPs proven by registry credentials

This commit is contained in:
Aere Network committed 2026-09-30 10:02:39 +03:00
1 parent 154c424e94
commit f75c33454a
6 files changed
+464 -6

No files matched your search

+27 -2
View File
@@ -25,8 +25,8 @@ VALID, 1 on INVALID, 2 on a usage error. The claims it returns are the plain one
**Signatures are hybrid**: Ed25519 and ML-DSA-65 over the same message, and both are required, so a break of either scheme alone
forges nothing. Every message is domain-separated by purpose (`aere-identity/v1/<purpose>\n` + text, purposes `credential`,
`presentation`, `delegation`, `revocation`, `status-list`), so a signature made for one purpose is not valid for another over the same
text. The signed text is the canonical JSON of the statement (keys sorted), rebuilt by the verifier.
`presentation`, `delegation`, `revocation`, `status-list`, and for the Travel Rule `kem-binding`, `travel-rule`, `travel-rule-receipt`),
so a signature made for one purpose is not valid for another over the same text. The signed text is the canonical JSON of the statement (keys sorted), rebuilt by the verifier.
**An identity is its keys**: `aere-id:` + the first 20 bytes of SHA-256 over the canonical form of the two public keys (SPKI). A
credential or a delegation that names an id not derived from the keys it carries fails.
@@ -102,6 +102,29 @@ for a time it does not choose, instead of keeping the data. What this is not: a
"over 18" is a claim the issuer made), an AML or sanctions screening (it consults no list), or legal compliance with anything: it
says that one presentation met one policy at one time, as judged by the verifier.
## Travel Rule between VASPs, post-quantum (`travel-rule.mjs`)
The originator and beneficiary data of a transfer (an IVMS101 object) sent from the paying VASP to the receiving VASP, readable only
by it: a hybrid key encapsulation (X25519 and ML-KEM-768, both secrets required, HKDF-SHA-256, AES-256-GCM), signed by the originator
(Ed25519 and ML-DSA-65), bound to the transfer (chain, asset, amount, beneficiary address, transaction) as authenticated data and in
the key derivation, and acknowledged with a signed receipt. Each side proves it is a VASP with a presentation of an Aere Identity
credential (`vasp: true`) from a registry the other side trusts, made for the other side, with its status judged.
```js
import { generateKemKeys, bindKemKeys, acceptBeneficiary, sealMessage, openMessage, acknowledge, verifyReceipt, travelRuleRecord } from './travel-rule.mjs';
// beneficiary: its KEM keys, bound to its identity (signed), handed over with a presentation of its VASP credential for the originator
// originator: acceptBeneficiary({ binding, presentation, registries, originatorId, nonce, statusLists }) -> { ok, beneficiary }
// sealMessage({ from, beneficiary, ivms101, transfer, presentation /* its own, for the beneficiary, nonce = messageId */ })
// beneficiary: openMessage(message, { me, kem, registries, statusLists, seen }) -> { ok, ivms101, transfer } ; acknowledge(...)
// originator: verifyReceipt(receipt, { message, beneficiaryId }) ; travelRuleRecord({ message, receipt, buildProof })
```
`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
`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.
## What it does not do
It does not bind a key to hardware: a device key is a key like any other, and no TPM or secure-enclave attestation is checked here. It
@@ -116,6 +139,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
```
The envelope test needs the AIP-23 reference verifier (`AERE_VERIFY_PROOF=<verify-proof.mjs>`); without it that test is reported as