# Unbreakable encryption

**Category:** Crypto - **Points:** 50 - **Solves:** 2\
**Description:** My friend stole this flag, but I don't care I've encrypted it with a super secret key that he'll never find!

**Infos:**

> 0x1050a3732753d7e13632d673b7f093c633c3e09353f7d7d387260317b2b

**Hint:** *Known plain*

**Solution:**\
To solve this challenge you need to do researches thanks for the hint.\
Effectively, the hint is helpful because when you search "Known Plain" on the web, you discover a lot of information about an attack, the Known Plaintext Attack (or KPA).\
Look at the CTFs and a lot of documentation that explains how to resolve this attack. After a few documentations readings, you have surely seen you need to use the XOR resolve.\
And that's the case, you need to calculate the FLAG with your message (0x1050a37\[...]) and a key to decipher the correct FLAG.\
But the problem is that you don't the key... And for finding this key you have to imagine and test keys about your CTF or information of the CTF organizer.\
So that is the best practice. In our case, the CTF is organized by a student of our establishment.\
So we need to test all information about the school (director name, city of the school, school name...)\
So there are very many possibilities. So you need to test all possibilities and sort them in importance and logical order.\
For this CTF we can test : Léonard, Vinci, Défense, IIM, ESILV, EMLV and others...\
To test the compatibility with the message and this key, we can go on two different websites that can decrypt XOR: [dCode.fr](https://www.dcode.fr/chiffre-xor) or [CyberChef](https://gchq.github.io/CyberChef/)\
⚠️ The message is in hexadecimal and I saw on a website that it is necessary to remove the first "x" of the message...\
Once these changes are done, you must enter the message and the key in the right places and the FLAG will be calculated automatically.

<details>

<summary>🚩 FLAG</summary>

```
DVC{d0n7_5h4r3_y0ur_pl41n73x7}
```

</details>


---

# 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://writeups.ayweth20.com/2021/dvctf-to-join-davincicode/crypto/unbreakable-encryption.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.
