power(_:modulus:)

Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

Exponentiation.swift:52
func power(_ exponent: BigUInt, modulus: BigUInt) -> BigUInt

Uses the right-to-left binary method.