Which of these encryption methods is more effective (secure) Vinegere or basic XOR encryption, if the key we use is the same size in both cases?

7 Years
Discussion Span
Last Post by pyTony

A VERY interesting question ! Thanks for asking such thing :)

Both methods are polyalphabetic ciphers. There are some algorithms for polyalphabetic ciphers which computes key size from ciphertext. Once key size is known, ciphertext can be splitted into columns which are vulnerable to simple frequency analysis.
So answer is that both methods have the same level of security.

Edited by 0x69: n/a


Additional idea how to see similarity between Vigenère and XOR ciphers is this- compare encryption formulas-

Vigenère cipher => C = (P+K) mod 26 XOR cipher => Cb = (Pb+Kb) mod 2 Here C/P/K is ciphertext/plaintext/key letters respectivelly and Cb/Pb/Kb is ciphertext/plaintext/key bits respectivelly.

So the only differences are:
1. Vigenère performs modulo 26 arithmetic and XOR performs modulo 2 arithmetic.
2. Vigenère encryption is letter-by-letter and XOR encryption is bit-by-bit.

So as you can see from the formulas both ciphers make substitution in plaintext data. And hence both ciphers are called substitution ciphers, which have little or no security.

BTW, if ciphers uses random key which size equals to size of plaintext, then both ciphers becomes One-time_pad which is unbreakable even in theory !!!

Good luck !

Edited by 0x69: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.