Pure Python Salsa20 Stream Cipher Implementation

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Feb 11 23:05:36 CET 2008


En Mon, 11 Feb 2008 17:29:49 -0200, Aahz <aahz at pythoncraft.com> escribió:

> In article <mailman.578.1202619043.9267.python-list at python.org>,
> Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote:
>> En Sat, 09 Feb 2008 20:29:58 -0200, Aahz <aahz at pythoncraft.com>  
>> escribió:
>>> In article <mailman.546.1202530094.9267.python-list at python.org>,
>>> Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote:
>>>> En Sat, 09 Feb 2008 01:34:30 -0200, <betabrain.honshu at gmail.com>
>>>> escribió:
>>>>> On 8 Feb., 17:18, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
>>>>>>
>>>>>> I don't understand why a pure python version of salsa20 would be
>>>>>> interesting.  Is there some application that uses salsa20, that's
>>>>>> worth being able to interoperate with in pure python?
>>>>>
>>>>> The reason for a pure python is that it would be independent from the
>>>>> platform. A C implementation is faster, but you need to compile it  
>>>>> for
>>>>> every platform. A python implementation doesn't have that problem and
>>>>> could be used to fall back upon.
>>>>
>>>> On most platforms -with a notable exception- there is a C compiler
>>>> available as a standard tool, which is used to compile Python itself.
>>>> distutils can easily compile and install C extensions itself, so most  
>>>> of
>>>> the time "python setup.py install" is the only thing users have to
>>>> execute, exactly the same as if the package were pure Python. With
>>>> setuptools, things may be even easier.
>>>
>>> What about Jython, PyPy, and IronPython?
>>
>> What about them?
>> Do you mean that there should be a Python implementation for each and
>> every imaginable module over there, so it can be used with all of those
>> Python variants? Restricted of course to their minimum common feature  
>> set?
>
> <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.

And that's exactly what I said, I don't see the need for a pure Python  
implementation of salsa20 based solely on "you need to compile [the C  
source] on every platform" (cf. quoted text above). That's all, and I  
don't want to argue with you or anyone about this.

-- 
Gabriel Genellina




More information about the Python-list mailing list