How much network overhead does TLS add compared to a non-encrypted connection?

后端 未结 4 405
野性不改
野性不改 2021-02-05 05:55

(Approximately) how many more bits of data must be transferred over the network during an encrypted connection compared to an unencrypted connection?

IIUC, once the TLS

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 06:31

    The short answer is: Your Milage May Vary (YMMV) - it all depends on your traffic pattern. There are a number of factors to take into account:

    • The additional handshakes and certs will add 4-6KB to the TCP stream, this will result in more ethernet frames going across the wire as well
    • Clients should download the certificate revocation list. Some tools like cURL omit this step. The crl may be cached by the browser, however, it usually doesn't have a long age associate with it. Verisign sets theirs to expire after four minutes. In my testing, I see Safari on Windows downloading the same 91KB file two times.
    • TLS Session resumption can avoid the public key-exchange part of the handshake, as well as the certificate verification.
    • HTTP keep-alives will keep the socket open, same as http, but has more savings when the socket is TLS.
    • SSL compression support is starting to show up server side, but AFAIK, most browsers aren't implementing this yet. Additionally, if you are already compressing at the http layer, not much will be gained here. Potentially large gains could be had if the client is sending large amounts of text to the server, which ordinarily isn't compressed at the http layer.

提交回复
热议问题