HarryR / ethsnarks

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop
GNU Lesser General Public License v3.0
240 stars 57 forks source link

comparison checks on binary #64

Closed barryWhiteHat closed 5 years ago

barryWhiteHat commented 5 years ago

Take 2 vector of bits (a and b) and confim that vector a > b

This can be done two ways

  1. with binary comparisons
  2. with safe add where b + c == a since we cannot overflow we know that there is not other way to add to b and get a unless a > b.