I tried it, and it's working fine. Now question: is it real salsa20?

  • $\begingroup$ There is a codereview.SE for this kind of questions. $\endgroup$ – kelalaka Jan 13 '20 at 15:06
  • $\begingroup$ @kelalaka: not quite - codereview will tell if it's correctly written and maintainable code; he's asking whether it implements a very specific functionality. The best answer to that might be to give him some test vectors to try out (I don't have any myself) $\endgroup$ – poncho Jan 13 '20 at 15:21
  • $\begingroup$ @kelaka & poncho Well, you can also ask about security of the written code there, however I do know they accept your own written code, not that of somebody else: "For licensing, moral, and procedural reasons, we cannot review code written by other programmers. We expect you, as the author, to understand why the code is written the way that it is.". $\endgroup$ – Maarten Bodewes Jan 13 '20 at 15:33
  • $\begingroup$ @poncho I've provided some links then. $\endgroup$ – kelalaka Jan 13 '20 at 16:10
  • $\begingroup$ Off topic here. However the first step would be to confirm that you get the right output for an extensive set of test vectors. Then check if an implementation corresponds step-by-step with the algorithm's specification. Missing steps could be exploitable bugs. Additional steps could be intentional back doors or unintentional side channel attack vectors. That's quite insufficient in general, but to truly evaluate an implementation requires relatively arcane knowledge of hardware, programming languages, compilers, and a serious understanding of how a cryptographic algorithm is meant to be used. $\endgroup$ – Future Security Jan 13 '20 at 19:48
  • The Salsa20 specification paper contains examples for testing for each function. quarterround 7 example, rowround 2 example, etc..

    Indeed this paper is written as a tool for programmers, or the analyzers so that they can use these test vectors.

  • Salsa20 exists in the Crypto++ which is a C++ library originally written by Wei Dai. You can use this code to test, too.

  • Also, the snuffle page of the Bernstein contains code for various platforms.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.