Side channel silent karatsuba / mpn_addmul_2 karatsuba

Marco Bodrato bodrato at mail.dm.unipi.it
Thu Dec 13 22:52:30 UTC 2018


Ciao,

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:
https://gmplib.org/list-archives/gmp-devel/2016-December/004502.html

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,
right?

Ĝis,
m

-- 
http://bodrato.it/



More information about the gmp-devel mailing list