Bernstein, Daniel J., and Bo-Yin Yang. “Fast Constant-Time Gcd Computation and Modular Inversion”. IACR Transactions on Cryptographic Hardware and Embedded Systems, vol. 2019, no. 3, May 2019, pp. 340-98, doi:10.13154/tches.v2019.i3.340-398.