Date: Fri, 11 Aug 2000 15:02:47 -0400 (EDT)
From: John R Levine 
To: ...
Cc: cryptography@c2.net
Subject: Re: Book on cryptography for programmers

> In case you haven't figured it out, yes, I am seriously contemplating 
> writing such a book. Please keep the good ideas coming.

Oh, good.

All of the discussion of algorithms is fine, but it seems to me that the most
important topic in such a book is how to avoid building yet another crypto
system with a ten-ton steel door and a cardboard back wall.  I would include
some horror stories of failed crypto, and perhaps a few pages on how crypto
systems are broken or subverted. 

Also, you might develop a check list of do's and dont's, e.g.:

* Don't try to invent a new crypto systems.  Amateurs can't write secure 
crypto systems, as often as not professionals can't either.

* Don't "improve" an existing system.

* Do remember that "random" numbers usually aren't, and no amount of
massaging them will fix that. 

* Don't assume that bad guys won't be able to read your source code. 

* Do have an explicit threat model so you understand why you're developing a
crypto program in the first place.  People obsess over credit card numbers
being stolen in transit over the net, but the real threats are poorly secured
DBMS back ends and merchant sites that are not what they appear to be. (Check
out www.mcgrawhill.com, for example.)

* Do be lazy.  Before you try to write a network crypto package, for example,
see if you can piggyback on SSL.  SSL has its problems, but it's probably
better than something you'll invent. 

* Do consider usability.  If a crypto system issues 25 character random
passwords every week, the passwords will all be written on post-its stuck on
people's screens.  If there's a rule not to do that, the post-its will move
into the desk drawer. 

* Don't be seduced into doing something foolish for usability's sake, 
e.g., self-extracting executables with alleged encrypted data inside.

Regards,
John Levine, johnl@iecc.com, Primary Perpetrator of "The Internet for Dummies",
Information Superhighwayman wanna-be, http://iecc.com/johnl, Sewer Commissioner
Finger for PGP key, f'print = 3A 5B D0 3F D9 A0 6A A4  2D AC 1E 9E A6 36 A3 47