On Thu, 10 Aug 2000, Michael Paul Johnson wrote:
> What would you like to see covered in a practical book on cryptography for
> programmers?
>
* Practical random number generation -- /dev/random, entropy gathering
daemon, Yarrow, etc. Some examples of bad random number generation
to put the fear of JHVH-1 into the reader.
Places to find code for doing practical random number generation.
Places to look for updates and bug reports.
* How to design a program in such a way that it's easy to upgrade crypto
involved.
* Quick rundown on what crypto primitives exist, the most common
kinds used in each application, and "how to decide between primitives."
Mention the controversy over key sizes (c.f. cryptosavvy.com
and last RSA Bulletin for starters).
* "War stories," as in Skiena's _Algorithm Design Manual_ may be
worth looking at, but may be too informal for some tastes.
Certainly real-world examples of a project started and finished
using crypto would be relevant (for an extreme example of this,
_Clouds to Code_ focuses on a single project for the whole book).
Preferably projects which address common applications like
logging in (although logging in already has ssh and so on,
so maybe something else).
* Writing your own code vs. using a crypto library.
* Discussion of crypto libraries available (say an updated version of
Shostack's comparisons), with attention to licensing issues.
Discussion of multi-precision integer libraries available for
various languages. Also their performance on various OS and
chip combinations.
* What is and is not provided by a library. What should a programmer
expect to write? what should he or she certainly not try to write?
* Memory management for paranoids. General discussion of swap files
and so on, then specific examples of how to do Windows and/or
linux memory management.
* Practical details of encoding schemes which may come up in practice
(such as what ASN is, how to use it, whether you need it, etc).
* Explanation of the PKCS standards, what they are, how to find them,
whether you need to conform to them, etc. Ditto for IEEE 1363
standards, ISO, whatever. Some real world perspective on which
parts of the standards make sense and which don't.
(e.g. "safe primes")
* Information on "where to find standards" and "where to look for
new information on breaks in systems." Some idea of how to
find and interpret results like the ISO-9796 padding breaks.
* Speaking of which, it should cover padding. OAEP would be neat.
Briefly mentioning the security proof for OAEP would be
very cool, but I suppose it's not strictly necessary.
* All the _Handbook of Applied Cryptography_ type material on
good ways to generate prime numbers and other encryption
parameters. Maybe in smaller scope than the HAC
(you might not need to include provable prime generation
for instance), but explicitly specified at each step.
* Fast algorithms for common operations, like modexp.
Precomputation algorithms. Source code for such things.
Ditto for things like DES; explain what bitslicing is
and how it works.
* Lots of examples of how to screw up in subtle ways. Either
cryptographically (e.g. not verifying that a particular
element is a member of a subgroup or something else sneaky)
or with the language (buffer overflows).
Especially examples of tempting, but wrong, things to do.
* Real-world examples of systems which screwed up due to protocol
or programming errors.
* Some discussion of "speed vs. security" tradeoffs, with
specific reference to such things as using e=3 for RSA,
moduli of the form n = p^2 q, and so on. Try to distinguish
tricks which almost certainly don't affect security from
those which might from those tricks which certainly do.
-David Molnar