# Prerequisite Understanding Questions

You should be reasonably confident that you'd be able to solve most of the problems below, given some time and a bit of Googling.

If you're comfortable solving these problems, you should have the necessary background for writing ZK circuits!

Here is a good reference for number theory topics.

## Modular arithmeticâ€‹

- Without using a calculator, compute the remainder when $20212017^2$ is divided by $20212022$.
- Cycles
- What is the third-smallest positive value of $x$ for which $2^x \equiv 3 \pmod{13}$?
- What is the fourth-smallest positive value of $x$ for which $2^x \equiv 8 \pmod{101}$?

- Chinese Remainder Theorem
- Describe all integers $n$ such that $n \equiv 3 \pmod{5}$ and $n \equiv 6 \pmod{7}$.
- Describe all integers $n$ such that $n \equiv 5 \pmod{6}$, $n \equiv 6 \pmod{7}$, and $n \equiv 7 \pmod{8}$.

- Modular inverses
- Describe all integers $n$ such that $5n + 7 \equiv 2 \pmod{13}$.
- Describe all integers $n$ such that $3n + 9 \equiv 4 \pmod{12}$.
- Describe all integers $n$ such that $3n + 9 \equiv 3 \pmod{12}$.
- Describe all integers $n$ such that $19n \equiv 1 \pmod{257}$.

## Polynomialsâ€‹

- Solve for $x$: $(x-1)(x+2)(x-3)(x+4) > 0$.
- Describe all $n$ such that $(n-2)(n-3) \equiv 0 \pmod{97}$.
- Describe all $n$ such that $(n-2)(n-3) \equiv 0 \pmod{72}$.
- Suppose that $f(x)$ is a polynomial with leading coefficient $1$ such that $f(0) = 10$. What is the product of the roots of $f(x)$, if $f(x)$ has an even degree? What if $f(x)$ has an odd degree? If $f(x)$ had leading coefficient $5$, how would this change?
- Find the sum of the squares of the roots of the polynomial $x^4 - 3x^3 + 12x^2 - x + 15 = 0$.

## Miscellaneousâ€‹

- Suppose you had an efficient algorithm to factor arbitrarily large numbers. How could you use such an algorithm to decrypt messages not meant for you, that are encrypted with an RSA encryption scheme?
- Many online services which require user authentication store hashed passwords, rather than plaintext passwords.
- Explain the rainbow attack: an attack by which an attacker can derive a substantial fraction of plaintext passwords from a leaked table of hashed passwords.
- Explain how to use salting to prevent a rainbow attack.

- What is the difference between a Merkle tree and a hash list? When would you want to use a Merkle tree instead of a hash list?