Side channel silent karatsuba / mpn_addmul_2 karatsuba

Marco Bodrato bodrato at
Thu Dec 13 22:52:30 UTC 2018


Il Gio, 13 Dicembre 2018 8:36 pm, Marco Bodrato ha scritto:
> Il Gio, 13 Dicembre 2018 1:07 pm, Torbjörn Granlund ha scritto:
>> I am still playing in C with longlong.h, but I will likely try creating

> Sometimes in the past we also played with an almost-branch-free C-only
> umul_ppmm using karatsuba... but I don't remember when...

Found it:

It used -1, and has an if (in the "Next message (by thread)", Niels
suggested how to remove it). Funny code :-)

Do you think that something alike could be translated to asm and be of
some use on any arch? But that naive code used the half x half -> full
register multiplication, you would use the reg x reg -> double-reg one,



More information about the gmp-devel mailing list