21

I've come across many questions in the tag asking to indentify what encoding, hashing scheme or cipher was used. I specifically mean questions where the "ciphertext" is presented with the request to determine what algorithm was used. This question is particularly good as it provides multiple examples which makes it easier to verify, but others are not so good. Are questions like these on-topic?

I think they are not, because

  • not all of them can be verified,
  • they are not really about programming and
  • they are likely not useful for future readers, but only for the OP.

What should I do when I encounter them? I usually vote to close them with a custom close reason. Possibly a canonical Q&A can be created showing what can be done to determine the scheme, but this will likely get too broad.

7
  • Would such a question be on-topic on crypto.stackexchange.com or security.stackexchange.com ? If so, maybe migrate them? Commented Nov 28, 2014 at 12:30
  • @AngeloNeuschitzer I haven't found something specific in their help pages or meta, but I highly doubt that.
    – Artjom B.
    Commented Nov 28, 2014 at 12:44
  • 1
    I left a message in their respective chats, maybe some regulars from there stop by and leave an answer. Commented Nov 28, 2014 at 12:51
  • 4
    Those types of questions usually get closed pretty quickly on both sec.se and crypto.se - not because they are not ontopic per se, but because they are simply bad questions. There is no context, and no interesting information to be shared. At best, we have a custom close reason "Questions asking us to break the security of a specific system for you are off-topic unless they demonstrate an understanding of the concepts involved and clearly identify a specific problem" - because otherwise they are not useful questions, and the equivalent of "giv me teh codez".
    – AviD
    Commented Nov 28, 2014 at 13:10
  • 6
    "...these questions aren’t educational in any way, because there’s no way to learn about the process of discovery. A particular community member, by virtue of their experience in the field, just happens to be able to take the limited information you remembered and fill in enough of the blanks to guess the correct answer... guessing game questions do not meet our goal of making the Internet better." (blog.stackoverflow.com/2012/02/lets-play-the-guessing-game)
    – gnat
    Commented Nov 28, 2014 at 15:30
  • The vast majority of questions by users with less than 100 rep will only be useful to the individual who asked them, but that doesn't mean they shouldn't be answered. This site was meant to be an open community of programmers who help each other think through difficult technical questions. How does gatekeeping help anyone on this site?
    – duhaime
    Commented Feb 14, 2021 at 22:19
  • @gnat there are ways to help others understand one's process of discovery. There are classes in cryptanalysis precisely because the techniques used to decipher the algorithm used to encode some text can be studied, reverse-engineered, and otherwise discovered by the clever analyst. The same process of discover can easily be pursued, openly discussed, and eventually taught on this site...
    – duhaime
    Commented Feb 14, 2021 at 22:21

2 Answers 2

15

The issue with most "what encoding/encryption/hashing has been used for a84fab7fe74910e0ff93 is that it's just a string of bytes. Of course base64 can be identified quite easily, but generally encrypted strings are just a random set of bytes which are completely meaningless if you don't have the key and the algorithm.

In general that type of questions gets closed rather quickly on both security and crypto stackexchange. So I think that in general they are considered off-topic.

4
  • 1
    So, did I understand that correctly (I'm no crypto person): This questions can not have a distinctive answer because more than one crypto system could produce the same? Commented Nov 28, 2014 at 13:25
  • 1
    @AngeloNeuschitzer Basically yes, sometimes there is no definitive answer for such a question since crypto tries to produce ciphertext that looks like random noise. So the only way to try to at least restrict the search space would be to look at secondary criteria like length of the ciphertext.
    – Artjom B.
    Commented Nov 28, 2014 at 14:43
  • 4
    @AngeloNeuschitzer A rough programming equivalent would be stating c = a + b and asking what type c is. We know it's a primitive (in most languages), but there's no context.
    – Compass
    Commented Nov 28, 2014 at 15:30
  • The fact that an OP has failed to restrict the set of acceptable solutions is not sufficient merit to close a question. Any solution from the superset of possible solutions is sufficient to solve an encryption scheme, but that's no reason to prevent the discussion of problems in encryption on this site...
    – duhaime
    Commented Feb 14, 2021 at 22:13
6

Depending on the specifics of the question, they are arguably too localized, lacking in minimal understanding, and/or "gimme teh codez," but they're not off-topic because they're about an algorithm, which is explicitly on-topic on Stack Overflow.

With regards to your first point, if a question can't be verified, it should be treated the same way as any other question where the answer can't be verified: close it as off-topic for needing debugging details.

If all the OP does is hand us some ciphertext and ask us to identify the algorithm, that kind of question is not answerable. It should be closed for needing debugging details. However, if they have sufficient details and show the OP's prior effort, I personally don't have much of a problem with these, particularly if they can be answered in a way that's informative to other readers.

2
  • Nice edit. Chance of the question being well-received: close to zero though. Even if they can be on-topic, I wouldn't personally recommend anyone to try to ask them unless they are wizards.
    – Gimby
    Commented Sep 1, 2022 at 9:02
  • @Gimby In practice, yeah, most people just hand us some ciphertext with zero context and say "what's this algorithm?", which in most cases would be impossible to answer (we couldn't do any better than trying to brute-force it with every possible key and every possible algorithm, which is clearly infeasible). Even if we did answer, it likely wouldn't help anyone but the OP. So, questions like this should be closed. Commented Sep 1, 2022 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .