identity: compliance without surveillance - a verifier's policy judged on a presentation, recorded as an AIP-23 envelope that carries no personal data

This commit is contained in:
Aere Network committed 2026-09-30 09:52:16 +03:00
1 parent 01c0c5e211
commit 154c424e94
6 files changed
+322 -6

No files matched your search

+23
View File
@@ -81,6 +81,27 @@ clock. For a time the issuer does not choose, notarize: `proofOfCredential` and
envelopes (`identity` and `authorization` kinds of `../proof-kinds`) that the Aere Proof API notarizes and that the AIP-23 reference
verifier checks.
## Compliance without surveillance (`conformitate.mjs`)
A verifier writes its compliance policy once: which issuers it believes, and which claims it needs (`equals`, `in`, `notIn`,
`atLeast`, `present`), for example "over 18, not in these jurisdictions, verification level at least 2". `checkCompliance` judges a
presentation against it: the presentation must be valid and bound to the verifier's audience and nonce, the issuer must be one of
the policy's, the credential status must be judged, not merely "not known to be revoked" (unless the policy says otherwise), and
every rule must hold. The policy's hash is recomputed from its normal form, so a looser policy cannot pass under a strict one's hash.
```
node identity-cli.mjs comply --presentation p.json --policy policy.json --audience https://exchange.example --nonce <nonce> \
--status-list list.json --record record.json [--pseudonym-key-file key]
```
The record (`complianceEnvelope`) is an AIP-23 `compliance` envelope that carries no personal data: the policy's hash, the result, the
digest of the presentation, and a pseudonym of the holder bound to this verifier. Without `--pseudonym-key-file` the pseudonym is a
SHA-256 over the holder's id and the audience, which anyone who knows both can recompute (it keeps the id out of the record, it does
not hide it from them); with a key it is an HMAC only the verifier can recompute. The verifier keeps the record, and can notarize it
for a time it does not choose, instead of keeping the data. What this is not: a zero-knowledge proof (a shown claim is shown whole;
"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.
## 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
@@ -93,6 +114,8 @@ line is reported as not judged. The private key files are written with mode 0600
```
node proba-identity.mjs # 43: the paths above, and each attack of the adversarial review as its own test
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
```
The envelope test needs the AIP-23 reference verifier (`AERE_VERIFY_PROOF=<verify-proof.mjs>`); without it that test is reported as