I feel like it should work and we can close another PR.
anoncreds-clsignatures requires passing of predicate name, type, value for doing verification of each cl sub-proof.
If we pass a different predicate value, verification will fail.
It can cause an issue when a request contains multiple predicates with the same attribute name. Due to this, we used an explicit mapping.
In proper way, this information (predicate name /type/value) should be taken from the proof request.
But as we do verification for each request attribute/predicate that presentation contains a verifiable credential providing requested data, we can just take attributes/predicates from inside of sub proof itself at the sub proof verification step .
The function to verify requested predicate check the following:
w3c credential contains a predicate attribute in credential subject
cl sub_proof contains sub_proof for the requested predicate (same name, value, type)
@TimoGlastra @andrewwhitehead @swcurran
This is an alternative implementation for w3c predicate representation as boolean values to using explicit mapping like was done in PR: https://github.com/hyperledger/anoncreds-rs/pull/302
I feel like it should work and we can close another PR.
anoncreds-clsignatures
requires passing of predicate name, type, value for doing verification of each cl sub-proof. If we pass a different predicate value, verification will fail. It can cause an issue when a request contains multiple predicates with the same attribute name. Due to this, we used an explicit mapping.In proper way, this information (predicate name /type/value) should be taken from the proof request. But as we do verification for each request attribute/predicate that presentation contains a verifiable credential providing requested data, we can just take
attributes/predicates
from inside of sub proof itself at the sub proof verification step .The function to verify requested predicate check the following:
sub_proof
contains sub_proof for the requested predicate (same name, value, type)This PR: depends on this change in CL AnonCreds library: https://github.com/hyperledger/anoncreds-clsignatures-rs/pull/38