2

So I want to create a zero-knowledge proving system for numbers (think loans and bank accounts, I want to prove my paycheck is more than x dollars per month).

I was thinking about using a zero-knowledge proof for the preimage of a hash. So let's say my employer hashes my paycheck in such a way (e.g. using merkle trees) that my net received is hashed individually. I can use a preimage proof to prove I know the preimage of the hash, but that does not get me anywhere. I want to prove the preimage of the hash is bigger than some set amount.

But that also is not very useful as I don't want to disclose the hash of my paycheck, because it's not difficult to hash all possible amounts (let's say 500.00-5000.00, that's only 450k options) and check if it's equal.

So what I thought about doing is append a random string to the amount, and hash that. Is there a way I can prove that a hash of a string containing a number is bigger than some amount? Or am I thinking about this the wrong way?

vrwim
  • 468
  • 4
  • 7
  • Have you looked into range proofs: https://arxiv.org/abs/1907.06381? – Sam Jaques Jan 20 '22 at 16:02
  • My answer here https://crypto.stackexchange.com/questions/96232/zkp-prove-that-18-while-hiding-age/97836#97836 shows how to use a Pedersen Commitment instead of a hash, and how to create a Schnorr-ring-signature-based range proof that proves the commitment is greater than or equal to a certain value – knaccc Jan 20 '22 at 17:30

0 Answers0