[PYTHON-CRYPTO] First draft of secret-key encryption PEP

Rich Salz rsalz at ZOLERA.COM
Wed Sep 19 06:01:16 CEST 2001

I don't know codecs, but it seems okay.

My primary concern is not requiring all the data to be in memory at
once.  As long as some kind of streaming model is supported, I'm

> Encryption and decryption are not necessarily symmetric, even if the
> keys are.  Look at an explanation of IDEA, for example; see
> http://home.ecn.ab.ca/~jsavard/crypto/co0404.htm .

I always forget IDEA. :( thanks.

> This would go through some layers of Python code, so it wouldn't be
> absolutely optimal performance.  I'm reluctant to require that every
> implementor of an encryption module re-implement sizable chunks of the
> file object API (read(), readline(), writelines(), &c.)

I think read/write/close is enough.  But a simple mixin class that did
all the others is easy enough to write in a couple-dozen lines if really

> Not sure how to handle padding.

Right.  You can't pad until you know there's no more input coming in the
"to be encrypted" side.  Which means either another API or close() has
special semantics affecting only the write method.

Zolera Systems, Securing web services (XML, SOAP, Signatures,

More information about the python-crypto mailing list