The Gold-Bug: Edgar Allan Poe's story that taught me about cryptography (2024)

(robotsinplainenglish.com)

63 points | by ripe 2 days ago ago

18 comments

  • gojomo 5 hours ago

    Poe's got enduring relevance for our era of unreliable narrations. His 1845 short story 'The System of Dr. Tarr and Prof. Fether' – set in a private mental institution – popularized the adage, "Believe nothing you hear, and only one half that you see."

    In our era of generative AI, that needs a small update – "Believe nothing you see or hear, and only half of that over a strongly-authenticated channel from a reliable source". But the story's themes of communities-of-mental-illness and blurred boundaries between doctor and patient (or between therapy and enablement) still resonate.

  • randyl 7 hours ago

    Donald Menzel, a Harvard astronomer/astrophysicist, was also inspired by The Gold-Bug. Among other things, he helped the Navy organize a secret cryptanalysis-training class at women's colleges during WW2.

    See the paper "The Cryptologic Contributions of Dr. Donald Menzel" by Craig Bauer and John Ulrich.

    • ripe an hour ago

      Thank you for the pointer to the Bauer and Ulrich paper. I read an abstract (pasted below), but I don't have the paper itself.

      "Dr. Donald H. Menzel is well known for his work in astronomy, but his cryptologic work has never received a thorough review. The present article describes how his interest in this area was first sparked and provides the details of the secret class he led in “Naval Communications” (really cryptanalysis) at Radcliffe College during World War II. This class served as a prototype and was copied elsewhere. A sketch of some of the classified work he carried out during the war, and after, as a consultant, is also included, along with a brief overview of Menzel's personality and other interests."

      • rramadass 18 minutes ago

        There was also a Friedrich L. Bauer (no relation) who wrote the excellent book Decrypted Secrets: Methods and Maxims of Cryptology which details both the History and the Mathematics of classical ciphers. It is a pretty rare book to find in print form nowadays so here is a archive link - https://archive.org/details/DecryptedSecretsMethodsMaximsOfC...

  • throwa356262 2 hours ago

    I discovered cryptography thanks to Sherlock Holmes Dancing Men:

    https://en.wikipedia.org/wiki/The_Adventure_of_the_Dancing_M...

    • rramadass 41 minutes ago

      This was directly "inspired" by Poe's "The Gold-Bug". Only the cipher alphabet is different.

      Arthur Conan Doyle was inspired by Poe's Auguste Dupin in his creation of Sherlock Holmes. He acknowledged this in a sort-of backhanded manner in "A Study in Scarlet";

      “It is simple enough as you explain it,” I said, smiling. “You remind me of Edgar Allen Poe’s Dupin. I had no idea that such individuals did exist outside of stories.”

      Sherlock Holmes rose and lit his pipe. “No doubt you think that you are complimenting me in comparing me to Dupin,” he observed. “Now, in my opinion, Dupin was a very inferior fellow. That trick of his of breaking in on his friends’ thoughts with an apropos remark after a quarter of an hour’s silence is really very showy and superficial. He had some analytical genius, no doubt; but he was by no means such a phenomenon as Poe appeared to imagine.”

      If you read all of the Dupin stories i list here - https://news.ycombinator.com/item?id=50089773 - you can see just how much Arthur Conan Doyle owed Edgar Allan Poe.

      In fact when accused of not acknowledging the above, Doyle wrote a short ditty "To an Undiscerning Critic" explaining himself - https://www.arthur-conan-doyle.com/wiki/To_An_Undiscerning_C...

  • dekhn 5 hours ago

    Also if you haven't seen it, https://en.wikipedia.org/wiki/The_Gold_Bug_Variations by Richard Powers is an absolutely amazing fiction book that combines DNA, cryptography, and many more interesting concepts.

  • ryan_glass 7 hours ago

    I thought it would be interesting to see if the local AI I use for quick question and answer stuff could crack the code.

    I use Deepseek V4 flash 0731 Q8 quantisation from unsolth with reasoning turned off on a local server for quick easy tasks. Note I use another model locally for harder tasks that need reasoning.

    I was a bit dissappointed that it knew it was Poe's cypher so didn't need to even try to crack the code.

    • ripe 7 hours ago

      Ha! Too smart for its own good. Is it possible to ask it to pretend it hadn't seen the example before?

      • ryan_glass 5 hours ago

        I just tried that and it went down a rabbit hole for about 20 minutes before using "the exact method from Poe's story". So basically cheated :)

  • hinkley 4 hours ago

    There's an old TV movie adaptation of this that I saw when I was about 8, long before I had developed a taste for reading.

    I would have sworn it was Disney, because I recall seeing it at least twice and walking away from a decision to watch it another time or two, and that was very on-brand for Disney at the time. However, Wikipedia is telling me that it was made by ABC in 1980 and starred Anthony Michael Hall. I suppose ABC must have done reruns during the summer.

  • rramadass 7 hours ago

    This is one of my favourite Edgar Allan Poe stories. The cipher is just a simple monoalphabetic substitution one based on frequency analysis.

    The same idea was "reused" by Arthur Conan Doyle in his story "The Adventure of the Dancing Men" where he used pictures of dancing men for his cipher text.

    Note that Conan Doyle indirectly acknowledged Poe's influence (via his character Auguste Dupin) on Sherlock Holmes in "A Study in Scarlet".

    Poe wrote three stories starring his detective Auguste Dupin all of which are fantastic. They are "The Murders in the Rue Morgue", "The Mystery of Marie Roget" and "The Purloined Letter". They are a must-read for all fans of detective fiction. Folks who have read Sherlock Holmes can see how much he was influenced by Dupin. The stories often have some close/clever observations/reasonings which given Poe's style of writing are a delight to read.

    For example the opening paragraph of "The Murders in the Rue Morgue" reads;

    THE mental features discoursed of as the analytical, are, in themselves, but little susceptible of analysis. We appreciate them only in their effects. We know of them, among other things, that they are always to their possessor, when inordinately possessed, a source of the liveliest enjoyment. As the strong man exults in his physical ability, delighting in such exercises as call his muscles into action, so glories the analyst in that moral activity which disentangles. He derives pleasure from even the most trivial occupations bringing his talent into play. He is fond of enigmas, of conundrums, of hieroglyphics; exhibiting in his solutions of each a degree of acumen which appears to the ordinary apprehension præternatural. His results, brought about by the very soul and essence of method, have, in truth, the whole air of intuition.

    The essence of why some people love solving problems!

    • jhallenworld 6 hours ago

      Poe is awesome. If you're near Charleston, it's worth visiting Sullivan's Island- try to find the tree.

      When Poe writes about murder, it's often first person point of view of the murderer- I find it more disturbing than later horror writers like HP Lovecraft or Steven King.

      • rhdunn 4 hours ago

        The Cask of Amontillado is great for that. And the classic poem The Raven describes existential dread so well.

        I found with King the scarier aspects were the more mundane and psychological parts of his writing. I also found in some cases the adaptations to be better in some ways -- The Shawshank Redemption adaptation is great. And the poem in the TV adaptation of The Tommy Knockers felt more impactful than the one in the book.

  • hinkley 4 hours ago

    I saw a different video about cracking the Enigma recently and learned something new about it. It's basically a Rube Goldberg substitution cypher - each character is encoded in a cypher and then advanced to another cypher. There were two consequences of that.

    'A' would never map to 'A'. So any message with a known plaintext of local weather conditions, or like in The Imitation Game, "Heil Hitler", you could test the plain text at each position of the encoded message and know that the message did not contain the known plaintext because none of the letters could match in sequence. If 'ei' or 'e_____t' existed in the cipher then the input could not contain the same. So selection of the candidate messages for cracking first culled any messages that definitely did not contain the known plain text.

    Additionally, the breadboard part of the cipher was static throughout any given day, and reciprocal. That is, if A was currently mapped to B, then B also mapped to A, which is not usually the case with Caesar. That caused the breadboard stages between the wheels to cancel each other out, because A at the output of wheel 1 would change to B and then back to A for the input to wheel 2. That dropped the number of substitutions per character on the 3 wheel Enigma from 9 to 5, and thus reducing the exponent of the problem space, and the complexity of The Bombe.

  • cosmic_cheese 6 hours ago

    Also a song by The Alan Parsons Project, inspired by the same story: https://youtu.be/6aebUrI-WYQ

  • NetMageSCW an hour ago

    I learned from Cryptonomicon LOL