RSA Algorithm

Summary: This program codes the RSA algorithm in Java.

Description: This Java program implements a simple RSA-based encryption/decryption workflow: Keys.java generates and stores the RSA key pair (public and private), Encode.java reads plaintext from input.txt, encrypts it using the public key and writes the ciphertext to encrypted.txt, and Decode.java reads encrypted.txt, decrypts it with the private key, and writes the recovered plaintext to output.txt; together these components demonstrate key generation, asymmetric encryption, and decryption in a compact, file-driven example useful for learning or testing RSA concepts.

Dates: 2/3/2024 – 2/8/2024

Languages: Java

Skills:

  • Reading and writing to files
  • Exception handling
  • BigInteger
  • ArrayList
  • Interfaces

File:

How to Run:

  1. Type something in input.txt
  2. Run Encode.java to encode the message in input.txt
    • The encoding will be in encryped.txt
  3. Run Decode.java to decode the message in encrypted.txt
    • The decoding will be in output.txt

Repository: https://github.com/marvel3492/rsaAlgorithm