Source: https://nitaj.users.lmno.cnrs.fr/CryptRSA.pdf