identity: SD-JWT interoperability measured in both directions with @sd-jwt/core 0.23.0 and jose 6.2.12 (ML-DSA-65 included), nested _sd_alg refused, the SD-JWT VC profile (draft-19, dc+sd-jwt, vct, Token Status List offline); conformance: SD-JWT and SD-JWT VC enrolled (213 rules, 13 verifiers, 553 vectors)

This commit is contained in:
Aere Network committed 2026-10-18 11:07:27 +03:00
1 parent fab02f7952
commit e1bb4e25d8
109 files changed
+9823 -175

No files matched your search

+70 -26
View File
@@ -42,9 +42,10 @@ verdict (`vectori/payment-receipt/company-p1-28001.valid.json`).
## What is enrolled
`REGULI.json` is derived from the code (`node deriva-reguli.mjs --verifica`): 181 rules of 11 verifiers, 15 artifact kinds. By level:
142 rules are reported at `integrity`, 36 at `authenticity`, 3 at `anchoring` (one of them, `envelope.finality`, is reported at
`anchoring` or at `finality` by the place that refused).
`REGULI.json` is derived from the code (`node deriva-reguli.mjs --verifica`): 213 rules of 13 verifiers, 17 artifact kinds (since
2026-10-18; 181 rules of 11 verifiers, 15 kinds before the SD-JWT verifiers were enrolled). By level: 170 rules are reported at
`integrity`, 40 at `authenticity`, 3 at `anchoring` (one of them, `envelope.finality`, is reported at `anchoring` or at `finality` by
the place that refused).
| artifact kind | judged by | rules |
|---|---|---|
@@ -59,6 +60,8 @@ verdict (`vectori/payment-receipt/company-p1-28001.valid.json`).
| `agent-ledger` (an agent's signed ledger under its policy) | `agents/agent-ledger.mjs` | 16: `agents.ledger-form`, `.policy`, `.other-policy`, `.session`, `.key`, `.identity`, `.anchor`, `.seq`, `.chain`, `.body`, `.signature`, `.hash`, `.time`, `.revocation`, `.approvals`, `.decision` |
| `identity-presentation` (a credential shown by its holder or by the last delegate of a chain, judged with what the verifier brings: its audience, its nonce, its clock, the issuers it trusts, the status lists and the revocations it was handed) | `identity/identity.mjs` | 37: `identity.form`, `.issuer-id`, `.holder-id`, `.credential-signature`, `.issuer-trusted`, `.credential-window`, `.status-list`, `.credential-revoked`, `.sd-distinct`, `.disclosure-readable`, `.disclosure-signed`, `.disclosure-once`, `.disclosure-plain`, `.claim-name`, `.binding-credential`, `.binding-disclosures`, `.binding-delegations`, `.presenter`, `.presentation-signature`, `.audience`, `.nonce`, `.freshness`, `.chain-length`, `.delegation-form`, `.delegation-ids`, `.delegation-from`, `.delegation-parent`, `.delegation-signature`, `.delegation-scope`, `.delegation-window`, `.delegation-depth`, `.delegation-narrows`, `.delegation-credential`, `.delegation-claims`, `.delegation-audience`, `.delegation-revoked`, `.unreadable` |
| `device-bundle` (the chain of a device: the manufacturer's credential for the device key, a firmware release, the ownership transfers, the owner's authorization, the device's attestation and its AIP-23 envelope, judged with what the verifier brings: its clock, nonce and audience, the manufacturers it trusts, the recall lists, firmware policies and status records it read, its own reading of the notarized envelope) | `device-identity/device.mjs` | 47: `device.form`, `.manufacture-form`, `.manufacturer-id`, `.manufacture-holder`, `.manufacture-signature`, `.manufacturer-trusted`, `.manufacture-window`, `.manufacture-status-list`, `.manufacture-revoked`, `.device-key`, `.device-id`, `.firmware-form`, `.firmware-signer`, `.firmware-signature`, `.firmware-model`, `.firmware-retracted`, `.firmware-rollback`, `.firmware-software`, `.chain-length`, `.transfer-form`, `.transfer-device`, `.transfer-ids`, `.transfer-from`, `.transfer-prev`, `.transfer-signature`, `.transfer-time`, `.authorization-form`, `.authorization-device`, `.authorization-owner`, `.authorization-ownership`, `.authorization-signature`, `.authorization-window`, `.authorization-action`, `.status-retired`, `.status-suspended`, `.attestation-form`, `.attestation-key`, `.attestation-device`, `.attestation-signature`, `.audience`, `.nonce`, `.freshness`, `.attestation-firmware`, `.attestation-ownership`, `.witness-envelope`, `.witness-time`, `.unreadable` |
| `sdjwt-presentation` (an SD-JWT of IETF RFC 9901, as issued or with its Key Binding JWT, judged with what the verifier brings: the issuer key it chose, a public JWK, never one taken from the token; its clock; its audience and nonce; the issuer and the explicit type it expects; whether it requires key binding and `exp`) | `identity/sdjwt.mjs` (enrolled 2026-10-18) | 23: `sdjwt.form`, `.alg`, `.typ`, `.crit`, `.key`, `.signature`, `.issuer`, `.sd-alg`, `.disclosure-form`, `.disclosure-twice`, `.digest-twice`, `.disclosure-name`, `.claim-conflict`, `.unreferenced`, `.time`, `.kb-context`, `.kb-required`, `.kb-cnf`, `.kb-claims`, `.kb-audience`, `.kb-nonce`, `.kb-freshness`, `.kb-sd-hash` |
| `sdjwt-vc-presentation` (an SD-JWT VC of `draft-ietf-oauth-sd-jwt-vc`, judged as the SD-JWT above plus the profile: the credential type the verifier expects, and the Token Status List it fetched for the `status` the credential names) | `identity/sdjwt-vc.mjs` (enrolled 2026-10-18) | 9 of its own, on top of the 23 of `sdjwt`: `sdjwtvc.vct-expected`, `.vct`, `.vct-mismatch`, `.disclosed-protected`, `.form`, `.status-list`, `.status-index`, `.status-revoked`, `.status-unjudged` |
A module verifier exports the list of rules it can name (`REGULI`; its helper throws on any other) and marks its rules in one of two
ways, both read by the derivation: a marker on every check of a rule (nine modules), or the rule named at every call of the
@@ -88,15 +91,21 @@ adapter writes them in the reason of the integrity level, and the vectors compar
So `vectori/device-bundle/resold-after-retirement.valid.json` is `VALID` here, and a verifier that drops the naming still passes it; that the
naming is there is measured by the device component's own probe, not by this suite.
**Not enrolled**, counted in the same file: three verifiers of the identity component that sit beside the enrolled one or on top of
it: SD-JWT (26 calls of its refusal helper), Travel Rule (20 places that add a reason) and compliance (3). Their refusals are texts,
not rule ids. Their own probes and negative controls stay what checks them.
The SD-JWT verifier and the SD-JWT VC profile (enrolled 2026-10-18) stop at their first refusal and name its rule: an integrity refusal
leaves the authenticity level `NOT_MEASURED` (`not-reached`), an authenticity refusal leaves integrity so. A VC presentation whose
`status` the verifier waived (`requireStatus: false`) and did not judge is `PARTIAL` (`claim-not-checked`), like a credential whose
status list was not read. The profile imports `sdjwt.mjs` from its real file, so a planted copy of `sdjwt.mjs` is reached only through
the artifact `sdjwt-presentation`: no `sdjwt-vc-presentation` vector expects a rule of `sdjwt` (they all exercise them).
**Not enrolled**, counted in the same file: two verifiers of the identity component that sit on top of the enrolled ones: Travel Rule
(20 places that add a reason) and compliance (3). Their refusals are texts, not rule ids. Their own probes and negative controls stay
what checks them.
## The vectors
`vectori/` holds 467 vectors (458 offline, 9 that read testnet 28001; 19 MB, since every device and identity vector carries its ML-DSA-65 keys and signatures), listed with their digests in `vectori/INDEX.json`:
`vectori/` holds 553 vectors (544 offline, 9 that read testnet 28001; 20 MB, since every device and identity vector carries its ML-DSA-65 keys and signatures), listed with their digests in `vectori/INDEX.json`:
envelope 64, payment-risk 11, payment-receipt 10, market-timeline 26, dataset 22, ai-trust-bundle 24, audit-log 19, audit-inclusion
10, audit-consistency 4, agent-ledger 18, identity-presentation 65, device-bundle 194. By expected verdict: 64 `VALID`, 66 `PARTIAL`, 337 `INVALID`. None is typed by hand
10, audit-consistency 4, agent-ledger 18, identity-presentation 65, device-bundle 194, sdjwt-presentation 54, sdjwt-vc-presentation 32. By expected verdict: 81 `VALID`, 68 `PARTIAL`, 404 `INVALID`. None is typed by hand
(`node genereaza-vectori.mjs --verifica` regenerates them and compares byte for byte):
- the 16 AIP-23 kinds come from their producers on fixed inputs (the same envelopes as the published AIP-23 kind vectors); the audit
@@ -118,13 +127,22 @@ envelope 64, payment-risk 11, payment-receipt 10, market-timeline 26, dataset 22
image and its Proof of Software attestation are the fixtures of the device component; `--proaspat --refa device` makes this one
source anew when the producers of the device component change, and every other vector stays byte for byte); an envelope with
random content that nobody notarized; a dataset of 16 records with random salts; and the transaction of the recorded receipt read
from the chain (two read calls).
from the chain (two read calls); since 2026-10-18 also an SD-JWT and an SD-JWT VC issued with AERE keys (an issuer, a holder, a
stranger: three hybrid key pairs each, made and discarded), presented to one verifier, the VC's Status List Tokens (clean, revoked,
suspended, 8 bits, for another uri, expired, by a stranger, typed JWT, without `iat`, too short, ML-DSA-65) and the forged siblings
only a key holder can make (a key binding JWT by a stranger or without its nonce, a digest signed twice, a nested `_sd_alg`, a
disclosure named `_sd`, a claim named `__proto__`, an algorithm confusion, a `status` behind a disclosure, and so on);
- the SD-JWT vectors have two more sources that are fixed text: the example of RFC 9901 Section 5 with the key of its Appendix A.5
(`identity/fixturi-rfc9901.json`), and the tokens of `@sd-jwt/core` 0.23.0 and `@sd-jwt/sd-jwt-vc` 0.23.0 with the status lists of
`@owf/token-status-list` 0.5.0 (`identity/interop/fixturi-interop-*.json`), which the identity component derived from those
libraries' real output on 2026-10-18, with their public test keys.
An `INVALID` vector names its `base` and its `mutation`: **one operation** (set, remove or add at one JSON path) applied to the input
of a vector that is not invalid, and it must be refused for exactly the rules in `expected.failed`, not merely refused: 221 of the
337 are made this way. Where the rule sits under a hash or a signature, one place is not reachable (changing an amount under the
of a vector that is not invalid, and it must be refused for exactly the rules in `expected.failed`, not merely refused: 249 of the
404 are made this way. Where the rule sits under a hash or a signature, one place is not reachable (changing an amount under the
instruction hash trips the binding first; a false decision in a ledger must still be signed by the agent; a disclosure the issuer never signed must still be signed for by
the holder; an authorization by a previous owner must still be signed by that owner): the other 116 are made at
the holder; an authorization by a previous owner must still be signed by that owner; a digest repeated in an SD-JWT must still be
signed by its issuer, a key binding JWT for another audience by its holder): the other 155 are made at
the producer, the commitments above the change recomputed with the published formulas, and every path that moved is declared
(`mutation.changed`). Eleven vectors expect more than one rule: rules that guard the same field cannot be separated (a looser policy shown
under a receipt also makes the risk verdict not reproduce; a Proof of AI envelope that is changed is also no longer the one the
@@ -136,9 +154,9 @@ key breaks both the id derivation and the match with the manufacturer's credenti
```
AERE_VERIFY_PROOF=<verify-proof.mjs from aere.network/tools, with verify-anchor.mjs, mpt.mjs, falcon512.mjs, registry-v3.mjs and package.json beside it and npm install done>
node conformance.mjs --impl "node implementare-aere.mjs" # the published verifiers behind the one verdict form: 458 offline vectors
node conformance.mjs --impl "node implementare-aere.mjs" # the published verifiers behind the one verdict form: 544 offline vectors
node conformance.mjs --impl "node implementare-aere.mjs" --online # and the 9 that read testnet 28001 (nothing is sent)
node conformance.mjs --impl "python3 implementare-integritate.py" # an independent implementation: 62 vectors, 405 reported NOT COVERED
node conformance.mjs --impl "python3 implementare-integritate.py" # an independent implementation: 62 vectors, 491 reported NOT COVERED
node conformance.mjs --impl "<your command>" # yours
node implementare-aere.mjs <artifact.json> [--online] # one artifact { artifact, input }: its verdict
```
@@ -148,8 +166,10 @@ not JSON at all: a file that is not an envelope is refused at the form level, by
the vectors show (`{ log, head?, signer? }` for an audit log, `{ ledger, policy }` for an agent's ledger, `{ bundle }` for a trust
chain, `{ presentation, now, audience?, nonce?, trustedIssuers?, statusLists?, revocations?, maxAgeS? }` for a presentation of a
credential, `{ bundle, now, nonce?, audience?, trustedManufacturers?, statusLists?, firmwarePolicies?, statusRecords?,
softwareAttestation?, anchors?, maxAgeS? }` for a device bundle: `now`, the verifier's clock, is required for both, since a verdict
on the clock of the machine that runs a vector would not reproduce).
softwareAttestation?, anchors?, maxAgeS? }` for a device bundle, `{ sdJwt, issuerKey, issuerAlg?, now, audience?, nonce?,
expectedIssuer?, expectedTyp?, requireKeyBinding?, requireExp?, maxAgeS? }` for an SD-JWT presentation and the same plus
`{ expectedVct, statusListJwt?, statusListKey?, statusListAlg?, requireStatus? }` for an SD-JWT VC: `now`, the verifier's clock, is
required for all of them, since a verdict on the clock of the machine that runs a vector would not reproduce).
An implementation is a command that answers three calls with JSON on stdout: `--capabilities` (`{ artifacts, rules, online, batch }`:
what it claims to judge), `<vector.json> [--online]` (the verdict above for the file's `{ artifact, input }`), and, if it says
@@ -159,14 +179,33 @@ exact set of failed rules and the state of each of the four levels are the expec
refusal. Without `--online` an implementation must not open a connection.
`implementare-integritate.py` is the second implementation: Python, standard library only, written from the rules and not from the
JavaScript. It claims 6 of the 181 rules (the form and the statement hash of an envelope; the form, the commitment, the salted field
JavaScript. It claims 6 of the 213 rules (the form and the statement hash of an envelope; the form, the commitment, the salted field
commitments and the RFC 9162 inclusion of a dataset record) and passes all 62 vectors it claims. It cannot check an ML-DSA signature
or read a chain, says so in its capabilities, and the runner reports the rest as not covered: 405 vectors, among them every vector of
the trust chain, the audit log, the agents' ledger, the identity presentations and the device bundles. For those six verifiers the
suite has one implementation, ours.
or read a chain, says so in its capabilities, and the runner reports the rest as not covered: 491 vectors, among them every vector of
the trust chain, the audit log, the agents' ledger, the identity presentations, the device bundles and the SD-JWT presentations. For
those eight verifiers the suite has one implementation, ours (for SD-JWT, the identity component measured our verifier against
`@sd-jwt/core` and `@sd-jwt/sd-jwt-vc` outside this suite; those libraries are not implementations of this suite's contract).
## How the suite itself is checked
Measured on 2026-10-18 (UTC), when the SD-JWT verifier and the SD-JWT VC profile were enrolled (Node.js 24.14.1; the reference
verifier of the development repository; testnet 28001 read, nothing sent):
- `node proba-conformance.mjs --online`: 12 rows green, 0 red. The rules and the vectors are what the code derives now: 213 rules of
13 verifiers, 553 vectors (54 of the kind `sdjwt-presentation`, 32 of `sdjwt-vc-presentation`). Every rule has a vector that
expects it (213 of 213); every artifact kind has a valid vector (17); every invalid vector is its base with one operation (249) or
one declared producer change (155); the published verifiers pass 553/553; the independent implementation passes all 62 it claims
and the other 491 are reported not covered; 97,966 malformed inputs given to the module verifiers each got a verdict and none
threw (4,398 still accepted, at 193 distinct paths, 4 of them of `sdjwt-presentation` and 2 of `sdjwt-vc-presentation`: the
optional inputs of the verifier, such as the issuer it expects); 183 malformed envelope files given to the reference verifier each
got a verdict.
- `node proba-conformance.mjs --control-negativ --online`: 295 rows green, 0 red: 213 of 213 rules (each of the 23 rules of the
SD-JWT verifier and the 9 of the VC profile planted out in turn fails exactly the vectors that expect it), 76 of 76 conditions of
the device verifier, six controls of the instruments (an implementation that calls everything valid fails 512 of the 544 offline
vectors). While the enrolment was being made, the control found one thing and it was fixed before this measurement: with
`vct-expected` planted out, the VC verifier threw on the vector that names no expected type instead of refusing it by the next
rule, which the suite reported as a broken vector, not as a refusal.
Measured on 2026-10-14 (UTC), after the third review of the device verifier (Node.js 24.14.1; the AIP-23 reference verifier fetched
from aere.network/tools with its four sibling files and `npm install` done in an empty folder, as a stranger would; testnet 28001
read, nothing sent):
@@ -267,11 +306,11 @@ On 2026-10-05, while the identity verifier was being enrolled, one more, fixed t
## What it is not, and what is not measured
- **Not a certification, not an audit, not a mark.** Passing says that an implementation agrees with the published verifiers on these
467 inputs. It does not say either of them is correct, and no third party has reviewed the verifiers, the vectors or this suite.
553 inputs. It does not say either of them is correct, and no third party has reviewed the verifiers, the vectors or this suite.
- **The vectors and the verifiers have the same authors.** The expected verdicts were written by the people who wrote the verifiers.
The second implementation is independent in code and language, not in authorship, and it covers 6 rules of 181; the other
175 rules, among them every rule of the trust chain, the audit log, the agents' ledger, the identity verifier and the device
verifier, are judged here by one implementation.
The second implementation is independent in code and language, not in authorship, and it covers 6 rules of 213; the other
207 rules, among them every rule of the trust chain, the audit log, the agents' ledger, the identity verifier, the device
verifier and the SD-JWT verifiers, are judged here by one implementation.
- **Finality is the chain's.** The level says that the post-quantum certificate of the covering anchor verified on the chain where the
artifact was notarized. Every notarized vector here is on chain 28001, a testnet; nothing in this suite ran on mainnet.
- **Five of the six finality refusals have no vector.** The reference verifier can refuse at its finality level in six places; the
@@ -320,7 +359,12 @@ On 2026-10-05, while the identity verifier was being enrolled, one more, fixed t
not read them; the statement carries its own `kind`, which is under the hash. (This file used to quote 526 malformed envelopes,
a figure of 2026-10-03 from a run whose script was not kept; the row above replaces it.)
- **Not part of AIP-23.** The rule ids, the four levels and the verdict form are this suite's reading of the published verifiers;
AIP-23 defines the envelope. The device verifier is enrolled. Of the identity verifiers published beside these, the presentation verifier is enrolled; SD-JWT,
Travel Rule and compliance are not.
AIP-23 defines the envelope. The device verifier is enrolled. Of the identity verifiers published beside these, the presentation
verifier, the SD-JWT verifier and the SD-JWT VC profile are enrolled; Travel Rule and compliance are not.
- **The SD-JWT vectors say what two libraries agree on, on these inputs.** The tokens of `@sd-jwt/core` and `@sd-jwt/sd-jwt-vc` in
the SD-JWT vectors are the fixtures the identity component derived from those libraries' real output on 2026-10-18 (their versions
are in the vector sources); the expected verdicts are those of our verifiers on them, which the identity component measured against
the libraries' own verdicts in both directions. A verifier that resolves the issuer key from `iss` or `x5c`, fetches the status list
or the type metadata, or takes an untyped token by default, is judged here on inputs where all of that is already brought.
- **The Python implementation** writes numbers the way JavaScript does only for integers and plain decimals, and sorts keys by code
point (JavaScript's order for keys in the Basic Multilingual Plane).