I am considering using the DTLS protocol for my online multiplayer game. For those who don't know, it is essentially a port of TLS to UDP datagrams.
According to this paper, the main overhead of the protocol is in the handshake phase, which took 950 ms in their tests. However, this study (broken link; see copy on archive.org) indicates that during actual encrypted transport, there is often less than 1 millisecond of delay.
This sounds like a godsend for realtime games. It is a low latency, highly secure encrypted channel that operates over UDP. It provides reliability and protection for the handshake phase, then steps out of the way. Yet, I have never heard of it being used in a game before, even though the RFC spec was written in 2006 and it's implemented in OpenSSL.
Why doesn't every game use it?
Answer
Why doesn't every game use it? Firstly, I doubt most people have even heard of this protocol. Network security is not well-known among game developers and this is a fairly obscure variant anyway. Secondly, not every game uses UDP. Thirdly, performance is a concern. A fifth of a millisecond delay on every 200 byte packet obviously means you can only handle 5000 packets a second even if your system does absolutely nothing else (which is unlikely). And there's the comparison of write performance - encryption can be more expensive than decryption.
No comments:
Post a Comment