Fix typo
This commit is contained in:
parent
c0041dba16
commit
30254f5400
@ -97,11 +97,12 @@ Consider the following algorithm.
|
||||
`m`, `n`, `a` `b` and `c` are positive numbers.
|
||||
`m` is the plaintext encoded into a number.
|
||||
`c` is the ciphertext.
|
||||
`mod` is the modulo operator denoting the remainder of a division. `10 mod 3 = 1` as `9` is a multiple of `3`.
|
||||
|
||||
- Public Key -> `(n, a)`
|
||||
- Private Key -> `(n, b)`
|
||||
- Encryption Algorithm -> `c = (m^a) mod n`
|
||||
- Decryption Algorithm -> `n = (c^b) mod n`
|
||||
- Decryption Algorithm -> `m = (c^b) mod n`
|
||||
|
||||
While the algorithm looks simple, not all numbers satisfy the above equations. However, the real beauty of this algorithm lies in the fact that given a sufficiently complex public key, that is given `n` and `a`, it is almost impossible to determine the private key `b`.
|
||||
|
||||
@ -112,11 +113,11 @@ Consider the following example. The numbers below are not magic numbers and can
|
||||
|
||||
For simplicity, let us assume that the message to transmit is `5`.
|
||||
|
||||
The encrypted cipher text is therefore `5^3 % 22 = 15`.
|
||||
The encrypted cipher text is therefore `5^3 mod 22 = 15`.
|
||||
|
||||
`15` is transmitted to the receiver.
|
||||
|
||||
The receiver calculates plain text as `15^7 % 22 = 5`.
|
||||
The receiver calculates plain text as `15^7 mod 22 = 5`.
|
||||
|
||||
## Is this enough?
|
||||
|
||||
|
@ -45,4 +45,4 @@ layout: default
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user