ietf-openpgp
[Top] [All Lists]

Re: extensibility & code bloat (Re: PGP cipher tags)

1997-08-11 06:50:09
On Sat, 9 Aug 1997 brianh(_at_)risky(_dot_)bit3(_dot_)com wrote:

Have people considered seperating the mode from cipher used?  Each cipher 
would have a small number of functions and constants to define 
(functions: expand_key and encrypt_block (which would also decrypt 
block), and constants: key_length, expanded_key_length, and 
block_length).  The next layer would be multi-encryption (for instance, 
3-EDE).  The layer above that would be mode (CBC, code book, etc).  The 
encoding would then be something like:
    CBC-3EDE-DES
With the three parts each going to the three layers.

This would keep code bloat down (among other things, like making 
experimentation easier).  There would be a slight cost in performance (a 
couple of extra function calls, and the dropping of some possible 
optimizations- like dropping the initial/final permutations between 
rounds of 3DES).

Thoughts?

PGP 5.0 has copied the CFB with IV in the first 8 encrypted bytes with two
check bytes from IDEA in 2.6.3 to DES and CAST.  It seems to be "baked
in".  So before we go ahead and propose layering, it might be nice to work
out these little details.  If CFB is going to be a quirky CFB, will
"plain" CFB be another mode?  And CBC now exists for 3DES, CAST, and IDEA
in other implementations.

--- reply to tzeruch - at - ceddec - dot - com ---