Gauss wrote Disquisitiones Arithmeticae which is a book about number theory. In that book he proved the law of Quadratic reciprocity. He also was the first mathematician to explain Modular arithmetic in a very detailed way. Before Gauss, mathematicians had used modular arithmetic in some cases but did not know much about using it broadly.