Chaos.NaCl
Chaos.NaCl copied to clipboard
Need help?
Hey,
this is very interessting. Do you need help on anything?
Cheers, --esskar
My main problem is that I can't figure out how I want the API to look like. With issues like:
- Single responsibility principle and flexibility vs. an integrated approach that's harder to use incorrectly
- How close should the API be to the original NaCl?
- Base classes/interfaces for abstractions like signatures, etc. But unfortunately similar algorithms have slightly different properties and features, so I struggle with finding useful abstractions.
- Using
byte[]as keys vs. encapsulating them in a class - How strictly should I avoid heap allocations? Originally I wanted to avoid them entirely, but that becomes extremely annoying since .net has no value type arrays in safe code (only that ugly hack in unsafe code).
Feature wise I'm pretty close to completion. I'm mainly adding unit tests at the moment.
I would prefer an API as close as possible tn the original C++ version. Using byte[] would be enough as nothing more neds to be encapsulated. Nonetheless, good work so far.
For my version of TripleSec, I took your XSalsa20-Poly1305 method and stripped out the Poly1305 because for that encryption scheme the Poly1305 wasn't part of the spec, and your implementation of XSalsa20, overall, was the most compatible. If you want to fold it back into your repository let me know or grab it direct from my repository and drop me a line. I'm also using this library (unaltered) in my version of Nadim Kobeissi's miniLock with the full Poly1305 scheme.
https://github.com/SparkDustJoe/miniLockManaged https://github.com/SparkDustJoe/TripleSecManaged