[PYTHON-CRYPTO] SIG thoughts.

Bryan Mongeau bryan at EEVOLVED.COM
Thu Feb 8 21:47:09 CET 2001


> No, algorithm implementations are meant to register their
> capabilities at run-time. crypto.locate_alg('aes') would then try to
> locate the first possible implementation for e.g. AES.
>
> There could be several implementations for the same algorithm, e.g.
> RSA provided in pure Python, C wrapper module or a driver for a
> hardware crypto device. The different implementation vendors should
> have registered names (requires a definition of a easy-to-use name
> space) that the application is able to choose a specific
> implementation by algorithm/protocol and vendor name.

Very cool. I like this. Two small issues I can think of:

aes = crypto.find_alg("aes")

precludes the ability to pass any arguments to the AES class constructor
without some trickery. Maybe:

aes = crypto.find_alg("aes",*args)

would be better? Secondly, what if multiple implementations of a given cipher
exist on a computer? Example, joe average installs a crypto device but is
unaware that he is using the C implementation because it was found first.
Could a search parameter be added?

> No. Think of keys with more parameters.

Help me out here... I can't think of any... :)

> Yes, for type-checking in debug mode. It should not be possible for
> an application to use a RSA key for a AES cipher. I want to check
> that with assert isinstance() statements.

This is an excellent idea that I concurr with completely! Is the goal to
protect lay programmers from their own mistakes?

> Please try to understand JCE's dynamic nature first. Off course I'm
> also jealous that I will never be able to provide such a good
> documentation. ;-)

Never say never... HappyDoc is a wonderful tool! :)

> That's why I propose a dynamic registration of implementations. You
> can distribute only the modules needed then. And you can choose the
> implementations which fits your needs best.

Maybe I don't know enough on the issue, but I don't see how the dynamic
registration would be possible to effectuate efficiently. Care to enlighten
me?

Regards,
--
<==================================>
Bryan Mongeau
Lead Developer, Director
eEvolved Real-Time Technologies Inc.
www.eevolved.com
<==================================>

"He who joyfully marches to music rank and file, has already earned my
contempt. He has been given a large brain by mistake, since for him the
spinal cord would surely suffice. This disgrace to civilization should be
done away with at once. Heroism at command, how violently I hate all this,
how despicable and ignoble war is; I would rather be torn to shreds than be a
part of so base an action. It is my conviction that killing under the cloak
of war is nothing but an act of murder."-- Einstein





More information about the python-crypto mailing list