[python-crypto] Add AES to amkCrypto?
M.-A. Lemburg
mal at lemburg.com
Thu Feb 1 14:55:42 CET 2001
PC Drew wrote:
>
> "M.-A. Lemburg" wrote:
> > ...
> > I think this is what "PC Drew" (what's your real name, BTW ?)
> > had in mind with his higherlevel API.
>
> My name is Philip Cartier Drew, but I go by "PC" (my initials). Drew
> is my last name.
Ah, ok. Hi Philip :-)
> Here's what I want. I want to be able to take a file or a block of text
> and be able to encrypt it in any encryption algorithm, using any key
> size.
> The user would provide both the plaintext and the key to the function.
> I'm
> not proposing key rings like PGP and stuff like that, just basically
> providing
> a Python interface to these encryption libraries. I want to provide a
> consistant
> interface to every algorithm though.
Sounds like a reasonable proposal... something like the codec
registry design, only for ciphers and hashes.
There's a catch to this though: not all ciphers support variable
key-lengths, most even don't support variable block lengths. Then
there are sometimes extra parameters which are specific to one
cipher only (e.g. some initial state parameter or the number of
rounds to apply).
Why not write this up as a module on top of amkCrypto ?
> >
> > An codec style interface would also be nice to have. Streams
> > could then easily be encoded and decoded on-the-fly.
>
> can you explain that?
Codecs encode and decode data using either direct interfaces
or via the standard file interface. Ciphers could easily be
used to encode streams going in and out of Python this way.
For details, read codecs.py and Misc/unicode.txt. The codec
design originated in the Unicode implementation, but can be
put to use in a lot of other different contexts as well.
> > Note that even though we could add a strong cipher to the
> > Python distribution, this would probably not do any good: some
> > countries do not allow to *import* and use strong cryptographic
> > code. Python would no longer be downloadable for people living
> > in these countries.
>
> That's an interesting thought...I didn't know that countries would
> limit the importing of strong cryptography. Okay, so how about
> providing an easy way to download and install the cryptography package?
> For instance, I really hate having to download 15 packages just to get
> a feature working. It'd be nice to have one download so that it's easy
> for the user to install.
Ok, but that's really a different subject (CPAN for Python) and
covered by different SIGs (e.g. the catalog-sig, I think).
Since amkCrypto already uses distutils, we are already in a fine
position. OpenSSL is quite portable and available on most platforms
as well (as RPM or as DLL for Windows). We could even try to tweak
distutils into compiling OpenSSL as well, if that's a problem.
--
Marc-Andre Lemburg
______________________________________________________________________
Company: http://www.egenix.com/
Consulting: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/
------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/1/_/22498/_/981035771/
---------------------------------------------------------------------_->
More information about the python-crypto
mailing list