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?

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.
http://www.security-forums.com/viewtopic.php?t=15961

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 !

Thanks for the reply!

Maybe however you look some of my comments of "security" of XOR encryption.

Just encrypt the file with XOR encryption to see what I mean.

http://www.daniweb.com/forums/post1253810.html#post1253810

Also at end of thread same page there is attack when you have copy of any original file in your disposal.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.