Photo by Mathieu Stern on Unsplash

How Does Peggy Prove To Victor The Banker That Her Salary is between $30K and $100K Without Revealing It?

--

There are many things in life ask if we have something that is in a certain range, such as for our age, our salary or even our weight. But when we answer the question we often have to give away the actual value. So how can we take our value, and show someone that the range is in a certain range? Well for this we can use range proofs.

So let’s say that Victor wants Peggy to prove that her salary is between $30K and $100K. We will now use the Damgard Fukisaki method to prove that Peggy’s salary is in a given range [here]:

First Victor and Peggy agree on two bases for their calculations (g and h) and a prime number (n). Victor then sends Peggy using a random number (r) as a challenge. Every positive value can be represented in the form:

For example:

Peggy now creates four commitments from these four values and takes four random numbers (r0, r1, r2 and r3).

--

--

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.