Salsa20 and Poly1305
See original GitHub issueI’m putting together a .NET Core Discord client, and the voice connection requires raw opus stream encoded using xsalsa_poly1305
.
https://discordapp.com/developers/docs/topics/voice-connections
Not being a crypto guy myself, I am new to NaCl, libsodium, etc, and have stupid questions to ask:
- what is
xsalsa_poly1305
? - can I utilize it using NSec?
😅
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
authenticated encryption - Is Salsa20+Poly1305 an AEAD?
ChaCha, Salsa, including their eXtended nonce versions are all stream ciphers and Poly1305 is the authentication mechanism that provides ...
Read more >Salsa20
Salsa20 and the closely related ChaCha are stream ciphers developed by Daniel J. Bernstein. ... Google had selected ChaCha20 along with Bernstein's Poly1305...
Read more >xsalsa20poly1305 - Rust
XSalsa20Poly1305 (a.k.a. NaCl crypto_secretbox ) is an authenticated encryption cipher amenable to fast, constant-time implementations in software, based on the ...
Read more >Use ChaCha20Poly1305 instead of Salsa20Poly1305 for ...
... XSalsa20 + Poly1305 for symmetric encryption. The underlying Salsa20 cipher is part of the "Snuffle" lineage of ARX-based stream ciphers ...
Read more >For those who don't know, ChaCha20, a descendant of ...
OpenSSH, when using ChaCha20, also uses Poly1305 (also designed by djb) as its MAC ... Not sure about ChaCha but I implemented Salsa20...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NSec is very cutting-edge and uses C# features that still haven’t been announced officially. It looks like they’ll come with .NET Core 2.1/Visual Studio 15.5 release, though. I expect a big reveal at the upcoming connect(); in November. It’s pretty cool!
Until then, there is not really much to do. The actual crypto algorithms are already implemented; NSec relies on libsodium for this. What NSec does is provide fast, usable C# APIs. Most of these are in place already as well; only a few algorithms haven’t been designed an API yet. This includes the
xsalsa20_poly1305
algorithm referenced by the Discord spec. I haven’t decided yet how I want to expose it, since it doesn’t seem to have caught on much compared to the standardized AES-GCM and ChaCha20-Poly1305 AEAD constructions.If you’re willing to experiment with the .NET Core 2.1 alpha bits and accept APIs breaking a bunch of times, I could cook something up quickly to get you started with the Discord spec. Ping me at contact@nsec.rocks.
Added to NSec.Experimental in e3723cfa7d109809417d9f3b39aa01fe794c2354