An open API service indexing awesome lists of open source software.

https://github.com/choyiny/factorizing-semiprimes

Factorizing Semiprimes (Proof of concept to decrypt RSA keys)
https://github.com/choyiny/factorizing-semiprimes

factorize hacking-rsa java semiprime

Last synced: 12 months ago
JSON representation

Factorizing Semiprimes (Proof of concept to decrypt RSA keys)

Awesome Lists containing this project

README

          

IB Math HL IA - Hacking RSA (kinda)
===============
[![Build Status](https://travis-ci.org/choyiny/factorizing-semiprimes.svg?branch=master)](https://travis-ci.org/choyiny/factorizing-semiprimes)

Featured on [The Mathematics IA: Earning Full Marks on HL or SL Mathematics Explorations: Ideal for the INTERNATIONAL BACCALAUREATE DIPLOMA](http://www.amazon.com/gp/product/B00U4UE8EA/) as a method to increase personal engagement and a proof of authenticity.

I've created this java program as part of my International Baccalaureate Mathematics Higher Level Internal Assessment. This is a proof of concept for factorizing public keys and crack the RSA cryptographic algorithm.

Usage
----------------
Replace n with the semiprime you wish to factorize.

How does it work?
----------------
This script uses 2 methods to factorize semiprimes.
- Brute Force Method
- Fermat's Factorization Method
- Pollard's Rho Method

Limitations
----------------
The code can only factorize the maximum of a JAVA_INT, 2^31 - 1.

Sample output
----------------
````
n = 397927
FF: 433 is a factor
FF: 919 is another factor
FF: Total execution time: 0ms
FF: steps involved: 22
BF: 433 is a factor
BF: 919 is another factor
BF: Total execution time: 0ms
BF: steps involved: 215
PF: 919 is a factor
PF: 433 is another factor
PF: steps involved: 51
PF: Total execution time: 2ms
````