Photo by Sharon McCutcheon on Unsplash

How Can Peggy Prove To Victor That She Has Enough Cryptocurrency To Pay Him, Without Revealing Her Transactions?

--

So how can Peggy prove to Victor that she has enough cryptocurrency to pay him, without revealing all her previous transactions? Well, we can use a range proof for that, and where we can sum up all Peggy’s incomings and outgoings, and then substract the amount he needs to pay Victor. If the value is positive, she has enough cryptocurrency to pay Victor, if it is negative, the transaction should be declined.

So all we want to prove that a value is positive. For this we will use the Damgard-Fujisaki method defined [here]. First Victor and Peggy agree on two bases for their calculations (g and h) and a prime number (n). Every positive value can be represented in the form:

For example:

51=1²+3²+4²+5²

1451 = 1² +9² +12² +35²

99999 = 1² +2² +313² +45²

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

And:

--

--

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.