Re: Small-base modexp

2019-10-02 Thread Marco Bodrato
Ciao, Il Mer, 2 Ottobre 2019 3:29 pm, Torbjörn Granlund ha scritto: > "Marco Bodrato" writes: > I wrote the doubling-modulo step with 3 possible operations: >if it can not overflow, simply lshift; >otherwise choose between (x*2-m) and ((x-m)*2) > > Do you choose that at each step?

Re: Small-base modexp

2019-10-02 Thread Torbjörn Granlund
"Marco Bodrato" writes: I tried... the attempt is attached. I wrote the doubling-modulo step with 3 possible operations: if it can not overflow, simply lshift; otherwise choose between (x*2-m) and ((x-m)*2) Do you choose that at each step? That might be a cause for delay due to