FW: First Attempt at Crypto Library

Andrew J Bromage ajb@spamcop.net
Wed, 23 Apr 2003 18:08:11 +1000

G'day all.

On Tue, Apr 22, 2003 at 12:15:41PM +0100, Malcolm Wallace wrote:

> >>I would have thought that its population would look something like:
> >>
> >>   Codec.Encryption.DES
> >>   Codec.Encryption.RSA
> >>   Codec.Encryption.Blowfish
> >>
> >>etc.  No need for any deeper structure.  Any attempt to further
> >>classify crypto schemes by method or purpose would be confusing I
> >>think.  Crypto is just crypto, i.e. binary to binary.

On Tue, Apr 22, 2003 at 11:00:05PM -0500, Matt Harden wrote:

> What about ROT13, or Enigma?  Those are text to text.

If it helps, remember that RSA and DES, for example, don't do the same
thing.  "Encryption" is a general heading which at least includes
symmetric ciphers, asymmetric ciphers, digital signatures, hash
functions and secure random number generators, and that's just the
algorithms.  Then there are all the various modes in which they can be
used to encrypt blocks of data (e.g. PKCS#1 encoding for RSA, inner-CBC
vs outer-CBC mode for 3DES etc).

Codec.Encryption specifies what the module is for, not how it is used.
Presumably there are going to be some type classes somewhere which
specify whether it is a BinarySymmetricCipher like TripleDES or
TextSymmetricCipher like FourWheelNavalEnigma.

(These names are just examples, of course.)

It's the same, for example, with FileFormat.  Zip and Gzip are
conceptually similar, but one supports multiple files and the other
does not.

> By the way, crypto hashes should go somewhere else, because they're not 
> codecs.  Same goes for crypto random-number generators.

Which suggests that Codec isn't the right name. :-/

Andrew Bromage