AES-256-GCM encryption for Discord voice.
Uses Erlang's built-in :crypto module. Implements the
aead_aes256_gcm_rtpsize mode where the RTP header stays plaintext.
Summary
Functions
Decrypts an AES-256-GCM encrypted voice packet.
Encrypts an audio frame using AES-256-GCM.
Returns the nonce byte length for this encryption mode.
Functions
Decrypts an AES-256-GCM encrypted voice packet.
Returns {:ok, plaintext} or :error.
Encrypts an audio frame using AES-256-GCM.
The RTP header (first 12 bytes) is used as AAD (additional authenticated data) and stays plaintext. A 4-byte nonce is appended to the packet.
Returns the nonce byte length for this encryption mode.