zlacker

[parent] [thread] 36 comments
1. coldpi+(OP)[view] [source] 2025-07-03 19:09:58
Yeah I'm also interested in some of the details here, but the linked library repo is a bit too low-level for my current understanding.

For example, in the usecase of providing a proof-of-age to a website: who provides the verification data (the government?); what form does that take (a file in a standard format?); who holds/owns the verification data (the user?); who runs the verification software (the end-user's web browser?).

Can the user use any implementation to provide the proof, or must it be a "blessed" implementation such as Google Wallet?

replies(3): >>Matteo+V >>abhv+g1 >>esbran+g2
2. Matteo+V[view] [source] 2025-07-03 19:18:56
>>coldpi+(OP)
The specifics depend on local regulations, but roughy speaking: the government gives you a document in a standard format (eg MDOC). Your phone stores the document, with cooperation from a secure element that binds the document to the phone. The website you visit verifies the proof. The government gives documents to whatever wallet they want, which may be a special government wallet. They may or may not give the document to Google Wallet.
replies(1): >>coldpi+D1
3. abhv+g1[view] [source] 2025-07-03 19:21:22
>>coldpi+(OP)
(1) in this case, an identity issuer provides the source of truth identity information. Examples include state DMV, your passport (you can try "Id pass" in Google wallet), etc.

(2) One of the goals of this project was to layer ZK on top of current identity standards that DMVs already issue, so that gov orgs don't have to change what they currently do to support the strongest user privacy. One example format is called Mdoc.

(3) The user holds the identity information on their device only. No other copies. The user's device makes the zkp proof on-device. This was one of the major technical challenges.

(4) The relying party (eg a website) runs the zk verification algorithm on the proof that is produced by the device to ensure soundness.

(5) Yes, the user can use any compatible implementation to produce the proof. We have open-sourced our implementation and we have a spec for the proof format that others can also reimplement.

replies(4): >>coldpi+62 >>doctor+l2 >>miki12+3b >>nixpul+aD
◧◩
4. coldpi+D1[view] [source] [discussion] 2025-07-03 19:23:58
>>Matteo+V
Thank you.

> Your phone stores the document, with cooperation from a secure element that binds the document to the phone. The website you visit verifies the proof.

So it does require a "blessed" implementation, and I have to trust Google or Apple to handle my data? I cannot own the document myself and use an open-source client that I trust to provide the proof?

replies(2): >>Matteo+e2 >>miki12+ea
◧◩
5. coldpi+62[view] [source] [discussion] 2025-07-03 19:27:46
>>abhv+g1
Thanks for the reply. So in theory, I could get this MDOC file and store it on my desktop computer, and use an open-source library whose behavior I can verify, to provide the proof to the website via my web browser. Yeah? This sounds good to me.
replies(1): >>Matteo+y2
◧◩◪
6. Matteo+e2[view] [source] [discussion] 2025-07-03 19:29:09
>>coldpi+D1
It depends on local regulations. As far as I can tell Europe will require some sort of blessing of the wallet. To be clear, governments will develop their own apps and it's not clear that Google will be blessed. We (Google) are giving them the code pro bono to improve privacy.
replies(1): >>coldpi+R2
7. esbran+g2[view] [source] 2025-07-03 19:29:23
>>coldpi+(OP)
It is decentralized. The holder provides the data, which was ultimately provided to them by the government, they're the client. The verifier is the entity that wants to know how old the holder is, the server.

The form are eg things like the JSON Web Token (JWT), Digital Credentials, and the Federated Credential Management API (FedCM).[1][2][3][4][5] The software can be anything since they're expected to use open protocols, so yes, web browsers.[6] Per the Commission, "For remote presentation flows, … the Wallet Instance implements the OpenID for Verifiable Presentation protocol OpenID4VP in combination with the W3C Digital Credentials API."[7]

[1] https://en.wikipedia.org/wiki/JSON_Web_Token

[2] https://github.com/w3c-fedid/digital-credentials

[3] https://w3c-fedid.github.io/digital-credentials/

[4] https://github.com/w3c-fedid/FedCM

[5] https://w3c-fedid.github.io/FedCM/

[6] https://github.com/w3c-fedid/FedCM/blob/main/explorations/HO...

[7] https://eu-digital-identity-wallet.github.io/eudi-doc-archit...

◧◩
8. doctor+l2[view] [source] [discussion] 2025-07-03 19:29:58
>>abhv+g1
Are you trying to say that there’s a signed blob called an MDOC, that happens to have the age and name of the user, and this library allows a website to prove that the provided age belongs to the person with the MDOC, but not also see the name?
replies(2): >>Matteo+C2 >>JoshMa+T9
◧◩◪
9. Matteo+y2[view] [source] [discussion] 2025-07-03 19:31:43
>>coldpi+62
No. Using the MDOC requires a signature from a hardware security key in the phone, and a lot of the complexity is how to avoid leaking the private key, which would identify you.
replies(1): >>coldpi+73
◧◩◪
10. Matteo+C2[view] [source] [discussion] 2025-07-03 19:32:05
>>doctor+l2
Yes
◧◩◪◨
11. coldpi+R2[view] [source] [discussion] 2025-07-03 19:33:20
>>Matteo+e2
Hmm. This introduces a third party to the protocol, right? Specifically the developer of the wallet. So we now have three parties: the user, the wallet developer, and the relying party. Does this zk protocol protect the user's privacy from the wallet developer as well as the relying party?

In other words, does the protocol give the wallet access to information about the relying party? For example, could this wallet that I don't control tell its owner, or the government, that I am using it to access a certain website?

replies(1): >>Matteo+G4
◧◩◪◨
12. coldpi+73[view] [source] [discussion] 2025-07-03 19:35:34
>>Matteo+y2
Well, that's not great. My phone is closed-source and its software is provided by an ad company. I do not trust it to always behave in my interests.
replies(1): >>Matteo+d5
◧◩◪◨⬒
13. Matteo+G4[view] [source] [discussion] 2025-07-03 19:46:06
>>coldpi+R2
Yes, a malicious wallet could leak your information. This is why some governments will insist on using only blessed wallets. However, wallet+zk is strictly better than sending the plaintext MDOC to the relying party. There are no solutions in this space, only tradeoffs, and elected representatives have picked one tradeoff.
replies(1): >>coldpi+D5
◧◩◪◨⬒
14. Matteo+d5[view] [source] [discussion] 2025-07-03 19:49:59
>>coldpi+73
An alternative would be some secure chip in a credit-card size plastic document, but nobody seems to like that idea. We (Google) don't make these choices.
replies(1): >>coldpi+26
◧◩◪◨⬒⬓
15. coldpi+D5[view] [source] [discussion] 2025-07-03 19:52:27
>>Matteo+G4
That's too bad :( I wish the protocol had been designed with that in mind. Requiring users to trust proprietary software from Google & Apple to be in complete control over their digital identities is a pretty crummy direction to go in.
replies(1): >>Matteo+QS
◧◩◪◨⬒⬓
16. coldpi+26[view] [source] [discussion] 2025-07-03 19:55:35
>>Matteo+d5
Another approach could be for a component in the protocol that I do trust (eg an open source web browser) to serve as an intermediary, providing only the information required to each of the components that I don't trust (wallet, website). The wallet does not need to know who is requesting the proof, right?
replies(1): >>Matteo+28
◧◩◪◨⬒⬓⬔
17. Matteo+28[view] [source] [discussion] 2025-07-03 20:12:00
>>coldpi+26
I hear you. The main problem is how to prevent you from giving your document to somebody else, and things have converged on certified smartphone with security key plus biometrics.
replies(1): >>coldpi+19
◧◩◪◨⬒⬓⬔⧯
18. coldpi+19[view] [source] [discussion] 2025-07-03 20:18:32
>>Matteo+28
Yeah, Passkeys are doing the same thing, expecting users to just blindly trust American Big Tech companies. It's distressing that no one working on these protocols considers the developers of the software that implements the protocol to be a party in the protocol. What are the wallet provider's interests in this exchange? How can the user be protected from the wallet provider? Seems no one asks these questions :(
replies(1): >>AgentM+uL
◧◩◪
19. JoshMa+T9[view] [source] [discussion] 2025-07-03 20:24:57
>>doctor+l2
But to be clear, mdoc already accounts for this through its selective disclosure protocol, without the need for a zero knowledge proof technology. When you share an mdoc you are really just sharing a signed pile of hashes ("mobile security object") and then you can choose which salted pre-images to share along with the pile of hashes. So for example your name and your birth date are two separate data elements and sharing your MSO will share the hashes for both, but you might only choose to share the pre-image representing your birthday, or even a simple boolean claim that you are over 21 years old.

What you don't get with this scheme (and which zero knowledge proofs can provide) is protection against correlation: if you sign into the same site twice or sign into different sites, can the site owners recognize that it is the same user? With the design of the core mdoc selector disclosure protocol, the answer is yes.

◧◩◪
20. miki12+ea[view] [source] [discussion] 2025-07-03 20:29:25
>>coldpi+D1
In principle, you could use an open source implementation, but not a user-modifiable implementation.

Nothing stops a government from making their code open source and providing you with reproducible builds. You just won't be able to change the code to do something the government doesn't deem legal.

◧◩
21. miki12+3b[view] [source] [discussion] 2025-07-03 20:35:46
>>abhv+g1
If you can achieve RCE on the chip and run arbitrary code without invalidating signatures, does the protocol still stay secure?

If so, what's the point of requiring your implementation to run on a verified secure element? If not, the protocol seems only as strong as the weakest chip, as obtaining just a single private key from a single chip would let you generate arbitrary proofs.

replies(1): >>Matteo+Po
◧◩◪
22. Matteo+Po[view] [source] [discussion] 2025-07-03 22:55:28
>>miki12+3b
The role of the secure element is only to "bind" the credential to the device, so that if you copy the credential somewhere else then the credential is useless. Concretely, the secure element produces a ECDSA signature that must be presented together with the credential. This is the normal protocol without ZKP. Concretely, the SE is in the phone, but could be a yubikey or something else.

The ZKP library does not run on the secure element. It runs on the normal CPU and produces a proof that the ECDSA signature from the SE is valid (and that the ECDSA signature from the issuer is valid, and that the credential has not expired, and ...) If you crack the ZKP library, all you are doing is producing an incorrect proof that will not verify.

replies(1): >>tzs+yv
◧◩◪◨
23. tzs+yv[view] [source] [discussion] 2025-07-04 00:24:30
>>Matteo+Po
Am I correctly understanding that I'd get the credential from say my state DMV once, and then later whenever I want to prove my age to a website the proof protocol is just between that website and my device? The DMV gets no information about what websites I use the DMV credential with and they get no information about when I use the credential even if the website and the DMV decide to cooperate? All they would be able to get was that at time T someone used a credential on the site that came from the DMV?

I tried to sketch out a design an age verification system, but it involved the DMV in each verification, which made timing attacks a problem. Briefly the website would issue a token, you'd get a blind signature of the token from the DMV's "this person is 18+" service, and return the token and unblinded signature to the website. I think that can be made to work but if the site and DMV cooperated they would likely be able to unmask many anonymous site users by comparing timing.

Getting the DMV out of the picture once your device is set up with the credential from them nicely eliminates that problem.

replies(1): >>Matteo+wO
◧◩
24. nixpul+aD[view] [source] [discussion] 2025-07-04 02:35:57
>>abhv+g1
Would something like this be considered a ZK proof? https://crypto.stackexchange.com/questions/96232/zkp-prove-t...
replies(1): >>Matteo+JU
◧◩◪◨⬒⬓⬔⧯▣
25. AgentM+uL[view] [source] [discussion] 2025-07-04 04:47:41
>>coldpi+19
Anyone can implement passkeys. The feature where passkeys can be made to attest to the hardware provider is optional and no site I've used requires it. Firefox defaults to not allowing passkeys to attest to the hardware unless you click through a permission dialog.
replies(1): >>coldpi+Xr1
◧◩◪◨⬒
26. Matteo+wO[view] [source] [discussion] 2025-07-04 05:31:08
>>tzs+yv
You are correct. The property that the colluding website and DMV still cannot identify you is called "unlinkability" and as far as I can tell cannot be achieved without zero-knowledge proofs. See https://github.com/user-attachments/files/15904122/cryptogra... for a discussion on this issue.

However, the timing attack resurfaces once you allow the DMV to revoke credentials. Exactly how the revocation is done matters. We are actively pushing back against solutions that require the DMV to be contacted to verify that the credential has not been revoked at presentation time, but this is a very nuanced discussion with inevitable tradeoffs between privacy and security.

replies(2): >>hobofa+DY >>coldpi+iq1
◧◩◪◨⬒⬓⬔
27. Matteo+QS[view] [source] [discussion] 2025-07-04 06:24:05
>>coldpi+D5
See https://github.com/eu-digital-identity-wallet/eudi-doc-archi... for a reference to the nuances on all these topics, at least in the context of the European Union. Other locales have different problems and different solutions.

If you think you have a better idea shoot me an email.

replies(1): >>coldpi+Sp1
◧◩◪
28. Matteo+JU[view] [source] [discussion] 2025-07-04 06:47:08
>>nixpul+aD
No. ZK has a technical definition I don't want to get into, but note that the described system is deterministic and it always produces the same proof for Alice on a given day, and the proof for a later day can be derived from the proof for an earlier day. So two proofs can be linked back to Alice, and thus the system is not ZK. You need some kind of randomness for ZK.
replies(1): >>nixpul+OY1
◧◩◪◨⬒⬓
29. hobofa+DY[view] [source] [discussion] 2025-07-04 07:25:44
>>Matteo+wO
One part that I don't understand yet: How does the system ensure "sybil resistance"? (not sure if that's the right term in that context)

By providing both attestation of individual attributes combined with "unlikability", how would even a single verifying party ensure that different attestations don't come from the same identity?

E.g. In the case of age attestation a single willing dissenting identity could set up a system to mint attestations for anyone without it being traceable back to them, right? Similar to how a single of-age person could purchase beer for all their under age friends (+ without any feat of repercussions.

replies(1): >>Matteo+L21
◧◩◪◨⬒⬓⬔
30. Matteo+L21[view] [source] [discussion] 2025-07-04 08:03:53
>>hobofa+DY
Great question. The current thinking, at least in high level-of-assurance situations, is this. The identity document is only usable in cooperation with a hardware security element. The relying party picks a random nonce and sends it to the device. The device signs the nonce using the SE, and either sends the signature back to the relying party (in the non-ZKP case), or produces a ZKP that the signature is correct. The SE requires some kind of biometric authentication to work, e.g. fingerprint. So you cannot set up a bot that mints attestations. (All this has nothing to do with ZKP and would work the same way without ZKP.)

In general there is a tradeoff between security and privacy, and different use cases will need to choose where they want to be on this spectrum. Our ZKP library at least makes the privacy end possible.

replies(1): >>hobofa+j61
◧◩◪◨⬒⬓⬔⧯
31. hobofa+j61[view] [source] [discussion] 2025-07-04 08:39:35
>>Matteo+L21
Okay, yeah that's what I assumed.

That seems a bit like a game of whack-a-mole where as long as the forging side is willing to go further and further into out-of-hardware emulation (e.g. prosthetic finger on a robot hand to trick fingerprint scanners), they are bound to win. Biometrics don't feel like they hold up much if you can have collusion without fear of accountability.

> Our ZKP library at least makes the privacy end possible.

Yes, that's also one of the main things that make me excited about it. I've been following the space for quite some time now, and I'm happy that it becomes more tractable for standard cryptographic primitives and thus a lot more use-cases.

Thanks for your contributions to the space and being so responsive in this thread!

◧◩◪◨⬒⬓⬔⧯
32. coldpi+Sp1[view] [source] [discussion] 2025-07-04 11:49:57
>>Matteo+QS
The document states:

> Controlled by users: The EU Digital Identity Wallets will enable people to choose and keep track of their identity, data and certificates which they share with third parties. Anything which is not necessary to share will not be shared.

I think where the ZKP stuff being discussed here fails to meet this criteria is the wallet provider is also a third (non-user) party. You stated elsewhere that a malicious wallet could leak data about a transaction: that's exactly the vulnerability that is not being accounted for by this protocol.

> If you think you have a better idea shoot me an email.

Sure, will do. It does seem to me like a solvable problem. I think this kind of tech is really important and I'd love to see this hole get closed so I can feel better about supporting it.

replies(1): >>coldpi+cb2
◧◩◪◨⬒⬓
33. coldpi+iq1[view] [source] [discussion] 2025-07-04 11:53:44
>>Matteo+wO
>> The DMV gets no information about what websites I use the DMV credential with and they get no information about when I use the credential even if the website and the DMV decide to cooperate?

> You are correct. The property that the colluding website and DMV still cannot identify you is called "unlinkability" and as far as I can tell cannot be achieved without zero-knowledge proofs.

Well, no. This is true only if you trust the unverifiable wallet software on your phone, which was provided by a for-profit, American big tech advertising company. In this protocol, the wallet may secretly leak the transaction details back to the DMV or whoever else they wish[1].

[1] "Yes, a malicious wallet could leak your information." >>44458549

replies(1): >>tzs+h52
◧◩◪◨⬒⬓⬔⧯▣▦
34. coldpi+Xr1[view] [source] [discussion] 2025-07-04 12:11:04
>>AgentM+uL
I don't want to get into a Passkey derail, but no. The Passkey spec requires clients to handle the user's own data in certain ways, and the Passkey spec authors threaten clients that allow users to manage their own data with client bans.
◧◩◪◨
35. nixpul+OY1[view] [source] [discussion] 2025-07-04 16:29:07
>>Matteo+JU
Makes sense.
◧◩◪◨⬒⬓⬔
36. tzs+h52[view] [source] [discussion] 2025-07-04 17:17:20
>>coldpi+iq1
MatteoFrigo is suggesting that unlinkability requires ZKPs.

Your observation that a bad wallet could compromise unlinkability is not a refutation of that. To refute it you need to show that it is possible to achieve unlinkability without using a ZKP.

◧◩◪◨⬒⬓⬔⧯▣
37. coldpi+cb2[view] [source] [discussion] 2025-07-04 18:05:14
>>coldpi+Sp1
Update: After some email discussion with Matteo, it looks like my fears are unfounded. The EU regulations seem to require wallets to be open source[1]. Assuming that wallets do not need to pass any sensitive transaction data down to the OS libraries, then it should be possible for users to verify the behavior of their wallet software by examining the source and possibly even by building & deploying it themselves.

[1] See section 33 here https://www.european-digital-identity-regulation.com/Preambl...

[go to top]