# 九章算术 & Fermat Little Theorem

500 BCE Confucius Period 孔子时代，Chinese ancient Math text “Nine Chapters of Arithmetic” 中国 (九章算术) already recorded the following:
$p \mid (2^{p} - 2) \text { for p prime}$
$\iff 2^{p} \equiv 2 \mod {p}$

Fermat Little Theorem (17th century):
$m^{p} \equiv m \mod {p}$

Note: Computer Cryptography is based on two math theorems: Chinese Remainder Theorem and Fermat Little Theorem.