implement RSA.modExp