Skip to content
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

Modify voice to use encryption instead of plain. #133

Closed
bwmarrin opened this issue Feb 24, 2016 · 1 comment
Closed

Modify voice to use encryption instead of plain. #133

bwmarrin opened this issue Feb 24, 2016 · 1 comment
Assignees
Labels
feature Feature implementation
Milestone

Comments

@bwmarrin
Copy link
Owner

Discord plans to drop support for non-encrypted voice. So, we need to get voice encryption support added quickly.

Discord is using NaCl SecretBox for encryption (https://nacl.cr.yp.to/secretbox.html)

@bwmarrin bwmarrin added the feature Feature implementation label Feb 24, 2016
@bwmarrin bwmarrin added this to the v0.12.0 milestone Feb 24, 2016
@bwmarrin
Copy link
Owner Author

Rough steps for encryption.

Step 1

Need to pass xsalsa20_poly1305 as the mode for voiceUDPOp{} in voice.go:udpOpen() func. to get the encryption party started.
85e06e3#diff-952a4895d262bd9f63ab49444784519dR398

Step 2

Then, on the WS opcode 4 comes back that should contain the encryption secret

Example op 4

{
        "secret_key": [
                254,
                232,
                117,
.....  this continues to create a total of 32 int values
                180,
                232
        ],
        "mode": "xsalsa20_poly1305"
}

85e06e3#diff-952a4895d262bd9f63ab49444784519dR205

Step -- Send Audio

After we build the packet to send, encrypt the opus data before sending
85e06e3#diff-952a4895d262bd9f63ab49444784519dR494

Step -- Receive Audio

When we receive a packet, decrypt the opus data
85e06e3#diff-952a4895d262bd9f63ab49444784519dR574

@bwmarrin bwmarrin added the help wanted Requires additional help label Feb 24, 2016
@bwmarrin bwmarrin changed the title Need to added voice encryption support. Modify voice to use encryption instead of plain. Feb 25, 2016
@bwmarrin bwmarrin removed the help wanted Requires additional help label Feb 25, 2016
@bwmarrin bwmarrin self-assigned this Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature implementation
Projects
None yet
Development

No branches or pull requests

1 participant