# Gotta Decrypt Them All

Source files and Solve Script:  [CSAW-Quals/crypto/Gotta Decrypt Them All](https://github.com/r3yc0n1c/CTF-Writeups/tree/main/2021/CSAW-Quals/crypto/Gotta%20Decrypt%20Them%20All)

### Attack Idea

**STEP 1:** Identify the [Morse ](https://en.wikipedia.org/wiki/Morse_code)encoded string

**STEP 2:** Decrypt to get Integers

**STEP 3:** Convert them to ASCII characters

**STEP 4:** Identify [Base64](https://en.wikipedia.org/wiki/Base64) and decode it to get [RSA ](https://en.wikipedia.org/wiki/RSA_\(cryptosystem\))parameters and encrypted message

**STEP 5:** Check the **small public exponent (e)** and take the **eth root** to get the message

{% hint style="info" %}
Why STEP 5 works?

In practice, we pick the RSA parameters and the message such that$$m^{e} \geq n$$. If we use a small message and a small exponent then it just becomes$$c = m^{e}$$ and we can directly calculate$$m = \sqrt\[e]{}c$$ to get back our message.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://r3yc0n1c.gitbook.io/writeups/2021/csaw-qualification-round/crypto/gotta-decrypt-them-all.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
