> For the complete documentation index, see [llms.txt](https://0xss0rz.gitbook.io/0xss0rz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xss0rz.gitbook.io/0xss0rz/ctf/cryptography-1/rsa.md).

# RSA

## Fundamentals

The key variables that you need to know about for RSA in CTFs are p, q, m, n, e, d, and c.&#x20;

* “p” and “q” are large prime numbers, “n” is the product of p and q.
* The public key is n and d, the private key is n and e.
* “m” is used to represent the message (in plaintext) and “c” represents the ciphertext (encrypted text).

## Tools

### FactorDB

{% embed url="<http://factordb.com/>" %}

### RsaCtfTool

{% embed url="<https://github.com/Ganapati/RsaCtfTool>" %}
