11
$\begingroup$

You are the head of the cryptanalysis department, and you are pretty nervous because you have sent your best field agent, John, who also happens to be a cryptographer in your team, to find out who in your office has been selling state secrets, and today's the day he is supposed to report back. You and your team are waiting in the common room of the department, all worried. You look at everyone's face and try to gauge everyone's reaction but fail to do so because you are a cryptanalyst not a psychologist. You walk around the room when suddenly your pager beeps, making everyone jump. You take it out, and see that it reads:

TRACK THE INCOMING. 5 MINS.

You let everyone know what it says. The code is clear to everyone. John will be contacting through multiple channels, and you need to keep track of the order they come through, all starting in 5 minutes.

"Everybody, hands on station! I want timestamps on every incoming message through all sources, whether hard or soft. GO!" You shout. You yourself proceed to man your terminal.

Everybody does their job, and exactly 5 minutes later, a printout comes through on one of the printers:

16e46c8cebc3dc8c6073a8d87159cf1d38aedf7b5fc5f63749e0fb6d17073973eea7a4

A second later, another pops out of another printer:

9e871680fdb729dd7f391c42a30edd94fd3ddb712cc59578cc418fc4c8903cb5fb0fe3

Then a third, using another different printer:

edf32055eae75b8d66377ce845c85f1f7188c70fbac45c6381a0d78acedb16d5f23b49

A fourth:

ced8744c5164541b732491d1c5cdcff73b6ced458cc48533fed81317ce177051b357c7

A fifth:

dcd7174c4d8f8a8c93b4edcf86c1ede3b078d3b3a416305ea1d71330edf3735c997b3f

And then suddenly all goes silent. No more printouts. You still wait for a few minutes, and when nothing is heard, you all finally pour in to see what the message says.

Gibberish.

But you all are trained to look through such stuff, and although you don't find anything immediate, you all notice that everything is in hex.

You all ponder for some time, when suddenly one of the printer crackles to life. You all turn around and pick up the printout.

caesar 4 h b 32 4 7-4 flip h 70

Everyone takes a copy of the codes and start trying to decipher the messages, but no one makes any headway as to what to do. Your printers are silent for hours so you know no more messages. This must be the entirety of it.

As head of the department, you need to rise up and solve this, to save your state and find out the traitor.

Do you have it in you to find the message?

A little side note on the title:

Relatively easy cipher here means that if you know the encryption, the decryption is straightforward. Not even brute forcing is required. But if not, then oh boy...

Hint 1:

The length of the strings is a familiar number.

Hint 2 (Semi-decisive):

The h in the last transmission is also available as a hint in the story. Something that links the first 5 ciphers.

$\endgroup$
4
  • $\begingroup$ Does the h stand for a hash function? The length of all the strings is 70, which indicates a hash. $\endgroup$
    – user37842
    Commented May 13, 2020 at 15:26
  • 1
    $\begingroup$ The h is in the story. Small clue : If h is a hash and even if you know the hash, then you can't decrypt this by hand. But as I mentioned, the cipher can be cracked by hand ( almost , as there's nothing to brute force ) if you know the encryption. $\endgroup$ Commented May 13, 2020 at 15:29
  • $\begingroup$ "I want timestamps on every incoming message through all sources, whether hard or soft." What is meant by "hard or soft"? Is this the "h"? $\endgroup$
    – user37842
    Commented Jun 10, 2020 at 20:43
  • $\begingroup$ @Mike Sorry for the extremely late reply, but no, hard or soft just means hard copy (printed paper etc) or soft (database, screenshots, etc). $\endgroup$ Commented Jul 1, 2020 at 20:57

1 Answer 1

7
$\begingroup$

The plaintext is:

you all need to alert the government that J L Morrison is the traitor and has been selling state secrets to the Russians go

Sadly, the intelligence was not received in a timely manner and John's employer is now a Russian vassal state. Perhaps the Russians will teach their new officers some proper cryptanalysis.

Take the five strings of hex digits in order and consider them as a single ciphertext:

16e46c8cebc3dc8c6073a8d87159cf1d38aedf7b5fc5f63749e0fb6d17073973eea7a4
9e871680fdb729dd7f391c42a30edd94fd3ddb712cc59578cc418fc4c8903cb5fb0fe3
edf32055eae75b8d66377ce845c85f1f7188c70fbac45c6381a0d78acedb16d5f23b49
ced8744c5164541b732491d1c5cdcff73b6ced458cc48533fed81317ce177051b357c7
dcd7174c4d8f8a8c93b4edcf86c1ede3b078d3b3a416305ea1d71330edf3735c997b3f

Use the Index of Coincidence to detect any periodic phenomena in the hex digits.

The yellow plot (the Kappa test) is similar to Autocorrelation and counts the number of digits that repeat at each distance. This plot tells us that digits tend to recur at distances 7, 14, 21, etc.

The blue plot (the Kullback Test) arranges the text into different widths and for each width counts the average IoC down every column. The plot tells us that on a width of 7, or 14, or 21, or so on, each column contains a lot of repeated hex digits.

Periodic IoC plot of hex digits

Since hex digits can be used to represent binary data, find out if the same period exists at the binary level. Convert the hex strings to binary:

1    6    e    4    6    c    8    c    e    b      [...]
0001 0110 1110 0100 0110 1100 1000 1100 1110 1011   [...]

Repeat the IoC test. Sure enough, the period of 7 shows up at the binary level too, but the period of 14 is an even stronger hit.

Periodic IoC plot of binary digits

Investigate the period of 7 further. Break the binary string into 7-bit "words", and count the number of times a 1 bit appears at each of the 7 positions in that word. (In other words, write the string on a width of 7 and count the 1 bits in each column.)

enter image description here

There is some roughness on bits 2, 4, and 5. Recall that a Hamming(7, 4) code uses bits 2, 4, 5, and 6 as its data bits. Group the binary string into seven-bit groups and attempt to apply the Hamming code to decode each group into a four-bit data group. dCode's online tool can be used for this, though I did write my own to overcome dCode's limit on input length. My own tool also tells me that each group has only a single flipped bit.

Encoded: 0001011 0111001 0001101 1001000 1100111 0101111  [...]
Errors:  0000100 0100000 0000010 0000100 0000001 0100000  [...]
Fixed:   0001111 0011001 0001111 1001100 1100110 0001111  [...]
Data:      0 111   1 001   0 111   0 100   0 110   0 111  [...]

The result is 800 bits long, and the first bit of every group of 8 is always a zero. This is probably ASCII- or UTF-8-encoded text, so interpret it as such:

ytgtiraicRooohsasnruuavaoibgesaletntestslerJioetsilrnLsrnatantmMtastoneteohneetsehnredlshgdetrthleeo

There are 100 characters of text here, a square number. Print them on a width of 10. The plaintext appears on the columns.

ytgtiraicR
ooohsasnru
uavaoibges
aletntests
lerJioetsi
lrnLsrnata
ntmMtaston
eteohneets
ehnredlshg
detrthleeo

youallneedtoalertthegovernmentthatJLMorrisonisthetraitorandhasbeensellingstatesecretstotheRussiansgo

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.