Vigenère chiper

I'd want to know the principle that allows to obtain the encrypted character from the clear and the key, without using the Vigenère table. You can extend the Vigenère cipher on the set of all characters represented by a char variable?
Yes, I can tell you from recent experiance that you can do this with a moderate to high level of success. Building the table won't be your biggest hertal though, gathering together a large enough sample set from the target language will be.

May I recommend some links to you?
Last edited on
I'm looking for the theoretical case that allows you to use the Vigenere cipher with any alphabet of any length without any tables.
The Vigenere Table is a way to help you visualize what you are doing mathmatically, the same way a Truth Table helps you visualize a Boolean Function to reduce the number of logical operations on an equation. So unless you are trying to specifically draw the Vigenere Table to the screen I suggest dropping that line of research, trust me it will only lead to confusion and round about answers that don't quite work. I've had a lot of success at this using the Kisiski Examination: http://en.wikipedia.org/wiki/Kasiski_examination and it feels like the strings and math libraries were written for this process. There are other processes that are said to work even better then this one but I stepped away from this project for a little while and haven't had time to play with those yet.
Ok, I've read it.
Can you give me a practical example:
I have an alphabet of 28 characters (26 common alphabet + '?' + '!')
My word is 'hello' and my key is 'home'. Without building the table, how do I find the encrypted characters?
Oh, if you just want to Encrypt then use XOR, I honestly thought you were asking about Decryption which is by far much more interesting of a topic, but unfortunatly cannot be discussed on the internet in detail. But here you go:
1
2
3
4
5
/*Over simplified, this will use the entire ASCII instead of the bounds you defined*/
for(int i = 0; i < Word.length(); i++)
{
     Word[i] = Word[i] ^ (Key[i % Key.length()]);
}
I want to find the characters corresponding to 'hello', when I use the key 'home'(for example), without using the table, not just encrypt.
Topic archived. No new replies allowed.