The famous phrase don't roll your own crypto, also featured in our memes list, is frankly getting a bit annoying.

There are times when including that advice in an answer is called for, but after a casual skim of the "hot" questions, I see the phrase is something of a universal signature.

The main issue I have with it is if you don't roll your own crypto (and see it crash and fail), how will you ever learn? One could say this site does just that: Post a really clever scheme, and see it torn apart.

A justified inclusion of the phrase in an answer IMO would be in an answer to the Dave variety, where the scheme in question is used in production, and someone's paycheck (or more) depends on it.

To quote a relevant question from The Workplace (emphasis added)

It's way too easy to post "quit your job" as an answer, and almost every post on our site could be answered in this manner.

Replace quit your job with don't roll your own crypto and the situation is almost identical.

Possible ways to answer a question:

  • This can be broken by doing [X]. Use [Y] instead, and don't roll your own crypto.
  • Don't do that. Use [Y]. Don't roll your own crypto.
  • This can be broken by doing [X]. To avoid this, use [A] and [B] but that could leave an opening for [C], depending on the moon cycle. Use [Y] instead to be safe, and don't roll your own crypto.

Frankly the last phrase in all three can be replaced with "may the Force be with you" and the result will still be the same: The OP will (hopefully) use [Y] untill he comes up with the next brilliant idea. He will then probably ask about it here, get told not to roll his own crypto again and think "boy I must be useless - I think I don't like security after all".

We need people in security, we need people rolling their own crypto. Telling people off isn't doing anyone any good in the long run.

Should the use of don't roll your own crypto it be limited, abolished alltogether, or be kept as the mandatory mantra it seems to be today?

  • 1
    On the one hand I'm pretty sick of this, on the other hand the typical homebrew crypto makes me sick as well. Nov 25, 2013 at 20:47
  • 1
    @CodesInChaos My feelings exactly
    – rath
    Nov 25, 2013 at 21:11

2 Answers 2


"Quit your job" is on a site where people keep asking for help with their job troubles. It is a valid, if superfluous, answer to the question.

This is not a site where we discuss new crypto solutions. This is a site for information security, mainly about implementing existing crypto to secure the universe and beyond. So the analogy doesn't quite hold, since the site isn't about "probblems with rolling my own crypto" in the first place.


This site is about information security. Almost anyone who is asking here about how to correctly make their own crypto solution should be told categorically, "Don't!"

We have some very good questions on here about how to correctly use existing crypto functions, modules, API's, whatever, which are suited to information security folks, because we can go and implement these sort of things.

Cryptography Stack Exchange caters much more for those who really understand the maths involved, but even there, it is generally agreed that very few cryptographers manage to make successful, strong crypto. And all of those use extensive peer review because it is something that is so complex. Sure, we have some very smart cryptographers as members of this community, but the site itself is targeted to Information Security Professionals, not Cryptographers.

tl;dr - on this site, I definitely think we need, "Don't roll your own." On Crypto, maybe not so much.

  • I see your point. A security professional is less likely to roll his own, and if he does, he has a better chance of doing it right than an amateur. My question is more about the amateurs or the inexperienced, and it seems that if people are pointed towards established standards, maybe they'll get something out of it apart from the immediate utilitarian benefit.
    – rath
    Nov 23, 2013 at 21:55
  • 12
    @rath I think you missed Rory's point. A security professional who rolls his own crypto is not doing his job properly. This site is primarily for security professionals, and “don't roll your own crypto” is good advice. Nov 23, 2013 at 22:03
  • 2
    That is ALWAYS good advice, and a "security professional" who rolls his own is neither.
    – AviD Mod
    Nov 26, 2013 at 13:28
  • @AviD I would consider Bruce Schneier and Adi Shamir "security professionals", and if either one of them decides to roll his own crypto (which they both have done on multiple occasions), I would be all in favor. So there.
    – tylerl
    Dec 9, 2013 at 4:24
  • 4
    @tylerl no, they haven't - even Bruce S has come out numerous times and said quite clearly, that he would never just go and up and design his own algorithm and proceed to use it in production. Even Mr. Schneier or Mr. Shamir (or Mr. Pornin) expects their crypto to be peer-reviewed, tested over several years, etc etc before actually using it. That hardly counts as "rolling their own crypto".
    – AviD Mod
    Dec 9, 2013 at 11:48
  • @AviD ah, then you're making the added assumption that creating your own crypto necessarily means doing so in isolation without peer review. Which is silly.
    – tylerl
    Dec 9, 2013 at 16:46
  • 2
    Meh, I don't think this is really an important point.... Or we could just use the full form of the saying "Don't roll your own crypto, unless you are an experienced cryptographer, and then make sure you get your new crypto peer reviewed and tested for several years"....
    – AviD Mod
    Dec 9, 2013 at 21:32
  • 2
    Doesn't quite roll off the tongue as easily...
    – Rory Alsop Mod
    Dec 9, 2013 at 23:01

You must log in to answer this question.

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