<font face="arial" size="3"><p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">It does seem awfully complicated compared to how I would imagine the functionality could be implemented if you just did it on top of UDP. One of the costs of using UDP is that one needs to support protocol-specific end-to-end congestion control as well as protocol-specific datagram-loss handling.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">To me a far simpler idea would be to start with "UDP congestion control" that didn't assume UDP datagrams arrived in-order and at-most-once, using observed drops and ECN marks, or end-to-end delay (by timestamping packets).</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">Then use on that logic a sort of erasure coding (allowing reconstruction of packets containing backspace/delete) that allows out-of-order delivery as information becomes known. Erasure coding (like Digital Fountain codes) are more efficient than retransmission of duplicates of packets - if there are N packets queued in the network, you'd need some kind of SACK-like scheme, but SACK doesn't work very well when the buffering is a backup in the network, rather than in the receive endpoint's OS queueing. Digital Fountains or its successors work great! (and I think the patent expired finally).</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">Up to this point, encryption hasn't been mentioned. But there are encryption schemes that work very well for UDP - emulating a "one-time pad" based on a random start value fed back into a good cipher. Ideally it would be inserted under the erasure code layer. What you need to know to decrypt a block to feed into the erasure-code decoder is just a sequence number for the transmitted block, so you can index into the OTP.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">Very simple.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">But doing this on top of WebRTC (not a bad protocol, just a complicated platform) etc. seems to introduce problems that need to be patched around.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">On Wednesday, April 15, 2020 7:34pm, "Dave Taht" <dave.taht@gmail.com> said:<br /><br /></p>
<div id="SafeStyles1587052637">
<p style="margin:0;padding:0;font-family: arial; font-size: 12pt; overflow-wrap: break-word;">> dave<br />> <br />> I am a big fan of udp. but reading about how this was implemented made<br />> my head hurt. Then add crypto.<br />> <br />> https://www.meetecho.com/blog/realtime-text-sip-and-webrtc/<br />> <br />> --<br />> Make Music, Not War<br />> <br />> Dave Täht<br />> CTO, TekLibre, LLC<br />> http://www.teklibre.com<br />> Tel: 1-831-435-0729<br />> </p>
</div></font>