RSA is an asymmetric cryptosystem with two jobs: encrypting messages with a public key and creating digital signatures with a private key. Anyone can encrypt to the key owner, while others can verify a signature using the public key, message, and signature. section 1.4.2 section 1.4.3
A practical RSA exchange separates the roles of its keys:
- Publish the public key and keep the private key secret. section 1.4.2
- Encrypt a message with the recipient’s public key; decrypt it with the associated private key. section 1.4.2
- Sign a message with the private key; verify it with the public key, the signed message, and the signature. section 1.4.3
- Encapsulate a generated symmetric key with RSA, allowing the recipient to recover a shared secret. section 6.2.1
From message to ciphertext
Textbook RSA treats a message as a number. Encryption raises it to a public exponent e modulo a public modulus N = p × q; decryption raises the ciphertext to a private exponent d modulo N. For m = 2, e = 2, and modulus 5, the illustrative ciphertext is 2² mod 5 = 4. The concept is simple, but naive textbook implementations are insecure, and even standardized schemes have suffered breaks. section 6.3.1



