Bernstein, D. J., and B.-Y. 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.