Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 364 Bytes

README.md

File metadata and controls

13 lines (10 loc) · 364 Bytes

Let p and q be two (large, unknown) primes. Moreover, let us know n=pq and x=p XOR q.

Given numbers n and x, this code efficiently (but slightly slowly, because it's Python) factors n and outputs p and q.

Usage:

./ xor_factor.py n x

The algorithm is the one described in this Math StackExchange answer.