[PYTHON-CRYPTO] PEP-272 (API for Secret-Key Encryption Algorithms)

Andy Dustman andy at DUSTMAN.NET
Fri Dec 14 17:36:25 CET 2001


On Fri, 2001-12-14 at 00:16, A.M. Kuchling wrote:
> On Thu, Dec 13, 2001 at 05:38:45PM -0500, Andy Dustman wrote:
> >If new() sets up the key schedule, then it will need a keyword argument
> >(decrypt=1) so it can know how to build the key schedule. But then, both
>
> Why not build them both?  I think that's what the pycrypt code does;
> the key schedules aren't that large and you probably don't have
> hundreds of thousands of encryption objects, so the extra memory and
> processing time is negligible.

Looking at the OpenSSL headers, you have to build the encryption key
schedule before you can build the decryption key schedule, so you have
to build both anyway to decrypt.

--
Andy Dustman         PGP: 0x930B8AB6
    @       .net     http://dustman.net/andy
You can have my keys when you pry them from my dead, cold neurons.





More information about the python-crypto mailing list