Zero Knowledge ID Solutions

Hi Algoranders. Im researching Zero Knowledge Proofs in relation to a project im involved in and wonder if anyone here can give me some advice/links that may help me on my quest to learn more about this specific area. I’m designing and project managing an app build (im not a software engineer) and interested in a solution that allows users to verify each other in things like age, location, personal liability insurance and credentials relating to experience/skill level whilst remaining anonymous/maintaining privacy (or at least to the point of not actually sharing ID/Passport etc etc). I understand (from a high level) the underlying ZKP cryptography at work here that is fundamental to the Algorand protocol. So my question is really - how can this be implemented in say a dAPP built on Algorand, how can this ZKP be reflected at the use case layer?? Is there any Algo partners who provide a 3rd party ‘plug in/api’ type of service currently? Any advice, pointers massively appreciated!

1 Like

Welcome @sic to Algorand!

It depends a lot on the application you want to do.
My understanding is that you want to use anonymous credentials.
How are you considering the blockchain?

There are many different ways to do so.
Here is one way for example:

You create a special frozen asset (ASA) that you send to people that should receive certificate over which anonymous credentials work, and include the certificate in the note field of the ASA transfer.
Then a user can prove that they own a specific address with a certificate proving they are over 18.

The way you do the above is completely using traditional cryptography (I mean by that, zero-knowledge, encryption, signature, … as opposed to blockchain), and is unrelated to blockchain. That is, the blockchain stores data for transparency of issuance of certificate (and potentially to prove ownership of accounts - but again, it’s just traditional cryptography, not blockchain technology we are talking about).

If you are familiar with ZK, one way to do the above is the following:
a certificate is a commitment (e.g., hash with randomness) of the list of attributes of the users, like: age || height || name || …
Then you can using a ZK proof to show that the certificate sent to address XXX contains age = 18.

You can also sign the ZK proof with the secret key of the account if you want to tie the proof to the accounts.

(Disclaimer: I’ve not reviewed carefully the above so it may be insecure. In general, for such complex systems, you need to either use an already published system or have a cryptographer design the system for you.)

The above is just one example of how to do things. Each application would need a different design.

Note that there is one thing you cannot currently do on Algorand (but maybe you will be able to do in the future): you cannot have smart contracts check validity of anonymous credentials. I think that in most cases, this is not an issue, as I guess you usually want to use anonymous credentials to prove something to an actor outside of the blockchain (for which you don’t need smart contract verification).

Much appreciated @fabrice :slight_smile: :+1: :+1: