The MAD (multiply-add-divide) method computes hash as follows for some value x, h(x) = ((ax + b) mod p) mod N where a and
x
h(x) = ((ax + b) mod p) mod N
a