Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identical condition #559

Open
maddin200 opened this issue Jan 29, 2021 · 3 comments
Open

Identical condition #559

maddin200 opened this issue Jan 29, 2021 · 3 comments

Comments

@maddin200
Copy link

/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;
}
}

@jamuir
Copy link
Contributor

jamuir commented Feb 21, 2021

That does indeed appear to be a redundant check.

Would you be able to open a PR with a fix?

@maddin200
Copy link
Author

not so familiar with the code

@sjaeckel
Copy link
Member

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants