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

Bram Cohen bram at GAWTH.COM
Wed Sep 19 09:42:23 CEST 2001

On Tue, 18 Sep 2001, Andrew Kuchling wrote:

> Here's a first cut at a secret-key encryption API.  It's very rough.
> Note that the existing API in the Python cryptography modules is
> rather silly at times.  I think it's worth breaking compatibility in
> this specification if need be, in order to get a decent API.

For what it's worth, my project uses rijndael in counter mode, which you
don't have included, and the API is that you call make_encrypter() and it
returns a function, which you call repeatedly passing different strings
and it encrypts them in order (it's not threadsafe). Decryption is done
using the same function. To be general you'd want this to be able to
specify big vs. little endian and the starting block.

-Bram Cohen

"Markets can remain irrational longer than you can remain solvent"
                                        -- John Maynard Keynes

More information about the python-crypto mailing list