FW: First Attempt at Crypto Library

Matt Harden matth@mindspring.com
Thu, 24 Apr 2003 23:22:12 -0500


Andrew J Bromage wrote:

> A cipher is an algorithm for turning an n-bit block into another n-bit
> (and back again) block using an m-bit key.  It does not cover encoding
> messages longer or shorter than an n-bit block.  At best it's a "codec"
> for a certain fixed-size binary object where the size depends, in
> general, on the algorithm.
> 
> This table may help clarify the thinking:
> 
> 			| Algorithm	| Codec		| Format
> 	----------------+---------------+---------------+----------------
> 	 Cipher		| DES		| CBC-DES	| SSL
> 	 MAC		| SHA-1		| HMAC-SHA-96	| SNMPv3
> 	 Text compress	| LZ77		| Deflate	| GZip
> 	 Image compress	| DCT		| JPEG		| JFIF

This is great.  I would just change one thing: in my opinion, SSL and 
SNMPv3 are not formats, but protocols.  HTML is a format, HTTP is a 
protocol.  The distinction should be that a format is a way of 
structuring data that is designed for storage, whereas a protocol is 
used to transfer data where there is a sender and a reciever, or a peer 
relationship in which multiple entities interact.  Protocols are 
interactive, where formats are passive.  An example of a crypto format 
might be the OpenPGP file format.  An example of a MAC format (or at 
least, one involving a secure hash) might be the unix /etc/shadow file.

Thanks,
Matt Harden