21 April 2025


RSA for Encryption and Signature

RSA

RSA is a cryptographic algorithm mainly used for two purposes.

Historically, HTTPS (TLS) used RSA for both key exchange and authentication. When you visit a website, server sends a digital certificate (often RSA-based) to prove its identity. Today, RSA is still used, but sometimes replaced by newer methods like ECDHE (Elliptic Curve Diffie-Hellman Ephemeral) for better security

Padding Schemes in RSA

Plain RSA encryption without padding is insecure. Padding adds randomness and structure to the message before encryption. It prevents attacks like replay attacks, chosen-plaintext attacks, and makes RSA safer. Padding in RSA = add randomness and structure to protect security

Padding is like adding a secret envelope around your letter before you seal and mail it — Without it, someone might guess what's inside just by the shape!

RSA Current Situation