Equality.circom

pragma circom 2.1.4;

// Input 3 values using 'a'(array of length 3) and check if they all are equal.
// Return using signal 'c'.

template Equality() {
   // Your Code Here..   
}

component main = Equality();

Answer

a,b,c could be equidistant
   a----b----c

such tt b - a == c - b, when a !+ b != c

therefore, cannot do the following:
   isZero <== (a -b -c)
 
 will result in false positive.

cannot do a + b == 2c, since a,b,c could be distinct but honor the equality
E.g.
   a + b == 2c          (mod 7)
   3 + 4 == 2(4)
       8 == 8           (mod 7)
  • out = 1, if equal

Last updated