-
Notifications
You must be signed in to change notification settings - Fork 16
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
Bit vector revocation design discussion #6
Comments
MVP Revocation ProposalWe believe that for the DCC MVP/Pilot project, selecting the Revocation List 2020 bitstring strategy strikes the right balance of implementation simplicity (leveraging an existing library), reasonable server-side storage constraints, cache-ability and herd privacy, for the given use case. First Iteration - Randomly Named Block with Sequential Index AssignmentFor the initial implementation:
Implementation Note - Revocation ConfigThe issuer service will create a {
"credentialsIssued": 0,
"currentBlock": "QHDR12CD2J"
} That means the first VC issued by that issuer service will have the following {
// "@context": [ ... ],
"credentialStatus": {
"type": "RevocationList2020Status",
"revocationListIndex": "1",
"revocationListCredential": "https://example.edu/revocations/QHDR12CD2J"
},
"credentialSubject": { /* ... */ },
"proof":{ /* ... */ }
} The next VC issued will have the Implementation Note - Issuer LogTo aid the revocation process, the Issuer service should keep a private log of issued VCs. For each VC, the log will note:
That way, when a particular VC needs to be revoked, the issuer log will contain the filename and the index position for that credential, so that its bit can be flipped. First Iteration - Limitations/Risks
Second Iteration - Randomly Named Block with Random Index AssignmentTo mitigate risk 3 mentioned above (the ability of an attacker to estimate the number of VCs issued for a given block), a second iteration can be done. Instead of assigning list indexes sequentially, the issuer will generate the list index randomly. Because of the random assignment, the issuer will need a second bitstring, this one private, to keep track of which indexes have already been assigned. This approach doubles the server-side storage requirements (for 131k entries, now 32KB is required, versus the 16KB in the first iteration). However, note that there is no additional bandwidth or storage burden on the verifier / relying party. Optional Enhancement - Block Initialization Using Noise/ChaffTo mitigate risk 2 (ability of an attacker to estimate the percentage of the VCs revoked for a given block), an additional step can be taken. When a revocation bitstring block is provisioned by the issuer, a percentage of it (say, 20-30%) can be initialized with random noise (so, 30% of the bits can be randomly flipped to 1, at the outset). To keep track of which index positions have been chaffed in this manner, they can be recorded in the second, private bitstring from the Second Iteration above. Note that this does increase the issuer-side storage requirement by the same percentage (ie, by 20-30% from the previous example). Cache Expiration and Mitigating Tracking/"Phone Home"The major drawback of a bitstring revocation list stored at the issuer's website is the possibility of the issuer being able to track the verifier's requests for a given revocation list. This can potentially provide metadata such as timestamp, the requester's IP address, and any cookies and headers the verifier's browser is willing to send. However, depending on the use case (the relative value and threat level of the credential), several simple steps can be taken to mitigate this risk. Firstly, not all VC use cases need to be revokable. For each type of credential, the issuer is advised to consider whether their business processes actually allow for revocation. In many cases, the issuer can use a VC expiration date instead of revocation (that is, issue a transcript that is good for one year, for example). For VC use cases that do need revocation ability, issuers can reduce the "phone home" problem by considering just how quickly does a particular VC need to be revoked. This is an important question, because it directly determines the cache-ability of the revocation list, and whether it can be stored by third parties (for example, cached by Content Delivery Networks). If a high-value/high-threat credential (such as an administrator login) needs to be be revoked (and the revocation needs to propagate) within a matter of seconds, it is not very cache-able, and the issuer's revocation list must be the only source of truth. If, however, the business rules require that the revocation can propagate within a day, that means that the revocation list can be cached by a CDN (or by the verifier's browser cache) with the cache expiration value of 24 hrs. This dramatically changes the risk of tracking / "phone home" behavior by the issuer. Now, instead of a verifier having to request the revocation list each time it verifies a VC, each verifier can simply fetch the revocation list first thing in the morning. This can be done automatically (by a cron job, etc, much like RSS feeds), which means that all subsequent verification operations (within that 24 hr expiration period) can be performed using the verifier's local cache. Well known HTTP mechanisms (such as the |
What about tracking by the verifier? If I present the same credential more than once, my credential will probably have the same index in all presentations, meaning that the verifier will know it is the same entity across all the interactions. |
Hi @Diiaablo95! Can you say a bit more about the threat model you're concerned about? Are you building an education use case that is anonymous, and that foresees anonymous or pseudonymous reuse of the same verifiable credential? |
Yes, kind of. What I am trying to say is that having to reveal the index in the revocation list, if it does not change, opens the room to correlation attacks. Someone might even have an anonymous credential, but if the index needs to be revealed, then all the presentations of the same credentials can be linked together. How can this weakness be addressed? |
@Diiaablo95 @dmitrizagidulin This probably reveals my ignorance, but wouldn't there always be some part of a credential that remains constant across presentations? |
@jchartrand at least to my knowledge, the use of zero-knowledge proofs, like the one used in Hyperledger Indy or in BBS+ signatures, allows the prover to hide parts of a credential. So if the information revealed in the proof provides enough herd anonymity, the proof itself does not have to leak anything across presentations. The problem arises when proving that the credential has not been revoked, as revealing the same index in several presentations is a linking factor. |
Thank you @Diiaablo95 - very interesting (although I admit the math is a bit bedazzling.) A related question: all of this seems to assume that the verifier is the weak point: that a centralized verifier is used by many different people/applications, and can therefore track multiple requests for the same credential, and so potentially correlate. But, wouldn't it often be the case that a centralized verifier isn't in fact used? If the verifier is nothing more than code that can run anywhere (e.g., in a web browser or in a phone app) then you could run that code locally (e.g., within a web browser, so using the computer on which the web browser is running) without making any calls to a centralized server, and so there's less opportunity to cross-reference different requests? |
In web development 101 they teach you that validation on client side equals no validation at all. So if a verifier wants to actually verify the validity of a credential, it cannot rely on client code, but it has to perform the validation server-side, hence the possibility of correlation attacks. |
How about an example:
What makes this client side validation 'no validation at all'? |
Well, in this case the mobile app is acting as the verification service, hence the app represent the "threat" from the point of view of the potential employee's. But in this case there is definitely no need for unlinkability, as we are discussing about a potential employees. But if you want to extend this to those use cases, as I said (in my opinion), the mobile app still represents a threat because it is able to understand when the same user is showing a presentation, given that the index in the bit vector will be the same. |
Could you provide a concrete example/scenario that shows where the correlation happens when verification is done entirely within a mobile app (on a phone)? |
Because the validity of a credential needs to be proved at the entity offering a service. A mobile app might be the client for that service, but good information security practices say that client validation equals no validation. So a properly developed server will need to check on its own whether the user is authorised to perform a specific action, be it via the mobile app or a command line application. And again, the service provider cannot blindly trust whatever the app does, as apps are in the hands of end users, which means hackers, which means that an app can be sideloaded and a mobile phone jailbroken. |
Ah, now I think I see where you are going with this. Another example then: Say I am applying for a drivers licence, and have to present proof of citizenship to get the drivers licence. I could present my credential in person or I could submit it electronically.
In this case, the app is presumably safe since it is controlled by the drivers licence bureau?
On the topic of the trustworthiness of apps, many of us trust banking apps to do our banking, or say the amazon app to order from amazon, etc. - should we not be? Even the web browsers on our phones are apps - should we not trust those? And how is a centralized verification point (say a web page) any more trustworthy? Because it has a well known domain name? If you do feel that web pages are more trustworthy, then we could put the verification code (as javascript) directly into the web page. The code then runs in the browser, pulling in revocation lists (via XHR), etc. So again no opportunity for correlation because all verification runs locally the browser. As always, though, I may well misunderstand your point - could you provide a real-life example? |
You are indeed making a different point. My original point was that by revealing the same index in the revocation list, you are providing a correlating identifier that allows to link multiple presentations, even though those presentations do not share any other detail that would make them linkable. So as long as you are revealing the same index to the same verifier (be it the same mobile app, or the same system), the verifier will be able to verify that it is the same entity, without necessarily know what is that entity's real identity, but that depends on the use case. |
added to documentation: https://github.com/digitalcredentials/docs/blob/main/credential/revoke_credential.md |
We've decided to use the bit vector revocation approach for MVP. Past design discussions are here
@jchartrand @dmitrizagidulin
Let's iterate on bit vector implementation options. Let's also make a distinction between a reasonable MVP (pilot) implementation vs higher-stakes. In the latter case, herd privacy will be especially important.
The concern we discussed: if the issuer is simply incrementing indices, then a 3rd party might be able to derive additional general information about revocations in a cohort (say if it's well-known that there were 30 students in a class).
The issuer could deal with this in the implementation, i.e. by using an index generation scheme that adds noise/offsets (possibly at the risk of needing to track previously-used indices).
I discussed this with Manu and Dave Longley who suggested the following:
The text was updated successfully, but these errors were encountered: