5

The Vigenère cipher can relatively easy be broken when the key size is small compared to the size of the message. One first finds the length of the key, and then uses frequency analysis to actually find the key.

  1. How can one "add" something non-complicated to the Vigenère cipher to make it harder to break? Would it for example help to first apply a permutation the message in some way?

  2. Are there any general strategies for this when using other ciphers?

Mike Edward Moras
  • 18,161
  • 12
  • 87
  • 240
Thomas
  • 1,184
  • 5
  • 16
  • 33

3 Answers3

3

For Vigenère specifically, you can make it harder to break by increasing the size of the key and by making the key truly random. If the key is truly random, longer than the plaintext and never reused, then Vigenère becomes equivalent to a One Time Pad.

Even without going that far, it is possible to strengthen many, though not all, cyphers by lengthening and/or randomising the key.

rossum
  • 769
  • 4
  • 12
3

Sticking to monoalphabetic ciphers, Vigenere can be combined with a secret random-like substitution of the plaintext or/and ciphertext alphabet, making it significantly more resistant.

If Vigenere encryption is $$x_j\mapsto (x_j+K[j\bmod k])\bmod{26}$$ where array $K$ is the key or length $k$, I'm discussing $$x_j\mapsto (S[x_j]+K[j\bmod k])\bmod{26}$$ $$x_j\mapsto S'[(x_j+K[j\bmod k])\bmod{26}]$$ $$x_j\mapsto S'[(S[x_j]+K[j\bmod k])\bmod{26}]$$ where arrays $S$ or/and $S'$ are secret 26-letter permutations, which extends the key. Using permutations is necessary so that decryption is possible (this is not required for $K$).

Another option is to use a (possibly public) substitution $S$, and two (or more) rounds of Vigenere cipher with different keys $K$ and $K'$ (preferably: of coprime length): $$x_j\mapsto (S[(x_j+K[j\bmod k])\bmod{26}]+K'[j\bmod k'])\bmod{26}$$

None of this is secure; in particular, any variation on this line suffers that with the same key, identical letters at the same position in the ciphertext occurs iff there are identical letters at the corresponding position in the plaintext, which is a serious weakness.

fgrieu
  • 149,326
  • 13
  • 324
  • 622
2

You can greatly increase the security of the Vigenere cipher by encrypting a second time with a key whose length is relatively prime to that of the first key.

Meler Lawler
  • 325
  • 1
  • 10