本文内容来自《Traffic Analysis of an SSL/TLS Session》的阅读笔记,原文见此处。
TLS 全称为 Transport Layer Security,它本身也分为了 Lower 和 Higher 两层协议。
Lower Layer Lower Layer 协议在 TCP 协议之上,提供面向连接的可靠传输,在这一层的协议主要是记录协议(TLS Record Protocol)。 记录协议首先把上层协议传来的数据分成小于2^14字节的数据块,如果设置了压缩选项,则第二步为压缩数据,然后在数据块的末尾增加 MAC(Message Authentication Code),第三步将数据块加密,最后增加记录头。该过程如下所示。
each block is packed into a structure that does not preserve client message boundaries, meaning that mulitiple message of the same type maybe coalesced into a single structure
-----------+ data --+--------------> 1. Fragment data -----------+ +------------------------+ | | | | +------------------------+ 2. Compress data (generally no compression applied) +------------------------+----+ | |MAC | Add a Message Authentication Code | | | +------------------------+----+ 3....