RSA implementation step 4