Python export-a-crypto-system

Andrew Kuchling<amk@magnet.com>
wrote Python versions of the perl export-a-crypto-system sig. Python
(in case you don't know) is another interpreted scripting language.
An advantage of python is that it has built-in bigints :-)

On more serious applications, Andrew also wrote a Python Cryptography
Toolkit. See his home page for docs, and source for
PCT

Here is the
README file from
the curiosa directory of the crypto toolkit, it contains his python
export-a-crypto-system code also, plus an explanation.

Here is Andrew's second post to comp.lang.python of his python codes,
with a few optimisations (of the size kind by others) added, also I
put in his newer rc4.py, the original post expected an ascii key, this
one expects a hex key:

Both cope with arbitrary sized RSA keys, and the Python code is
considerably faster than the perl code due to the built-in bigints in
python being faster than dc which is shelled in the perl version.

In fact from a purist point of view, the perl code is in fact perl and
dc code as dc is called as a separate utility, and although dc is
shipped with most unix systems, it is kind of a hack. Andrew's
Python version doesn't suffer from this short-coming as it uses the
builtin in python bigint, and pow() function.