]> git.codecow.com Git - Monocypher.git/commit
All field element constants have the proper invariants
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 4 Aug 2018 13:30:54 +0000 (15:30 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 4 Aug 2018 13:30:54 +0000 (15:30 +0200)
commitd0933a5e495b74dae8f23ff5dbaed1780ca878e2
treecf8edd1f159310dbf25fbef94db4e448f5644b80
parent89092b3df89d9a646aea7e75c529fdf0f04e0be1
All field element constants have the proper invariants

A number of pre-computed constant didn't follow the ideal invariants set
forth by the carry propagation logic.  This increased the risk of limb
overflow.

Now all such constants are generated with fe_frombytes(), which
guarantees they can withstand the same number of additions and
subtraction before needing carry propagation. This reduces the risks,
and simplifies the analysis of code using field arithmetic.
src/monocypher.c