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

Paul Rubin phr-pycrypt at nightsong.com
Fri Dec 14 06:21:21 CET 2001


    >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.

How about an argument that says what operation(s) should be supported:

 new(op='d')   # encrypt only
 new(op='e')   # encrypt only
 new(op='de')  # both

Other operations can be supported:

 new(op='s')   # sign digital signature or message authentication code
 new(op='v')   # verify signature from above

and so forth.  This is similar to a package I've been working on.

Is a draft copy of PEP 272 actually available somewhere?





More information about the python-crypto mailing list