Skip to content

Commit

Permalink
Update DESCRIPTION.md (#36)
Browse files Browse the repository at this point in the history
fix minor typo
  • Loading branch information
markrouz authored Feb 17, 2025
1 parent c7dc315 commit 1e79d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cryptography/level-7/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The _why_ of this theorem is some advanced math stuff that, to be honest, few pe
Computing `(p-1)*(q-1)` is trivial for Alice (armed with knowledge of `p` and `q`) but impossible to anyone else (assuming that `p` and `q` are large), because the human race lacks an efficient algorithm to factor products of large prime numbers!

Recall that `e*d` in the exponent of `m**(e*d) mod n`?
For any `e`, knowing `(p-q)*(q-1)` allows Alice to compute a `d` such that `e*d == 1`.
For any `e`, knowing `(p-1)*(q-1)` allows Alice to compute a `d` such that `e*d == 1`.
While this seems silly, it is the core of RSA.
Alice chooses a number `e` (typically fairly small to reduce computation costs, but not too small to cause certain security issues) and computes the corresponding multiplicative inverse `d`.
This leads to encryption of plaintext `m` (`m**e mod n == c`) and decryption! `c**d mod n == (m**e)**d mod n == m**(e*d) mod n == m**1 mod n == m`.
Expand Down

0 comments on commit 1e79d57

Please sign in to comment.