How can I get started on understanding how to decipher this ciphertext when I don't know the algorithm or key used?

TDcbY xqCa NeAA OsWMirK FNFOm bYRUYAkxl,  tqwl  axZU  XTaLrBSFv OI G vWjBZyqhz.  SUze pGUqZi fCxHFbaIK QnY n UxGMB. zHtA ViNNGQxQ esTphQ.  EdmfAb aS vwMd oekezWAk BnHs EqEKK, DhvqTZNUn aeDo P c LeT EmuPyncQ, cimgJTk jFWcA de PlCtZ.

  • And what have you tried? Can you give some context where this encrypted text came from? That might give a clue as to what encryption is being used – Dijkgraaf Jun 24 '19 at 21:24
  • This isn't looking like a hash. More like an encoding. Did you try some of them? – CDRohling Jun 24 '19 at 21:31
  • 1
    The text is clearly huffman-compressed and then encrypted with a vernam one time pad, and says "Hey, if you're trying to decode this without having any clue about the cryptography used, you get zero transinformation and all your attempts are completely in vain. Try harder next time!" followed by zero-byte padding. – Marcus Müller Jun 24 '19 at 21:40

I performed frequency analysis and found a shallower distribution than I would expect for a monoalphabetic ciphertext of this size. Might indicate a polyalphabetic, homophonic, or polygraphic substitution cipher. These are just a few possibilities.

You can learn more about frequency analysis and its relevance to cryptanalysis here and here.

I would start with learning about frequency analysis and then running the analysis yourself. Search around with the links I've provided and google to help learn how to interpret the results and narrow the list of likely ciphers from that. Once you have a narrowed list, start looking for weaknesses in those ciphers and how to crack them. The wikis I've linked to have several descriptions on weaknesses of some implementations of these non-monoaplhabetic cryptographic methods.

If you end up narrowing the cipher list down and make a programmatic solution to bruteforce keys like I have had to in the past, you'll need to find a way to determine if a result is cleartext for each decryption attempt. Assuming this is English, you can implement an English detection tool. I've written about it here. Feel free to pilfer my English detection code in order to interpret your results. It's basic but has gotten the job done for me.

If you really want to get into solving crypto programmatically, this is a great resource: http://inventwithpython.com/hacking/.

And if you to take your learning a step further, learn about Friedman's IC, Cohen's kappa test, and the chi test and their relevancy to cryptanalysis.

If this is some school or crypto event challenge, it very well might be an implementation with a known weakness that can be exploited. If this is something like Raytheon's job offer challenges (as have been found on business cards in the past), I would expect it to require much more effort.

| improve this answer | |

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