The Virginia cipher (also translated as the Vergenal cipher) is an encryption method based on the Caesar cipher. It uses a series of Caesar ciphers to form an encryption algorithm for the cipher alphabet. It is a simple form of multi-table ciphers.
The Virginia cipher:
The Virginia cipher, which puts all 26 arrangements of the Caesar cipher in a table, forming an encrypted alphabet with 26 rows and 26 columns. In addition, the Virginia password must have a key consisting of letters, at least one letter, and at most the same number of letters as the plaintext letters.
In the Caesar cipher, each letter undergoes a certain offset value conversion. For example, when the offset value is 3, then B is converted to E, C is converted to F... In Virginia cipher encryption, it is composed of Caesar ciphers with different offsets.
To generate a password, you need to use a table method. This table (as shown in the figure) contains 26 rows of alphabet, and each row is offset by one bit from the previous row to the left row. Which line of the alphabet is used for encryption is based on the key, and the key will keep changing during the encryption process.
For example, suppose the plaintext is:
Choose a keyword and repeat it to get the key, for example, when the key is LIMN, the key is:
The first letter B in the plaintext corresponds to the first letter L in the key. Use the letters L in the encrypted alphabet to encrypt, and get the ciphertext M of the first letter. Similarly, the second plaintext letter is T, which is encrypted with row I in the table to get the second ciphertext B. By analogy, we can get:
Plain text: BTTACKATDAFG key: LIMNLIMNLIMN cipher text: MBFNNSMGOIRT
The decryption process is the reverse process of encryption. For example, the first letter of the key corresponds to the L line of the alphabet, and it is found that the first letter M of the ciphertext is located in the B column, so the first letter of the plaintext is B. The second letter of the key corresponds to the I line of the alphabet, and the second letter B of the ciphertext is located in the T column of this line, so the second letter of the plaintext is T. Wait, you can get the plaintext.