identity: verify-sdjwt on the command line (an SD-JWT+KB checked with the issuer key you give; Aere Cloud runs it behind POST /v1/identity/sd-jwt/verify)
The issuer key (a public JWK, or the public keys of an AERE identity) is checked first: one that cannot be read, is private, or is not a key for the algorithm asked exits 2 with the reason, instead of reporting the token INVALID. --json prints compact JSON (indented output grew with the square of the claims' nesting depth). --at judges at a given time, as for verify. Test on the RFC 9901 example presentation: valid at its own time, invalid now, a private key refused. Tests: SD-JWT 23/23, negative control 28/28; identity 44/44, negative control 49/49.
This commit is contained in:
1 parent
4ffec8d7e3
commit
5f1e60b8d2
6 files changed
+54
-6
No files matched your search
+4
-1
@@ -163,6 +163,9 @@ const shown = presentSdJwt({ sdJwt, reveal: ['age_over_18', { element: 'RO', in:
|
||||
const r = verifySdJwt(shown, { issuerKey, audience, nonce, expectedIssuer: 'https://issuer.example' }); // { valid, reason, payload, disclosed, keyBinding }
|
||||
```
|
||||
|
||||
From the command line (the issuer key a public JWK, or the output of `pub`): `node identity-cli.mjs verify-sdjwt --sd-jwt token.txt --issuer-key issuer.pub.json
|
||||
--issuer-alg EdDSA --audience A --nonce N [--expected-issuer I] [--at T] [--json]`; Aere Cloud runs it behind `POST /v1/identity/sd-jwt/verify`.
|
||||
|
||||
Checked against the standard's own vectors (`fixturi-rfc9901.json`, extracted from RFC 9901 Section 5 and Appendix A.5; IETF code
|
||||
components, Revised BSD License): the digest of each of the ten example disclosures; the example SD-JWT, signed ES256 by someone
|
||||
else with the key in A.5, verifies and rebuilds every input claim; the example presentation with its Key Binding JWT verifies and
|
||||
@@ -195,7 +198,7 @@ node proba-conformitate.mjs # 15: compliance policies judged on real pr
|
||||
node control-negativ-conformitate.mjs # on a copy, each of 14 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
|
||||
node proba-sdjwt.mjs # 22: the RFC 9901 vectors, SD-JWTs issued with AERE keys (EdDSA and ML-DSA-65), each attack
|
||||
node proba-sdjwt.mjs # 23: the RFC 9901 vectors, SD-JWTs issued with AERE keys (EdDSA and ML-DSA-65), each attack
|
||||
node control-negativ-sdjwt.mjs # on a copy, each of 28 guards removed -> its own named test turns red
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user