Our FAQ currently says:

Do we accept questions asking for cryptanalysis of your cipher (hash function, ...) design?

No, we do not. If you want peer review of your full cryptographic scheme, here is not the place to acquire it. However, you might like to break your problem down into specifics, such as "under these conditions, does structure X have desired security property Y?" which would be a perfect fit for us.

As an example, this recent question was closed as off topic by Paŭlo Ebermann, citing this FAQ entry. So the answer to "Do we allow these questions?" is clearly "No." What I'd like to ask is whether we, perhaps, should allow at least some of them after all.

(I do realize I may be asking for downvotes by bringing up what may have been an issue already debated to death before — although, in my defense, if such extensive debate does exist, I didn't find it.)

I think there are some reasons why allowing questions of the type "Here's a cipher I made up, how do I break it?" here could be a good idea — or at least not a terribly bad one:

  • To me, questions like these would seem an excellent fit to the StackExchange Q&A format, if there only was a site that accepted them. At the moment, there doesn't seem to be one: some have been asked on both SO and math.SE, but they're not a very good fit to either; for example, the same question mentioned above was also closed as off topic on SO.

    (On the other hand, this not so dissimilar question seems to have done just fine on math.SE — and was recommended as "perfect for the Cryptography.SE site" there, before this site entered public beta.)

    A final point to note about this is that, whatever location is to be chosen as most appropriate for these questions, if they are to have any chance of receiving high quality answers it really ought to be one that is frequented by experts in cryptanalysis. As such, one particular StackExchange site suggests itself to me...

  • One concern about these questions seems to be that they'll be too open-ended to have a definite answer. However, I'd expect most such questions to have a very simple and definite answer: "Your scheme is not secure, because..." It's true that someone might occasionally come up with a cipher that stumps even the bright minds here; but such situations, as long as they remain occasional, are normal on any Q&A site, and in those cases we can at least point the asker towards further resources on how to analyze their cipher.

    (Of course, we shouldn't create the impression that a homebrew cipher is secure just because none of us can break it — but I don't really believe that to be a risk. I'd expect most of the regulars here to instinctively include such disclaimers in their answers anyway, whenever the situation might possibly call for them.)

  • Another concern may have been that such questions might become too common and crowd out more relevant questions. My suggestions would be not to worry about that before it happens. (I wanted to say "not to count our chickens until they've hatched", but that doesn't really have the right connotations... perhaps I should ask on english.SE for a better idiom.) Anyway, we can always revisit the issue if and when such questions do become too common.

    (My experience on the completely unmoderated Usenet forum sci.crypt suggests that they probably won't; they do appear from time to time, but not often enough to crowd out other topics. The threads that drown out meaningful discussion on sci.crypt are generally completely different ones.)

  • Finally, our FAQ also says that "Crypto - Stack Exchange is for software developers, mathematicians and others interested in cryptography" (emphasis mine). I believe this should also include amateur cryptographers interested in developing and analyzing new crypto schemes, whether to practice their cipher design and cryptanalytic skills or just because they like such mental challenges. After all, some of these people will become the next generation of crypto experts.

To recap, I'd suggest amending our FAQ (and practice) to explicitly allow questions of the form "I made up this cipher/hash/etc., how can I break it?" or "...what are its weaknesses?".

(The common phrasing "... is it secure?" is somewhat unfortunate, but I do believe that the underlying questions could still often be made appropriate to this site. In any case, the literal questions do generally have a definite answer: either "No, because..." or "Probably not, but we can't tell", with the very occasional "Yes, assuming..." thrown in.)


2 Answers 2


Finally, people are taking an interest in the faq! :)

Since this particular part was my wording let me first explain what I was going for:

However, you might like to break your problem down into specifics, such as "under these conditions, does structure X have desired security property Y?" which would be a perfect fit for us.

The key issue is that the Stack Exchange format is best for questions about an actual problem you face within a reasonably defined scope. Specifically, the uneditable part of the FAQ states that if you can imagine a whole book about a topic, that's not the sort of question you should be asking. So I thought about this and I thought, well, if you're asking:

Is my cipher secure?

What you are really asking is:

I have combined a substitution permutation network with this particular key derivation function and this particular padding scheme and this particular ... is it secure?

So you're actually asking about 100 questions in one. Further, is it secure? is not what you really mean either; what you mean is what are the bounds and assumptions for the level of security I can expect? By which mean if you're serious, "yes/no" is not the answer you are looking for; rather, assuming you've designed something not totally insecure what you want are estimates for security and possible threats given your chosen constructions.

The Stack Overflow equivalent of is my cipher secure? is here is my code, what are some issues with it? Like analysing an entire program, analysing an entire cipher is a huge undertaking. You're after all the possible things that could be wrong which is... huge.

Now, I am an amateur too and I thought after reading some of the output on here at some point I would very much be interested in having a go; so the question was then how do we allow these questions reasonably? Well, assuming it's a well researched attempt - break it into bits - ask the separate questions. That gets you your answer over several parts. My advice for getting the best out of this would be:

  1. Ask each question at a time - you may want to review the feedback you get from question 1.
  2. By all means link your questions together.
  3. Make the effort to describe them mathematically - answers will use the notation, so understanding it is a huge plus.
  4. Make them in some way reusable for others. We have a too localised close reason; it would be best to avoid really localised questions.

In short, I think these questions can work here, but only if they're thought about by the OP properly. As such, my approach to this is generally to encourage people to break reasonable-looking attempts down into their constituent questions. I will generally try, personally, to avoid closing these questions unless it is obviously snakeoil; however, it might be worth us closing them until they're edited, then re-opening them. I was conscious last time that this process of continuous comments can be off-putting for new users, so it is a balancing act...

So there you are. That is why I felt we should word the FAQ that way and why we should enact that policy. Nobody has yet disagreed, although of course if you do, feel free to comment and/or answer.

I thought, as I saw this asked today I'd add something of an explanation to why I've seen it and think it's fine:

  • It's reasonably scoped. The question is basically can you use sha to generate a keystream?
  • It's asking about classes of ciphers and therefore implies reusability of the topic for others with the specific design as an example.
  • It isn't a dump. It is not here's my cipher: please tell me what's wrong with it.

I see nothing wrong with this kind of question. It's exactly the right way analysis should be asked for - as opposed to the dump approach, which is what the FAQ is trying to discourage.

If you (anyone, generally) think we can better state that difference in the FAQ without making it a huge tl;dr read, feel free to have a go at editing it :)


Of course, if any Stack Exchange would be fitting for these kinds of questions, then it would be crypto.SE.

Contrary to you, I think these questions are in general not fitting for the Q&A-format of Stack Exchange. They simply have a too broad scope: To reasonably ask the question (i.e. specify the full cipher, including any design considerations), one would need an article fitting a journal submission.

Adequate answers would also be of similar sizes. The FAQ says (in the part that is not editable by us, i.e. the one which is valid for the whole network):

Your questions should be reasonably scoped. If you can imagine an entire book that answers your question, you’re asking too much.

This is why Ninefingers asked the asker in a comment to break down the question in smaller parts. I think it could have worked this way.

Now, many hobby cryptographers (i.e. amateur Cipher designers) can't see that their question has a too broad scope, and this is the reason that we added this section about cryptanalyzing self-made ciphers to the FAQ.

Another problem with this actual question was that it contained mainly PHP code instead of a english/mathematical description.

About your experience with sci.crypt, in our first chat meeting on last monday, some users with experience there actually said they enjoy the absence of this type of questions here (if I understood right).

  • $\begingroup$ Thanks for the reply! Re: the chat meeting, if you mean poncho's comment, I wouldn't have read it as referring to quite the same type of questions as I was talking about above. (For one thing, unlike most sci.crypt cranks, the people asking the questions I mentioned appear at least approximately sane.) But I'd rather not try to put any more words in poncho's mouth; if it matters, we can always ask him(/her) directly to clarify what he meant. $\endgroup$ Dec 4, 2011 at 18:48
  • $\begingroup$ Yes, I meant Poncho's comment and the later one by Simon. I have about no experience with sci.crypt (and prefer not to split off even more of my free time trying to read this, too), so I can't really judge what was meant there. It is not that relevant, though. $\endgroup$ Dec 4, 2011 at 19:25

You must log in to answer this question.

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