]> git.codecow.com Git - Monocypher.git/commit
Revert "Cleaner fe_frombytes() (loading field elements)"
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 4 Aug 2018 11:25:23 +0000 (13:25 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 4 Aug 2018 11:25:23 +0000 (13:25 +0200)
commit89092b3df89d9a646aea7e75c529fdf0f04e0be1
tree5d0143a7af03e0304adf92fa1916606176af111e
parent6ee8787e61b3918789eab0ab38ce176abc767abb
Revert "Cleaner fe_frombytes() (loading field elements)"

This reverts commit 6ee8787e61b3918789eab0ab38ce176abc767abb.

Turns out this commit was a huge blunder.  Carry propagation works by
minimising the absolute value of each limb.  The reverted patch did not
do that, resulting in limbs that were basically twice as big as they
should be.

While it could still work, this would at least reduce the margin for
error.  Better safe than sorry, and keep the more versatile loading
routine we had before.

Likewise, constants should minimise the absolute value of their limbs.
Failing to do so caused what was described in issue #107.
src/monocypher.c