Skip to content

Commit

Permalink
Fix typo in comment in RSA class
Browse files Browse the repository at this point in the history
  • Loading branch information
pgp authored and Legrandin committed Jun 6, 2022
1 parent f674baa commit 85449d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Crypto/PublicKey/RSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _decrypt(self, ciphertext):
m2 = pow(cp, self._dq, self._q)
h = ((m2 - m1) * self._u) % self._q
mp = h * self._p + m1
# Step 4: Compute m = m**(r-1) mod n
# Step 4: Compute m = m*(r**(-1)) mod n
result = (r.inverse(self._n) * mp) % self._n
# Verify no faults occurred
if ciphertext != pow(result, self._e, self._n):
Expand Down

0 comments on commit 85449d8

Please sign in to comment.