This project is a simple web-based demonstration of the RSA algorithm, a public-key cryptography system used for secure data transmission. The application allows users to input two prime numbers (P and Q) and a numeric message, then performs RSA encryption and decryption to showcase the algorithm's functionality. https://rsa-algorithm-compression.netlify.app/
- Input Fields: Enter two prime numbers (P and Q) and a numeric message.
- RSA Process: Computes the public and private keys, encrypts the message, and decrypts it.
- Educational Content: Provides an overview of the RSA algorithm, its advantages, and disadvantages.
- Interactive UI: Simple HTML-based interface for ease of use.
- Input Prime Numbers: Users provide two prime numbers, P and Q, which are used to generate the public and private keys.
- Input Message: A numeric message is entered for encryption.
- Run RSA: Clicking the "Run RSA" button triggers the RSA algorithm to:
- Calculate the modulus (N = P × Q) and totient (φ(N) = (P-1) × (Q-1)).
- Generate the public key (e) and private key (d).
- Encrypt the message using the public key.
- Decrypt the message using the private key.
- Output: Displays the encrypted and decrypted messages.
- A modern web browser (e.g., Chrome, Firefox, Edge).
- Basic understanding of RSA cryptography (optional, but helpful for context).
-
Clone the repository:
git clone https://github.com/Vijitverm1234/RSA-Algorithm.git
-
Open
index.htmlin a web browser to run the application locally.
- Open
index.htmlin a browser. - Enter two prime numbers (P and Q) in the provided input fields.
- Enter a numeric message to encrypt.
- Click the "Run RSA" button to see the encryption and decryption results.
index.html: The main HTML file containing the UI and RSA logic.
- The demo is designed for educational purposes and uses small prime numbers for simplicity.
- The message must be a numeric value to work with the RSA algorithm in this implementation.
- The application does not handle non-prime inputs or invalid messages gracefully (consider adding validation for production use).
- Add input validation to ensure P and Q are prime numbers.
- Support text-based messages by converting them to numeric values.
- Include a visual step-by-step breakdown of the RSA process.
- Enhance the UI with CSS styling and responsive design.
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure your code follows the project's structure and includes appropriate documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
- The RSA algorithm was developed by Ron Rivest, Adi Shamir, and Leonard Adleman.
- Built with HTML and JavaScript for simplicity and accessibility.
