Struggling to put a number through this as I keep getting my original number as the encrypted number too.(adsbygoogle = window.adsbygoogle || []).push({});

A = 11

p = 3 q = 5

n = pq = 15

z = (p-1)(q-1) = 2*4 = 8

k = co-prime of z = 7

So,

A=11

n=15

z=8 (Public key)

k=7(Public key)

kj = 1 (mod z)

7j = 1 (mod 8)

for which I am getting j = 9/7 (private key)

Start of encryption...

A^k = E (mod n)

11^7 = E (mod 15)

19487171/15 = 1299144.733......

1299144 * 15 = 19487160

E = 19487171 - 19487160 = 11 (which is what I started with)

Tried using the decrypting part anyway and got....

E^j = A (mod n)

11^(9/7) = A (mod 15)

21.8239547419283/15 = 1.45493031612855

1 * 15 = 15

21.8239547419283 - 15 = 6.8239547419283 (which obviously isnt what I started with)

Any help where I am going wrong would be appreciated, I assume it is where mod is brought in as I havent used that function before 2 hours ago but it may be somewhere else.

Cheers

james

**Physics Forums - The Fusion of Science and Community**

# RSA Algorithm Help

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: RSA Algorithm Help

Loading...

**Physics Forums - The Fusion of Science and Community**