I noticed a small difference with the repos micro-ecc and easy-ecc. I had to modify myself this line of code (line 1338) in order to make the verify function work fine:
/* Calculate u1 and u2. */
vli_modInv(z, s, curve_n); /* Z = s^-1 */
ecc_bytes2native(u1, p_hash); //modification taken from easy-ecc
vli_modMult(u1, u1, z, curve_n); /* u1 = e/s */
vli_modMult(u2, r, z, curve_n); /* u2 = r/s */
I am not sure if the modification was left out on purpose but I leave it here in case anyone faces the same problem.
I noticed a small difference with the repos micro-ecc and easy-ecc. I had to modify myself this line of code (line 1338) in order to make the verify function work fine:
/* Calculate u1 and u2. */vli_modInv(z, s, curve_n); /* Z = s^-1 */ecc_bytes2native(u1, p_hash); //modification taken from easy-eccvli_modMult(u1, u1, z, curve_n); /* u1 = e/s */vli_modMult(u2, r, z, curve_n); /* u2 = r/s */I am not sure if the modification was left out on purpose but I leave it here in case anyone faces the same problem.