# Introduction

Cryptography is the science of securing communication and data from unauthorized access. The word itself comes from the Greek words "kryptós" (hidden) and "graphein" (to write). It is used in various fields, including online security, banking, military communications, and digital signatures.

Cryptography ensures four key security principles:

* **Confidentiality:** Ensuring that information is accessible only to those who have permission.
* **Integrity:** Protecting data from being altered or tampered with.
* **Authentication:** Verifying the identity of users.
* **Non-repudiation:** Ensuring that someone cannot deny their actions, such as sending a message.

## Classic Cryptography: The Foundation of Encryption

Classic cryptography refers to historical methods of encrypting messages before the advent of modern computer-based encryption. These methods rely on simple mathematical operations, letter substitutions, and transpositions to obscure the original message (plaintext) into an unreadable format (ciphertext). Classic cryptography is divided into two main types:

### Substitution Ciphers

These ciphers replace letters or symbols in a message with others using a fixed system.

* **Caesar Cipher:** Shifts letters by a fixed number (e.g., A → D, B → E, etc.).
* **Atbash Cipher:** Reverses the alphabet (A ↔ Z, B ↔ Y, etc.).
* **Vigenère Cipher:** Uses multiple shifting sequences based on a keyword.

### Transposition Ciphers

Instead of replacing letters, these ciphers rearrange them according to a pattern.

* **Rail Fence Cipher:** Writes text in a zigzag pattern and reads it differently.
* **Scytale Cipher:** Uses a rod to wrap a strip of paper around to reveal a message.
* **Route Cipher:** Writes the message in a grid and reads it using a different route.

## Modern Cryptography: Securing the Digital World

Modern cryptography is the foundation of secure communication, data protection, and cybersecurity today. Unlike classic cryptography, which relies on simple letter manipulations, modern cryptography uses complex mathematical algorithms that are computationally secure, making it much harder to break. Modern cryptography is built on three key principles:

* **Confidentiality:** Preventing unauthorized access.
* **Integrity:** Ensuring that data remains unchanged.
* **Authentication:** Verifying identities securely.

Modern cryptography consists of three major types:

1. **Symmetric-key cryptography:** Both sender and receiver use the same key.
2. **Public-key cryptography:** Uses two keys (public and private) for encryption and decryption.
3. **Cryptographic hash functions:** Converts data into a fixed-length hash that cannot be reversed.


---

# 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://handbook.ncateam.xyz/fundamentals/cryptography/introduction.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.
