[PYTHON-CRYPTO] things missing from PEP 272

Bram Cohen bram at GAWTH.COM
Sun Mar 17 23:56:15 CET 2002


The standard NIST cipher modes are defined in this document

http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf

The modes it gives are CBC, ECB, CFB, OFB, and CTR, the last two of which
are missing from PEP 272. Some further justification for CTR is given
here -

http://www.cs.berkeley.edu/~daw/papers/ctr-aes00.ps

I'd really like CTR to ship with Python because, well, I'm using it, and
it's the only thing keeping my app from being pure Python :-)

The API for OFB is obvious, but the one for CTR is considerably less so.
My suggestion is to have the IV be the first block to be encrypted, and
have the big/little endian issue be addressed by having CTR mean big
endian and CLE mean little endian.

-Bram Cohen

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





More information about the python-crypto mailing list