4. 用于 ECC 的 TLS 扩展 (TLS Extensions for ECC)
本规范定义两个 TLS extension: (i) Supported Elliptic Curves Extension, 以及 (ii) Supported Point Formats Extension. 它们允许在启动新 session 的 handshake 期间协商使用特定 curve 和 point format (例如分别为 compressed 与 uncompressed). 这些 extension 对可能只支持有限数量 curve 或 point format 的受限 client 尤其相关. 它们遵循 [RFC4366] 中概述的一般方法; message 细节在第 5 节规定. client 通过在 ClientHello message 中包含适当 extension 来枚举其支持的 curve 以及它能够解析的 point format. server 同样通过在 ServerHello message 中包含 extension 来枚举它能够解析的 point format.
在 ClientHello message 中提出 ECC cipher suite 的 TLS client SHOULD 包含这些 extension. 实现 ECC cipher suite 的 server MUST 支持这些 extension, 并且当 client 使用这些 extension 时, 除非 server 能够在遵守 client 指定 curve 选择的情况下完成 handshake, 否则 server MUST NOT 协商使用 ECC cipher suite. 这消除了协商出的 ECC handshake 后续因 client 无法处理 server 的 EC key 而中止的可能性.
如果 client 没有提出任何 ECC cipher suite, 它 MUST NOT 在 ClientHello message 中包含这些 extension. 提出 ECC cipher suite 的 client 可以选择不包含这些 extension. 在这种情况下, server 可自由选择第 5 节列出的任一 elliptic curve 或 point format. 该节还更详细地描述这些 extension 的结构和处理.
在 session resumption 的情况下, server 只需忽略当前 ClientHello message 中出现的 Supported Elliptic Curves Extension 和 Supported Point Formats Extension. 这些 extension 只在协商新 session 的 handshake 期间发挥作用.