CODEGATE 2012 – Misc-2

Challenge Description

Alice wants to send a message to Bob in secure way. Alice encrypted a plaintext PA = ¡°IMISSYOU¡± = 0x494D495353594F55 by using DES and obtained ciphertext CA = 0xFA26ED1833264435.
Alice sent the ciphertext CA and the secret key to Bob. The secret key was encrypted by converting each of its letters to a pair of digits giving its position in the typewriter keyboard.

More precisely, the following table is used.

1 2 3 4 5 6 7 8 9 0
1 Q W E R T Y U I O P
2 A S D F G H J K L
3 Z X C V B N M

In this manner, ‘A’ is converted to 21, ‘B’ to 35, etc. In transmission, all of the first digits were lost and the received secret key resulted in the pairs:
?8  ?9  ?9  ?4  ?3  ?5  ?9  ?5

After a few minutes, Bob recovered the secret key and smiled. Bob decided to reply in the same way. Bob encrypts a plaintext PB = 0xB6B2B6ACACA6B0AA by using DES and obtained ciphertext CB = 0x05D912E7CCD9BBCA. What is the secret key which Bob used? (0x????????????????) (Bob¡¯s secret key is different from Alice¡¯s secret key)

With the information provided the Key of Alice can be recovered by trying the different options: ILOVEBOB

The plain text of Alice in HEX is 494D495353594F55
When XORed against \xFF this gives B6B2B6ACACA6B0AA which is the Plaintext for Bob

The Cipher text of Alice in HEX is FA26ED1833264435
When XORed against \xFF this gives 05D912E7CCD9BBCA which is the Ciphertext for Bob

So, when using the Key of Alice, which is in HEX 494C4F5645424F42
We can XOR that against \xFF which gives us B6B3B0A9BABDB0BD which is Bob his key and the answer to the challenge.


perl -e '@a = split(//,"\x49\x4C\x4F\x56\x45\x42\x4F\x42");foreach(@a) { print $_^"\xFF"}'|xxd
0000000: b6b3 b0a9 babd b0bd                      ........
Answer:  B6B3B0A9BABDB0BD

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>