> For the complete documentation index, see [llms.txt](https://alham-rizvi.gitbook.io/alhamrizvi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/cryptography/easy1.md).

# easy1

## 📝 Easy1 PicoCTF : Vigenère Cipher Challenge

### 🧩 Challenge Given

We were given:

* **Ciphertext:** `UFJKXQZQUNB`
* **Key:** `SOLVECRYPTO`
* A Vigenère table (alphabet shift table)

The hint said this is related to a **one-time pad**, but since the **key is known**, we can decrypt it easily.

***

### 🔎 Step 1: Understand the Cipher

The table provided is a **Vigenère cipher table**.

In Vigenère:

* Encryption = Add key shift
* Decryption = Subtract key shift

Since we have the key, we will **decrypt**.

***

### 🔑 Step 2: Align Key with Ciphertext

Ciphertext:

```
UFJKXQZQUNB
```

Key (same length):

```
SOLVECRYPTO
```

Write them together:

```
Cipher: U  F  J  K  X  Q  Z  Q  U  N  B
Key:    S  O  L  V  E  C  R  Y  P  T  O
```

***

### 🔓 Step 3: Decrypt (Simple Explanation)

For each letter:

👉 Find the **row of the key letter** 👉 Look for the **cipher letter in that row** 👉 The column letter is the **original plaintext**

OR

👉 Just subtract alphabet positions (A=0, B=1, C=2 … Z=25)

Example:

* U − S = C
* F − O = R
* J − L = Y

Continue for all letters.

***

### ✅ Final Result

After decrypting all letters:

```
CRYPTOISFUN
```

Formatted properly:

## 🎉 **CRYPTO IS FUN**

***

### 💡 Why It Was Easy

A real **One-Time Pad** is secure only if:

* The key is random
* The key is secret
* The key is never reused

Here, the key was given (`SOLVECRYPTO`), so the cipher becomes easy to break.

***

If you want, I can also give you a **short 4–5 line version** for quick CTF submission.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/cryptography/easy1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
