Skip to content

Generating a 2048‑bit RSA key pair, encrypting with the public key, decrypting with the private key, and documenting outputs

Notifications You must be signed in to change notification settings

PRENGARA/RSA-Asymmetric-Encryption-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

RSA-Asymmetric-Encryption-Project

Generating a 2048‑bit RSA key pair, encrypting with the public key, decrypting with the private key, and documenting outputs

This repository documents Priyadharshini Rengaramanujam's RSA assignment: generating a 2048-bit RSA key pair, encrypting a message with the public key, and decrypting it with the private key, including captured program output. citeturn10search1turn10search2

Contents

  • docs/RSA assignment.pdf — Output evidence (screenshots/logs showing input, encrypted data, and decrypted message).
  • src/rsa_encryption.py — Working Python script using the cryptography library (RSA, OAEP with SHA-256).
  • BLOG.md — Lessons learned.

Quick Start

# (Optional) create a virtual environment
python -m venv .venv && source .venv/bin/activate  # Linux/macOS
# On Windows: python -m venv .venv && .venv\Scripts\activate

pip install cryptography
python src/rsa_encryption.py

The script will:

  1. Generate private_key.pem and public_key.pem (2048-bit).
  2. Prompt for a message, encrypt with the public key, and save as encrypted_message.bin.
  3. Decrypt using the private key and print the original plaintext.

Author

Priyadharshini Rengaramanujam

About

Generating a 2048‑bit RSA key pair, encrypting with the public key, decrypting with the private key, and documenting outputs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages