RSA encryption is typically “public key encrypts → private key decrypts”. Core idea:
- If I have your public key, I can encrypt a message for you
- Only you (with the private key) can decrypt it
RSA is not efficient for large data. It’s commonly used to encrypt small pieces of data like symmetric keys, not entire files. Try it (demo):
- Copy the public key from key generation
- Enter a short message (example: “Meet me at 5PM”)
- Encrypt using the public key
- You get ciphertext