Modular powering with a generated binary modulus #
The evaluator reads a dividend, a requested half-degree, and a squaring count
through pair (pair dividend target) count. Both numerical parameters are
unary word lengths. It rounds the half-degree up to a power of three,
generates the corresponding trinomial, and performs bounded modular squaring.