Your Gateway to Cryptographic Mastery
The RSA cipher was introduced in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT. Named after the initials of its inventors, RSA was a groundbreaking development in cryptography, providing a way to securely exchange information without needing a shared secret key. RSA's security relies on the complexity of factoring large composite numbers, which remains a computational challenge.
The RSA algorithm was one of the first practical implementations of public-key cryptography, following the theoretical work of Diffie and Hellman on public-key exchange. Its adoption has had a profound impact on modern secure communication, becoming a cornerstone of internet security protocols.
RSA operates on the principle of public-key cryptography, where two keys are used: a public key for encryption and a private key for decryption. The security of RSA is based on the mathematical challenge of factoring large numbers into their prime components.
Key Generation: Generate two large prime numbers, \( p \) and \( q \). Compute \( n = p \times q \), and calculate the totient \( \phi(n) = (p - 1) \times (q - 1) \). Choose a public exponent \( e \) such that \( 1 < e < \phi(n) \) and \( e \) is coprime with \( \phi(n) \). Compute the private exponent \( d \), which is the modular inverse of \( e \) modulo \( \phi(n) \).
Encryption Formula:
C = M^e \mod n
where \( M \) is the plaintext message converted to a number, and \( C \) is the resulting ciphertext.
Example:
C = 12^17 \mod 3233 = 2201
Decryption Formula:
M = C^d \mod n
where \( C \) is the ciphertext, \( d \) is the private exponent, and \( M \) is the decrypted plaintext message.
Example:
M = 2201^2753 \mod 3233 = 12