Pure Python Salsa20 Stream Cipher Implementation

Paul Rubin http
Mon Feb 11 20:34:59 CET 2008


aahz at pythoncraft.com (Aahz) writes:
> <shrug>  Is there some reason you're using exaggerated language?  My only
> point is that simply saying "C compiler!  C compiler!" ignores the fact
> that Python itself is multi-platform (and makes you look foolish);
> whether any given module should be written in pure Python needs to be
> decided on a case-by-case basis.

Certainly one of salsa20's main design features is that it's supposed
to be faster than AES-CTR.  Therefore any implementation other than a
native C implementation is basically a compatibility fallback.
However, it's likely that there's already a JNI wrapper for it that
should(?) make it useable with jython.  I don't know the .net
situation but I'd hope it's similar.  And someone says there's already
a ctypes wrapper.

Overall, though, I just don't see a need for this, it's far more
important to have AES and DES available since those are standard
crypto algorithms, even if pure python implementations are inherently
slow.  If something nonstandard is desired for speed, SHA-OFB seems
to work pretty well.



More information about the Python-list mailing list