A-1.4 Modulo Division

In modulo arithmetic, modulo division is different from regular numeric division. Strictly speaking, there is no such thing as modulo division because the modulo operation itself is a form of division that returns only the remainder. In practice, one uses “modulo division” to mean multiplying by a modular inverse when it exists, i.e., when gcd (a,q) = 1. Modulo division of b by a modulo q is equivalent to computing the modular multiplication b a1 mod q. The result of modulo division is different from that of numeric division, because modulo division always gives an integer (a residue modulo q) (as it multiplies two integers modulo q), whereas numeric division gives a real number. The inverse of an integer modulo q can be computed using the extended Euclidean algorithm (YouTube tutorial).