In this post, as it is the first post of my new blog, I want to talk about RSA encryption method …
RSA named after Ron Rivest, Adi Shamir and Len Adleman initials in 1997. RSA method is an asymmetric encryption method which means it use twi different keys, one key to share in public for encryption and one secret key for decrypting that …
RSA provide very good level of security, PGP (Pretty Good Privacy) application based on this encryption algorithm and it can simply implemented in your applications …
maybe later, I write a code for you …
.
.
.
And now, How it works?
I hate this part of all encryption methods due to all mathematical relations and such stuff! but I’ll try to explain it as simple as I can,
1. the first step is to find two different random extremely large PRIME numbers … we will call them p and q.
-(the security of the encryption is directly depends on this, in average each of them should have 200 digits! Its good to know that some applications use 1000 digit numbers!!) …
Lets say we have m and n which:
n=p*q & m= (p-1) (q-1)
2. based on these numbers we need to find e and d , how ? its simple:
2.1. to find e , you need to find it in such a way that GCD (e, m) = 1 …
(for sure you know that GCD is Greatest Common Divisor)
2.2. to find d, (d*e) mod m=1 should be correct. very simple!!
- Until now you have private key and public key … the combination of (n, e) is the public key and the the pair of (n, d) make the private key.
Ok, then how to encrypt or decrypt messages?
If P=plain text (readable text) and C=Cipher text (unreadable text), then encryption can be done by C= (P^e) mod n
and then use P= (C^d) mod n to decrypt the C.
DONE!
.
.
.
These post tried to be useful for non-technical readers … If you are interested in more-in-deep descriptions you can find some here:
https://www.woodmann.com/crackz/Tutorials/Rsa.htm



