Two Keys Instead of One
Asymmetric encryption uses a mathematically linked key pair: a public key anyone may know and a private key kept secret. Data encrypted with the public key can only be decrypted with the matching private key.
How RSA Works
RSA relies on the difficulty of factoring very large numbers. You build a public key from the product of two huge primes. Recovering the private key would require factoring that product, which is infeasible at large sizes.
- Encrypt with the recipient public key, so only they can read it.
- Sign with your private key, so anyone can verify it came from you.
The Cost
RSA is far slower than symmetric ciphers and the message must be smaller than the key. So in practice RSA is used to wrap a small symmetric key or to sign data, not to encrypt large payloads directly. Keys of 2048 or 3072 bits are common today.
Key idea
RSA is an asymmetric scheme built on the hardness of factoring large numbers, letting anyone encrypt with a public key while only the private key holder decrypts, and it is used to wrap keys or sign rather than encrypt bulk data.