derived from the participant id in addition to the salt, separated by a null
byte to avoid ambiguity attacks along the lines of
(someRoom, someParticipant)
(someRoo, mSomeParticipant)
moves the cryptography bit to a datastructure which allows per-sender keys.
Does not yet use per-sender keys.
Also fixes lots of lint errors in the worker.
e2ee: don't pass plain frames to decoder if we are encrypting (#1116)
If we are encrypting and the key index from a (potentially unencrypted)
frame exceeds our key ring size (1 currently) drop the frame.
This is a heuristic. We currently don't have the signaling for whether a
remote end does encrypt its frames or not.
Reverts #1098, that strategy does not work. When switching from garbage to non-garbage the decoder
would decode subsequent packets based on the wrong keyframe.
e2ee: decode static black frame for decryption errors (#1098)
similar to #1095 use a black keyframe instead of displaying a potentially
unencrypted stream. This was again captured with a modified version of
the webrtc sample, additional logging and a resolution of 320x180
e2ee: generate silence in case of audio decryption errors
This handles decryption errors for audio differently than the
current version. Instead of forwarding horrible noise to the decoder,
replace the bytes with magic opus bytes for silence:
0xd8fffe
Those bytes were captured on a modified version of
https://webrtc.github.io/samples/src/content/peerconnection/endtoend-encryption/
with more dumping and after disabling the track.