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)
- Host: GitHub
- URL: https://github.com/choyiny/factorizing-semiprimes
- Owner: choyiny
- License: mit
- Created: 2015-03-03T10:43:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-03T13:27:16.000Z (over 9 years ago)
- Last Synced: 2025-03-29T18:02:58.701Z (over 1 year ago)
- Topics: factorize, hacking-rsa, java, semiprime
- Language: Java
- Homepage:
- Size: 45.9 KB
- Stars: 3
- Watchers: 1
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
IB Math HL IA - Hacking RSA (kinda)
===============
[](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
````