Closed obatirou closed 9 months ago
oh my, you look totally right. this is really annoying cause i thought that edge cases were totally covered by wychproof.
I will gladly integrate your PR
@rdubois-crypto Thank you for confirming this. Here is the PR ready for review https://github.com/rdubois-crypto/FreshCryptoLib/pull/20
In several places where EcAdd is replaced by EcDbl, the
TT1
variable is not used before re-assignation leading to unexpected behavior as inY := addmod(T2, mulmod(T1, Y, p), p)
T1 will be equal to U still hence the implementation will not follow the formulas if I am not mistaken.Current implementation
Proposed fix
Occurrences of this:
What are your thoughts on this ? I am working on a PR (branch here for now) and would love to be able to contribute.