Back to Learning

RSA

What is RSA?

RSA is based on public keys that encrypt the message by using functions/ methods and that cipher text will decrypt by private key.
The main idea is encrypting messages and decrypting without knowing otherside the operations makes is hardest to guess and trying.

RSA

The Functions and operations:

• First step
   - P and Q must be prime number

• The second step is determined N
   - N = p.q

• Third step is determined øn
   - Øn =(P-1)(Q-1)

• The fourth step is to select e
   - The e must be nubmer that makes results relative prime
   - e = GCD(i,øn)=1
   - e is the number that makes the i mod øn=1
     Which means e=i

• Next step Determined (d)
   - D=(i*øn+1)/e
   - The results must be integer
   - i is trying any number that makes the results equal to integer, and i must not equal it to e
     Now you know every element

• if you want encrypting, you can say :
    - M^e mod n =cipher text

• If you want decrypt:
    - C^d mod n= plain text, or you can refer as M

• Note M must be between e and p
    - p < M < e

Video for explanation