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

# Cryptography

- [Introduction](https://ir0nstone.gitbook.io/notes/cryptography/introduction.md)
- [Number Theory Fundamentals](https://ir0nstone.gitbook.io/notes/cryptography/number-theory-fundamentals.md)
- [Divisibility, Factors and Euclid's Algorithms](https://ir0nstone.gitbook.io/notes/cryptography/number-theory-fundamentals/divisibility-factors-and-euclids-algorithms.md): An outline of the fundamentals of number theory
- [Modular Arithmetic](https://ir0nstone.gitbook.io/notes/cryptography/number-theory-fundamentals/modular-arithmetic.md): An introduction to the fundamentals
- [Rings, Fields and Euler's Totient Function](https://ir0nstone.gitbook.io/notes/cryptography/number-theory-fundamentals/rings-fields-and-eulers-totient-function.md): The basics of Rings, Fields and Euler's Phi Function
- [Continued Fractions](https://ir0nstone.gitbook.io/notes/cryptography/continued-fractions.md)
- [RSA](https://ir0nstone.gitbook.io/notes/cryptography/overview.md)
- [Public Exponent Attacks](https://ir0nstone.gitbook.io/notes/cryptography/overview/public-exponent-attacks.md)
- [e=1](https://ir0nstone.gitbook.io/notes/cryptography/overview/public-exponent-attacks/e-1.md)
- [Small e](https://ir0nstone.gitbook.io/notes/cryptography/overview/public-exponent-attacks/small-e.md)
- [Multi-party RSA with Small e](https://ir0nstone.gitbook.io/notes/cryptography/overview/public-exponent-attacks/multi-party-rsa-with-small-e.md)
- [Wiener's Attack](https://ir0nstone.gitbook.io/notes/cryptography/overview/public-exponent-attacks/wieners-attack.md): Using Continued Fractions to attack large e values
- [Choice of Primes](https://ir0nstone.gitbook.io/notes/cryptography/overview/choice-of-primes.md)
- [N is prime](https://ir0nstone.gitbook.io/notes/cryptography/overview/choice-of-primes/n-is-prime.md)
- [Mersenne Primes](https://ir0nstone.gitbook.io/notes/cryptography/overview/choice-of-primes/mersenne-primes.md)
- [P=Q](https://ir0nstone.gitbook.io/notes/cryptography/overview/choice-of-primes/p-q.md)
- [Fermat Factorisation](https://ir0nstone.gitbook.io/notes/cryptography/overview/choice-of-primes/fermat-factorisation.md): Used when p and q are numericaly close
- [Factorisation Methods](https://ir0nstone.gitbook.io/notes/cryptography/overview/factorisation-methods.md)
- [Pollard's p-1](https://ir0nstone.gitbook.io/notes/cryptography/overview/factorisation-methods/pollards-p-1.md): Factorising N when we know a factor is smooth
- [Diffie-Hellman Key Exchange](https://ir0nstone.gitbook.io/notes/cryptography/overview-1.md)
- [Solving the DLP](https://ir0nstone.gitbook.io/notes/cryptography/overview-1/solving-the-dlp.md)
- [Baby Step, Giant Step](https://ir0nstone.gitbook.io/notes/cryptography/overview-1/solving-the-dlp/baby-step-giant-step.md): The simple iterative approach


---

# 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://ir0nstone.gitbook.io/notes/cryptography.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.
