Blockchain has been the new buzzword in recent years due to the advent of decentralized identity standards that provide a considerable edge over conventional standards in terms of transparency, privacy, and security. With blockchain, users can safeguard their privacy by providing only the minimal required information to establish their identities. Additionally, blockchain offers increased security over centralized identity standards, since the information stored in blocks is duplicated and distributed to all members in the network.
However, as blockchain in IAM and other spaces is gaining traction, it becomes necessary to introduce additional security standards and practices to prevent security breaches. Zero-knowledge proof (ZKP) is one such cryptographic technique that can help reinforce privacy and security in blockchain transactions.
ZKP is an encryption technique that can be used to verify the validity or authenticity of information without the prover having to reveal the actual information to the verifier. In terms of IAM, this negates the need for people to disclose information about themselves that they would rather keep private while also being able to authenticate themselves. A ZKP needs to satisfy the following three properties:
Completeness: This refers to the ability of the verifier to be convinced by the transaction statement provided by the prover and allow the prover to move ahead with the transaction.
Soundness: This refers to the ability of the verifier to determine whether the statement provided by the prover is true and cannot be falsified. The verifier cannot be made to believe otherwise, and the prover cannot move ahead with the transaction if the statement is found to be false.
Zero knowledge: This means that the verifier cannot possess or demand any information beyond the statement being true or false. No other private information can be exchanged between the verifier and the prover.
There are two basic types of zero-knowledge proofs.
A common example that is used to explain how ZKP works is that of a colorblind friend and two balls. Consider two friends, Alice and Bob: Alice is colorblind and Bob isn't. Bob needs to prove to Alice that he isn't colorblind and that the balls are, in fact, different colors. Alice has a red ball and a green ball in each hand, and shows them to Bob initially. She then switches the balls behind her back, shows them to Bob and asks him if the balls have been switched. Bob responds that the balls have been switched. If Bob were colorblind, then there's a 50% probability of him responding correctly. Alice repeats this activity multiple times until she's convinced that Bob isn't colorblind. Here, Bob is able to prove to Alice that he isn't colorblind without actually revealing any other information or the colors of the balls.
The Ali Baba's Cave example is another scenario that is commonly used to demonstrate how ZKP works. In this example, we take the same two friends, Alice and Bob, who are at a ring-shaped cave. The cave has paths on both the left and right with a door that connects both. However, this door can only be opened with a secret code. While Alice knows the code that opens the door, Bob doesn't. Alice has to prove to Bob that she knows the code without actually revealing it to him. Bob asks Alice to enter the cave through one side and exit through the other. Alice would only be able to do this if she knew the code, and could do it without actually revealing the code to Bob. Bob asks Alice to repeat this a certain number of times until he's convinced that she actually knows the secret code to open the door.
Zero-knowledge proof offers several advantages, such as enhanced security, privacy, and simplicity, which can help reinforce privacy and security in blockchain transactions. Since blockchain transaction details are available to all participants, there is a compromise in privacy and security. One of the ways in which ZKPs are used in blockchain is their application in a cryptocurrency.
Zero-knowledge succinct non-interactive argument of knowledge (zk-SNARK) is a type of ZKP used in Zcash. With the help of zk-SNARKs, users can verify their identities without divulging any personal data and without any interaction between the prover and the verifier. Other than through zk-SNARKs, ZKP can also be extended to blockchain in several other ways.
Most messaging applications require end-to-end encryption to maintain security in communication. This requires users to verify themselves using personal information. However, with the help of ZKPs, users need not reveal personal information for end-to-end encryption. This allows them to use messaging applications with enhanced privacy and security. Similarly, ZKP can also be used for authentication purposes, where the user proves their identity without actually divulging any personal data. Besides facilitating privacy, this will also help prevent data leaks, since information is not being exposed in the first place.
ZKPs can also be used for file access control and storage security, for which users are required to satisfy specific security conditions before being allowed to access the resources. This inhibits bad actors from accessing and manipulating sensitive data. Besides these, ZKP can also be integrated with private blockchain transactions to ensure privacy and security.