Implements Vigenere/Polyalphabetical Text Crypto Algorithm.
The Vigenere encryption was the creation of the French diplomat, Blaise de Vigenere, 1523-1596.
Like Caesar and all the cryptographers that followed, he did not visualize the cipher in modular
arithmetical terms. Rather he viewed the cypher as a substitution cipher where a different alphabet
was used for the next letter of the message, with the alphabets repeating periodically --- according
to some key. Rather than setting several different alphabets, the cryptographer would use the Vigenere
square.
Here's the idea. For the given key word "FIRST", encrypt each letter of the message taken in the
left-most column to the letter in the keyword-letter column. Thus, the first five letters of the
message use the alphabets corresponding the the "F", "I", "R", "S", and "T" columns. So, the
Vigenere code with this keyword is really five Caesar shifts used in a cyclical fashion. Decription
is carried out working backwards from the keyword-columns to the left-most column. Because we are
really using five alphabets, the Vigenere encryption is sometimes called a polyalphabetic
(many + alphbets) code.
Namespace: LLCryptoLib.CryptoAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
public class TextVigenere : TextAlgorithm |
Visual Basic |
---|
Public Class TextVigenere _ Inherits TextAlgorithm |
Visual C++ |
---|
public ref class TextVigenere : public TextAlgorithm |
Examples
Polyalphabetical text encryption:
CopyC#

TextAlgorithmParameters parms = new TextAlgorithmParameters(3); TextCrypter textEncrypter = TextCrypterFactory.Create(SupportedTextAlgorithms.POLYALPHABETIC,parms); string encrypted = textEncrypter.TextEncryptDecrypt(origString, true); Console.WriteLine("Encrypted string: " + encrypted); string decrypted = textEncrypter.TextEncryptDecrypt(encrypted, false); Console.WriteLine("Decrypted string: " + decrypted); Console.WriteLine();
Inheritance Hierarchy
System..::..Object
LLCryptoLib.Crypto..::..TextAlgorithm
LLCryptoLib.Crypto..::..TextVigenere
LLCryptoLib.Crypto..::..TextPseudoDes
LLCryptoLib.Crypto..::..TextAlgorithm
LLCryptoLib.Crypto..::..TextVigenere
LLCryptoLib.Crypto..::..TextPseudoDes