Encryption in Literature: Dancing Men (Spoilers)
Arthur Conan Doyle’s 1903 “The Adventure of the Dancing Men” (text here), like most Sherlock Holmes stories, features Holmes lecturing Watson about how much he can deduce. This particular story also introduces a character who is a “fine creature” of the English soil, and an evil murderous American. That’s not important. What I’m interested in is that this story hinges around encrypted messages. To whit, A bunch of strange stick figures keep appearing around a house, and a woman seems to be terrified by them.
Holmes recognizes the figures as a ciphertext, a message in code. After getting several samples, he easily cracks it, because this is a simple substitution cipher: 1 stick figure == 1 letter. He approaches this with the assumption that the plaintext is English, and then does some frequency analysis. He concludes, quite reasonably, that the most frequently appearing stick figure represents an E, and works from there, helped with an educated guess about a word based on the name of the woman to whom these seem to be addressed. Holmes is helped out in that this simplest of ciphers has a little twist that makes it easier to crack. Word endings are indicated by putting little flags on some of the dancing men.
Rule 1 of encryption: Take all the white space and punctuation out of plaintext before encrypting. Do not make a cipher easier to break than it has to be. Just the fact that word breaks are indicated makes me want to declare this cipher as just absolutely the worst.
The one saving grace of this stick figure substitution cipher is that it is not obviously a cipher. It could be dismissed (and Watson in fact does so) as a child’s scribbling of stick figures. I, who have read this story, might be inclined to pass off random stick figure drawings as comics of a sort. However, once recognized as a cipher, this doesn’t hold up to simple frequency analysis.
Conclusion: Don’t hide your secrets with dancing men.