There was a small bug in the new modexp implementation where sometimes factoring an even modulus into and odd number times a power of two left a leading zero on the odd number. This threw off some of the other parts of the algorithm, leading to incorrect results. This PR fixes the issue and adds test cases for it.
Description
There was a small bug in the new modexp implementation where sometimes factoring an even modulus into and odd number times a power of two left a leading zero on the odd number. This threw off some of the other parts of the algorithm, leading to incorrect results. This PR fixes the issue and adds test cases for it.