The puzzlehunt has ended, thanks for playing!
Puzzlehunt 2017

Reset Puzzle State

Collision

Bond looked down at the body. 006 lay in a pool of her own blood with one hand still on the secure file storage device. The names of all of SPECTRE's agents were contained within but they were encrypted with a password known only to 006.

Beside the body was a scrap of paper. There was nothing on it beside blood stains and two groups of meaningless letters and numbers. The first group read:

255044462d312e330a25e2e3cfd30a0a0a312030206f626a0a3c3c2f5769
6474682032203020522f4865696768742033203020522f54797065203420
3020522f537562747970652035203020522f46696c746572203620302052
2f436f6c6f7253706163652037203020522f4c656e677468203820302052
2f42697473506572436f6d706f6e656e7420383e3e0a73747265616d0aff
d8fffe00245348412d3120697320646561642121212121852fec09233975
9c39b1a1c63c4c97e1fffe017346dc9166b67e118f029ab621b2560ff9ca
67cca8c7f85ba84c79030c2b3de218f86db3a90901d5df45c14f26fedfb3
dc38e96ac22fe7bd728f0e45bce046d23c570feb141398bb552ef5a0a82b
e331fea48037b8b5d71f0e332edf93ac3500eb4ddc0decc1a864790c782c
76215660dd309791d06bd0af3f98cda4bc4629b1f72791d851c2a252b346
78025a37ea85a8ec4fe059600d11f82c3956e41291f4c9558b1492fdd262

and the second:

6829642d43544b147905b1ab8e875e4f5874641e002645072a5e504a320d
0d1a0f005041544c2b01682c4e110d54455d434259225b311d5011485d53
10463b4336551707101e020054005f4e3725320001114502415200474926
47630e4c3c3a1241410b04535f005f4672167d5d0a04105c130d42031633
4a21591040315144740b54165e5e000d4c150a5b066c1044425d00432aab
b09af47045203b36424344491a534411090101404f5256e05dcc7d4c1901
f450c281b45528f38d9ac40b2c31b9f6d2960d604271bade75d7764429ae
4793e6a09422ff24595d854a4fd660974de3066e64b75165e31a2d92b397
0b51851e524ec7c01dfb662c76c027ac5477678ca633ebc48f00d7b6d50b
874723c3ef43b8debe6346564ae30bc450348528bd7d02e1ff1cac785847
3b5276100955b7eb050aa2984cb8a3c9692316abbf52e3aa28ee82628371
56220e5f8ff7cdcb3cc0370f793195595a3ec466f899ac75e771f489f368

In her dying moments, 006 had scrawled some symbols on the floor in her own blood. There was a shape that looked like an "X", an "O" and what could perhaps have been an "R".

Bond grabbed his phone and sent a photo of the page to Q. A few minutes later he had a single word reply. What was it?

Solution

author: Rich Wareham (rjw57)

There's a heavy hint towards XOR in the puzzle. XOR-ing the two files together gives what is nearly the answer:

My knee's SHATTERED. I'm bleeding badly. I've encrypted this file using a one
time pad with a SHA1 hash of 918dcd435b36aec0d3a467d9f10ec852e8fc008a. The
password is the answer to this riddle:
<GIBBERISH>Hurry, 007. There's not much time left!

The problem is that <GIBBERISH> is just that, gibberish. Inspecting the SHA1 checksum of both files, we find that one file has the checksum mentioned in the message. Surely it must be the one time pad then?

The puzzle is entitled collision and we have what appears to be the wrong file but with the correct hash. Perhaps we need to find a file which collides with the pad we've been given?

This puzzle could not have been set before 2017 as it depends on the SHAttered attack on SHA1 which was published by Google in February of 2017. Inspecting the supposedly random pad, one finds that it is in fact the start of a PDF document with trailing garbage. One simply replaces the section from the colliding part of the SHAttered example collision to obtain the correct pad.

Of course this file has the same hash as the original but now decrypts the message properly:

My knee's SHATTERED. I'm bleeding badly. I've encrypted this file using a one
time pad with a SHA1 hash of 918dcd435b36aec0d3a467d9f10ec852e8fc008a. The
password is the answer to this riddle:
Sweet says the Old English Bear to Roger: "I'll kill a mother and her son."
A dragon killed the bear. What was the bear's name?
Hurry, 007. There's not much time left!

This riddle refers to Henry Sweet's proposed etymology of Beowulf being "bee-wolf", a kenning for bear. The bear is not saying things sweetly to Roger. Instead, Sweet says that it is an Old English bear which is speaking. The remainder of the riddle is a summary of the plot of Beowulf. Roger is the anglicised name of "Hroðgar".

The answer is therefore "Beowulf".