]> git.codecow.com Git - Monocypher.git/commit
Simplified crypto_x25519_dirty_small() a tiny bit
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 22 May 2021 13:46:44 +0000 (15:46 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 22 May 2021 13:54:38 +0000 (15:54 +0200)
commit9c3b859fb59b096bde8dd8b70f758f6fc815dd44
treeedc45e88a8fd1bb168b7578dd591dcff161843d9
parent719859dbaccf82191bb7f66bb61dd8428faa15fc
Simplified crypto_x25519_dirty_small() a tiny bit

To give the same results as crypto_x25519_dirty_fast(), we originally
multiplied the cofactor by 5 before we multiplied it by L. I noticed
however that this multiplication by 5 could be baked in the base point
itself, and simplifies the computation a little bit.

This also saves a single MUL instruction.
src/monocypher.c
tests/gen/elligator_scalarmult.py