# Solve a Cipher, Fight a War

The war against the dastardly General Hoggquill has been going very poorly indeed. He has had every tactical advantage, and we survive only by the skins of our teeth.

However, this night we've had a stroke of luck! Our scouts have intercepted a message headed for his front lines! If we knew what their orders were, we'd at last have the upper hand! Huzzah!

01|03|03|01|16|17|00|01|03|00|31|01|17|31
01|12|12|01|16|17|00|01|12|00|01|01|17|17
01|16|16|01|16|21|00|01|16|00|01|01|10|21
01|12|12|01|16|17|00|01|12|00|01|01|10|17
31|03|03|31|31|31|00|31|03|00|31|31|08|31


Well, what are their intentions?

• Welcome to puzzling Sep 2, 2016 at 18:45
• Thank you very much! I hope this turns out to be a fun puzzle. Sep 2, 2016 at 18:46
• My first thought was number to letter, but it has the number 31 so no. Sep 2, 2016 at 18:47
• @BeastlyGerbil: Why not? There are no digits 8 or 9. Sep 2, 2016 at 18:53
• There are up to 31 days in a month? Might have something to do with a calender. (Wait nvm there's a 0. Also, 31 in base 8 is 25, so... Hm) Sep 2, 2016 at 18:54

The numbers are ...

... just decimal numbers from 0 to 31, i.e. 5-bit numbers. Therefore, each column between vertical bars represents a 5×5 pixel grid:

This is ...

... the Pigpen or Masonic cipher and the message is:

ATTACK AT DAWN.

(There are some transcription errors, though: The 08 should probably be a 04 and the wedge for the T points the wrong way. It is also questionable whether the message is actually helpful to the intercepting party, since "Attack at Dawn" is the cryptographer's version of "Test, test! One, two, test!")

Note:

It is enough to see that there are only so many different columns in the code. You can then assign a unique letter to each column pattern, abbacd ab fagh in this case, and try to find a suitable substitution cipher, for example by using the cryptogram solver quipquip. That's how I found the message. I then worked back from that to find the whole pattern.