TLS的应用对比

本页使用了标题或全文手工转换,现处于中国大陆简体模式
求闻百科,共笔求闻

安全传输层协议 (TLS) 保障网络间的通信安全。本文比较几种最常用的TLS应用。市面上存在许多种免费开源的TLS应用软件。

所有类目的比较均使用下列概述部分中列出软件的稳定版本。该比较仅限于与TLS协议直接相关的功能。

概述

应用软件 开发商 开源 软件证书 版权拥有 编辑语言 最新版本,日期 源于
GnuTLS GnuTLS项目 GNU LGPLv2.1+ 自由软件基金会 C 3.6.14(2020年6月3日,​3年前​(2020-06-03[1][±] 欧洲 (希腊和瑞典)
OpenSSL OpenSSL 项目 OpenSSL-SSLeay dual-license Eric Young, Tim Hudson, Sun, OpenSSL 项目, 及其他 C汇编语言 3.0.1(2021年12月14日,​2年前​(2021-12-14[2][±] 澳大利亚/欧洲
wolfSSL (曾名为 CyaSSL) wolfSSL[3] GNU GPLv2+ and commercial license wolfSSL 公司.[4] C 4.5.0(2020年8月19日,​3年前​(2020-08-19[5][±] 美国

协议支持

TLS协议存在几种版本。 SSL 2.0是一个被弃用的[6]协议版本,具有明显的缺陷。 SSL 3.0(1996)和TLS 1.0(1999)是具有两个CBC-填充弱点的版本——在2001年由Serge Vaudenay解析.[7]。 TLS 1.1(2006)通过将CBC块密码切换到随机初始化矢量(IV)解决了其中一个问题,RFC7366[8]强调了 更严重的mac-pad-encrypt使用问题而不是使pad-mac-encrypt更安全的问题。

在2011年底,一种用于SSL 3.0和TLS 1.0的解决方法,基本等同于TLS 1.1的随机的IV被很多应用软件广泛采用[9]。所以从安全角度来看,所有现有TLS 1.0,1.1和1.2版本在2030年前均在基本协议中提供相同的强度协议并适用于128位,据 NIST SP800-57。在2014年,SSL 3.0的POODLE漏洞被发现,其利用在CBCd的已知漏洞,以及浏览器中不安全的回退协商。[10]

TLS 1.2(2008)是最新发布的基本协议,引入了一种用于识别数字签名的散列方法。虽然在SSL 3.0保守选择(rsa,sha1 + md5)上允许将来使用更强大的散列函数进行数字签名(rsa,sha256 / sha384 / sha512),但TLS 1.2协议不经意间变化并大大削弱了默认数字签名并提供(rsa,sha1)甚至(rsa,md5)。[11]

数据报传输层安全性(DTLS或数据报TLS)1.0是针对面向数据包的传输层的TLS 1.1修改,其中必须容忍数据包丢失和数据包重新排序。基于TLS 1.2的修订版DTLS 1.2于2012年1月发布[12]

在SSL 2.0和SSL 3.0中存在已知的漏洞。除了可预测的IV(存在简单的解决方法)之外,所有当前已知的漏洞都会影响所有版本的TLS 1.0 / 1.1 / 1.2。[13]

应用软件 SSL 2.0 (不安全)[14] SSL 3.0 (不安全)[15] TLS 1.0[16] TLS 1.1[17] TLS 1.2[18] TLS 1.3
(Draft)[19][20]
DTLS 1.0[21] DTLS 1.2[12]
GnuTLS [a] 默认禁止[22]
OpenSSL [23] 默认允许
wolfSSL 默认禁止[24]
  1. ^ 即使SSL 2.0不支持或由于向后兼容性而被禁用,客户端问候也会被支持。
  2. ^ SSL / TLS协议的服务器端实现仍支持处理收到的v2兼容客户端问候消息。[25]
  3. ^ 安全传输:在OS X 10.8中停用了SSL 2.0。在OS X 10.11和iOS 9中停用了SSL 3.0。TLS 1.1,1.2和DTLS在iOS 5.0和更高版本以及OS X 10.9和更高版本中均可用 。[26]
  4. [27]

NSA Suite B 密码学

NSA Suite B 密码学 (RFC 6460) 的必须部分:

  • 高级加密标准 (AES), 密钥大小为128和256位。对于业务流量,AES应与低带宽流量的计数器模式(CTR)或高带宽流量的伽罗瓦/计数器模式(GCM)操作模式一起使用(请参阅分块密码模式操作) - 对称加密
  • 椭圆曲线数字签名算法(ECDSA) - 数字签名
  • 椭圆曲线 Diffie-Hellman(ECDH) - 密钥协议
  • 安全散列算法2 (SHA-256 和 SHA-384) — 消息摘要

根据CNSSP-15,256位椭圆曲线(FIPS 186-2中),SHA-256和AES 128位密钥足以保护机密信息达到Secret级别,而384位椭圆曲线(在FIPS 186-2中指定),SHA-384和带有256位密钥的AES是保护最高机密信息所必需的。

应用软件 TLS 1.2 Suite B
GnuTLS
OpenSSL
wolfSSL

证书

请注意,某些认证已受到实际参与研发人的严重负面批评。[28]

应用软件 FIPS 140-1, FIPS 140-2[29] 通用标准 Embedded FIPS Solution
第一层面 Level 2Template:Disputed inline
GnuTLS[30] 红帽企业Linux GnuTLS加密模块(#2780)
OpenSSL[31] OpenSSL FIPS 对象模块: 1.0 (#624), 1.1.1 (#733), 1.1.2 (#918), 1.2, 1.2.1, 1.2.2, 1.2.3 or 1.2.4 (#1051)
2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7 or 2.0.8 (#1747)
wolfSSL[32] wolfCrypt FIPS 模块: 3.6.0 (#2425)
已验证的操作环境详见于NIST 证书 for validated Operating Environments

密钥交换算法(仅限于证书)

本节列出了在不同应用软件中中可用的证书验证功能。

应用软件 RSA[18] RSA-EXPORT (不安全)[18] DHE-RSA (forward secrecy)[18] DHE-DSS (forward secrecy)[18] ECDH-ECDSA[33] ECDHE-ECDSA (forward secrecy)[33] ECDH-RSA[33] ECDHE-RSA (forward secrecy)[33] GOST R 34.10-94, 34.10-2001[34]
GnuTLS 默认禁止[22]
OpenSSL [23] 默认禁止[23]
wolfSSL

密钥交换算法(备选密钥交换)

应用软件 SRP[35] SRP-DSS[35] SRP-RSA[35] PSK-RSA[36] PSK[36] DHE-PSK (前向保密)[36] ECDHE-PSK (前向保密)[37] KRB5[38] DH-ANON[18](不安全) ECDH-ANON[33](不安全)
GnuTLS 默认禁止 默认禁止
OpenSSL [39] 默认禁止[40] 默认禁止[40]
wolfSSL [41]

证书验证算法

应用软件 应用程序定义 PKIX path validation[42] CRL[43] OCSP[44] DANE (DNSSEC)[45] 首用信任 (TOFU)
GnuTLS
OpenSSL
wolfSSL

加密算法

应用软件 分组密码操作模式 流密码 None
AES GCM
[46]
AES CCM
[47]
AES CBC Camellia GCM
[48]
Camellia CBC
[49]
ARIA GCM
[50]
ARIA CBC
[50]
SEED CBC
[51]
3DES EDE CBC
(不安全)[52]
GOST 28147-89 CNT
(提出)
[34][n 1]
ChaCha20-Poly1305
[53]
Null
(insecure)
[n 2]
GnuTLS [22] 默认禁止[54] [55] 默认禁止
OpenSSL [56] 默认禁止[23] 默认禁止[23] 默认禁止[23] 默认禁止[23] [23] 默认禁止
wolfSSL Yes 默认禁止

废弃算法

应用软件 分组密码操作模式 流密码
IDEA CBC
[n 3](不安全)[58]
DES CBC
(不安全)
[n 3]
DES-40 CBC
(EXPORT, 不安全)
[n 4]
RC2-40 CBC
(EXPORT, 不安全)
[n 4]
RC4-128
(不安全)
[n 5]
RC4-40
(EXPORT, 不安全)
[n 6][n 4]
GnuTLS 默认禁止[22]
OpenSSL 默认禁止[23] 默认禁止 [23] [23] 默认禁止 [23]
wolfSSL 默认禁止[59] 默认禁止

支持的椭圆曲线

应用 sect163k1
NIST K-163
(1)[33]
sect163r1
(2)[33]
sect163r2
NIST B-163
(3)[33]
sect193r1
(4)[33]
sect193r2
(5)[33]
sect233k1
NIST K-233
(6)[33]
sect233r1
NIST B-233
(7)[33]
sect239k1
(8)[33]
sect283k1
NIST K-283
(9)[33]
sect283r1
NIST B-283
(10)[33]
sect409k1
NIST K-409
(11)[33]
sect409r1
NIST B-409
(12)[33]
sect571k1
NIST K-571
(13)[33]
sect571r1
NIST B-571
(14)[33]
GnuTLS
OpenSSL
wolfSSL
Implementation secp160k1
(15)[33]
secp160r1
(16)[33]
secp160r2
(17)[33]
secp192k1
(18)[33]
secp192r1
prime192v1
NIST P-192
(19)[33]
secp224k1
(20)[33]
secp224r1
NIST P-244
(21)[33]
secp256k1
(22)[33]
secp256r1
prime256v1
NIST P-256
(23)[33]
secp384r1
NIST P-384
(24)[33]
secp521r1
NIST P-521
(25)[33]
arbitrary prime curves
(0xFF01)[33][60]
arbitrary char2 curves
(0xFF02)[33][60]
GnuTLS
OpenSSL
wolfSSL
应用 brainpoolP256r1
(26)[61]
brainpoolP384r1
(27)[61]
brainpoolP512r1
(28)[61]
X25519
[62]
Curve448
Ed448-Goldilocks
[63]
M221
Curve2213
[64]
E222
[64]
Curve1174
[64]
E382
[64]
M383
[64]
Curve383187
[64]
Curve41417
Curve3617
[64]
M511
Curve511187
[64]
E521
[64]
GnuTLS [65]
OpenSSL [66][67] [68][69]
wolfSSL [70]

数据完整性

应用软件 HMAC-MD5 HMAC-SHA1 HMAC-SHA256/384 AEAD GOST 28147-89 IMIT[34] GOST R 34.11-94[34]
GnuTLS
OpenSSL
wolfSSL

压缩

请注意,CRIME 安全漏洞 利用了TLS压缩的优势,因此传统应用不会在TLS层启用压缩。 HTTP 压缩是不相关的且不受此漏洞攻击的影响,但会被BREACH相关的攻击利用。

应用软件 DEFLATE[71]
(不安全)
GnuTLS 默认禁用
OpenSSL 默认禁用
wolfSSL 默认禁用

扩展

在本节中列出了每个应用支持的扩展。请注意,安全重新协商扩展对于HTTPS客户端安全至关重要。不执行TLS协议的客户端很容易受到攻击,无论客户端是否实施TLS重新协商。

Implementation Secure Renegotiation
[72]
Server Name Indication
[73]
ALPN
[74]
Certificate Status Request
[73]
OpenPGP
[75]
Supplemental Data
[76]
Session Ticket
[77]
Keying Material Exporter
[78]
Maximum Fragment Length
[73]
Truncated HMAC
[73]
Encrypt-then-MAC
[79]
TLS Fallback SCSV
[80]
Extended Master Secret
[81]
ClientHello Padding
[82]
Raw Public Keys
[83]
GnuTLS [84] 弃用[85] [22] [86] [22] [87]
OpenSSL 否? 是? [88] [89] [90] 未知
wolfSSL [59] 未知

辅助加密

本节列出了已知的利用CPU指令集优化加密,或利用系统特定允许访问底层加密硬件加速或分离数据的设备。

应用软件 PKCS #11 device Intel AES-NI VIA PadLock ARMv8-A Intel SGX Intel QAT
GnuTLS [91]
OpenSSL [92] [93]
wolfSSL [94]

系统特定的后端

本节列出了已知利用可用操作系统特定后端或另一个提供的后端的应用。

应用软件 /dev/crypto Windows CSP 一般加密CommonCrypto OpenSSL
GnuTLS
OpenSSL
wolfSSL 部分

加密模块/令牌支持

Implementation TPM support Hardware token support Objects identified via
GnuTLS PKCS11 RFC7512 PKCS #11 URLs[95]
OpenSSL PKCS11 (通过第三方模块)[96] RFC7512 PKCS #11 URLs[95]
wolfSSL

代码属性

应用软件 属性 可选属性
GnuTLS libc
nettle
gmp
zlib (compression)
p11-kit (PKCS #11)
trousers (TPM)
OpenSSL libc zlib (压缩)
wolfSSL None libc, zlib (压缩)

开发环境

应用软件 Namespace 建设工具 API 手册 加密后端 OpenSSL 兼容层
GnuTLS gnutls_* Autoconf, automake, libtool Manual and API reference (HTML, PDF) External, libnettle 是 (部分)
OpenSSL SSL_*

SHA1_*
MD5_*
EVP_*
...

Makefile Man pages Included (monolithic) 不适用
wolfSSL CyaSSL_*

SSL_*

Autoconf, automake, libtool, MSVC project workspaces, XCode projects, CodeWarrior projects, MPLAB X projects, Keil, IAR, Clang, GCC Manual and API Reference (HTML, PDF) Included (monolithic) 是 (大约 10% of API)

移植问题

应用软件 平台要求奥球 网络要求 线程安全 随机速度 能够交叉编译 No OS (bare metal) 可支持的操作系统
GnuTLS C89 POSIX send() and recv(). API 支持所找的替代品. 线程安全,如果POSIX和Windows线程都不可用,则需要自定义互斥锁钩 取决于平台 基本任何 POSIX 平台 or Windows, 一般已测试的平台包含 GNU/Linux, Win32/64, OS X, Solaris, OpenWRT, FreeBSD, NetBSD, OpenBSD.
OpenSSL C89? ? 需要互斥量回调 通过原始API设置 Unix, DOS (with djgpp), Windows, OpenVMS, MacOS, NetWare, eCos
wolfSSL C89 POSIX send() and recv(). API 支持所找的替代品. 线程安全,如果POSIX和Windows线程都不可用,则需要自定义互斥锁钩 通过 wolfCrypt设置随机速度 Win32/64, Linux, OS X, Solaris, ThreadX, VxWorks, FreeBSD, NetBSD, OpenBSD, embedded Linux, Haiku, OpenWRT, iPhone (iOS), Android, Nintendo Wii and Gamecube through DevKitPro, QNX, MontaVista, OpenCL, NonStop, TRON/ITRON/µITRON, Micrium's µC OS, FreeRTOS, SafeRTOS, Freescale MQX, Nucleus, TinyOS, HP/UX, Keil RTX, TI-RTOS

其他

  • SCTP — 含DTLS 支持
  • DCCP — 含 DTLS 支持
  • SRTP — 含 DTLS 支持 (DTLS-SRTP) 安全实时传输控制协议 (SRTCP)

参考文献

  1. The GnuTLS Transport Layer Security Library. [30 June 2020]. 
  2. OpenSSL: Newslog. [2021-12-14]. 
  3. wolfSSL product description. [2016-05-03]. 
  4. wolfSSL Embedded SSL/TLS. [2016-05-03]. 
  5. wolfSSL ChangeLog. 2020-08-19 [2020-08-19]. 
  6. [rfc:6176 RFC6176: Prohibiting Secure Sockets Layer (SSL) Version 2.0]
  7. "CBC-Padding: Security Flaws in SSL, IPsec, WTLS,...", Serge Vaudenay, 2001 (PDF). [2018-06-22]. 
  8. [rfc:7366 RFC7366: Encrypt-then-MAC for Transport Layer Security (TLS) and Datagram Transport Layer Security]
  9. Rizzo/Duong BEAST Countermeasures. [2018-06-22]. 
  10. Möller, Bodo; Duong, Thai; Kotowicz, Krzysztof. This POODLE Bites: Exploiting The SSL 3.0 Fallback (PDF). 2014-09 [2014-10-15]. 
  11. TLSv1.2's Major Differences from TLSv1.1
  12. 12.0 12.1 RFC 6347
  13. Bard attack. CiteSeerX 10.1.1.61.5887可免费查阅. 
  14. draft-hickman-netscape-ssl-00. tools.ietf.org. [2018-06-22]. 
  15. RFC 6101
  16. RFC 2246
  17. RFC 4346
  18. 18.0 18.1 18.2 18.3 18.4 18.5 RFC 5246
  19. draft-ietf-tls-tls13-11 - The Transport Layer Security (TLS) Protocol Version 1.3
  20. tlswg/tls13-spec branches. tlswg.github.io. [2018-06-22]. 
  21. RFC 4347
  22. 22.0 22.1 22.2 22.3 22.4 22.5 [gnutls-devel] GnuTLS 3.4.0 released. 2015-04-08 [2015-04-16]. 
  23. 23.00 23.01 23.02 23.03 23.04 23.05 23.06 23.07 23.08 23.09 23.10 23.11 Inc., OpenSSL Foundation,. /news/openssl-1.1.0-notes.html. www.openssl.org. [2018-06-22]. 
  24. [wolfssl] wolfSSL 3.6.6 Released. 2015-08-20 [2015-08-24]. 
  25. NSS 3.24 release notes. Mozilla Developer Network. Mozilla. [2016-06-19]. 
  26. Technical Note TN2287: iOS 5 and TLS 1.2 Interoperability Issues. iOS Developer Library. Apple Inc. [2012-05-03]. 
  27. Qualys SSL Labs - Projects / User Agent Capabilities. dev.ssllabs.com. [2018-06-22]. 
  28. "Secure or Compliant, Pick One" Steve Marquess blog. [2018-06-22]. 
  29. Search - Cryptographic Module Validation Program - CSRC. csrc.nist.gov. [2018-06-22]. 
  30. "While, as a free software project, we are not actively pursuing this kind of certification, GnuTLS has been FIPS-140-2 certified in several systems by third parties." GnuTLS 3.5.6 B.5 Certification
  31. OpenSSL and FIPS 140-2. [2018年6月22日]. 
  32. wolfCrypt FIPS 140-2 Information - wolfSSL Embedded SSL/TLS Library. [2018-06-22]. 
  33. 33.00 33.01 33.02 33.03 33.04 33.05 33.06 33.07 33.08 33.09 33.10 33.11 33.12 33.13 33.14 33.15 33.16 33.17 33.18 33.19 33.20 33.21 33.22 33.23 33.24 33.25 33.26 33.27 33.28 33.29 33.30 33.31 RFC 4492
  34. 35.0 35.1 35.2 RFC 5054
  35. 36.0 36.1 36.2 RFC 4279
  36. RFC 5489
  37. RFC 2712
  38. Changes between 0.9.6h and 0.9.7 [31 Dec 2002]. [2016-01-29]. 
  39. 40.0 40.1 Changes between 0.9.8n and 1.0.0 [29 Mar 2010]. [2016-01-29]. 
  40. wolfSSL (Formerly CyaSSL) Release 3.9.0 (03/18/2016). 2016-03-18 [2016-04-05]. 
  41. RFC 5280
  42. RFC 3280
  43. RFC 2560
  44. RFC 6698, RFC 7218
  45. RFC 5288, RFC 5289
  46. RFC 6655, RFC 7251
  47. RFC 6367
  48. RFC 5932, RFC 6367
  49. 50.0 50.1 RFC 6209
  50. RFC 4162
  51. Sweet32: Birthday attacks on 64-bit block ciphers in TLS and OpenVPN. sweet32.info. [2018-06-22]. 
  52. RFC 7905
  53. gnutls 3.6.0. 2017-09-21 [2018-01-07]. 
  54. gnutls 3.4.12. 2016-05-20 [2016-05-29]. 
  55. openssl/CHANGES at OpenSSL_1_0_1-stable · openssl/openssl. [2015-01-20]. 
  56. RFC 5469
  57. 存档副本. [2018-06-22]. 
  58. 59.0 59.1 wolfSSL (Formerly CyaSSL) Release 3.7.0 (10/26/2015). 2015-10-26 [2015-11-19]. 
  59. 60.0 60.1 Negotiation of arbitrary curves has been shown to be insecure for certain curve sizes Mavrogiannopoulos, Nikos and Vercautern, Frederik and Velichkov, Vesselin and Preneel, Bart. A cross-protocol attack on the TLS protocol. Proceedings of the 2012 ACM conference on Computer and communications security (PDF). 2012: 62–72 [2018-06-22]. ISBN 978-1-4503-1651-4. 
  60. 61.0 61.1 61.2 RFC 7027
  61. Simon, Josefsson,; Yoav, Nir,; Manuel, Pégourié-Gonnard,. Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS) Versions 1.2 and Earlier. tools.ietf.org. 
  62. Simon, Josefsson,; Manuel, Pégourié-Gonnard,. Curve25519 and Curve448 for Transport Layer Security (TLS). tools.ietf.org. 
  63. 64.0 64.1 64.2 64.3 64.4 64.5 64.6 64.7 64.8 Simon, Josefsson,; Manuel, Pégourié-Gonnard,. Additional Elliptic Curves for Transport Layer Security (TLS) Key Agreement. tools.ietf.org. 
  64. "An overview of the new features in GnuTLS 3.5.0". 2016-05-02 [2016-12-09]. 
  65. OpenSSL 1.1.0x Release Notes. 2016-08-25 [2018-05-18]. 
  66. OpenSSL  GitHub Issue #487 Tracker. 2015-12-02 [2018-05-18]. 
  67. OpenSSL 1.1.1x Release Notes. 2018-05-01 [2018-05-18]. 
  68. OpenSSL  GitHub Issue #5049 Tracker. 2018-01-09 [2018-05-18]. 
  69. wolfSSL (Formerly CyaSSL) Release 3.4.6 (03/30/2015). 2015-03-30 [2015-11-19]. 
  70. RFC 3749
  71. RFC 5746
  72. 73.0 73.1 73.2 73.3 RFC 6066
  73. RFC 7301
  74. RFC 6091
  75. RFC 4680
  76. RFC 5077
  77. RFC 5705
  78. RFC 7366
  79. RFC 7507
  80. RFC 7627
  81. RFC 7685
  82. RFC 7250
  83. gnutls 3.2.0. [2015-01-26]. 
  84. 存档副本. [2018-06-22]. 
  85. gnutls 3.4.4. [2015-08-25]. 
  86. %DUMBFW priority keyword. [2017-04-30]. 
  87. 存档副本. [2018-06-22]. 
  88. OpenSSL 1.1.0 Release Notesl. [永久失效链接]
  89. Major changes between OpenSSL 1.0.1f and OpenSSL 1.0.1g [7 Apr 2014]. 2014-04-07 [2015-02-10]. 
  90. 存档副本. [2018-06-22]. 
  91. https://habrahabr.ru/post/134725/ , http://forum.rutoken.ru/topic/1639/ , https://dev.rutoken.ru/pages/viewpage.action?pageId=18055184 (俄文)
  92. git.openssl.org Git - openssl.git/commitdiff. git.openssl.org. [2018-06-22]. 
  93. wolfSSL Asynchronous Intel QuickAssist Support - wolfSSL. 2017-01-18. 
  94. 95.0 95.1 RFC 7512
  95. libp11: PKCS#11 wrapper library. 2018-01-19 [2018-06-22] –通过GitHub. 

Template:SSL/TLS


  1. This algorithm is not defined yet as TLS cipher suites in RFCs, is proposed in drafts.
  2. authentication only, no encryption
  3. 3.0 3.1 IDEA and DES have been removed from TLS 1.2.[57]
  4. 4.0 4.1 4.2 40 bits strength of cipher suites were designed to operate at reduced key lengths in order to comply with US regulations about the export of cryptographic software containing certain strong encryption algorithms (see Export of cryptography from the United States). These weak suites are forbidden in TLS 1.1 and later.
  5. The RC4 attacks weaken or break RC4 used in SSL/TLS. Use of RC4 is prohibited by RFC 7465.
  6. The RC4 attacks weaken or break RC4 used in SSL/TLS.