Re: Modulo exponentiation 2 bits at a time.



fabrice.gautier@xxxxxxxxx writes:
Hi,

I'm looking for reference on a modulo exponentiation algorithm that
use 2 bits of the exponent at each loop instead of the simplest
algorithm that just use 1 bit for each loop.

To make things clearer , calculating q=c^e (mod m)

The loop in the simplest algo is something like:
{
q=q*q (mod m);
if (e[i]) q=q*c (mod m);
}


The other algo loop is something like

{

q=q*q;
q=q*q;
if(e[i]|e[i+1])
{

q=q*C[e[i], e[i+1]] ;

}

}

where C's 4 elements are precalculated.

Add 'window' to your google search.
If your search doesn't find /HAC/, then repeat until it does.

Phil
--
"Home taping is killing big business profits. We left this side blank
so you can help." -- Dead Kennedys, written upon the B-side of tapes of
/In God We Trust, Inc./.
.



Relevant Pages

  • Re: Newbie question about tuples and list comprehensions
    ... I second Matt's comment about using a boring old for loop when ... it is the simplest way to express what you want to do. ... only obfuscate. ...
    (comp.lang.python)
  • Re: Threading, Loops, and Direct3D
    ... I appologise for the vagueness of the last, post, but my code is very ... complicated and by the time I'd gotten around to producing the simplest ... Moving it to a higher context (out of the while loop) fixed it. ...
    (microsoft.public.dotnet.languages.csharp)
  • Modulo exponentiation 2 bits at a time.
    ... I'm looking for reference on a modulo exponentiation algorithm that ... algorithm that just use 1 bit for each loop. ... The loop in the simplest algo is something like: ...
    (sci.math)
  • Re: Numeric one-way hash function
    ... >> The simplest way to ensure that the bar codes are ... > don't understand your algorithm. ... end loop ...
    (sci.crypt)
  • Re: question about tasks, multithreading and multi-cpu machines
    ... Maciej Sobczak wrote: ... the simplest case you do this: ... for I in Vector'Range loop ... "The time has come to act, and act fast. ...
    (comp.lang.ada)