Cryptography and RSA Algorithm
Q. What is meant by Cryptography? Discuss RSA Algorithm.
Introduction
Cryptography is the science and art of securing information by converting it into a form that cannot
be easily understood by unauthorized persons. It is widely used to protect data confidentiality,
integrity, authentication, and non-repudiation in digital communications and computer systems.
Meaning of Cryptography
The term cryptography is derived from the Greek words 'Kryptos' meaning hidden and 'Graphein'
meaning writing. Cryptography transforms readable information (plaintext) into an unreadable
format (ciphertext) using mathematical algorithms and keys. Only authorized users possessing the
correct key can convert the ciphertext back into plaintext.
Objectives of Cryptography
• Confidentiality – Prevent unauthorized access to information.
• Integrity – Ensure data is not altered during transmission.
• Authentication – Verify the identity of users and systems.
• Non-repudiation – Prevent denial of sending or receiving information.
Types of Cryptography
1. Symmetric Key Cryptography – Same key is used for encryption and decryption.
2. Asymmetric Key Cryptography – Different keys are used for encryption and decryption.
RSA Algorithm
RSA (Rivest-Shamir-Adleman) is one of the most widely used public-key cryptographic algorithms.
It was developed in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman. RSA is an asymmetric
encryption algorithm that uses two different keys: a public key and a private key.
Features of RSA Algorithm
• Uses public-key cryptography.
• Provides encryption and digital signatures.
• Ensures confidentiality and authentication.
• Widely used in secure communication systems.
Working of RSA Algorithm
Step 1: Select Two Prime Numbers
Choose two large prime numbers p and q.
Step 2: Compute n
n=p×q
Step 3: Compute Euler's Totient Function
φ(n) = (p − 1)(q − 1)
Step 4: Choose Public Key Exponent (e)
Select an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) = 1.
Step 5: Compute Private Key (d)
Determine d such that:
d × e ≡ 1 (mod φ(n))
Step 6: Generate Keys
Public Key = (e, n)
Private Key = (d, n)
Encryption Process
Ciphertext (C) = Me mod n
where M is the plaintext message.
Decryption Process
Plaintext (M) = Cd mod n
Example of RSA
Let p = 3 and q = 11.
n = 33
φ(n) = 20
Choose e = 3
Calculate d = 7
Public Key = (3, 33)
Private Key = (7, 33)
The sender encrypts the message using the public key and the receiver decrypts it using the private
key.
Applications of RSA
• Secure web communication (SSL/TLS).
• Digital signatures.
• Secure email systems.
• Online banking and e-commerce.
• Authentication systems.
Advantages of RSA
• High security.
• Supports digital signatures.
• Secure key distribution.
• Widely accepted and standardized.
Disadvantages of RSA
• Slower than symmetric algorithms.
• Requires large key sizes.
• Computationally expensive for large-scale encryption.
Conclusion
Cryptography plays a vital role in securing modern information systems. RSA is one of the most
important public-key cryptographic algorithms and is widely used for encryption, authentication, and
digital signatures in secure electronic communications.