]> git.codecow.com Git - Monocypher.git/commit
Faster reduction modulo L
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 29 Nov 2020 20:27:25 +0000 (21:27 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 29 Nov 2020 20:41:44 +0000 (21:41 +0100)
commitfb0f4df38cb7ee029f8feacd2971173458d9ffcd
tree7df889a86b099b625e75449de9737ceb0542d639
parentb96955cb926e527bd4b065572498b1c489386ab9
Faster reduction modulo L

Replaced TweetNaCl's code by Barrett reduction.

- mod_l(), reduce(), and mul_add() use less stack.
- mod_l(), reduce(), and mul_add() are now much faster.
- Signature generation is noticeably faster (~7% on my Skylake laptop).
- Now I understand all the code. No more black boxes.

The change cost a total of 8 lines of code.
AUTHORS.md
CHANGELOG.md
src/monocypher.c