Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. CTF
  3. RSATool

RSATool

BSD-2-ClausePython

A Python tool for calculating RSA and RSA-CRT cryptographic parameters and generating OpenSSL-compatible keys.

GitHubGitHub
1.6k stars266 forks0 contributors

What is RSATool?

rsatool is a Python command-line utility for calculating RSA cryptographic parameters and generating OpenSSL-compatible private keys. It solves the problem of manually computing RSA values by automating the process of deriving all necessary parameters from either two primes or from modulus and private exponent inputs.

Target Audience

Security researchers, cryptography developers, and system administrators who need to generate RSA keys or work with RSA parameters in cryptographic implementations.

Value Proposition

Developers choose rsatool for its simplicity and specificity—it does one thing well without the overhead of larger cryptographic libraries, and it produces keys that are immediately compatible with OpenSSL and other standard tools.

Overview

rsatool can be used to calculate RSA and RSA-CRT parameters

Use Cases

Best For

  • Generating RSA private keys from known primes
  • Converting between RSA parameter formats
  • Creating OpenSSL-compatible keys for testing
  • Educational purposes for learning RSA cryptography
  • Scripting cryptographic key generation workflows
  • Recovering RSA parameters from partial key information

Not Ideal For

  • Projects requiring support for cryptographic algorithms beyond RSA, such as ECC or AES
  • Environments that demand graphical user interfaces or web-based tools for key management
  • Systems needing built-in key validation, auditing, or compliance with security standards like FIPS
  • Applications that require integration with hardware security modules or real-time key generation

Pros & Cons

Pros

Accurate Parameter Computation

Calculates all RSA and RSA-CRT values from primes or modulus/exponent pairs, as demonstrated in the README examples for deriving p, q, n, d, e, dP, dQ, and qInv.

OpenSSL Compatibility

Generates DER or PEM encoded private keys that work seamlessly with OpenSSL, ensuring easy integration into standard cryptographic workflows.

Flexible Input Options

Accepts input as two primes or as modulus and private exponent, providing versatility for different key derivation scenarios, as shown in usage examples.

Scriptable CLI

Command-line interface allows for automation in scripts, with simple commands for outputting keys to files in various formats.

Cons

External Dependencies

Relies on Python packages like pyasn1 and gmpy2, which can complicate installation and maintenance, especially in restricted environments.

Limited Cryptographic Scope

Focuses solely on RSA parameter calculation and key generation, lacking features for other algorithms, key management, or security validations.

No Built-in Validation

Does not verify input prime validity or key security, placing the onus on users to ensure correct and secure parameters, which could lead to errors.

Frequently Asked Questions

Quick Stats

Stars1,638
Forks266
Contributors0
Open Issues2
Last commit4 days ago
CreatedSince 2012

Tags

#python-tool#rsa#cli-tool#key-generation#security-tools#cryptography#openssl

Built With

P
PyASN1
P
Python

Included in

CTF11.4k
Auto-fetched 19 hours ago

Related Projects

RSACTFToolRSACTFTool

RSA attack tool (mainly for ctf) - retrieve private key from weak public key and/or uncipher data

Stars7,038
Forks994
Last commit1 month ago
xortoolxortool

A tool to analyze multi-byte xor cipher

Stars1,486
Forks180
Last commit1 year ago
Hash ExtenderHash Extender

Hash Extender is a specialized security tool that automates hash length extension attacks, a cryptographic vulnerability affecting many common hash functions. It enables security researchers and penetration testers to exploit weaknesses in applications that improperly construct message authentication codes. ## Key Features - **Multi-Algorithm Support** — Attacks MD4, MD5, RIPEMD-160, SHA-0, SHA-1, SHA-256, SHA-512, and WHIRLPOOL hash functions. - **Flexible Input/Output Formats** — Handles raw, hex, HTML, and C-style string encodings for both data and signatures. - **Automated Padding Calculation** — Correctly handles block sizes, endianness, and length fields for each algorithm. - **Secret Length Discovery** — Supports brute-forcing unknown secret lengths with min/max ranges. - **Batch Testing** — Can test multiple hash algorithms simultaneously with table output. ## Philosophy Hash Extender aims to make complex cryptographic attacks accessible by automating the tedious and error-prone manual calculations involved in length extension attacks, allowing security professionals to focus on vulnerability discovery rather than implementation details.

Stars1,206
Forks196
Last commit1 year ago
FeatherDusterFeatherDuster

An automated, modular cryptanalysis tool; i.e., a Weapon of Math Destruction

Stars1,135
Forks129
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub