CN105610795A - 一种增加自定义可信任的根证书的方法 - Google Patents

一种增加自定义可信任的根证书的方法 Download PDF

Info

Publication number
CN105610795A
CN105610795A CN201510959081.2A CN201510959081A CN105610795A CN 105610795 A CN105610795 A CN 105610795A CN 201510959081 A CN201510959081 A CN 201510959081A CN 105610795 A CN105610795 A CN 105610795A
Authority
CN
China
Prior art keywords
server
array
certificate
root certificate
characteristic value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510959081.2A
Other languages
English (en)
Other versions
CN105610795B (zh
Inventor
柳增寿
王鹏
王烨
安晓江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Haitai Fangyuan High Technology Co Ltd
Original Assignee
Beijing Haitai Fangyuan High Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Haitai Fangyuan High Technology Co Ltd filed Critical Beijing Haitai Fangyuan High Technology Co Ltd
Priority to CN201510959081.2A priority Critical patent/CN105610795B/zh
Publication of CN105610795A publication Critical patent/CN105610795A/zh
Application granted granted Critical
Publication of CN105610795B publication Critical patent/CN105610795B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L9/3265Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements using certificate chains, trees or paths; Hierarchical trust model
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/64Self-signed certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/081Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying self-generating credentials, e.g. instead of receiving credentials from an authority or from another peer, the credentials are generated at the entity itself

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明所提供的一种增加自定义可信任的根证书的方法,包括步骤:A、建立各个服务器的可信任根证书特征值的列表;B、针对每个服务器,生成一组随机数,与该服务器可信任根证书特征值一并,组成第一数组;C、对所述第一数组进行加密运算;D、利用安全厂商证书的私钥对加密运算的结果进行签名,把签名值保存到所述列表中;E、访问服务器时,首先检测该服务器的根证书是否存于所述列表中;若存在,执行步骤F,否则无法访问该服务器;F、对该服务器的根证书进行校验,验签通过,则可以访问该服务器,否则无法访问该服务器。由上,保证根证书不被篡改或替换,实现安全访问服务器。

Description

一种增加自定义可信任的根证书的方法
技术领域
本发明涉及网络安全技术领域,特别涉及一种增加自定义可信任的根证书的方法。
背景技术
应用程序或者终端在访问任意一个安全网站的时候,都需要验证该网站提供的根证书。如果该网站的根证书是受信任的,则信任该网站提供的数据;如果该网站的根证书不在受信任的证书范围内,则提示用户该网站目前不受信任,有安全风险。
目前,应用程序或终端会把已知可信任根证书的特征值写到程序中,可信任的根证书存放在***的可信任根证书库中。应用程序或终端验证服务器证书的流程是:
1、先确认当前服务器的证书是否是一张自定义签名证书;
2、如果是自定义的签名证书,验证当前证书是否在应用程序或终端的可信范围内,如果在可信范围内,则信任该服务器;如果该证书不在可信范围内,则返回该服务器不受信任;
3、如果当前服务器的证书不是一张自定义签名证书,则查找当前证书的颁发者证书;
4、如果当前证书的颁发者证书是一张自定义签名证书,则执行步骤2;如果不是一张自定义签名证书,则执行步骤3,直到找到自定义签名证书,然后执行步骤2。
上述流程的缺陷在于:***的证书库是公开的,黑客可以导入一张自定义签名证书,或修改应用程序或者终端中已知的某一张根证书的特征值,将其替换为用户自定义签名证书的特征值,这样应用程序或终端在验证服务器证书的时候,因为既能在证书库中查找到所导入的自定义签名证书,又能在应用程序或终端中,比对特征值的时候比对通过,就会误信任这个服务器,给用户带来风险。
发明内容
有鉴于此,本发明的主要目的在于,提供一种增加自定义可信任的根证书的方法,包括步骤:
A、建立各个服务器的可信任根证书特征值的列表;
B、针对每个服务器,生成一组随机数,与该服务器可信任根证书特征值一并,组成第一数组;
C、对所述第一数组进行加密运算;
D、利用安全厂商证书的私钥对加密运算的结果进行签名,把签名值保存到所述列表中;
E、访问服务器时,首先检测该服务器的根证书是否存于所述列表中;若存在,执行步骤F,否则无法访问该服务器;
F、对该服务器的根证书进行校验,验签通过,则可以访问该服务器,否则无法访问该服务器。
由上,在程序中保存已知可信任根证书的特征值,在此基础上,对特征值进行变换,并使用安全厂商的证书对特征值进行签名,作为可信任的根证书。从而保证根证书不被篡改或替换,实现安全访问服务器。
可选的,步骤F包括:
生成一组随机数,与该服务器可信任根证书特征值一并,组成第一数组,所述随机数与步骤B中对该服务器生成的随机数相同;
对所述第一数组进行加密运算;
采用安全厂商证书的公钥对加密运算结果进行验签,验签通过才可以访问该服务器。
由上,在可信任根证书特征值的列表中已存有正在访问的服务器根证书的基础上,还需对正在访问的服务器根证书进行校验,从而才能确保该服务器的根证书没有被篡改或替换,以保证对服务器的安全访问。
可选的,在步骤B后,还包括步骤:对所述第一数组进行二次变换,得到第二数组;
所述步骤C中,对所述第二数组进行加密运算。
由上,通过二次变换,进一步提高服务器的可信任根证书特征值的特异性和唯一性,从而保证根证书不被篡改或替换,实现安全访问服务器。
可选的,所述二次变换包括:在第一数组后,增加一定数量的固定数或随机数,形成第二数组。
可选的,所述二次变换包括:对各个服务器进行编号,在在第一数组后增加所述服务器的编号,形成第二数组。
由上,可进一步的增加可信任根证书特征值的唯一性,即仅通过本应用程序或终端编辑过的根证书具有可信任性和可识别性,而对其他客户端或程序编辑过的根证书不具有上述特点,由此实现特征值与客户端或程序一一绑定的安全效果。
可选的,步骤C包括:利用安全厂商证书的特征值做密钥,使用AES算法,对所述第一数组进行加密运算,得到密文数组。
由上,通过对第一数组进行加密,以提高其保密性。
可选的,步骤C还包括:对所述密文数据采用SM3密码杂凑算法进行加密计算。
由上,通过对密文数据进行再加密,以进一步提高其保密性。
附图说明
图1为本发明流程图。
具体实施方式
为克服现有技术存在的缺陷,本发明提供一种增加自定义可信任的根证书的方法,应用程序或终端在程序中保存已知可信任根证书的特征值,在此基础上,使用安全厂商的证书,对特征值进行签名,将签名值保存在应用程序或终端中,作为可信任的根证书。从而保证根证书不被篡改或替换,实现安全访问服务器。本实施例中,所述安全厂商的证书可以采用如北京海泰方圆科技股份有限公司的证书。
如图1所示,本发明所述增加自定义的可信任根证书的方法包括以下步骤:
S10:在程序中保存已知的可信任根证书特征值。
首先建立特征值列表,所述特征值列表中保存已有的各个服务器的可信任根证书特征值。
S20:依照服务器的数量,生成多个随机数组,逐一将随机数组与步骤S10中所述各个服务器可信任根证书的特征值组合得到数组A。
例如,步骤S10中,第一服务器的可信任根证书的特征值是:bf89022991f238897276740319c355c6a1b1f656。
本步骤中,生成一组随机数,表示为:eafd90c5a52ecf065bf664067235d39bb02eacf2。
将二者进行组合,得到数组A,表示为:bf89022991f238897276740319c355c6a1b1f656eafd90c5a52ecf065bf664067235d39bb02eacf2。
本步骤的目的在于,增加服务器可信任根证书特征值的不确定性和唯一性,通过随机数组的产生,使得固定的特征值变成非固定,由此增加安全系数和破解难度。
S30:对数组A进行二次变换,得到数组B。
本步骤中,在数组A的基础上,补充0x80、0x00两个字节,得到数组B。数组B表示为:bf89022991f238897276740319c355c6a1b1f656eafd90c5a52ecf065bf664067235d39bb02eacf28000。
本步骤的目的在于:对变化后的特征值进行再变换,进一步增加可信任根证书特征值的不确定性和唯一性。
本步骤中,所增补的两个字节内容为固定内容,实际使用中,可以增补随机内容。
又或者,对服务器可信任根证书与随机数的组合次序进行标号,以该标号对数组A进行增补。例如,对第一服务器标号为01、对第二服务器标号为02等等,由此可进一步的增加可信任根证书特征值的唯一性,即仅通过本应用程序或终端编辑过的根证书具有可信任性和可识别性,而对其他客户端或程序编辑过的根证书不具有上述特点,由此实现特征值与客户端或程序一一绑定的安全效果。
S40:对步骤S30中的所述数组B进行加密运算,得到密文数据C。
用安全厂商证书的特征值做密钥,使用AES算法,对数组B进行加密运算,得到密文数据C。
S50:对所述密文数据C进行二次加密,得到数据D。
本步骤中,对所述密文数据C采用SM3密码杂凑算法进行加密计算,得到数据D。具体实现过程中,还可采用MD5等其他杂凑算法实现。
S60:将数据D使用安全厂商证书的私钥做签名,把签名值保存到特征值列表中。
S70:再次访问时,对服务器特征值进行验签,通过方可访问。
本步骤包括两个子步骤,子步骤S701:判断所访问的服务器其根证书特征值是否已保存于步骤S10所建立的特征值列表中,若是,则进入子步骤S702,否则确定该服务器不可信,发出提示信息,结束步骤S70。
子步骤S702:验证所访问服务器的根证书进行运算,包括执行步骤S20~S50的运算。
需要说明的是,本步骤验证过程中,采用与步骤S20中对该服务器相同的随机数以及与步骤S30对该服务器相同的二次变换,最终得到数据E。进而,采用安全厂商证书的公钥对数据E进行验签,从而与步骤S60的签名结果进行比较,只有当比较一致时,才信任该服务器,否则,确定该服务器不可信,发出提示信息,结束步骤S70。
通过本步骤,可以杜绝黑客对于服务器的可信任根证书特征值的篡改或者替换。即通过步骤S701和步骤S702这两种方式,确保了程序当前要访问的服务器如果可信,则一定是真实可信的,不会被钓鱼网站假冒;如果两步验证中的任意一步验证不通过,则服务器有被钓鱼网站假冒的风险。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明。总之,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (7)

1.一种增加自定义可信任的根证书的方法,其特征在于,包括步骤:
A、建立各个服务器的可信任根证书特征值的列表;
B、针对每个服务器,生成一组随机数,与该服务器可信任根证书特征值一并,组成第一数组;
C、对所述第一数组进行加密运算;
D、利用安全厂商证书的私钥对加密运算的结果进行签名,把签名值保存到所述列表中;
E、访问服务器时,首先检测该服务器的根证书是否存于所述列表中;若存在,执行步骤F,否则无法访问该服务器;
F:对该服务器的根证书进行校验,验签通过,则可以访问该服务器,否则无法访问该服务器。
2.根据权利要求1所述的方法,其特征在于,步骤F包括:
生成一组随机数,与该服务器可信任根证书特征值一并,组成第一数组,所述随机数与步骤B中对该服务器生成的随机数相同;
对所述第一数组进行加密运算;
采用安全厂商证书的公钥对加密运算结果进行验签,验签通过才可以访问该服务器。
3.根据权利要求1所述的方法,其特征在于,在步骤B后,还包括步骤:对所述第一数组进行二次变换,得到第二数组;
所述步骤C中,对所述第二数组进行加密运算。
4.根据权利要求3所述的方法,其特征在于,所述二次变换包括:在第一数组后,增加一定数量的固定数或随机数,形成第二数组。
5.根据权利要求3所述的方法,其特征在于,所述二次变换包括:对各个服务器进行编号,在在第一数组后增加所述服务器的编号,形成第二数组。
6.根据权利要求1所述的方法,其特征在于,步骤C包括:利用安全厂商证书的特征值做密钥,使用AES算法,对所述第一数组进行加密运算,得到密文数据。
7.根据权利要求5所述的方法,其特征在于,步骤C还包括:对所述密文数据采用SM3密码杂凑算法进行加密计算。
CN201510959081.2A 2015-12-18 2015-12-18 一种增加自定义可信任的根证书的方法 Active CN105610795B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510959081.2A CN105610795B (zh) 2015-12-18 2015-12-18 一种增加自定义可信任的根证书的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510959081.2A CN105610795B (zh) 2015-12-18 2015-12-18 一种增加自定义可信任的根证书的方法

Publications (2)

Publication Number Publication Date
CN105610795A true CN105610795A (zh) 2016-05-25
CN105610795B CN105610795B (zh) 2017-09-12

Family

ID=55990333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510959081.2A Active CN105610795B (zh) 2015-12-18 2015-12-18 一种增加自定义可信任的根证书的方法

Country Status (1)

Country Link
CN (1) CN105610795B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766716A (zh) * 2016-08-16 2018-03-06 阿里巴巴集团控股有限公司 证书检测方法及装置、电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964800A (zh) * 2010-10-21 2011-02-02 神州数码网络(北京)有限公司 一种在ssl vpn中对数字证书用户认证的方法
JP2011155349A (ja) * 2010-01-26 2011-08-11 Kddi Corp マルチ属性認証システム、マルチ属性認証方法、失効確認方法およびプログラム
CN102647394A (zh) * 2011-02-16 2012-08-22 中兴通讯股份有限公司 路由设备身份认证方法及装置
CN103684872A (zh) * 2013-12-26 2014-03-26 深圳数字电视国家工程实验室股份有限公司 应用程序的管控方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011155349A (ja) * 2010-01-26 2011-08-11 Kddi Corp マルチ属性認証システム、マルチ属性認証方法、失効確認方法およびプログラム
CN101964800A (zh) * 2010-10-21 2011-02-02 神州数码网络(北京)有限公司 一种在ssl vpn中对数字证书用户认证的方法
CN102647394A (zh) * 2011-02-16 2012-08-22 中兴通讯股份有限公司 路由设备身份认证方法及装置
CN103684872A (zh) * 2013-12-26 2014-03-26 深圳数字电视国家工程实验室股份有限公司 应用程序的管控方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766716A (zh) * 2016-08-16 2018-03-06 阿里巴巴集团控股有限公司 证书检测方法及装置、电子设备

Also Published As

Publication number Publication date
CN105610795B (zh) 2017-09-12

Similar Documents

Publication Publication Date Title
CN109067801B (zh) 一种身份认证方法、身份认证装置及计算机可读介质
US11005653B2 (en) Integrated method and device for storing and sharing data
RU2718689C2 (ru) Управление конфиденциальной связью
US11888974B1 (en) Secret sharing information management and security system
More et al. Third party public auditing scheme for cloud storage
US9020149B1 (en) Protected storage for cryptographic materials
US20100005318A1 (en) Process for securing data in a storage unit
US9531540B2 (en) Secure token-based signature schemes using look-up tables
JP2016515235A5 (zh)
CN104980477A (zh) 云存储环境下的数据访问控制方法和***
CN110881048A (zh) 基于身份认证的安全通讯方法及装置
CN110401615A (zh) 一种身份认证方法、装置、设备、***及可读存储介质
Zhou et al. EverSSDI: blockchain-based framework for verification, authorisation and recovery of self-sovereign identity using smart contracts
KR20110140122A (ko) 인증서 및 키를 가지는 제품을 생산하기 위한 방법
CN103414699A (zh) 客户端证书认证方法、服务器和客户端
US20140237252A1 (en) Techniques for validating data exchange
US20220020020A1 (en) Methods, systems, and devices for managing digital assets
US20200195447A1 (en) Communication method of client device, issuing device and server
CN112311538A (zh) 一种身份验证的方法、装置、存储介质及设备
CN106209730B (zh) 一种管理应用标识的方法及装置
US11997075B1 (en) Signcrypted envelope message
CN114244508B (zh) 数据加密方法、装置、设备及存储介质
CN106936579A (zh) 基于可信第三方代理的云存储数据存储及读取方法
WO2021005474A1 (en) Computer-implemented system and method for facilitating transactions associated with a blockchain using a network identifier for participating entities
KR101586439B1 (ko) 프라이버시를 보장하는 사용자 데이터의 무결성 검증 방법 및 그 장치

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Ding Min

Inventor after: Liu Zengshou

Inventor after: Wang Peng

Inventor after: Wang Ye

Inventor after: An Xiaojiang

Inventor before: Liu Zengshou

Inventor before: Wang Peng

Inventor before: Wang Ye

Inventor before: An Xiaojiang