Skip to content

Commit 40bdb58

Browse files
authored
add DAVE protocol high-level info and opcodes (#7150)
Adds high-level information for the new E2EE A/V protocol DAVE, as well as related opcodes
1 parent 75ecbb0 commit 40bdb58

File tree

4 files changed

+216
-20
lines changed

4 files changed

+216
-20
lines changed

docs/change_log/2024-08-13-voice-encryption-modes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ topics:
55
- "Voice"
66
---
77

8-
Added documentation for voice [encryption modes](#DOCS_TOPICS_VOICE_CONNECTIONS/encryption-modes) `aead_aes256_gcm_rtpsize` and `aead_xchacha20_poly1305_rtpsize` while announcing the deprecation of all `xsalsa20_poly1305*` variants and `aead_aes256_gcm`. Deprecated encryption modes will be discontinued as of November 18th, 2024.
8+
Added documentation for voice [encryption modes](#DOCS_TOPICS_VOICE_CONNECTIONS/transport-encryption-modes) `aead_aes256_gcm_rtpsize` and `aead_xchacha20_poly1305_rtpsize` while announcing the deprecation of all `xsalsa20_poly1305*` variants and `aead_aes256_gcm`. Deprecated encryption modes will be discontinued as of November 18th, 2024.
99

1010
> danger
1111
> Deprecated encryption modes will be discontinued as of November 18th, 2024.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "Voice End-to-End Encryption (DAVE Protocol)"
3+
date: "2024-09-17"
4+
topics:
5+
- "Voice"
6+
---
7+
8+
Introduced high-level documentation for Discord's Audio and Video End-to-End Encryption (DAVE) protocol, and the new voice gateway opcodes required to support it.
9+
10+
Since September 2024, Discord is migrating voice and video in DMs, Group DMs, voice channels, and Go Live streams to use end-to-end encryption (E2EE). You are not immediately required to support the E2EE protocol. Non-E2EE connections to voice in DMs, Group DMs, voice channels, and Go Live streams will eventually be deprecated and discontinued after at least a six month deprecation window, which will be announced in the future.

docs/topics/Opcodes_and_Status_Codes.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,31 @@ Our voice gateways have their own set of opcodes and close codes.
4848

4949
###### Voice Opcodes
5050

51-
| Code | Name | Sent By | Description |
52-
|------|---------------------|-------------------|----------------------------------------------------------|
53-
| 0 | Identify | client | Begin a voice websocket connection. |
54-
| 1 | Select Protocol | client | Select the voice protocol. |
55-
| 2 | Ready | server | Complete the websocket handshake. |
56-
| 3 | Heartbeat | client | Keep the websocket connection alive. |
57-
| 4 | Session Description | server | Describe the session. |
58-
| 5 | Speaking | client and server | Indicate which users are speaking. |
59-
| 6 | Heartbeat ACK | server | Sent to acknowledge a received client heartbeat. |
60-
| 7 | Resume | client | Resume a connection. |
61-
| 8 | Hello | server | Time to wait between sending heartbeats in milliseconds. |
62-
| 9 | Resumed | server | Acknowledge a successful session resume. |
63-
| 13 | Client Disconnect | server | A client has disconnected from the voice channel |
51+
| Code | Name | Sent By | Description | Binary |
52+
|------|-------------------------------------|-------------------|----------------------------------------------------------|--------|
53+
| 0 | Identify | client | Begin a voice websocket connection. | |
54+
| 1 | Select Protocol | client | Select the voice protocol. | |
55+
| 2 | Ready | server | Complete the websocket handshake. | |
56+
| 3 | Heartbeat | client | Keep the websocket connection alive. | |
57+
| 4 | Session Description | server | Describe the session. | |
58+
| 5 | Speaking | client and server | Indicate which users are speaking. | |
59+
| 6 | Heartbeat ACK | server | Sent to acknowledge a received client heartbeat. | |
60+
| 7 | Resume | client | Resume a connection. | |
61+
| 8 | Hello | server | Time to wait between sending heartbeats in milliseconds. | |
62+
| 9 | Resumed | server | Acknowledge a successful session resume. | |
63+
| 11 | Clients Connect | server | One or more clients have connected to the voice channel | |
64+
| 13 | Client Disconnect | server | A client has disconnected from the voice channel | |
65+
| 21 | DAVE Prepare Transition | server | A downgrade from the DAVE protocol is upcoming | |
66+
| 22 | DAVE Execute Transition | server | Execute a previously announced protocol transition | |
67+
| 23 | DAVE Transition Ready | client | Acknowledge readiness previously announced transition | |
68+
| 24 | DAVE Prepare Epoch | server | A DAVE protocol version or group change is upcoming | |
69+
| 25 | DAVE MLS External Sender | server | Credential and public key for MLS external sender | X |
70+
| 26 | DAVE MLS Key Package | client | MLS Key Package for pending group member | X |
71+
| 27 | DAVE MLS Proposals | server | MLS Proposals to be appended or revoked | X |
72+
| 28 | DAVE MLS Commit Welcome | client | MLS Commit with optional MLS Welcome messages | X |
73+
| 29 | DAVE MLS Announce Commit Transition | server | MLS Commit to be processed for upcoming transition | |
74+
| 30 | DAVE MLS Welcome | server | MLS Welcome to group for upcoming transition | X |
75+
| 31 | DAVE MLS Invalid Commit Welcome | client | Flag invalid commit or welcome, request re-add | |
6476

6577
###### Voice Close Event Codes
6678

@@ -77,7 +89,7 @@ Our voice gateways have their own set of opcodes and close codes.
7789
| 4012 | Unknown protocol | We didn't recognize the [protocol](#DOCS_TOPICS_VOICE_CONNECTIONS/establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. |
7890
| 4014 | Disconnected | Channel was deleted, you were kicked, voice server changed, or the main gateway session was dropped. Should not reconnect. |
7991
| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](#DOCS_TOPICS_VOICE_CONNECTIONS/resuming-voice-connection). |
80-
| 4016 | Unknown encryption mode | We didn't recognize your [encryption](#DOCS_TOPICS_VOICE_CONNECTIONS/encrypting-and-sending-voice). |
92+
| 4016 | Unknown encryption mode | We didn't recognize your [encryption](#DOCS_TOPICS_VOICE_CONNECTIONS/transport-encryption-and-sending-voice). |
8193

8294
## HTTP
8395

0 commit comments

Comments
 (0)