Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
rsatool can be used to calculate RSA and RSA-CRT parameters
branch: master
Failed to load latest commit information.
LICENSE Initial commit Initial commit Initial commit


rsatool calculates RSA (p, q, n, d, e) and RSA-CRT (dP, dQ, qInv) parameters given either two primes (p, q) or modulus and private exponent (n, d).

Resulting parameters are displayed and can optionally be written as an OpenSSL compatible DER or PEM encoded RSA private key.


Usage examples

Supplying modulus and private exponent, PEM output to key.pem:

python -f PEM -o key.pem -n 13826123222358393307 -d 9793706120266356337

Supplying two primes, DER output to key.der:

python -f DER -o key.der -p 4184799299 -q 3303891593
Something went wrong with that request. Please try again.