Editorial for COCI '09 Contest 6 #3 Dosadan
Submitting an official solution before solving the problem yourself is a bannable offence.
This task was inspired by a puzzle from +Ma's Reversing site.
OTP is a theoretically perfect algorithm, if implemented correctly. In most cases, if it fails, it fails due to human error. In this task, the key bit of information is the structure of the plaintext and the key. Let us take a look at the binary coding of plaintext letters. We see that letters a
- z
all have the bit equal to . Numbers 0
- 9
present in the key all have the bit equal to . Space and full stop also have the bit equal to . This is enough information to conclude that in the ciphertext, all letters will have the bit equal to , and space and full stop . This is enough information to solve this task.
For extra points, you might have realized that this now provides enough information for you to try and decrypt the test data completely. Using some guesswork, of course.
Comments