# What is the difference between a cipher and a code?

Ciphers and codes are both methods of encryption, but they differ in the way they are used. A cipher is an algorithm that is used to encrypt and decrypt data. It uses mathematical formulas or operations to transform plaintext (unencrypted) data into ciphertext (encrypted) data. On the other hand, a code is a system of symbols, letters, words, or signals that are used instead of ordinary words and numbers to send a message. Codes are typically used to replace entire words or phrases, whereas ciphers are used to replace individual characters or bits of data.


---

# 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://wiki.songer.pro/interviewing/security-domains-and-technical-aptitude/cryptographic-protections/cryptography/what-is-the-difference-between-a-cipher-and-a-code.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.
