Message Boards Message Boards

[WSS22] Implementation of Interactive Zero Knowledge proofs paclet​

2 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team

Hey there, I really @Armando Benjamín Cruz Hinojosa I like this, although I think we need more pie charts and word clouds and need to really show how to install the paclet, which really just means that all we need to do is have the file and install it. Actually, we can use the PacletInstall function to install the paclet and the rest is history.

zkProofHC = GenerateZeroKnowledgeProof["HamiltonianCycle"];
publicProblemHC = zkProofHC["ZeroKnowledgePublicProblem"];
privateSolutionHC = zkProofHC["ZeroKnowledgePrivateSolution"];
  Graph[privateSolutionHC["PrivateSolution"], VertexLabels -> "Name", 
   GraphLayout -> "CircularEmbedding"]}]
proverHC = GenerateZeroKnowledgeProver[privateSolutionHC, 5];
cipherHC = proverHC["ZeroKnowledgePrivateCipher"];
witnessHC = proverHC["ZeroKnowledgePublicWitness"];
cipherGraphs = 
   Table[{Graph[cipherHC["PrivateCipherSolutions"][[i, "Cipher"]], 
      VertexLabels -> "Name", 
      GraphLayout -> "CircularEmbedding"]}, {i, 
solutionGraphs = 
    Table[{Graph[cipherHC["PrivateCipherSolutions"][[i, "Solution"]], 
       VertexLabels -> "Name", 
       GraphLayout -> "CircularEmbedding"]}, {i, 
queryHC = GenerateZeroKnowledgeQuery[witnessHC];
responseHC = GenerateZeroKnowledgeResponse[cipherHC, queryHC];
   Table[{Graph[responseHC["Responses"][[n]], VertexLabels -> "Name", 
      GraphLayout -> "CircularEmbedding"]}, {n, 5}]]];
VerifyZeroKnowledgeProof[publicProblemHC, witnessHC, queryHC, \
ConnectGraphs[n_] := 
 Module[{proverHC, cipherHC, witnessHC, graphList, combinedGraph, 
   newEdges, connectedGraph},
  proverHC = GenerateZeroKnowledgeProver[privateSolutionHC, n];
  cipherHC = proverHC["ZeroKnowledgePrivateCipher"];
  witnessHC = proverHC["ZeroKnowledgePublicWitness"];
  graphList = witnessHC["PublicCipherProblems"];
  combinedGraph = GraphUnion @@ graphList;
  newEdges = 
   Table[First[VertexList[graphList[[i]]]] \[UndirectedEdge] 
       graphList[[Mod[i + 1, Length[graphList], 1]]]]], {i, 
  connectedGraph = EdgeAdd[combinedGraph, newEdges];
  Graph[connectedGraph, VertexLabels -> "Name", 
   GraphLayout -> "CircularEmbedding"]]
TableForm[Transpose[Table[{ConnectGraphs[n]}, {n, 5}]]]

Then we are actually able to show how to use the ZeroKnowledgeProofs packlet in the Wolfram Language. That's for Isomorphism, HamiltonianCycle, and SAT "problems" that all get summed up.

Public Problem Private Solution

Wouldn't it be cool to solve the Boolean Satisfiability Problem, this is within the ArmandoCruz/ZeroKnowledgeProofs that makes it possible to solve public problems with private solutions and then verify them? The secret, hidden Hamiltonian Cycles in the Graph can be created and displayed.


Emphasize the graph structure side by side and use witnesses in the proof path, and then get some response for showing that we proved the visual queries, that is True, and the next is True. This really made my day I enjoyed every proof in here.

Verify Zero Knowledge Proof

We know that the computations are being executed correctly without actually executing them!

Connected Graphs

There's no man in the middle there's just knowledge that there's a solution, and yeah there's the NP-complete 3SAT and Quadratic Span Problem compilers and @Armando Benjamín Cruz Hinojosa it's the interactivity of your proof protocols and the smaller witness sizes and shorter verification times and the generation of computationally hard problems & solutions, they have significant implications for non-interactive, privacy in decentralized technology.

POSTED BY: Dean Gladish
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract