# Mode of Operation

**The mode of operation** refers to **how the AES cipher is used to encrypt or decrypt data that is longer than a single block.**

AES operates on fixed-size blocks of 128 bits, so if the plaintext or ciphertext is longer than 128 bits, a mode of operation is required to break it up into multiple blocks and apply the cipher to each block.

There are several modes of operation that can be used with AES, each with its own strengths and weaknesses.

<mark style="color:red;">**All modes have serious weaknesses when used incorrectly.**</mark>


---

# 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://www.ctfrecipes.com/cryptography/symmetric-cryptography/aes/mode-of-operation.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.
