I present the very basic concepts of modular arithmetic as they are needed in cryptography. Important topics are: congruences, Fermat's theorem and the Euler function.
Extended Euclidean algorithm computes the greatest common divisor of two numbers as well as the coefficients of the Bézout's idententity. This is used for computing the modulo inverse of a number and that is needed in public cryptography.