[noparse]rsa algorithm description:select p,q ; p,q must both be prime numbers calculate n=p*q calculte c(n)=(p-1)*(q-1) select integer e such that gcd(c(n),e)=1;1<e<c(n) calculate d ;d*e*modc(n)=1 public key ku={e,n} private key kr={d,n} encryption:plain text =m<n cipher text :c=M^e *(modn) decryption cipher text =c plain text : M=c^d*(modn ) EX:n=3*7=21 c(n)=(2)(6) e=gcd(12,5)=1 therefore e=5 d =5*5mod12=1 25mod12=1 therefore d=5 then continue with plain text and cipher text.hope its understandable[/noparse]