Question: The base &^ exponent mod modulus-Function

Hello again,

for a paper I need to cipher and decipher with the standard RSA-procedure.
My problem is, that my numbers are really large.

As normally it's just, given a public key (e,N) and a private key (d,p,q), p,q are primes, and the plaintext:

encrypt: b^e mod N = c

decrypt: c^d mod N = b

That works cause ed = 1 mod (p-1)(q-1) (Euler's Phi-Function) and gcd(e,N)=1

 

With little numbers thats no problem. But increasing e and N, i thought using the powmod function will help:

b&^e mod N = c but

c&^d mod N <> b.

So it doesnt work anymore and I really dont get why...

 

thanks for help, I'm really lost here..

Please Wait...