Extended Euclidean Algorithm
Extended Euclidean Algorithm is an extension of the Euclidean Algorithm which, as well as finding the greatest common divisor of two integers and , also finds integers and such that:
This is known as Bézout's identity.
It's commonly used to find the modular multiplicative inverse of a number (see Modular Arithmetic), which is a key step in generating keys for RSA.