]> git.codecow.com Git - Monocypher.git/commit
Removed divison operations
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 10 Feb 2018 19:16:22 +0000 (20:16 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 10 Feb 2018 19:16:22 +0000 (20:16 +0100)
commit976e1baec37696d987c0537c40dbbfa542e831aa
tree63037565637d12e0f7fa5db81cce49a753148869
parent29f9557a53c686c400c676f2bc4654cebb06fdb7
Removed divison operations

This has no effect on most platform with most modern compiler, and makes
the code slightly less readable to boot.

But.

Some compilers may fail to transform divisions by a power of two into
the relevant shift or mask.  Moreover, some platforms sport a variable
time division operation.

In the name of safety against timing attacks, those operation have been
removed explicitly.  Only one remains, in Argon2i, but its operands are
not secret.
src/monocypher.c