Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

RSA Cryptographic Attacks

Overview

This project implements practical cryptographic attacks against RSA to demonstrate how insecure key configurations can compromise public-key encryption. The implementations recover plaintexts or private keys by exploiting mathematical weaknesses in RSA rather than attempting to factor the modulus.

The project was completed as part of a graduate level Foundations of Cryptography course and focuses on applying number theory and cryptanalysis to real world attack scenarios.

Implemented Attacks

Common Modulus Attack

Implemented an attack that recovers the original plaintext when the same message is encrypted using the same RSA modulus with different public exponents. The implementation uses Bézout's Identity, the Extended Euclidean Algorithm, and modular inverses to reconstruct the plaintext.

Wiener's Attack

Implemented Wiener's Attack to recover RSA private keys that use insecurely small private exponents. The implementation applies continued fractions and convergents to identify vulnerable keys without factoring the modulus.

Skills Demonstrated

  • Python
  • Cryptography
  • RSA
  • Public-Key Cryptography
  • Cryptanalysis
  • Number Theory
  • Algorithm Design
  • Security Research

Technologies

  • Python 3
  • Modular Arithmetic
  • Continued Fractions
  • Extended Euclidean Algorithm

Project Structure

rsa-cryptographic-attacks/
│
├── attacks.py
├── README.md
└── LICENSE

Learning Outcomes

Through this project I gained hands-on experience implementing cryptographic attacks and understanding how implementation mistakes can weaken otherwise secure encryption systems. It reinforced the importance of secure key generation, parameter selection, and mathematical reasoning in modern public-key cryptography.

Disclaimer

This repository is intended for educational purposes to demonstrate known cryptographic attacks against improperly configured RSA implementations. The techniques presented should only be used in authorized research, testing, and academic environments.

About

Implemented cryptographic attacks against RSA, including the Common Modulus Attack and Wiener's Attack, demonstrating practical exploitation of insecure RSA configurations and analysis of public-key cryptography vulnerabilities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages