dave-go

module
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: Apache-2.0

README

dave-go

Release License Go Reference CI

dave-go is a pure Go DAVE implementation targeting the github.com/disgoorg/godave.Session interface.

I originally started this while trying to get the MLS pieces needed for DAVE working in pure Go, and it ended up growing into a standalone implementation. It is built on top of github.com/thomas-vilte/mls-go.

Status

It is working and already usable, but I still consider it early and there are a few rough edges I want to clean up over time.

Install

go get github.com/thomas-vilte/dave-go

For a tagged version:

go get github.com/thomas-vilte/dave-go@v0.1.0

Usage

Use the session implementation anywhere a godave.SessionCreateFunc is expected:

import (
	"github.com/disgoorg/disgo/voice"
	"github.com/thomas-vilte/dave-go/session"
)

voice.WithDaveSessionCreateFunc(session.New)

There is also a small disgo voice example in examples/voice.

Packages

  • session: godave.Session implementation
  • mediakeys: sender key derivation and ratchets
  • frame: DAVE frame encrypt/decrypt logic
  • codecs: codec-aware frame transforms used by the session layer

References

Notes

  • the example streams Opus frames from a local .dca file
  • some internal comments may still be cleaned up over time

Directories

Path Synopsis
Package codecs handles the codec-aware logic to figure out which bytes of a media frame should stay unencrypted under the DAVE protocol.
Package codecs handles the codec-aware logic to figure out which bytes of a media frame should stay unencrypted under the DAVE protocol.
Package frame implements the DAVE (Discord Audio/Video End-to-End Encryption) v1.1 frame format.
Package frame implements the DAVE (Discord Audio/Video End-to-End Encryption) v1.1 frame format.
Package mediakeys implements DAVE media key derivation from the current MLS epoch exporter secret.
Package mediakeys implements DAVE media key derivation from the current MLS epoch exporter secret.
Package session implements a DAVE session as a drop-in replacement for godave.Session.
Package session implements a DAVE session as a drop-in replacement for godave.Session.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL