29
$\begingroup$

This is my first self-developed cryptographic puzzle. I hope it is neither too hard nor too easy for you to break, and that you enjoy it. Please do not only post the answer, but also your way towards it.


You are Alan Turing 2.0 - a British intelligence officer trying to break newly created codes from around the world.

Based on intelligence gained by turning a Zambian cipher clerk, you are right now listening in on a test run of a Zambian-Zimbabwian ciphered exchange, codenamed "Project Anaconda", using a newly developed cipher going by the cryptic name of "BFTIODFTTWKBCSC".

The cipher clerk delivered to you

  • the name(s) of the cipher,
  • the route used, so your technicians could listen in and report to you the text transmitted,
  • that the cipher requires a key that the clerk does not get to see, but that to his knowledge only a single key has been agreed upon during a meeting by the three-star generals overseeing the whole operation,
  • that his input terminal had 29 keys: the alphabet, the space, the apostroph and the enter key, and a mode switch to select "Encrypt" or "Decrypt", but neither Shift nor numeric keys.
  • that most likely some standard phrases will be used in the test conversations.

No other useful information could be gained until now; the interrogator will report to you at once if he gains anything valuable.

The technicians reported that the line has gone live only after they tapped into it.

Your objectives:

  • Decipher the test messages.
  • Determine the key(s) used.
  • Reverse-engineer the algorithm.
  • Decipher the algorithm name.
  • If possible, determine the respective country of the correspondents A and B.

The test messages reported by your technicians until now were the following:

A: XMVSDPNID_ZM
A: __KOHZDDUP_BPVH
B: DMUSDPUIH_ZI
B: GE_CF_OMHBDIUO
A: LVDU_WISW_G_TRTUQUHG_FW
B: H_VFSU__ZDONNMMV__R_CYURJEBUEUHV_RDSKZTJGQ_
A: __P_IQTGTJOEZUCI_UPXIPTBTAOIZDCC__PIIQTMTJODZUCT_UPOIPTPTAORZD
B: FRICX_XKIVV__OIFJRJWI_GLXV_PSORO_RXSL_IO_VX_IOETGRLWI_VHVPOKRS__V_O_RW_MVPOARS_RV_OXRW_KOP_
A: T_ZLWPSFGC_HZ_WWYPSV_GO__GP_ODBUOLBOO_GULGAJNXMIH_
B: _ACRB_SU_HUQWIOVBTHH_EZ'S_O_DU_UTDCVFG_TA_OPBPYOW_BDRB_POC
A: __PT_ZECGHDUQ_AITKBPDIYOH
B: BOIV
A: TSGE_LEDXJVF_TVSSWL_G
A: RWR_T_HVHZUUJDAUVF_SVTX
A: RBXOWSIFF_
B: DXLS_SW_RIPZROUPU

Good luck, Mr. Turing.

$\endgroup$
12
  • 1
    $\begingroup$ @TrojanByAccident I have clarified some things about the input terminal. (Given that the transmitted ciphertext has to be reentered by a clerk for decryption, you may assume that the _ represents a space for legibility reasons.) $\endgroup$
    – Alexander
    Commented Jan 13, 2017 at 3:58
  • 2
    $\begingroup$ @Techidiot The cipher is a standard cipher with two "improvements" by me, because the standard cipher in itself is not suitable for a puzzle on this site. I sincerely believe the resulting algorithm can be broken using basic cryptanalysis and a bit of internet search. $\endgroup$
    – Alexander
    Commented Jan 14, 2017 at 7:59
  • 2
    $\begingroup$ It would be nice to have some hint! $\endgroup$
    – IdkWhy
    Commented May 8, 2018 at 15:05
  • 2
    $\begingroup$ that the cipher requires a key // that the clerk does not get to see, // but that to his knowledge only // a single key // has been agreed // upon during a meeting // by the three // star generals overseeing // the whole operation. That would be a nice rap. $(+1)$ :D $\endgroup$
    – Mr Pie
    Commented Oct 7, 2018 at 6:48
  • 2
    $\begingroup$ I spent several hours on this yesterday, no dice. Can we get any kinda hint, @Alexander? $\endgroup$
    – kristinalustig
    Commented Nov 28, 2018 at 15:46

1 Answer 1

24
$\begingroup$

Solution

A: HELLO_LUSAKA
A: CAN_YOU_HEAR_ME
B: HELLO_HARARE
B: LOUD_AND_CLEAR
A: TEST_TEST_ONE_TWO_THREE
B: THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
A: BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFAL (yes, the last O is missing)
B: JAMES_WHILE_JOHN_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_A_BETTER_EFFECT_ON_THE_TEACHER
A: TIME_FLIES_LIKE_AN_ARROW_FRUIT_FLIES_LIKE_A_BANANA
B: THAT'S_ONE_SMALL_STEP_FOR_A_MAN_ONE_GIANT_LEAP_FOR_MANKIND
A: HOUSTON_WE_HAVE_A_PROBLEM
B: HAHA
A: SPIDER_PIG_SPIDER_PIG
A: THE_TEST_WAS_SUCCESSFUL
A: HARARE_OUT
B: HEAR_YOU_TOMORROW

Key

In alphabetical shifts, the key is BOBDPOE (Bob D. Poe?).
In numerical shifts, the key is 1 14 1 3 15 14 4.
I only needed the first 7 so there could be more.

Countries of the participants

Lusaka is the capital of Zambia and Harare is the capital of Zimbabwe, so A is from Zimbabwe and B is from Zambia.

Reverse-Engineered Ciphering Process

Let's encode "ABCDEFG". We start with the first letter.

- A

This is line one.

On the next line we are going to write the next two letters on either side of the A:

- A
- B C

"B C" is line two. You may be wondering why I am not just writing this as "BAC". That's because we are going to shift the "A" and the "B C" independently of each other.

Next we write "DEFG" between the previous letters.

- A
- B C
- D E F G

Now each line has to be shifted by the corresponding letter of the keyword: B, O, B.

- A [Shift by B]
- B C [Shift by O]
- D E F G [Shift by B]

becomes

- B [Shift by B]
- P Q [Shift by O]
- E F G H [Shift by B]

We then read the message from left to right to obtain the ciphertext.

- B [Shift by B]
- P Q [Shift by O]
- E F G H [Shift by B]
- EPFBGQH

Now let's apply this to the original messages.

- HELLO_LUSAKA
- H [Shift by B]
- E L [Shift by O]
- L O _ L [Shift by B]
- U S A K A [Shift by D]
- XMVSDPNID_ZM

- CAN_YOU_HEAR_ME
- C [Shift by B]
- A N [Shift by O]
- _ Y O U [Shift by B]
- _ H E A R _ M E [Shift by D]
- __KOHZDDUP_BPVH

- HELLO_HARARE
- H [Shift by B]
- E L [Shift by O]
- L O _ H [Shift by B]
- A R A R E [Shift by D]
- DMUSDPUIH_ZI

- LOUD_AND_CLEAR
- L [Shift by B]
- O U [Shift by O]
- D _ A N [Shift by B]
- D _ C L E A R [Shift by D]
- GE_CF_OMHBDIUO

- TEST_TEST_ONE_TWO_THREE
- T [Shift by B]
- E S [Shift by O]
- T _ T E [Shift by B]
- S T _ O N E _ T [Shift by D]
- W O _ T H R E E [Shift by P]
- LVDU_WISW_G_TRTUQUHG_FW

- THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
- T [Shift by B]
- H E [Shift by O]
- _ Q U I [Shift by B]
- C K _ B R O W N [Shift by D]
- _ F O X _ J U M P S _ O V E R _ [Shift by P]
- T H E _ L A Z Y _ D O G [Shift by O]
- H_VFSU__ZDONNMMV__R_CYURJEBUEUHV_RDSKZTJGQ_

- BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFALO_BUFFAL (yes, the last O is missing)
- B [Shift by B]
- U F [Shift by O]
- F A L O [Shift by B]
- _ B U F F A L O [Shift by D]
- _ B U F F A L O _ B U F F A L O [Shift by P]
- _ B U F F A L O _ B U F F A L O _ B U F F A L O _ B U F F A L [Shift by O]
- __P_IQTGTJOEZUCI_UPXIPTBTAOIZDCC__PIIQTMTJODZUCT_UPOIPTPTAORZD

