Rivest-Shamir - Adleman - Rsa: - Made by Sahil Bhatiya
Rivest-Shamir - Adleman - Rsa: - Made by Sahil Bhatiya
Shamir-
Adleman
- RSA
Output :
encrypted message = rIXS13MTfDoRJvwaopvIfB8LD79PrkwaIkRUZfmujdopPV3cc5EJy6X/qvkxCN16hTy3Yxn/Nf/kcfqIoOOXk8yL/
String publicKeyString =
k3Vbe6Lx5osUy/5cCV18x56M4zV2h8DGqieXPE+XLhYjEjToC5IZJ8W8xtOS/
9ub9tQRIO9vWdXzbE0GhEGIjif4+MHXeYQjzH9V4sVMi02Rio13xPa8uUjUWktPaZi1SAeKWLb9AeTpa/
Base64.getEncoder().encodeToString(publicKey.getEncoded());
z+etW0mEv12cZSAzY1vKmHyBLi8eE/
System.out.println("public key = "+ publicKeyString);
fDPSBbZOtaATSWnxxX7B3Z43CVp2SEdTGVP59GX8+vC4bakVuUVP9z0a8GlNn5xlc6Q3zY3odMpMW2y+w==
PrivateKeydecrypted
privateKey = pair.getPrivate();
message = This is IT department
String privateKeyString =
Base64.getEncoder().encodeToString(privateKey.getEncoded());
System.out.println("private key = "+ privateKeyString);
How is RSA secure? • Notes :
RSA security relies on the computational difficulty of factoring large • Encryption : message ^ E % N = Cipher
Text
integers. As computing power increases and more efficient factoring
• Decryption : Cipher Text ^ D % N =
algorithms are discovered, the ability to factor larger and larger numbers Message
also increases.
The result of RSA encryption is a huge batch of mumbo jumbo that takes
• Or
attackers a lot of time and processing power to break.
Real life examples: online transactions, such as online shopping and banking.
• Encryption : message ^ D % N = Cipher
Digital signatures etc Text
• Decryption : Cipher Text ^ E % N =
Message
Thank You