W3C: Reworked predicates representation - no mapping #303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@TimoGlastra @andrewwhitehead @swcurran
This is an alternative implementation for w3c predicate representation as boolean values to using explicit mapping like was done in PR: #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: hyperledger/anoncreds-clsignatures-rs#38