From 102954ace6ef8f8367d884c0ca8a69ce24c532ad Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:44:51 +0000 Subject: [PATCH] Documentation for 794e1765bd425d4f1771c6731940fa9f58399bac --- dd/d12/vigenere__cipher_8cpp.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dd/d12/vigenere__cipher_8cpp.html b/dd/d12/vigenere__cipher_8cpp.html index 173b19ab0..bb6c798f9 100644 --- a/dd/d12/vigenere__cipher_8cpp.html +++ b/dd/d12/vigenere__cipher_8cpp.html @@ -135,15 +135,15 @@ Functions
The Vigenère cipher is a method of encrypting alphabetic text by using a series of interwoven vigenere ciphers, based on the letters of a keyword. It employs a form of polyalphabetic substitution.
The encryption can also be represented using modular arithmetic by first transforming the letters into numbers, according to the scheme, A → 0, B → 1, ..., Z → 25. Encryption of \(\i^{th}\) character in Message M by key K can be described mathematically as,
+The encryption can also be represented using modular arithmetic by first transforming the letters into numbers, according to the scheme, A → 0, B → 1, ..., Z → 25. Encryption of \(i^{th}\) character in Message M by key K can be described mathematically as,
\[ E_{K}(M_{i}) = (M_{i} + K_{i})\;\mbox{mod}\; 26\]
-while decryption of \(\i^{th}\) character in Cipher C by key K can be described mathematically as,
+while decryption of \(i^{th}\) character in Cipher C by key K can be described mathematically as,
\[ D_{k}(C_{i}) = (C_{i} - K_{i} + 26)\;\mbox{mod}\; 26\]
-Where \(\K_{i}\) denotes corresponding character in key. If \(\|key| < |text|\) than same key is repeated untill their lengths are equal.
+Where \(K_{i}\) denotes corresponding character in key. If \(|key| < |text|\) than same key is repeated untill their lengths are equal.
For Example, If M = "ATTACKATDAWN" and K = "LEMON" than K becomes "LEMONLEMONLE".