Schneier's law (which should probably be called Babbage's Law). States that:

Anyone, from the most clueless amateur to the best cryptographer, can create an algorithm that he himself can't break.

I think its clear that this law can be applied to any security system, not just cryptography. What are some good methodologies for addressing this law?


"Addressing" that law, strictly speaking, means suing God for creating mankind with limited brains. There is little to do here, except to be aware of the difficulty of assessing the security of a security system: namely, that you cannot assess the security of your own creation. One way to say it is the following: if you cannot break your own system, then you are not demonstrating that it cannot be broken, only that you do not know how to break it. Which is not what you want: the goal is to have a system that potential attackers do not know how to break.

So the normal guideline is to never design your own cryptographic algorithm or protocol. A trained cryptographer can amend that into: "I can design my own algorithm variant but only if I can positively prove that I am not adding any extra weakness". Not being able to exhibit such a weakness is not a proof of absence of any weakness.

  • Well, you can assess your own creation... you just can't completely trust this assessment. – Jürgen A. Erhard Apr 18 '11 at 11:42
  • Oh, and who can design a crypto algo then? By definition, if I design a crypto algo, it is mine. Answer: you can. You just can't necessarily trust it. Oh and: just because all the cryptographers/cryptanalysts in the world can't break an algorithm doesn't prove it cannot be broken. It just means none of them manage to break it (yet). (It also doesn't mean that it can be broken... it may actually be unbreakable. It's the same thing as with bugs in any code) – Jürgen A. Erhard Apr 18 '11 at 11:46
  • 3
    @jae: well... I can. Trained cryptographers can design algorithms, because that's what they were trained for. But, when I design an algorithm, I submit it to other cryptographers for peer review, and I will not use the algorithm until sufficiently many cryptographers have looked at it for a sufficient amount of time (months, at least, preferably years). That's not ideal, but that's the best security "guarantee" that can be found currently; also, it "shares" responsibility in case of a blunder. – Thomas Pornin Apr 18 '11 at 11:50
  • Anyone can design a crypto algo, it's just that, an algorithm. One with (potentially) more dire consequences to failure than if your CD collection ordering algorithm fails, but still, "just" an algorithm. But that's designing. The rest is a whole 'nother kettle of fish. ("Trained" means what? A diploma of some kind? Don't trust these myself, seen/heard to much gaming the system) – Jürgen A. Erhard Apr 18 '11 at 13:23
  • 3
    @jae - well, I had some crypto training, and a stack of applied maths and I would class myself as a complete amateur compared with those who are trained. You may not trust a particular diploma, so you trust experience, or individuals who have proved their worth, or those who have had all their work stand up to peer review. Whatever level of trust is required. – Rory Alsop Apr 18 '11 at 17:07

A common way of addressing this problem is peer review. The open source world thrives on this. Better solutions are produced by the more eyes looking at the problem.

By attacking software you become better at it though practice. So you also become better at attacking your own software, and by Schneier's law you can then write more secure software.

  • 1
    My reputation is too low to comment, so I am posting here: Why are you answering your own question? :) Though the answer appears perfectly correct to me, I don't understand what you are doing. – freddyb Apr 16 '11 at 15:34
  • @freddyb why even have SO or security exchange if you can't get someone else's opinion on a complex topic? – rook Apr 16 '11 at 19:00
  • 1
    @Rook - freddyb has a perfectly valid point. Of your few questions here, you have a high percentage where you ask and answer your own question. That can be valuable where you have good input, but it doesn't actually get someone else's opinion. Let others answer first and you will learn opinions. – Rory Alsop Apr 16 '11 at 19:04
  • I don't see the problem. This practice is even covered in the FAQ: "It’s also perfectly fine to ask and answer your own question, as long as you pretend you’re on Jeopardy: phrase it in the form of a question." – user1633 Apr 16 '11 at 19:14
  • @Rory Alsop♦ and @Tim, thanks, and with a community of almost a dozen users i think the juxtaposition is valuable. – rook Apr 16 '11 at 19:53

I don't think this law needs any addressing, to be honest. It is well understood by the industry and (almost) everyone follows the sensible course of action.

For most purposes, encryption should be a solid reliable process which just works given an appropriate key length and using agreed algorithms which are peer reviewed (as per Rook's answer) and implemented correctly meet this requirement.

For those who want to generate stronger or faster algorithms as required, or to overcome a new attack that an older algorithm is susceptible to the only way to assess strength is to let a lot of people hammer at it.

  • But don't you think that this law applies to more than just algorithms? (+1 thanks for the answer. ) – rook Apr 16 '11 at 19:54
  • @Rook - I was actually trying to think of security systems in this context, and I think it makes sense that you can create something you can't break yourself. The corollary has to be though, that others almost certainly can...a good chunk of the pen test industry relies on exactly that:-) – Rory Alsop Apr 16 '11 at 20:13
  • could not agree more. But by that extension do you think that a pen tester can build a very secure system? – rook Apr 16 '11 at 20:16
  • 1
    @Rook that is an excellent question. personally I think that although good pen testers are invaluable in validating a security state, and generally provide real world guidance to developers, it is rare for the best makers to be the best breakers. sure, it can happen, but rare- hence the OWASP decision to split the two disciplines. – Rory Alsop Apr 16 '11 at 20:47

Anyone, from the most clueless amateur to the best cryptographer, can create an algorithm that he himself can't break.

The antidote is not to create algorithms, i.e. don't (re)invent systems where you can avoid it. Not just algorithms either - don't invent your own authentication system, security protocol, key exchange, etc. You'll almost certainly get it wrong.

Instead use tried and proven methods that have been subject to peer review and designed in accordance with Kerchoff's Principle. And ideally implementations that have stood the test of time, too.

Your Answer

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

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