identity: the compliance record's evidence digest is the digest of the presentation's signed binding
Before, it was the digest of the whole presentation object, so an unsigned top-level field added by anyone changed it without changing anything signed, and the digest did not name one presentation. The binding names, by hash, the whole credential, the disclosures, the delegation chain, the audience, the nonce and the time; the signature is left out (ML-DSA signs with randomness, so one binding can carry many valid signatures). Tests: compliance 15/15, negative control 14/14.
This commit is contained in:
1 parent
0b56d8e5df
commit
6c42fb2c0b
4 files changed
+23
-4
No files matched your search
@@ -10,6 +10,8 @@ const DEV_VERIFY = path.resolve(AICI, '..', 'aere-proof-protocol', 'verify.mjs')
|
||||
const VERIFY = process.env.AERE_VERIFY_PROOF || (fs.existsSync(DEV_VERIFY) ? DEV_VERIFY : '');
|
||||
const C = 'conformitate.mjs';
|
||||
const PLANTARI = [
|
||||
// B-29: forma publicata in 154c424 (digestul obiectului intreg)
|
||||
['digestul prezentarii peste obiectul intreg (B-29)', 'presentationHash: sha(canonical(legatura || p || null)),', 'presentationHash: sha(canonical(p || null)),', 'B-29'],
|
||||
// [nume, tipar, inlocuire, proba (inceputul numelui ei)]
|
||||
['equals nu mai compara', "if (Object.hasOwn(r, 'equals')) return canonical(v) === canonical(r.equals);", "if (Object.hasOwn(r, 'equals')) return true;", 'neconform: jurisdictie interzisa'],
|
||||
['notIn nu mai compara', "if (Object.hasOwn(r, 'notIn')) return !r.notIn.some((x) => canonical(x) === canonical(v));", "if (Object.hasOwn(r, 'notIn')) return true;", 'neconform: jurisdictie interzisa'],
|
||||
|
||||
Reference in new issue
Block a user