ArmandoCruz/ZeroKnowledgeProofs

(0.0.3) current version: 1.1.0 »

Implementation of Zero Knowledge proof interactive and non-interactive protocols

Contributed By: Armando Benjamín Cruz Hinojosa

This project implements interactive and non interactive zero knowledge proof protocols based on current Wolfram’s cryptography framework. Zero knowledge proofs are communication protocols by which one person called the Prover can convince another person called Verifier that it posses a solution to a given public problem without revealing the content of the solution. This project implements two main applications of zero knowledge proofs; online zero knowledge authentication that provides protection against “man in the middle” impersonation attacks; and the most impressive, a Verifier can be convinced that a computation was executed correctly without executing it and without knowing what was executed.

Installation Instructions

To install this paclet in your Wolfram Language environment, evaluate this code:
PacletInstall["ArmandoCruz/ZeroKnowledgeProofs"]

Examples

Basic Examples (5) 

Generate private solution and public problem:

In[1]:=
zkProof = GenerateZeroKnowledgeProof["Isomorphism"]
Out[1]=

Generate an interactive prover with the private solution that will take 5 rounds:

In[2]:=
prover = GenerateZeroKnowledgeProver[zkProof["ZeroKnowledgePrivateSolution"], 5]
Out[2]=

Generate a query to the prover's public witness:

In[3]:=
query = GenerateZeroKnowledgeQuery[
  prover["ZeroKnowledgePublicWitness"]]
Out[3]=

Respond to the query with the prover's oracle:

In[4]:=
response = GenerateZeroKnowledgeResponse[prover["ZeroKnowledgePrivateOracle"], query]
Out[4]=

Verify the proof:

In[5]:=
VerifyZeroKnowledgeProof[zkProof["ZeroKnowledgePublicProblem"], prover["ZeroKnowledgePublicWitness"], query, response]
Out[5]=

Scope


Publisher

ArmandoCruz

Compatibility

Wolfram Language Version 13.

Version History

  • 1.1.0 – 28 February 2024
  • 1.0.1 – 18 February 2024
  • 1.0.0 – 18 February 2024
  • 0.0.4 – 30 April 2023
  • 0.0.3 – 20 July 2022
  • 0.0.2 – 20 July 2022
  • 0.0.1 – 18 July 2022

License Information

MIT License

Paclet Source