Re: Side-channel silent division

2012-11-14 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: ni...@lysator.liu.se (Niels Möller) writes: If we can arrange for a loop which does a full quotent limb, and applies it using mpn_submul_1 followed by an mpn_add_cnd_n per quotient3B, would that be faster or otherwise preferable to your loop

Re: Side-channel silent division

2012-11-14 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I was been thinking of the following algorithm (I think I wrote about the mod variant a while ago). Say we want to divide by an n-limb number D, and for simplicity, assume that D is normalised. First precompute the inverse v =