conformance: the identity presentation verifier enrolled (134 rules of 10 verifiers, 273 vectors); the reference verifier instruction names all five files beside verify-proof.mjs; module READMEs point to aere.network/tools

This commit is contained in:
Aere Network committed 2026-10-05 18:53:32 +03:00
1 parent c9798a0013
commit 5fb38c5d0b
88 files changed
+20246 -179

No files matched your search

+18
View File
@@ -281,6 +281,24 @@ test('intrari stricate date verificatorului (lista fara chei, revocare cu o valo
const r2 = I.verifyPresentation(prezD(), { ...toate, revocations: [rv] }); cere(r2.valid && r2.rows.some((x) => x.pass === null && /not readable/.test(x.detail)), fals(r2) || 'aplicata');
cere(/public keys must be/.test(arunca(() => I.verifyPresentation(prez(), { ...toate, trustedIssuers: [{ alg: 'x' }] })) || ''), 'cheia de incredere stricata primita');
});
// 2026-10-05 (gasit la inrolarea in suita de conformitate): cheile emitentului necitibile nu acuza si detinatorul
test('ATAC: emitent cu o cheie Ed25519 in campul mldsa65 -> refuzat pentru emitent (issuer-id, credential-signature), nu si pentru detinator', () => {
const c = clon(credential); c.statement.issuer.keys = { ...c.statement.issuer.keys, mldsa65: c.statement.issuer.keys.ed25519 };
const r = I.verifyPresentation(I.present({ credential: c, disclosures, reveal: ['age_over_18'], presenter: hol, audience: AUD, nonce: NONCE, now: NOW }), toate);
cere(!r.valid && r.rules.join() === 'credential-signature,issuer-id', JSON.stringify(r.rules));
});
// 2026-10-05 (suita de conformitate): fiecare refuz isi numeste regula
test('fiecare refuz isi numeste regula: randul picat poarta rule (din REGULI), cel nejudecat unjudged (din NEJUDECATE), rezultatul rules si unjudged; o configuratie care nu e lista arunca, nu acuza prezentarea', () => {
const r = I.verifyPresentation(prez(), { ...toate, audience: 'https://alt.example', nonce: 'alt' });
cere(!r.valid && r.rules.join() === 'audience,nonce', JSON.stringify(r.rules));
cere(r.rows.every((x) => (x.pass === null ? I.NEJUDECATE.includes(x.unjudged) : I.REGULI.includes(x.rule))), 'un rand fara regula declarata');
const r0 = I.verifyPresentation(prez(), { now: NOW });
cere(r0.valid && r0.rules.length === 0 && r0.unjudged.join() === 'audience,issuer-trust,nonce,status-unread', JSON.stringify(r0.unjudged));
const rd = I.verifyPresentation(prezD(), toate); cere(rd.valid && rd.unjudged.join() === 'revocations-none', JSON.stringify(rd.unjudged));
cere(/statusLists and revocations are lists/.test(arunca(() => I.verifyPresentation(prez(), { ...toate, statusLists: 'x' })) || ''), 'statusLists care nu e lista: prezentarea acuzata in loc de configuratie');
cere(/statusLists and revocations are lists/.test(arunca(() => I.verifyPresentation(prezD(), { ...toate, revocations: {} })) || ''), 'revocations care nu e lista primit');
cere(/trustedIssuers is a list/.test(arunca(() => I.verifyPresentation(prez(), { ...toate, trustedIssuers: 'x' })) || ''), 'trustedIssuers care nu e lista');
});
test('o afirmatie in clar numita in reveal nu cere dezvaluire (se vede oricum)', () => {
const r = I.verifyPresentation(I.present({ credential, disclosures, reveal: ['employer', 'age_over_18'], presenter: hol, audience: AUD, nonce: NONCE, now: NOW }), toate);
cere(r.valid && r.claims.employer === 'Example Ltd' && r.claims.age_over_18 === true && !('name' in r.claims), fals(r) || JSON.stringify(r.claims));