.../RsaCtfTool$ python3.9 ./RsaCtfTool.py -h
usage: RsaCtfTool.py [-h] [--publickey PUBLICKEY] [--output OUTPUT] [--timeout TIMEOUT] [--createpub]
[--dumpkey] [--ext] [--uncipherfile UNCIPHERFILE] [--uncipher UNCIPHER]
[--verbosity {CRITICAL,ERROR,WARNING,DEBUG,INFO}] [--private] [--tests]
[--ecmdigits ECMDIGITS] [-n N] [-p P] [-q Q] [-e E] [--key KEY]
[--password PASSWORD] [--show-factors SHOW_FACTORS]
[--attack {SQUFOF,wolframalpha,comfact_cn,fermat,dixon,roca,ecm,binary_polinomial_factoring,lattice,kraitchik,nonRSA,qicheng,euler,factordb,lehman,fibonacci_gcd,z3_solver,carmichael,system_primes_gcd,XYXZ,ecm2,pollard_p_1,noveltyprimes,mersenne_primes,factorial_pm1_gcd,hart,brent,boneh_durfee,lucas_gcd,smallfraction,mersenne_pm1_gcd,siqs,qs,classical_shor,pisano_period,londahl,small_crt_exp,williams_pp1,cube_root,neca,partial_q,fermat_numbers_gcd,compositorial_pm1_gcd,lehmer,highandlowbitsequal,pollard_rho,partial_d,primorial_pm1_gcd,factor_2PN,smallq,pastctfprimes,wiener,common_modulus_related_message,hastads,common_factors,same_n_huge_e,all} [{SQUFOF,wolframalpha,comfact_cn,fermat,dixon,roca,ecm,binary_polinomial_factoring,lattice,kraitchik,nonRSA,qicheng,euler,factordb,lehman,fibonacci_gcd,z3_solver,carmichael,system_primes_gcd,XYXZ,ecm2,pollard_p_1,noveltyprimes,mersenne_primes,factorial_pm1_gcd,hart,brent,boneh_durfee,lucas_gcd,smallfraction,mersenne_pm1_gcd,siqs,qs,classical_shor,pisano_period,londahl,small_crt_exp,williams_pp1,cube_root,neca,partial_q,fermat_numbers_gcd,compositorial_pm1_gcd,lehmer,highandlowbitsequal,pollard_rho,partial_d,primorial_pm1_gcd,factor_2PN,smallq,pastctfprimes,wiener,common_modulus_related_message,hastads,common_factors,same_n_huge_e,all} ...]]
[--sendtofdb] [--isconspicuous] [--isroca] [--convert_idrsa_pub]
[--check_publickey] [--partial] [--cleanup] [--withtraceback]
RSA CTF Tool
optional arguments:
-h, --help show this help message and exit
--publickey PUBLICKEY
public key file. You can use wildcards for multiple keys.
--output OUTPUT output file for results (privates keys, plaintext data).
--timeout TIMEOUT Timeout for long attacks in seconds. default is 60s min: MIN_INT in C, max:
MAX_INT in C, values < 1 have the same effect as MAX_INT
--createpub Take n and e from cli and just print a public key then exit
--dumpkey Just dump the RSA variables from a key - n,e,d,p,q
--ext Extended dump of RSA private variables in --dumpkey mode - dp,dq,pinv,qinv).
--uncipherfile UNCIPHERFILE
uncipher a file, using commas to separate multiple paths
--uncipher UNCIPHER uncipher a cipher, using commas to separate multiple ciphers
--verbosity {CRITICAL,ERROR,WARNING,DEBUG,INFO}
verbose mode
--private Display private key if recovered
--tests Run tests on attacks
--ecmdigits ECMDIGITS
Optionally an estimate as to how long one of the primes is for ECM method
-n N Specify the modulus. format : int or 0xhex
-p P Specify the first prime number. format : int or 0xhex
-q Q Specify the second prime number. format : int or 0xhex
-e E Specify the public exponent, using commas to separate multiple exponents.
format : int or 0xhex
--key KEY Specify the private key file.
--password PASSWORD Private key password if needed.
--show-factors SHOW_FACTORS
Show P Q, the factors of N
--attack {SQUFOF,wolframalpha,comfact_cn,fermat,dixon,roca,ecm,binary_polinomial_factoring,lattice,kraitchik,nonRSA,qicheng,euler,factordb,lehman,fibonacci_gcd,z3_solver,carmichael,system_primes_gcd,XYXZ,ecm2,pollard_p_1,noveltyprimes,mersenne_primes,factorial_pm1_gcd,hart,brent,boneh_durfee,lucas_gcd,smallfraction,mersenne_pm1_gcd,siqs,qs,classical_shor,pisano_period,londahl,small_crt_exp,williams_pp1,cube_root,neca,partial_q,fermat_numbers_gcd,compositorial_pm1_gcd,lehmer,highandlowbitsequal,pollard_rho,partial_d,primorial_pm1_gcd,factor_2PN,smallq,pastctfprimes,wiener,common_modulus_related_message,hastads,common_factors,same_n_huge_e,all} [{SQUFOF,wolframalpha,comfact_cn,fermat,dixon,roca,ecm,binary_polinomial_factoring,lattice,kraitchik,nonRSA,qicheng,euler,factordb,lehman,fibonacci_gcd,z3_solver,carmichael,system_primes_gcd,XYXZ,ecm2,pollard_p_1,noveltyprimes,mersenne_primes,factorial_pm1_gcd,hart,brent,boneh_durfee,lucas_gcd,smallfraction,mersenne_pm1_gcd,siqs,qs,classical_shor,pisano_period,londahl,small_crt_exp,williams_pp1,cube_root,neca,partial_q,fermat_numbers_gcd,compositorial_pm1_gcd,lehmer,highandlowbitsequal,pollard_rho,partial_d,primorial_pm1_gcd,factor_2PN,smallq,pastctfprimes,wiener,common_modulus_related_message,hastads,common_factors,same_n_huge_e,all} ...]
Specify the attack modes.
--sendtofdb Send results to factordb
--isconspicuous conspicuous key check
--isroca Check if given key is roca
--convert_idrsa_pub Convert idrsa.pub to pem
--check_publickey Check publickey if modulus is well formed before attack
--partial work with partial priate keys
--cleanup cleanup *.pub files after finish
--withtraceback show tracebacks