[dev] Horde_Cipher et al;

Davey davey at php.net
Sat Jul 26 18:56:51 PDT 2003


Mike Cochrane wrote:

>>----- Message from davey at its-explosive.net ---------
>>    
>>
>>Then in the light of this, we have a choice of code duplication or
>>keeping this as one package. (or perhaps a Crypt_Base class (or
>>something like this) which contains this stuff for all of the encryption
>>stand-alone packages to use? sounds like a good idea to me actually...)
>>
>>    
>>
>
>Quick lesson in how blockmode ciphers such as rc4, gost, cast128, blowfish,
>basically all the common ones we see.
>
>At these ciphers can do is encrypt pieces of data of a fixed length, in the case
>of all the ones i listed, 8 bytes long. No short, no longer. That's how the
>ciphers are designed.
>
>The blockmodes handle how to combine these 8 byte blocks into something that
>allows you to encrypt any length pieces of data. eg Cipher Block Chaining (CBC)
>just breaks the data into 8 byte chucks, encrypts them and outputs them. Other
>block modes do this in more secure, or different ways that are appropriate in
>different situations such as when the total length of the data is not known
>ahead of time.
>
>There is no reason to seperate the two packages, anyone who is using the ciphers
>alone will need to implement their own blockmodes and anyone using blockmodes
>alone will need to implement their own cipher. Pretty silly really.
>
>All the cipher classes except the Rc4 encryption have the same dependancies, so
>there is no reason that all ciphers can't be installed in one package that I
>can see.
>
>- Mike :-)
>

Mike,

Thanks for the low-down. With this brought to light, I will push for 
using Horde_Cipher pretty much as-is.
I still haven't checked the code out to see how extensible it is, in 
allowing the use of any of the Crypt_* packages... and whether or not it 
handles whether or not to use mcrypt or the userland implementations, 
I'll need to add that if not

- Davey




More information about the dev mailing list