Photo by ThisisEngineering RAEng on Unsplash

Proving You Know The Answer, Without Revealing It, Using Crypto Pairs and Kryptology

--

It is the dream of many teachers to mark a student’s work, without actually revealing the answer. Why? Because the minute the student writes the answer, it can be revealed to their other classmates, and thus be copied. So can we prove proof of a correct answer, without revealing it? Well, we can with zk-Snarks, and which uses pairing-based cryptography to perform its magic. In this case, I will keep things simple, and show how we can prove things without revealing the knowledge that we have — a Zero Knowledge Proof (ZKP).

Pairing-based cryptography

Before we start, let’s look at the magic that is pairing-based cryptography. With pair-based cryptography we have two cyclic groups (G1 and G2), and which are of an order of a prime number (n). A pairing on (G1,G2,GT) defines the function e:GG2→GT, and where g1 is a generator for G1 and g2 is a generator for G2. If U is a point on G1, and V is a point on G2, we have the following rules:

Proving something

In this case, we will use pairing crypto to prove that we know the value of x which solves x²+ax+b=0. For example, if we have x−42=0 has the solution of x=7 and x=−6 as (x−7)(x+6)=0.

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.