Monday, January 21, 2008

Vigenère's Cypher and next steps of the project

The Vigenère cypher is also a very simple cypher and is based on Caesar's one. In fact, it is basically a Caesar cypher but on every letter of the message. Therefore, the key is no longer just a shift but a whole word.

For every character in the message is applied a different shift. For example, let's crypt the message "hello world" with the key "secret": ZINCS PGVNU

Even though this is very simple and symmetric cypher, the is no way to decypher a message directly because the key can be any combination of letter and of any length.

This algorithm remained uncracked for three centuries!

There are two methods of cracking it: the first is called the "Babbage and Kasiski" method, and the second, invented by commander Bazeries, consists of basically guessing some key words. Let's start with the latter.

Suppose you know a word of the message which could be at least as long as the key used to crypt the message. We also suppose the key used to crypt the message is a word and not a random letter combination. Now, what we have to do is decrypt the message with the word we think is in there. So, if that word is 8 characters long, we decrypt the first 8 characters of the message with that word. If the result is not satisfying, we repeat the process 1 characters further. And so on until the result sounds good.

An illustration of the process can be found on apprendre-en-ligne.net.


Let's now talk about the project. Due to our major exams this week, we haven't taken the time to work on the project. What is good though is that, as Emeric said in an earlier post, the structure of the program is defined and operational. Now, all there is left is to code the graphical buttons (using Swing) for each algorithm and program each algorithm to decipher a message. That second step is pretty easy since most of the ciphers used are symmetric.

See you later!

Caesar Cypher

The Caeser Cypher is a substitution cypher and one of the oldest ways to crypt a message: it was used during Roman Empire to crypt, military information.

A substitution cypher is cryptology technique in which each letter of a message is replaced by another one: it is therefore a symmetric cypher (the same algorithm is used to cypher and to decypher a message).

In the Caeser Cypher, the key used to cypher a message is a number which is the shift.

Here's an example:
message: HELLO WORLD
shift: 10
cyphered message: ROVVY GYBVN

This is a very easy algorithm and therefore not secure at all! If you don't know the key, you can simply try every shift, i.e. 25 (and not 26 because then you fall on the original cyphered message), and see which message seems the most coherent.

Now, here's a little treat, a nice screenshot of GU-Cypher. As you see, since I'm under Linux, the graphical interface is in GTK. Under Windows however, it will use the normal Windows graphical environment. ;)



P.S.: part of the treat is the website you see in, the background of the screenshot, that's version 4 of the website, online soon if I get my act together!

... And we're back!

Since we both have final exams this coming week (starting tomorrow) , we haven't had the time to post more article or modify the existing ones.
That does not mean the blog is dead. In fact, there will be at least one more article tomorrow by 5 P.M. at the latest! (That is because of school conditions ... )

After what, more article will be posted, but about a week later only since, as I already said, we have exams until Friday.

Thanks for your time and support!