Barrett reduction
In modular arithmetic, Barrett reduction is an algorithm designed to optimize the calculation of without needing a fast division algorithm. It replaces divisions with multiplications, and can be used when is constant and . It was introduced in 1986 by P.D. Barrett.
Historically, for values , one computed by applying Barrett reduction to the full product . In 2021, Becker et al. showed that the full product is unnecessary if we can perform precomputation on one of the operands.