| Welcome to Crypto. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Vigenère Cracker | |
|---|---|
| Topic Started: Oct 1 2005, 09:51 AM (2,304 Views) | |
| Revelation | Oct 1 2005, 09:51 AM Post #1 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, I have finished my first version of the Vigenere Cracker. It includes functions like easy shifting using the interface and calculating the IOC. The source is included in the .zip, along with the .exe. I hope you like it
Download it:
|
|
RRRREJMEEEEEPVKLWENFNVJKEEEEEAOLKAFKLXCFZAASDJXZTTTTTTTLSIOWJXMOKLAFJNNKFNXN RAGRBAQEMHIGDJVDSEOXVIYCELFHWLELJFIENXLRATALSJFSLCYTKLASJDKMHGOVOKAJDNMNUITN RRRRLJVEEEEECLYVYHNVPFTAEEEEEMWLMEIRNGLARWJAKJDFLWNTIERJMIPQWOTZEOCXKNUBNXCN RJIRPOWEANFUSNCZVDVZNMSFEKLOEPZLDKDJWSAAAAAAAOERHJCTNCKFRIMVKSOFOMKMANREWNBN RZUDRGXEEEEENFQIDVLQNCKNEEEEEDGLLLLLLAWIOSNCDARLODMTOEJXMILDFJROTKJSDNLVCZNN | |
![]() |
|
| Revelation | Oct 3 2005, 08:17 PM Post #2 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I have made some small fixes to the application
|
|
RRRREJMEEEEEPVKLWENFNVJKEEEEEAOLKAFKLXCFZAASDJXZTTTTTTTLSIOWJXMOKLAFJNNKFNXN RAGRBAQEMHIGDJVDSEOXVIYCELFHWLELJFIENXLRATALSJFSLCYTKLASJDKMHGOVOKAJDNMNUITN RRRRLJVEEEEECLYVYHNVPFTAEEEEEMWLMEIRNGLARWJAKJDFLWNTIERJMIPQWOTZEOCXKNUBNXCN RJIRPOWEANFUSNCZVDVZNMSFEKLOEPZLDKDJWSAAAAAAAOERHJCTNCKFRIMVKSOFOMKMANREWNBN RZUDRGXEEEEENFQIDVLQNCKNEEEEEDGLLLLLLAWIOSNCDARLODMTOEJXMILDFJROTKJSDNLVCZNN | |
![]() |
|
| insecure | Oct 3 2005, 08:33 PM Post #3 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Will you be doing a Linux version? |
![]() |
|
| Donald | Oct 4 2005, 03:39 AM Post #4 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Nice program! Two suggestions for future versions: 1: extend the IOC count further. You can be most certain that you have the period when you see the IOC spike at the same interval multiple times. 2: Add in a frequency count once you've set the period. The next thing you need to know in breaking a Vigenere is what are the frequencies for each alphabet so you can determine the key. Now if I can just get python to download and install I can look at rot13's tool. Donald |
![]() |
|
| Revelation | Oct 4 2005, 10:24 AM Post #5 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I am not sure what you mean with the first one. I will make a frequency checker, thanks for the tip
|
|
RRRREJMEEEEEPVKLWENFNVJKEEEEEAOLKAFKLXCFZAASDJXZTTTTTTTLSIOWJXMOKLAFJNNKFNXN RAGRBAQEMHIGDJVDSEOXVIYCELFHWLELJFIENXLRATALSJFSLCYTKLASJDKMHGOVOKAJDNMNUITN RRRRLJVEEEEECLYVYHNVPFTAEEEEEMWLMEIRNGLARWJAKJDFLWNTIERJMIPQWOTZEOCXKNUBNXCN RJIRPOWEANFUSNCZVDVZNMSFEKLOEPZLDKDJWSAAAAAAAOERHJCTNCKFRIMVKSOFOMKMANREWNBN RZUDRGXEEEEENFQIDVLQNCKNEEEEEDGLLLLLLAWIOSNCDARLODMTOEJXMILDFJROTKJSDNLVCZNN | |
![]() |
|
| Donald | Oct 4 2005, 12:31 PM Post #6 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Your IOC was only calculated out for 20 shifts. If the period of the cipher was, lets say, 8, then the IOC should spike up at positions 8, 16, 24, 32, etc. Now the IOC is just a statistic, it will vary. In the example that your program ships with, (the latest Vigenere challenge), the IOC spikes at the first period, but is ambiguous at the second. What if those had been reversed? You might think that the period was twice what it really was, or you might miss the period all together. However, if your IOC showed 100 shifts, or even all possible shifts, then we would be able to pick the pattern of spikes out of MORE multiples of the period and have a more certain chance of determining the correct period. Donald |
![]() |
|
| Revelation | Oct 4 2005, 12:43 PM Post #7 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I see! I will change that in the next version
The keylength of 20 is long enough, right?
|
|
RRRREJMEEEEEPVKLWENFNVJKEEEEEAOLKAFKLXCFZAASDJXZTTTTTTTLSIOWJXMOKLAFJNNKFNXN RAGRBAQEMHIGDJVDSEOXVIYCELFHWLELJFIENXLRATALSJFSLCYTKLASJDKMHGOVOKAJDNMNUITN RRRRLJVEEEEECLYVYHNVPFTAEEEEEMWLMEIRNGLARWJAKJDFLWNTIERJMIPQWOTZEOCXKNUBNXCN RJIRPOWEANFUSNCZVDVZNMSFEKLOEPZLDKDJWSAAAAAAAOERHJCTNCKFRIMVKSOFOMKMANREWNBN RZUDRGXEEEEENFQIDVLQNCKNEEEEEDGLLLLLLAWIOSNCDARLODMTOEJXMILDFJROTKJSDNLVCZNN | |
![]() |
|
| Donald | Oct 4 2005, 12:46 PM Post #8 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Probably for anything we are doing here, but no guarantees, the encryptor can make the key as long as they want and the longer it is the harder the cipher will be to crack. Donald |
![]() |
|
| rot13 | Oct 4 2005, 02:31 PM Post #9 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
One problem with that, though, is that unless you have a really long text, going out to 100 shifts probably isn't going to reveal as much as you would think. The IOC becomes less reliable with fewer letters. You might see a few spikes early on, but when you get to where there are only 3 or 4 letters involved in the computation, it will be very skewed. I usually used len/8 as the formula to determine how many periods to try, so it adjusts based on the length of the text. That was just an arbitrary value, but it is probably reasonable - it requires a minimum of 8 letters per period to compute the IOC. |
![]() |
|
| Donald | Oct 4 2005, 03:13 PM Post #10 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I see my mistake. I was assuming you would WRAP the text to get your IOC. But unless the text just happens to end exactly on the cipher period, the wrapped text wouldn't be lined up correctly. Hmmm, live and learn. Thanks! Donald |
![]() |
|
| Revelation | Oct 4 2005, 03:54 PM Post #11 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, the new version has been released!
This version includes an extended IOC and a frequency checker. I hope you like it! |
|
RRRREJMEEEEEPVKLWENFNVJKEEEEEAOLKAFKLXCFZAASDJXZTTTTTTTLSIOWJXMOKLAFJNNKFNXN RAGRBAQEMHIGDJVDSEOXVIYCELFHWLELJFIENXLRATALSJFSLCYTKLASJDKMHGOVOKAJDNMNUITN RRRRLJVEEEEECLYVYHNVPFTAEEEEEMWLMEIRNGLARWJAKJDFLWNTIERJMIPQWOTZEOCXKNUBNXCN RJIRPOWEANFUSNCZVDVZNMSFEKLOEPZLDKDJWSAAAAAAAOERHJCTNCKFRIMVKSOFOMKMANREWNBN RZUDRGXEEEEENFQIDVLQNCKNEEEEEDGLLLLLLAWIOSNCDARLODMTOEJXMILDFJROTKJSDNLVCZNN | |
![]() |
|
| PulsarSL | Oct 4 2005, 07:11 PM Post #12 |
|
Super member
![]() ![]() ![]() ![]() ![]() ![]()
|
I know it's a dumb question, but what's IOC? I know what it stands for, but what exactly is it, and how is it helpful/used? Anybody know of any really good sites that explain stuff like this to beginners? I hate to bug you guys with every one of my noobie questions. Thanks Pulsar |
![]() |
|
| Revelation | Oct 4 2005, 07:22 PM Post #13 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Donald explains it here.
|
|
RRRREJMEEEEEPVKLWENFNVJKEEEEEAOLKAFKLXCFZAASDJXZTTTTTTTLSIOWJXMOKLAFJNNKFNXN RAGRBAQEMHIGDJVDSEOXVIYCELFHWLELJFIENXLRATALSJFSLCYTKLASJDKMHGOVOKAJDNMNUITN RRRRLJVEEEEECLYVYHNVPFTAEEEEEMWLMEIRNGLARWJAKJDFLWNTIERJMIPQWOTZEOCXKNUBNXCN RJIRPOWEANFUSNCZVDVZNMSFEKLOEPZLDKDJWSAAAAAAAOERHJCTNCKFRIMVKSOFOMKMANREWNBN RZUDRGXEEEEENFQIDVLQNCKNEEEEEDGLLLLLLAWIOSNCDARLODMTOEJXMILDFJROTKJSDNLVCZNN | |
![]() |
|
| Donald | Oct 4 2005, 07:52 PM Post #14 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
We LIKE being bugged. Explaining crypto is fun, so ask all you want, PLEASE! Besides, I'm a noobie as well.
A classical crypto course by Randy Nichols (LANAKI) President of the American Cryptogram Association from 1994-1996 is available online. A nice hmtl version of the first 12 lessons has been created by Joe Peschel, and can be found at: http://members.aol.com/jpeschel/lessons.htm The full 24 lessons can be found here: http://www.und.edu/org/crypto/crypto/lanaki.crypt.class/ Donald |
![]() |
|
| rot13 | Oct 4 2005, 07:54 PM Post #15 |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
IOC is Index of Coincidence. It is used to detect whether a text is likely to be monoalphabetic or polyalphabetic. Basically, if a text is English, or a monoalphabetic substitution of english, the PHI function of the text should be around 0.06. If it is closer to 0.03, the text is probably not monoalphabetic. When we use it to determine key length, what we are doing is trying a key length of 1, then a key length of 2, etc, looking for a key length that gives a PHI close to 0.06. There is a good discussion here: Lanaki Lesson 2 That discussion is just one lesson of a nice course in classical cryptography. That's a good place to start. The links for all the lessons are there on the left. The formula I use is to sum n*(n-1) where n is the number of occurrences of each letter, then divide the total sum by t*(t-1) where t is the total number of letters . If there are 4 A's, 7 B's and 3 C's, you add 4*3 + 7*6 + 3*2, then divide that total by 14*14 (14 = 4 + 7 + 3). When using this to detect key lengths in a polyalphabetic cipher, you try each possible key length. For a key length of 3, you compute 3 IC's, the IC for the characters at key position 1, the IC for the chars at key position 2, and the IC for the chars at key position 3. Then you average these values. You do the same thing for each key length, and you should see that most values are in the 0.03-0.04 range, and the correct key length should have a value closer to 0.06. For example, here is the output for a particular Vigenere cipher: At key length = 1, ic = 0.0424 At key length = 2, ic = 0.0476 At key length = 3, ic = 0.0413 At key length = 4, ic = 0.0695 At key length = 5, ic = 0.0401 At key length = 6, ic = 0.0439 At key length = 7, ic = 0.0398 At key length = 8, ic = 0.0698 At key length = 9, ic = 0.0382 At key length = 10, ic = 0.0411 At key length = 11, ic = 0.0450 At key length = 12, ic = 0.0691 You see good numbers at 4, 8, 12. That suggests that 4 may be the key length. You get echoes again at 8 and 12 because they are multiples of 4. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · General · Next Topic » |





![]](http://209.85.122.85/static/1/pip_r.png)



2:05 AM Nov 28