Appendix A. DTLS 概述 (Overview of DTLS)
Appendix A. DTLS 概述 (Overview of DTLS)
本节为不熟悉 Datagram TLS (DTLS) 的读者提供简要概述. DTLS 是一种 channel security protocol, 基于广为人知的 Transport Layer Security (TLS) [RFC5246] protocol. TLS 依赖可靠 transport channel (通常是 TCP), 而 DTLS 已被适配为支持 UDP 等不可靠 transports. 除此之外, DTLS 几乎与 TLS 相同, 并且通常支持相同的 cryptographic mechanisms.
每个 DTLS association 都从 handshake exchange 开始, 在此期间 peers 相互认证, 协商 algorithms, modes 和其他 parameters, 并建立 shared keying material. 为支持不可靠 transport, 每一方都维护 retransmission timers, 以提供这些 messages 的可靠交付. handshake 完成后, 即可发送加密数据.
Client Server
ClientHello -------->
ServerHello
Certificate*
ServerKeyExchange*
CertificateRequest*
<-------- ServerHelloDone
Certificate*
ClientKeyExchange
CertificateVerify*
[ChangeCipherSpec]
Finished -------->
[ChangeCipherSpec]
<-------- Finished
Application Data <-------> Application Data
'*' indicates messages that are not always sent.
Application data 通过作为一系列 DTLS "records" 发送而受到保护. 这些 records 相互独立, 即使发生丢失或重排序也能被正确处理. 在 DTLS-SRTP 中, 该 record protocol 被 SRTP [RFC3711] 替代.