-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unchecked revocation interval between Presentation and PresRequest #41
Comments
The
AFAIK, the intention is for the verifier to say to the holder "I'll accept a recent Non Revocation Proof in this range", so that a holder with a cache of RevRegEntries might be able to generate the proof without going to the ledger. In practice, that's not particularly useful -- how often does a holder repeatedly present a credential such that the cache is sufficiently up to date for a verifier? Further, the interval is also used for point-in-time revocation checks so that the verifier can ask both "Is the credential revoked now?" (common case) and "Was the credential revoked on June 23, 2020 when the car accident occurred?" If the verifier puts the "interval" as a point in time, what does the verification mean? It should be that the RevRegEntry (timestamp) used is the one that was active at the point in time. But if a later one is used, is that a bad thing? I guess it could be if it is the practice of the issuer to revoke and unrevoke credentials over time. My suggestion is that we leave it as is for now, documenting the issues, and in a future version of AnonCreds, we look for a better solution. |
This was helpful thank you @swcurran. It was confusing but examples here also cleared things up. Regarding a few things you mentioned:
This is actually something discussed with @egidiocasati @TimoGlastra regarding a transitional revocation (more like a suspension) and a permanent revocation state. There are good reasons and real business needs to support both. We will be happy to discuss and outline some potential requirements and share for feedback.
With this being the intention, we should at least make the current code do as intended and document it, i.e. makes sure that the provided timestamp for the |
Sounds good. Agree that revoking and unrevoking credentials is a viable use case and should be supported. Idea: Perhaps we add a new output to the verification that leaves "verified" as What you propose is right. Note that I have a PR in for updating the presentation request section of the spec, so any change in the spec should be on top of that. |
Great! That PR on presentation request clearer mentioned your concerns here. Re the addition status: I do not think the code should proceed to do cryptographic verification at all if the timestamp interval condition in not satisfied. It is likely that the unexpected timestamp does not map to a revocation registry provided by the verifier so it will fail anyway. |
I'm not sure of that -- or I'm not understanding what you mean. Suppose the Verifier says "I will accept an interval between 5 days ago and now()", and the last |
Let me see if I can make this clearer: Verification option:
If case 2 is what should be supported, then the verifier should explicitly provide such instruction to the verification method to ignore the request interval. Otherwise it may verify due to unexpected presentation timestamps. |
I don't think AnonCreds should fail verification if there is a verified NRP, even if the timestamp is outside the interval. To know that it is outside the interval, one must have a full RevReg history, and that is at best "difficult" to maintain by both the holder and verifier. For example, who would maintain the RevReg history and query the AnonCreds method to maintain it -- AnonCreds code or the business logic? I think a warning would be good -- hence the suggestion of the additional data element. But for both sides to be precise is I think, very difficult. If we can give guidance on how the verifier and holder can make sure the NRP is based on an in-interval timestamp, perhaps it can work, but I'm not seeing how it can be done. This is why I think a better choice is for the verifier not to use an interval, but rather a point in time. But that's for the v2.0 discussions. |
OK, I understand that it is hard for sure to maintain it. Agree with v2, @egidiocasati had some thoughts on using some standard practise already exist. I will keep this opened for now and return a warning to address this issue. |
Yep, thanks @whalelephant. If we compare the RevocationList to a Certificate Revocation List (CRL), the Certificate Authority (CA) is required to publish the CRL at a predetermined frequency (usually every 24 hours) as specified in RFC5280, section 5.1.2.5. |
As all following probably aware but just for future contributors, @swcurran has created another issue where the outcome for this version of nonrevoked interval check will be carried out. |
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
Signed-off-by: bwty <[email protected]>
@whalelephant can we close this or is it not resolved, yet? |
The
NonRevocationInterval
in thePresentationRequest
on the request or the attribute/predicate level are not compared with the timestamp of which the prover has updated theRevocationState
to in creating thePresentation
.Given the verifier only provides
RevocationRegistry
(aka Accumulator value) for the timestamps in theNonRevocationInterval
, the requiredRevocationRegistry
for the timestamp given in thePresentation
will be missing and would not cause a revoked credential during that interval to be verified.However, if the verifier provides
RevocationRegistry
mapped to timestamps outside of the interval,a revoked credential can be verified.
This might also be related to the issued in #36, i.e. if the
RevocationState
is for a timestamp that is outside of the one defined in thePresentationRequest
, then regardless if it has been revoked, the verifier might not supply the Accumulator value for such a timestamp.The text was updated successfully, but these errors were encountered: