He first turns M into an integer corresponding to : This can be done quickly using the method of exponentiation by squaring .

He then computes the ciphertext corresponding to : This can be done quickly using the method of exponentiation by squaring .
