diff --git a/_posts/2022-09-05-securecommunication.markdown b/_posts/2022-09-05-securecommunication.markdown index 344c57d..c0a4fe2 100644 --- a/_posts/2022-09-05-securecommunication.markdown +++ b/_posts/2022-09-05-securecommunication.markdown @@ -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? diff --git a/index.html b/index.html index 6614f56..b1c1182 100644 --- a/index.html +++ b/index.html @@ -45,4 +45,4 @@ layout: default {% endif %} {% endif %} - + \ No newline at end of file