Side-channel silent modular inverse

Torbjorn Granlund tg at gmplib.org
Fri Dec 27 20:15:01 UTC 2013


nisse at lysator.liu.se (Niels Möller) writes:

  > Create zero vector, invoke mpn_sub_n.
  
  That doesn't make it conditional. And I see no obvious way to do
  conditional negation on top of mpn_cnd_sub_n.
  
Oops.

Compute T = 2 x A using mpn_add_n or mpn_lshift.
Use mpn_cnd_sub_n with A, T as arguments.

Torbjörn


More information about the gmp-devel mailing list