
OpenSSL
![]() | |
![]() | |
開發者 | OpenSSL專案 |
---|---|
首次发布 | 1998 |
目前版本 | ![]() |
源代码库 | ![]() |
编程语言 | C语言、汇编、Perl |
类型 | 安全性加密函式庫 |
许可协议 | 3.0以前:OpenSSL與SSLeay雙重授權條款 3.0開始:Apache许可证2.0 |
网站 | www |
在计算机网络上,OpenSSL是一個開放原始碼的軟體函式庫套件,應用程式可以使用這個套件來進行安全通訊,避免竊聽,同時確認另一端連線者的身份。這個套件廣泛被應用在網際網路的網頁伺服器上。
其主要函式庫是以C語言所寫成,實作了基本的加密功能,實作了SSL與TLS協定。OpenSSL可以運行在OpenVMS、 Microsoft Windows以及絕大多數類Unix作業系統上(包括Solaris,Linux,Mac OS X與各種版本的開放原始碼BSD作業系統)。
雖然此軟體是開放原始碼的,但其授權書條款與GPL有衝突之處,故GPL軟體使用OpenSSL時(如Wget)必須對OpenSSL給予例外。
歷史[编辑]
OpenSSL計劃在1998年開始,其目標是發明一套自由的加密工具,在網際網路上使用。OpenSSL以Eric Young以及Tim Hudson兩人開發的SSLeay為基礎,隨著兩人前往RSA公司任職,SSLeay在1998年12月停止開發。因此在1998年12月,社群另外分支出OpenSSL,繼續開發下去。
OpenSSL管理委員會目前由7人組成[3],有13個開發人員[4]具有提交權限(其中許多人也是OpenSSL管理委員會的一部分)。只有兩名全職員工(研究員),其餘的是志願者。
該項目每年的預算不到100萬美元,主要依靠捐款。 TLS 1.3的開發由Akamai贊助。[5]
主要版本发布[编辑]
版本 | 初始版本日期 | 备注 | 最近更新版本 |
---|---|---|---|
0.9.1 | 1998年12月23日 |
|
0.9.1c(1998年12月23日) |
0.9.2 | 1999年3月22日 |
|
0.9.2b(1999年4月6日) |
0.9.3 | 1999年5月25日 |
|
0.9.3a(1999年5月27日) |
0.9.4 | 1999年8月9日 |
|
0.9.4(1999年4月9日) |
0.9.5 | 2000年2月28日 |
|
0.9.5a(2000年4月1日) |
0.9.6 | 2000年9月24日 |
|
0.9.6m(2004年3月17日) |
0.9.7 | 2002年12月31日 |
|
0.9.7m(2007年2月23日) |
0.9.8 | 2005年7月5日 |
|
0.9.8zh(2015年12月3日) |
1.0.0 | 2010年3月29日 |
|
1.0.0t(2015年12月3日) |
[8] | 1.0.12012年3月14日 |
|
1.0.1u(2016年9月22日) |
[9] | 1.0.22015年1月22日 | 1.0.2u(2019年12月20日 | )|
[10] | 1.1.02016年8月25日 | 1.1.0l(2019年9月10日 | )|
[12] | 1.1.12018年9月11日 | 1.1.1p(2022年6月21日 | )|
[note 1] | 3.0.02021年9月7日 |
|
3.0.4 (2022年6月21日 | )
格式: 舊版本 舊版本,仍被支援 当前版本 最新的预览版 未来版本 |
算法[编辑]
OpenSSL支持许多不同的加密算法:
- 加密
- AES、Blowfish、Camellia、Chacha20、Poly1305、SEED、CAST-128、DES、IDEA、RC2、RC4、RC5、TDES、GOST 28147-89[16]、SM4
- 密碼雜湊函數
- MD5、MD4、MD2、SHA-1、SHA-2、SHA-3、RIPEMD-160、MDC-2、GOST R 34.11-94[16]、BLAKE2、Whirlpool[17]、SM3
- 公开密钥加密
- RSA、DSA、ECDSA、ECDHE、迪菲-赫爾曼密鑰交換、椭圆曲线密码学、X25519、Ed25519、X448、Ed448、GOST R 34.10-2001[16]、SM2
(从1.0版开始,橢圓曲線迪菲-赫爾曼金鑰交換用于支持前向安全性)[18])
功能[编辑]
- 创建私钥:
openssl genrsa -out yourdomain.key 2048
产生一个pem格式的rsa非对称加密算法的2048位长的私钥文件yourdomain.key - 查看私钥的内容:
openssl rsa -text -in yourdomain.key -noout
- 抽取出公钥:
openssl rsa -in yourdomain.key -pubout -out yourdomain_public.key
- 创建证书签名请求文件(certificate signing request,CSR):
openssl req -new -key yourdomain.key -out yourdomain.csr
,这时需要在线回答一系列问题(也可以事先写在配置文件中)。其中Common Name应该填写完整的域名(fully-qualified domain name,FQDN),如www.example.com - 验证证书签名请求文件的内容:
openssl req -text -in yourdomain.csr -noout -verify
- 验证收到的证书文件:
openssl x509 -text -in yourdomain.crt -noout
- 比较公钥是同一个:
openssl pkey -pubout -in .\private.key | openssl sha256
、openssl req -pubkey -in .\request.csr -noout | openssl sha256
、openssl x509 -pubkey -in .\certificate.crt -noout | openssl sha256
- 把PEM格式的key与certificate转化为PKCS#12格式:
openssl pkcs12 -export -name "yourdomain-digicert-(expiration date)" -out yourdomain.pfx -inkey yourdomain.key -in yourdomain.crt
注意,PKCS#12格式存储了证书和私钥,适用于从一个系统迁移到另一个系统。PKCS#12文件通常为.pfx 或.p12扩展名。建议使用强password加密。 - PKCS#12到PEM转化:
openssl pkcs12 -in yourdomain.pfx -nocerts -out yourdomain.key -nodes
、openssl pkcs12 -in yourdomain.pfx -nokeys -clcerts -out yourdomain.crt
- PEM到DER转化:
openssl x509 -inform PEM -in yourdomain.crt -outform DER -out yourdomain.der
、openssl rsa -inform PEM -in yourdomain.key -outform DER -out yourdomain_key.der
- DER to PEM:
openssl x509 -inform DER -in yourdomain.der -outform PEM -out yourdomain.crt
、openssl x509 -inform DER -in yourdomain.der -outform PEM -out yourdomain.crt
心脏出血漏洞[编辑]
OpenSSL 1.0.1版本(不含1.0.1g)含有一个严重漏洞,可允许攻击者读取服务器的内存信息。该漏洞於2014年4月被公諸於世,影响三分之二的活跃网站[19]。
分支[编辑]
Agglomerated SSL[编辑]
在2009年,OpenSSL API受挫之后,当时的OpenBSD开发人员Marco Peereboom创建了分支Agglomerated SSL(assl),它重新使用OpenSSL API,但提供了更简单的外部接口。[20]
LibreSSL[编辑]
2014年4月的心脏出血漏洞事件之后,OpenBSD项目成员以OpenSSL 1.0.1g作为分支,创建一个名为LibreSSL的项目。[21]在缩减OpenSSL的代码库的第一周,将超过90,000行的C语言代码从分支中删除。[22]
BoringSSL[编辑]
2014年6月,Google发布了自己的OpenSSL分支BoringSSL[23],计划与OpenSSL和LibreSSL的开发者合作。[24][25][26]
GmSSL[编辑]
GmSSL支持SM2/SM3/SM4/SM9/ZUC等商用密码,主要使用SM2替代RSA/Diffie-Hellman/ECDSA/ECDH,SM3替代MD5/SHA-1/SHA-256,SM4替代DES/AES,SM9替代PKI/CA体系,所有代码在GitHub上开源[27],并由北京大学信息安全实验室开发和维护[28]。此项目获得2015年度中国Linux软件大赛二等奖(一等奖空缺)[29]。
参见[编辑]
註記[编辑]
参考[编辑]
- ^ OpenSSL version 1.1.1t published. 2023年2月7日 [2023年2月7日].
- ^ OpenSSL version 3.1.0 published. 2023年3月14日 [2023年3月15日].
- ^ OpenSSL Management Committee. OpenSSL Software Foundation. [2018-07-22]. (原始内容存档于2018-07-22).
- ^ OpenSSL Committers. OpenSSL Software Foundation. [2018-07-22]. (原始内容存档于2018-07-22).
- ^ Marquess, Steve. Akamai sponsors TLS 1.3. openssl-announce (邮件列表). 2017-01-19 [2018-11-09]. (原始内容存档于2017-02-01).
- ^ OpenSSL – Changelog. OpenSSL Software Foundation. [2016-09-26]. (原始内容存档于2016-09-13).
- ^ OpenSSL – Release Strategy. OpenSSL Software Foundation. [2016-09-26]. (原始内容存档于2016-10-06).
- ^ OpenSSL 1.0.1 Series Release Notes. [2017-02-20]. (原始内容存档于2015-01-20).
- ^ OpenSSL 1.0.2 Series Release Notes. [2017-02-20]. (原始内容存档于2014-09-04).
- ^ OpenSSL 1.1.0 Series Release Notes. [2017-02-20]. (原始内容存档于2018-03-17).
- ^ 11.0 11.1 Caswell, Matt. OpenSSL 1.1.1 Is Released - OpenSSL Blog. www.openssl.org. OpenSSL Foundation. 2018-09-11 [2018-09-18]. (原始内容存档于2018-09-15) (英语).
- ^ Inc., OpenSSL Foundation,. OpenSSL 1.1.1 Is Released - OpenSSL Blog. www.openssl.org. [2018-09-18]. (原始内容存档于2018-09-15).
- ^ Caswell, Matt. Using TLS1.3 With OpenSSL - OpenSSL Blog. www.openssl.org. OpenSSL Foundation. 2018-02-08 [2018-02-17]. (原始内容存档于2018-02-09) (英语).
- ^ Caswell, Matt. OpenSSL 1.1.1 Is Released. www.openssl.org. OpenSSL Foundation. 2018-09-11 [2018-09-18]. (原始内容存档于2018-09-15) (英语).
- ^ 15.0 15.1 Matt Caswell. The Holy Hand Grenade of Antioch. OpenSSL Blog. 2018-11-28 [2019-10-07]. (原始内容存档于2021-09-07).
- ^ 16.0 16.1 16.2 GOST engine OpenSSL 1.0.0 README. cvs.openssl.org. [2020-12-09]. (原始内容存档于2013-04-15).
- ^ OpenSSL source code, directory crypto/whrlpool. [2017-08-29]. (原始内容存档于2019-02-17).
- ^ Protecting data for the long term with forward secrecy. [2012-11-05]. (原始内容存档于2016-03-04).
- ^ OpenSSL安全协议存在漏洞危及网络用户数据安全. 网易科技报道. 2014-04-09 [2014-04-10]. (原始内容存档于2014-04-12) (中文(中国大陆)).
- ^ security/assl: assl-1.5.0p0v0 – hide awful SSL API in a sane interface. OpenBSD ports. 2014-05-22 [2015-02-10]. (原始内容存档于2015-02-10).
- ^ OpenBSD has started a massive strip-down and cleanup of OpenSSL. OpenBSD journal. 2014-04-15 [2018-02-14]. (原始内容存档于2014-07-01).
- ^ OpenBSD forks, prunes, fixes OpenSSL. ZDNet. 21 April 2014 [21 April 2014]. (原始内容存档于2014-04-21).
- ^ https://boringssl.googlesource.com/boringssl/ (页面存档备份,存于互联网档案馆) BoringSSL
- ^ Google unveils independent 'fork' of OpenSSL called 'BoringSSL'. Ars Technica. 2014-06-21 [2018-02-14]. (原始内容存档于2014-06-23).
- ^ BoringSSL. Adam Langley's Weblog. 2014-06-20 [2018-02-14]. (原始内容存档于2018-06-01).
- ^ 存档副本. [2018-02-14]. (原始内容存档于2018-02-14).
- ^ GitHub上的GmSSL頁面
- ^ GmSSL —— 支持国密算法和标准的 OpenSSL 分支. 开源中国. [2016-05-17]. (原始内容存档于2019-10-19).
- ^ 首届中国Linux软件大赛:100万元奖金发出. 安全牛. [2015年12月12日]. (原始内容存档于2019年10月19日).
外部連結[编辑]
- OpenSSL官方網站
- SSLeay文件庫
- OpenSSL License vs GPL(页面存档备份,存于互联网档案馆)
- wget's readme file,including the GPL with exception
- mICQ COPYING file,citing the GPL and including the exception
- OpenSSL FAQ entry on interaction between the OpenSSL and GNU licenses(页面存档备份,存于互联网档案馆)
- OpenSSL Quick Reference Guide (页面存档备份,存于互联网档案馆)
- OpenSSL Cookbook - A Short Guide to the Most Frequently Used OpenSSL Features and Commands By Ivan Ristić (页面存档备份,存于互联网档案馆)
|
|