Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in Poly1305 bigval_final_reduce().
Mark Wooding pointed out that my comment in make1305.py was completely wrong, and that the stated strategy for reducing a value mod 2^130-5 would not in fact completely reduce all inputs in the range - for the most obvious reason, namely that the numbers between 2^130-5 and 2^130 would never have anything subtracted at all. Implemented a replacement strategy which my tests suggest will do the right thing for all numbers in the expected range that are anywhere near an integer multiple of the modulus.
- Loading branch information
Showing
2 changed files
with
117 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters