-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discord DAVE Protocol (E2EE) for voice #1258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so many new lines I think i'm gonna dream of them tonight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to say what code is new and what was moved, but there are some issues. Congrats on getting the feature working though
… log calls, this means adding a reference to the creating cluster in many of libdave's classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
…og events have never had them anyway so nobody will notice, this wont break anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Eskeetit
DAVE? What? huh?
This mega-PR implements Discord's DAVE protocol.
DAVE is an end-to-end encryption scheme that uses MLS (message layer security). To add support for this we use a fork of libdave (a Discord-made open source library) to which i have changed to our code style and documented.
This also depends on libmlspp, which is a third party dependency from cisco, but is currently only available on GitHub and on vcpkg, as such we have made our own fork. Our own fork of mlspp changes the build scripts, as by default it compiles AND INSTALLS as a shared object libmlspp.so, and also installs libbytes.so, libhpke,so, libmls_vectors.so and libtls_syntax.so. We really do NOT want all these installing alongside dpp and becoming separated requirements so this is linked statically into libdpp.so.
Notes about Discord's libdave and Cisco's mlspp
Note that both libdave and mlspp are significantly smaller libraries in terms of poplarity and userbase than dpp, as the mls protocol is yet to pick up widespread traction beyond innovators at places like cisco, signal, facebook, and google. In time, as mls becomes a more popular protocol (IF it becomes a more popular protocol) we can expect better documentation and support for it from third parties and things like libmlspp ending up in places like apt repositories.
Note that if the user disables voice, libmlspp isnt built at all, and nor is the entire of src/dpp/dave
Important: mlspp is not applicable for our code review. It is a security library and its implementation should be considered blackboxed and left well alone!
Refactoring
I have done significant refactoring of discordvoiceclient.cpp to split it into several separate files - if voice is enabled, everything under src/dpp/voice/enabled is compiled into dpp, else everything in src/dpp/voice/disabled is compiled into dpp; currently, a simple empty stub of discord_voice_client. This makes dpp with voice disabled an extremely streamlined version of the library.
Todo
Code change checklist