question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Salsa20 and Poly1305

See original GitHub issue

I’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:

  1. what is xsalsa_poly1305?
  2. can I utilize it using NSec?

😅

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ektrahcommented, Oct 12, 2017

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.

0reactions
ektrahcommented, Apr 7, 2018

Added to NSec.Experimental in e3723cfa7d109809417d9f3b39aa01fe794c2354

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found