From: Ostap Bender on 4 Jun 2010 20:23 On Jun 4, 8:32 am, recoder <kurtulmeh...(a)gmail.com> wrote: > Dear All, > I have to write a program to compute: > 2^q mod(p) and > 2^(q-3) mod (p) where q and p are very large primes. > I plan to use the "power-mod" algorithm to compute the 2 expressions seperately. > Is there a way to compute > 2^q mod(p) and derive 2^(q-3) mod (p) or vice versa ??? Yes. Compute 2^(q-3) and then multiply it by 8 mod(p) to get 2^q mod(p). Is this homework for your high school math class?
First
|
Prev
|
Pages: 1 2 Prev: does this f(x,y) have to be a polynomial function of x and y? Next: Tough queueing question |