/prime-finder

Find RSA primes in files

Primary LanguageRustMIT LicenseMIT

RSA Prime Finder

This program searches a file for RSA primes, i.e. primes P & Q, where P*Q == N.

Usage:

prime-finder 0.2
Calle Svensson <calle.svensson@zeta-two.com>
Finds RSA primes in files

USAGE:
    prime-finder [FLAGS] <FILE> --null-filter-length <LENGTH> --prime-size <SIZE>

FLAGS:
    -p, --dump-primes    Prints all primes without verifying P*Q
    -h, --help           Prints help information
    -V, --version        Prints version information

OPTIONS:
    -f, --null-filter-length <LENGTH>    Filters out any primes with a sequence of null bytes this long
    -s, --prime-size <SIZE>              Sets the size in bytes of the prime numbers to search for

ARGS:
    <FILE>    Sets the input file to use

Example:

$ ./prime-finder -f 2 -s 128 core.ssh-agent.15

Finding candidate primes
Validating candidates
Primes in file
P:167243541099979190866104182002593684063398428540905985580688529104434102755374630298513855186521184412065623635823375782841143543354431190121151024872456944525670397782314611126729769980995418102082999058944507085161787868005856111480097679889988573634547815490180714622429211320034107364758312717552229384797 Q:156664661832491901627885331440499088113843612375523571599984946147093194527261959355398998610299827646862742827091361247013625621562088668883094247003885397947818366308231266543720672961356082039678978741437109501689891388439083402321534454255869541578116091674154493855159404390355526119156545778192150673263 N:26201152810096700609395581963526713271469580549801299716013584738385394340350813921338612888695467840401939594250960338053063405999313461123653190679934766504739688264258052403010331351722049138390032193509393759120592354109504824892771744815202436037832297315218822827731630761715885608154179853250206599776516504368814974022846271709230784168710727506169798089606800767486520706741781726786136747097240484380053345055246799469899715418064146175150126034146727442890746480282301130380561241111338711869038505067567137114979871733564191756728428383347027467093925253131450753772602888402679525474063770721355846582611