Context: I was given a piece of encrypted string to decipher and I have been stuck at it for a while. To not ruin the point of the problem, I will provide only some description of the text and my attempts at deciphering it. In doing so, I hope that more experienced people can give me some pointers and hints on the nature of the ciphertext.

In first glance I determined that the ciphertext (~150 characters) is most likely base64-encoded, since it is alphanumeric and ends with an equals sign. However, decoding it in either ASCII or utf-8 results in a meaningless string composed mostly of unicode. The unicode characters can all be represented in format U+000X or U+001X where X is a digit or letter.

More importantly, I noticed a pattern in the decoded text: certain groups of alphabetical letters recur once 12 or 24 letters. This reminds me of Vigenere cipher, but I cannot do anything with it with all the nonsense unicode scattered around the text.

This probably means that decoding the text in base64 points somewhere around the right direction, but perhaps I need to try other ways of decrypting the binary? Or perhaps I need to apply more operations on the decoded text? Any advice on what I can try next is greatly appreciated.

EDIT: Now that I was thinking about it, it could possibly be an XOR cipher. So I'll try that.

  • 1
    $\begingroup$ Have you determined how many unique Unicode values there are? If there are 22-26 unique values, then they almost certainly correspond to alphabet letters. Just randomly substitute a letter for each value, then solve as a Vigenere. $\endgroup$ – GentlePurpleRain Jul 12 '18 at 15:25
  • 1
    $\begingroup$ If decoding as base64 yields a bunch of U+000X or U+001X characters, with "X" being a 0-9A-F, it sounds pretty likely that just grabbing the 0X or 1X piece as a two digit hexadecimal value and converting it as A1Z26 to letters will give you meaningful (though perhaps still encoded) text. Have you tried that? $\endgroup$ – Rubio Jul 12 '18 at 15:37
  • $\begingroup$ @Rubio I have not. I will definitely try that. Thanks! $\endgroup$ – Gary Geng Jul 13 '18 at 4:36
  • $\begingroup$ @GentlePurpleRain I will take a look and try that. Thank you. $\endgroup$ – Gary Geng Jul 13 '18 at 4:37
  • $\begingroup$ @Rubio Before trying your method, I realized that I forgot to mention that there are ASCII characters (e.g. '(', '_', '^', etc.) lying around the text as well, and those exceed the range of U+001X by a lot. It doesn't quite make sense to ignore these letters since they contribute to the 12 or 24-letter recurrence of words, but if I do, it leaves 27 non-ASCII unicode characters, including line break and carriage return. $\endgroup$ – Gary Geng Jul 18 '18 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.