libtomcrypt
libtomcrypt copied to clipboard
Identical condition
/src/math/fp/ltc_ecc_fp_mulmod.c line 1078 Code: if (zB && first == 0) { if (zB) { // <-- identical if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx2].LUT[zB], R, a, modulus, mp)) != CRYPT_OK) { return err; } }
That does indeed appear to be a redundant check.
Would you be able to open a PR with a fix?
not so familiar with the code
no worries, I already had a look at that finding because I was like "come on, this can't change anything in the generated code" ... aaaand I was wrong ... I played a bit around with it, but didn't come to a conclusion yet on how it should be written, resp. whether we should even touch it since #410 is still open and undecided...