Key generation Algorithm... First, Prime Numbers P & Q are selected by you've written random numbers.
P = 13
Q = 17
N = P * Q = 221
PI(N) = (P-1) * (Q-1) = 192
E = GCD(PI(N),E) = 1 ;1
D = E-1 mod PI(N)
Scenario... Now, you can give your pair of public key, KU={E and N}, to your friends. so that, friend can send you encrypted Message by using those public key. Later, you can decrypt it, using Private Key, KR={D and N}.
RSA Cryptographic Algorithm Simulate Center with JavaScript.