CodesInChaos/Chaos.NaCl — pull request #3 by jasonmccampbell (2014-04-09 04:37:53+00:00)
Title: Fixes an array-out-of-bounds failure in XSalsa decrypt

I ran into an array-bound exception when sending a short plain text message through. I believe this fix is correct, but I am still getting up-to-speed on the code so it could easily be wrong. The included unit test demonstrates the error on un-patched code.

Related, I have some basic tests for Ed25519.KeyExchange. This is my primary interest in the library in that I want to use Edwards curves for both signing and key exchange. Are there known issues with KeyExchange that basic tests won't tease out? In short I want to add the box create/open functionality by using KeyExchange to generate a shared secret and pass that secret to XSalsa Encrypt/Decrypt for distributing a symmetric encryption key to multiple parties. If KeyExchange is broken I'll have to find an alternative. But this library is very convenient thus far -- thanks!