Skip to content

Java implementation of RSA encryption and decryption, showcasing key generation, message encoding, and secure communication logic.

Notifications You must be signed in to change notification settings

mennadevhub/RSA-Cryptography-Program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” RSA Cryptography in Java

This Java program demonstrates a simple implementation of RSA encryption and decryption. The user is prompted to choose upper limits for prime numbers p and q, which are used to generate public and private keys. It then allows encrypting and decrypting a message securely using RSA principles.


πŸ“Œ Features

  • Prime number generation for RSA key components
  • Calculation of public (e) and private (d) keys
  • Encryption using C = P^e mod n
  • Decryption using P = C^d mod n
  • Uses BigInteger for large number support
  • Custom base-126 encoding to convert numeric ciphertext to printable characters

πŸ› οΈ How to Run

Requirements:

  • Java 8 or higher
  • A terminal/command prompt

Steps:

  1. Clone the Repository:
    git clone https://github.com/your-username/rsa-cryptography-java.git
    cd rsa-cryptography-java

About

Java implementation of RSA encryption and decryption, showcasing key generation, message encoding, and secure communication logic.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages