[tahoe-lafs-trac-stream] [pycryptopp] #40: xsalsa20 wrapper

pycryptopp trac at tahoe-lafs.org
Tue Feb 7 04:58:19 UTC 2012


#40: xsalsa20 wrapper
-----------------------------------+------------------------
Reporter:  dragonxue               |          Owner:  xue yu
    Type:  enhancement             |         Status:  new
Priority:  major                   |      Milestone:  0.6.0
 Version:  0.5.19                  |     Resolution:
Keywords:  xsalsa20 review-needed  |  Launchpad Bug:
-----------------------------------+------------------------

Comment (by warner):

 I ran a quick test (using the attached attachment:compare_with_pynacl.py
 script) to compare the pycryptopp XSalsa20 implementation against pynacl's
 {{{crypto_stream_xor()}}} function (using random keys, IVs, messages, and
 chunk sizes), and it passed 10k cases (took about 4 seconds total on my
 laptop).

 I also verified that the built-in test_xsalsa.py fails if I modify one of
 the salsa.txt test vectors, or if I modify the key in
 {{{test_zero_XSalsa}}}.

 For reference, it looks like the {{{salsa.txt}}} test vectors are a
 reformatted subset of the upstream cryptopp-5.6.1/TestVectors/salsa.txt
 (at least I eyeballed the two and found several keys in common). Upstream
 uses a funky data format (more of a miniature test-executing language),
 and includes vectors for reduced-round variants (Salsa12 and Salsa08).
 It'd be reassuring if pycryptopp could have an exact copy of the upstream
 vectors, but I don't think it's worth the effort to reverse-engineer
 Crypto++'s testing language.

-- 
Ticket URL: <http://tahoe-lafs.org/trac/pycryptopp/ticket/40#comment:7>
pycryptopp <https://tahoe-lafs.org/trac/pycryptopp>



More information about the tahoe-lafs-trac-stream mailing list