rsa-attack-techniques

Select and apply RSA cryptanalytic attacks from observable key and oracle evidence.

5|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/DorianGallo/hack-skills-local --skill rsa-attack-techniques-doriangallo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rsa-attack-techniques
Source: https://github.com/DorianGallo/hack-skills-local/tree/main/skills/rsa-attack-techniques
Command: npx skills add https://github.com/DorianGallo/hack-skills-local --skill rsa-attack-techniques-doriangallo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

This Skill helps you recover RSA plaintexts by selecting and applying the correct cryptanalytic attack when you’re given RSA parameters and evidence of weaknesses (e.g., small exponents, faulty implementations, or padding/oracle behavior).

Core Features & Use Cases

  • Attack Selection Decision Tree: Quickly routes from observable constraints (known factors, oracle access, e·d relationships, small e, etc.) to the best-fit RSA attack path.
  • Practical RSA Exploit Methods: Covers factorization attacks, small-exponent exploits (cube root, Hastad/broadcast, related-message), lattice-based methods (Wiener/Boneh-Durfee/Coppersmith), and implementation attacks (padding oracles, CRT faults).
  • Tooling & Implementation Guidance: Provides ready-to-use Python/Sage-style approaches and references (e.g., SageMath and RsaCtfTool) for real-world CTF workflows.

Quick Start

Ask the AI to decrypt an RSA challenge by recommending the correct attack from the available inputs (n, e, ciphertext(s), and any oracle/fault indicators) and producing a workable solution plan.

Frequently Asked Questions about rsa-attack-techniques

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover RSA plaintext when I have a small public exponent and multiple ciphertexts?

RSA plaintext recovery with a small public exponent and multiple ciphertexts uses the Hastad broadcast attack. By collecting enough ciphertexts encrypted under the same small exponent, you apply a lattice-based method to reconstruct the original message.

What is the best way to decrypt an RSA ciphertext when the private exponent is too small?

Decrypting an RSA ciphertext with an abnormally small private exponent requires the Wiener attack. This cryptanalytic method exploits the mathematical relationship between the public and private exponents to factor the modulus and recover the key.

How do I know which RSA attack to use based on my known parameters and oracle access?

Selecting the correct RSA attack uses a decision tree based on observable constraints like small exponents, oracle access, or shared factors. This approach routes your specific modulus properties to the appropriate exploit path, such as Coppersmith or padding oracle methods.

Do I need SageMath to execute lattice attacks and factorization methods for RSA cryptanalysis?

SageMath is highly recommended for executing lattice attacks and factorization methods in RSA cryptanalysis. The approach provides ready-to-use Python and Sage-style workflows alongside tools like RsaCtfTool for practical implementation.

Can I exploit a padding oracle vulnerability to decrypt RSA ciphertexts?

Exploiting a padding oracle vulnerability allows RSA ciphertext decryption by sending manipulated ciphertexts to the oracle. By observing the server's error responses, you can iteratively reconstruct the plaintext without knowing the private key.

When should I use CRT fault attacks for RSA key recovery?

CRT fault attacks for RSA key recovery apply when implementation errors occur during the Chinese Remainder Theorem signing process. By analyzing the faulty signature output, you can factor the modulus and reconstruct the private key.