]> git.codecow.com Git - Monocypher.git/commit
Signed comb with unsigned table
authorLoup Vaillant <loup@loup-vaillant.fr>
Wed, 8 Aug 2018 21:24:25 +0000 (23:24 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Wed, 8 Aug 2018 21:24:25 +0000 (23:24 +0200)
commit6e90a13f10c93923af8c62fe3a57f9daf8c6ecff
tree06c42f52094f3772b34bb1852745b33f7ae53f6c
parent05bf6946f07c5b0d34b9556d2c05da233ee2b4cb
Signed comb with unsigned table

Or, bitwiseshiftleft saves the day.  The current code is hacky as hell,
but it works, and it cleared up my confusion.  Turns out a suitable
signed comb is quite different from an unsigned one: the table itself
should represent -1 and 1 bits, instead of 0 and 1 bits.

Right now the same effect is achieved with 2 additions (more precisely,
an addition and a subtraction).  With the proper table, it can be one
operation.
src/monocypher.c