
RSA Algorithm: Key Generation, Encryption, Decryption
Learn about the RSA algorithm, including key generation, key distribution, encryption, and decryption processes. Explore how public and private keys are utilized for secure messaging. Discover the fundamental concepts and steps involved in RSA encryption and decryption.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
RSA Algorithm Sadia Afrin Purba 03/21/2025
RSA Algorithm Key Distribution: The public key is distributed to anyone who wants to send a secure message, while the private key remains secret. Encryption: The sender uses the recipient's public key to encrypt a message, creating ciphertext that can only be decrypted with the corresponding private key. Decryption: The recipient uses their private key to decrypt the ciphertext and retrieve the original message. Key Concept: The relationship between the public key and private key is only known to the receiver. The sender can encrypt the message without knowledge of the private key. The receiver can decrypt the message using only the private key. Encryption/Decryption Function: A key concept is that the encryption function only needs the public key, and the decryption function only needs the private key. The algorithm used that enables this is novel and quite ingenious. Key Generation: Two large prime numbers are selected and used to generate the public and private keys through mathematical operations. RSA is not unconditionally secure, it s computationally secure. 4/12/2025 2
RSA Algorithm Step 01: Key Generation and Distribution receiver sender Public Keys ? ,? Private key, ? Step 02: Encryption Cipher Text, ? ? = ?? ??? ? Step 03: Decryption ? = ?? ??? ? 4/12/2025 3
Key Generation Choose two prime numbers: p = 61 and q = 53 Calculate n = p * q = 61 * 53 = 3233 Calculate Euler Totient Function: (n) = (p - 1) * (q - 1) = 60 * 52 = 3120 Choose encryption exponent e, such that 1 < e < (n), and gcd(e, (n)) = 1, that is e should be co-prime with (n). E.g., 17 (co-prime to 3120) Calculate decryption exponent d, such that (d * e) 1 mod (n), that is d is modular multiplicative inverse of e mod (n). We can have multiple values of d satisfying (d * e) 1 mod (n) but it does not matter which value we choose as all of them are valid keys and will result into same message on decryption. E.g., 17 * d 1 (mod 3120), d = 2753 Public key: (n = 3233, e = 17) Private key: (n = 3233, d = 2753) 4/12/2025 4
Encryption and Decryption Encrypt the message (M) and send the ciphertext (C) ? = ?? ??? ? Decrypt the ciphertext, C and receive the message (M) ? = ?? ??? ? 4/12/2025 5
References Geeksforgeeks: https://www.geeksforgeeks.org/rsa-algorithm- cryptography/ 4/12/2025 6