- JAMES_WHILE_JOHN_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_A_BETTER_EFFECT_ON_THE_TEACHER
- J [B]
- A M [O]
- E S _ W [B]
- H I L E _ J O H [D]
- N _ H A D _ H A D _ H A D _ H A [P]
- D _ H A D _ H A D _ H A D _ H A D _ H A D _ H A D _ H A D _ A _ [O]
- B E T T E R _ E F F E C T _ O N _ T H E _ T E A C H E R [E]
- FRICX_XKIVV__OIFJRJWI_GLXV_PSORO_RXSL_IO_VX_IOETGRLWI_VHVPOKRS__V_O_RW_MVPOARS_RV_OXRW_KOP_

- TIME_FLIES_LIKE_AN_ARROW_FRUIT_FLIES_LIKE_A_BANANA
- T [Shift by B]
- I M [Shift by O]
- E _ F L [Shift by B]
- I E S _ L I K E [Shift by D]
- _ A N _ A R R O W _ F R U I T _ [Shift by P]
- F L I E S _ L I K E _ A _ B A N A N A [Shift by O]
- T_ZLWPSFGC_HZ_WWYPSV_GO__GP_ODBUOLBOO_GULGAJNXMIH_

- THAT'S_ONE_SMALL_STEP_FOR_A_MAN_ONE_GIANT_LEAP_FOR_MANKIND
- T [Shift by B]
- H A [Shift by O]
- T ' S _ [Shift by B]
- O N E _ S M A L [Shift by D]
- L _ S T E P _ F O R _ A _ M A N [Shift by P]
- _ O N E _ G I A N T _ L E A P _ F O R _ M A N K I N D [Shift by O]
- _ACRB_SU_HUQWIOVBTHH_EZ'S_O_DU_UTDCVFG_TA_OPBPYOW_BDRB_POC

- HOUSTON_WE_HAVE_A_PROBLEM
- H [Shift by B]
- O U [Shift by O]
- S T O N [Shift by B]
- _ W E _ H A V E [Shift by D]
- _ A _ P R O B L E M [Shift by P]
- __PT_ZECGHDUQ_AITKBPDIYOH

- HAHA
- H [Shift by B]
- A H [Shift by O]
- A [Shift by B]
- BOIV

- SPIDER_PIG_SPIDER_PIG
- S [Shift by B]
- P I [Shift by O]
- D E R _ [Shift by B]
- P I G _ S P I D [Shift by D]
- E R _ P I G [Shift by P]
- TSGE_LEDXJVF_TVSSWL_G

- THE_TEST_WAS_SUCCESSFUL
- T [Shift by B]
- H E [Shift by O]
- _ T E S [Shift by B]
- T _ W A S _ S U [Shift by D]
- C C E S S F U L [Shift by P]
- RWR_T_HVHZUUJDAUVF_SVTX

- HARARE_OUT
- H [Shift by B]
- A R [Shift by O]
- A R E _ [Shift by B]
- O U T [Shift by D]
- RBXOWSIFF_

- - HEAR_YOU_TOMORROW
- - H [Shift by B]
- - E A [Shift by O]
- - R _ Y U [Shift by B]
- - U _ T O M O R R [Shift by D]
- - O W [Shift by P]
- - DXLS_SW_RIPZROUPU

Reverse-Engineered Deciphering Process

It is horrendous to manually decipher with the key.

First you have to count the number of characters:

T_ZLWPSFGC_HZ_WWYPSV_GO__GP_ODBUOLBOO_GULGAJNXMIH_

We have 50 characters here. Now we have to map out slots for the characters based on that number (notice how skewed it is according to the length of the last line). The numbers are going from left to right.

- 2
- 6 3
- 8 4 9 7
- 4 2 0 8 6 1 5 9
- 2 6 0 4 8 2 6 0 4 8 0 2 4 6 8 0
-1 3 5 7 9 1 3 5 7 9 1 3 5 7 9 1 3 5 7

We insert the ciphertext:

- T_ZLWPSFGC_HZ_WWYPSV_GO__GP_ODBUOLBOO_GULGAJNXMIH_
- U
- W A
- F _ G M
- L H V _ O L N H
- _ P C _ P G G D L _ U G J X I _
- T Z W S G _ Z W Y S _ O _ P O B O B O

Finally we unshift each line by the corresponding letter of the key:

- T_ZLWPSFGC_HZ_WWYPSV_GO__GP_ODBUOLBOO_GULGAJNXMIH_
- T [Unshifted by B]
- I M [Unshifted by O]
- E _ F L [Unshifted by B]
- I E S _ L I K E [Unshifted by D]
- _ A N _ A R R O W _ F R U I T _ [Unshifted by P]
- F L I E S _ L I K E _ A _ B A N A N A [Unshifted by O]
- TIME_FLIES_LIKE_AN_ARROW_FRUIT_FLIES_LIKE_A_BANANA

Reasoning

This is the result of many, many all-nighters. I have been working on this since I joined the site a month ago.

Most of the work was of course ruling out what it wasn't. I had to keep repeating Edison's quote to myself: "I have not failed. I've just found 10,000 ways that won't work."

The first major breakthrough was observing that taking the first of every two characters of certain lines, I would find repeated sequences, such as __P_IQT... becoming _PITTOZC_PITTOZC_PITTOZC_PITTOZ.

FRICX_XKIVV__OIFJRJWI_GLXV_PSORO_RXSL_IO_VX_IOETGRLWI_VHVPOKRS__V_O_RW_MVPOARS_RV_OXRW_KOP_

becomes

FIXXIV_IJJIGX_SR_XLI_XIEGLIVVOR_VOR_VOR_VOR_O_

The second major breakthrough was observing that, with the above line, if I took the first of every two letters, then took the second of every two letters, then stitched these together,

FIXXIV_IJJIGX_SR_XLI_XIEGLIVVOR_VOR_VOR_VOR_O_ + RC_KV_OFRW_LVPOORS_OV_OTRW_HPKS___WMPASR_XWKP

then removed VOR_VOR_VOR_VOR,

FIXXIV_IJJIGX_SR_XLI_XIEGLIV_O_ + RC_KV_OFRW_LVPOORS_OV_OTRW_HPKS___WMPASR_XWKP

then repeated the split/stitch again,

FXI_JIXS_L_IGI__CK_FWLPOSO_TWHK__MARXK + IXVIJG_RXIXELVOR_VOR_VOR_VOR_PS_WPS_WP

I saw VOR_VOR_VOR_VOR again. There seemed to be some sort of nesting involved.

The third major breakthrough was observing that nested split/stitching __P_IQT... resulted in

_QJUUPAD_QJUUPAD

The fourth major breakthrough was observing that, when we took the first of every two characters of every line, the result had no double spaces.

XVDNDZ
_KHDU_PH
DUDUHZ
G_FOHDU
LD_IWGTTQH_W
HVS_ZONM_RCUJBEH_DKTG_
_PITTOZC_PITTOZC_PITTOZC_PITTOZ
FIXXIV_IJJIGX_SR_XLI_XIEGLIVVOR_VOR_VOR_VOR_O_
TZWSG_ZWYS_O_POBOBOGLANMH
_CBS_UWOBH_ZSOD_TCF_AOBYWBR_O
_P_EGDQATBDYH
BI
TG_EXV_VSLG
RRTHHUJAV_VX
RXWIF
DL_WRPRUU

For a long time, however, this was a dead end.

The fifth major breakthrough

Then suddenly, by some fluke of the universe, I noticed that PITTOZC could shift to QJUUPAD.

And that both could shift to BUFFALO.

BOOM. Something meaningful.

Googled "buffalo buffalo buffalo buffalo". IT'S A THING.

The sixth major breakthrough was going through all the first-letter halves and seeing if I could shift them to anything meaningful.

I could.

I found the following fragments:

USAKA (LUSAKA, ZAMBIA)
HEAR_ME
ARARE (HARARE, ZIMBABWE)
D CLEAR
THE LAZY DOG
BUFFALO BUFFALO BUFFALO BUFFAL
BETTER_EFFECT_ON_THE_TEACHER
FLIES_LIKE_A_BANANA
ONE_GIANT_LEAP_FOR_MANKIND
A_PROBLEM
CCESSFUL
OUT

Seventh major breaththrough

Lots of these were clearly fragments of mic-check phrases. The confirmation of this was realising that all of them other than the BUFFALO one were exactly the right length:

THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
H_VFSU__ZDONNMMV__R_CYURJEBUEUHV_RDSKZTJGQ_

JAMES_WHILE_JOHN_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_HAD_A_BETTER_EFFECT_ON_THE_TEACHER
FRICX_XKIVV__OIFJRJWI_GLXV_PSORO_RXSL_IO_VX_IOETGRLWI_VHVPOKRS__V_O_RW_MVPOARS_RV_OXRW_KOP_

TIME_FLIES_LIKE_AN_ARROW_FRUIT_FLIES_LIKE_A_BANANA
T_ZLWPSFGC_HZ_WWYPSV_GO__GP_ODBUOLBOO_GULGAJNXMIH_

THAT'S_ONE_SMALL_STEP_FOR_A_MAN_ONE_GIANT_LEAP_FOR_MANKIND
_ACRB_SU_HUQWIOVBTHH_EZ'S_O_DU_UTDCVFG_TA_OPBPYOW_BDRB_POC

HOUSTON_WE_HAVE_A_PROBLEM
__PT_ZECGHDUQ_AITKBPDIYOH

Eighth major breakthrough

If the original text hadn't had the mistake of the missing O of the last BUFFALO, I would have worked out sooner that the start of each of the fragments from Breakthrough Six was the end of each message.

Ninth major breakthrough

This took a very long time, but I finally cracked the exact process with writing out CAN_YOU_HEAR_ME. Up until now, I had noticed that there was some nesting, but I had always hit a dead-end getting to the bottom of it. I got lucky with this message because it happens to be the exact length required that there is no space on the last line, which would have skewed it.

- CAN_YOU_HEAR_ME
- C [Shift by B]
- A N [Shift by O]
- _ Y O U [Shift by B]
- _ H E A R _ M E [Shift by D]
- __KOHZDDUP_BPVH

From here, I was finally able to read the rest of the messages.

One Last Thing To Do: Name of the Cipher

Using the cipher, BFTIODFTTWKBCSC decodes into SUNECVRYQLCQHZZ.

- SUNECVRYQLCQHZZ
- T [Shift by B]
- I B [Shift by O]
- F D W S [Shift by B]
- B T O F T K C C [Shift by D]
- BFTIODFTTWKBCSC

You're telling me that the title uses a different cipher? Are you mental? If it is remotely as difficult and obscure as this cipher was, it will be basically impossible to work out using just one line. I have no idea. I have tried lots of things but can't make sense of it. I will update this and give credit to whoever figures this out.

Probably coincidentally, BFTIODFTTWKBCSC and PROJECTANACONDA are the same length and have the same letter frequency rates.

Notes

1. I entirely misinterpreted this clue:

"most likely some standard phrases will be used in the test conversations"

to mean that there would be some standard MILITARY phrases. But no, this meant mic check style phrases. I personally think it would be been a better puzzle if there had been a normal conversation happening.

2. I tried for so long to think of what "BOIV" could turn into - sure, okay, good, done, true, yeah, etc - but never guessed "Haha".

3. The last O in the last Buffalo is missing. It is unclear whether it went missing when writing the original message or writing its ciphertext, since it thankfully happens to be in the one location where it would have no effect on the result (the end).

4. No idea what the rap clue is about. When I had only worked out the first four letters of the key, I thought the lyric format might be a clue and thought, hmmm, BOBD = Boulevard of Broken Dreams? Alas. Had a nice experience listening to some old bands again though.

$\endgroup$
4
  • 3
    $\begingroup$ This is an impressive solve! This puzzle has been right at the top of the list for upvoted unanswered questions on this site for ages - quite the scalp to claim. No wonder it took so long! Kudos. +1 $\endgroup$
    – Stiv
    Commented Sep 8, 2019 at 12:39
  • $\begingroup$ @Stiv Thanks! Now just have to hope the asker checks in again at some point... $\endgroup$ Commented Sep 8, 2019 at 12:47
  • 1
    $\begingroup$ What took you soo long? :-) No, really, impressive achievement! $\endgroup$
    – Florian F
    Commented Sep 8, 2019 at 21:01
  • $\begingroup$ I really like this answer. $\endgroup$ Commented Mar 19, 2023 at 4:40

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