Today was the first day of our computer science fest : Inspire '05. I was helping out in an event titled "Hackathon" which had to do with cracking and cryptography. We didn't expect much participation for our event but a healthy number of 8 teams turned up. There were two parts to the event: cracking and cryptography. In the cracking part the participants were given three executables (which I downloaded from various sites and was able to crack myself) which they had to crack. The tools provided were ollydbg, w32dasm and xvi32.
For the cryptography part they were given three simple ciphers designed by me, which they had to decipher. The three were something like this:
Cryptography challenge 1 - More than Caesar
guvf xvaq bs pvcure vf xabja nf gur ebgngvba pvcure. gur nafjre gb guvf ceboyrz vf ebgngvba
Cryptography challenge 2 - Bad numbers
69 66 20 79 6f 75 20 64 69 64 20 74 68 69 73 20 63 68 61 6c 6c 65 6e 67 65 20 77 69 74 68 6f 75 74 20 74 68 65 20 68 65 6c 70 20 6f 66 20 61 20 70 72 6f 67 72 61 6d 20 74 68 65 6e 20 79 6f 75 20 6d 75 73 74 20 68 61 76 65 20 74 68 65 20 61 73 63 69 69 20 74 61 62 6c 65 20 69 6e 20 79 6f 75 72 20 68 65 61 64 2e 20 74 68 65 20 61 6e 73 77 65 72 20 74 6f 20 74 68 69 73 20 63 68 61 6c 6c 65 6e 67 65 20 69 73 20 68 65 78 63 6f 64 65 7a
Cryptography challenge 3 - A nice compliment
10011101
10010110
10010001
10011110
10001101
10000110
10001100
10001011
10001101
10010110
10010001
10011000
All these were generated by programs written by me and are pretty simple.
Solution for Cryptography 1
The cipher is a simple shift cipher also known as ROT-13. The letters a-z are translated to n-za-m. A simple PERL program solves it.
$a="guvf xvaq bs pvcure vf xabja nf gur ebgngvba pvcure. gur nafjre gb guvf ceboyrz vf ebgngvba";
$a=~tr/n-za-m/a-z/;
print $a;
Which reveals:
this kind of cipher is known as the rotation cipher. the answer to this problem is rotation
Solution for Cryptography 2
The cipher is basically ASCII codes written in hex. Here is a simple python program to solve it:
s="""69 66 20 79 6f 75 20 64 69 64 20 74 68 69 73 20 63 68 61 6c 6c 65 6e 67 65 20 77 69 74 68 6f 75 74 20 74 68 65 20 68 65 6c 70 20 6f 66 20 61 20 70 72 6f 67 72 61 6d 20 74 68 65 6e 20 79 6f 75 20 6d 75 73 74 20 68 61 76 65 20 74 68 65 20 61 73 63 69 69 20 74 61 62 6c 65 20 69 6e 20 79 6f 75 72 20 68 65 61 64 2e 20 74 68 65 20 61 6e 73 77 65 72 20 74 6f 20 74 68 69 73 20 63 68 61 6c 6c 65 6e 67 65 20 69 73 20 68 65 78 63 6f 64 65 7a """
l=s.split()
m=""
for k in l:m+=chr(int(k,16))
print m
Which reveals:
if you did this challenge without the help of a program then you must have the ascii table in your head. the answer to this challenge is hexcodez
Solution to cryptography 3
This was basically ASCII code changed to binary and complimented by 1. Again python does the job for us :)
s="""10011101 10010110 10010001 10011110 10001101 10000110 10001100 10001011 10001101 10010110 10010001 10011000"""
l=s.split()
m=""
for k in l:m+=chr(~int(k,2)+256)
print m
Which reveals
binarystring
The event went of pretty smoothly and I'm happy that it got a good response. The winners were from MCA CUSAT. Thanks to Chandan, Saurav and all the other juniors who ran around for this event :)
Saturday, October 08, 2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment