7
$\begingroup$

You're a secret agent working for the NSA and you have monitored the messages between two friends for a while now. Suddenly, their messages become encrypted and you're on high alert. The first part of their message was sent twice (accidentally), an encrypted and decrypted version. This was the message:

The package has arrived, I am ready for pickup. When and where shall we meet?

Encrypted:

r.4NC"Hm,20QV}*;. `AI&*BU3;%);.-6/2NUF=eOt-+3Jq%2]TpH,MCJ5!F*}HT?jX,R>EqC''*H

Further analysis show the keyword was password. The next part of the message was sent encrypted, but with a different key. All you could find out about the keyword was that it is 4 letters long. The message was this:

pt3sLuD,91~1o&,:# D0bVs{O'Mov;vC%l3yFb

Time is running out and you fear it may be dangerous! Can you decrypt the message in time?

Hint 1:

C++ code (very basic) here for algorithm (won't spoil the answer!)
(This is my repo) https://github.com/Cube777/cube-lib/blob/master/src/cube-encrypter.cpp

Hint 2: Another hint:

The keyword is not an English word, but a sequence of 4 letters (not an abbreviation but a popular sequence of 4 letters)

$\endgroup$
10
  • 19
    $\begingroup$ Man, the NSA must be really desperate to outsource their work here so often. $\endgroup$
    – user88
    Commented Apr 10, 2015 at 15:55
  • 1
    $\begingroup$ The number of characters is the same before and after encryption, so most likely we have to find a direct relationship between each character and its encrypted equivalent $\endgroup$
    – leoll2
    Commented Apr 10, 2015 at 16:16
  • $\begingroup$ Added the hint! :) Good luck! $\endgroup$
    – Cube777
    Commented Apr 10, 2015 at 17:45
  • 1
    $\begingroup$ Well, given that you decided to use Hungarian Notation for everything, the code is unreadable to me >_> $\endgroup$
    – user88
    Commented Apr 10, 2015 at 17:56
  • 2
    $\begingroup$ I thought that I'd mention that the link is dead... $\endgroup$
    – monamona
    Commented Nov 28, 2017 at 21:32

1 Answer 1

9
$\begingroup$

Alright, so I used your code to create a brute-force generator to determine all possible decodings for all four-letter words. Since the input was a four-letter word, I assumed that it was also lowercase, and so the search space was only $26^4 = 456~976$, totally feasible for brute force.

Then, a quick search for an isolated "the" turned up all I needed: the key was asdf and the plaintext was Coldplay makes the world's best music!.

I can see why they'd want to hide that from the NSA. I mean, they're not Nickelback, but...

$\endgroup$
5
  • 4
    $\begingroup$ Haha shots we're fired... Have found any other way to decrypt the algorithm that doesn't use brute-forcing? I'm really interested to see if this works! $\endgroup$
    – Cube777
    Commented Apr 11, 2015 at 7:23
  • $\begingroup$ I was lazy, so a logical solution is probably not so doable. $\endgroup$
    – user88
    Commented Apr 11, 2015 at 7:24
  • $\begingroup$ This makes way for a part 2 :) Thanks though $\endgroup$
    – Cube777
    Commented Apr 11, 2015 at 7:26
  • 1
    $\begingroup$ There should be a movie about this answer. (Suggestion for the title: The Immitation Game 2). $\endgroup$ Commented Nov 28, 2017 at 21:45
  • $\begingroup$ there's one about the key. PIE FLAVOR! $\endgroup$ Commented Apr 14, 2019 at 21:13

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.