RSa decrption encryption algorithm

justdoit1

Beta member
Messages
1
Hi,
Can anyone design an encryption decyption algorithm for rsa encrption in c or java language.The algorithm is as follows.

2.1 Algorithms and examples
Key generation
choose two primes, p and q −! p = 17 q = 11 (3)
generate the modulus, n −! n = p ·q = 17 ·11 = 187 (4)
generate r −! r = (p−1)(q−1) = 16 ·10 = 160 (5)
choose a prime as encryption key, (6)
e  r−1,gcd(r,n) = 1 −! e = 7
calculate d −! d = e−1mod r (7)
7−1mod 160 = 23
Encryption
letm = 88 (8)
c = me mod n −! 1237 mod 187 = 11 (9)
Decryption
givenc = 11 (10)
m = cd mod n −! 1123 mod 187 = 88 (11)


Can anyone do this program for me.plzzzzzzzz

thanks in advance.


looking for ur good reply.
 
Back
Top Bottom