CN108449346B - 一种密钥生成客户端 - Google Patents

一种密钥生成客户端 Download PDF

Info

Publication number
CN108449346B
CN108449346B CN201810241948.4A CN201810241948A CN108449346B CN 108449346 B CN108449346 B CN 108449346B CN 201810241948 A CN201810241948 A CN 201810241948A CN 108449346 B CN108449346 B CN 108449346B
Authority
CN
China
Prior art keywords
key
request
server
module
receiving
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.)
Active
Application number
CN201810241948.4A
Other languages
English (en)
Other versions
CN108449346A (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 Kexin Huatai Technology Co ltd
Original Assignee
Beijing Kexin Huatai 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 Kexin Huatai Technology Co ltd filed Critical Beijing Kexin Huatai Technology Co ltd
Priority to CN201810241948.4A priority Critical patent/CN108449346B/zh
Publication of CN108449346A publication Critical patent/CN108449346A/zh
Application granted granted Critical
Publication of CN108449346B publication Critical patent/CN108449346B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/062Network architectures or network communication protocols for network security for supporting key management in a packet data network for key distribution, e.g. centrally by trusted party
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • H04L9/0841Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these involving Diffie-Hellman or related key agreement protocols
    • H04L9/0844Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these involving Diffie-Hellman or related key agreement protocols with user authentication or key authentication, e.g. ElGamal, MTI, MQV-Menezes-Qu-Vanstone protocol or Diffie-Hellman protocols using implicitly-certified keys
    • 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/3236Cryptographic 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 using cryptographic hash functions

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)

Abstract

本发明涉及一种密钥生成客户端,包括连接请求模块、应答模块、密钥请求模块和密钥计算模块,其中:所述连接请求模块用于向另一个密钥生成客户端发送连接请求;所述应答模块由于在接收到连接请求后,发送应答消息;所述密钥请求模块用于向服务器请求密钥;所述密钥计算模块用于根据服务器返回的消息计算密钥。

Description

一种密钥生成客户端
【技术领域】
本发明属于密钥生成领域,尤其涉及一种密钥生成客户端。
【背景技术】
密钥是一种参数,它是在明文转换为密文或将密文转换为明文的算法中输入的参数。密钥分为对称密钥与非对称密钥。在现代计算机中,为了保证安全性,常常使用密钥对用户的信息进行加密,这就需要生成密钥。如何安全、可信、快速地生成密钥,是现代计算机中的一个重要课题。
【发明内容】
为了解决现有技术中的上述问题,本发明提供了一种密钥生成客户端。
本发明采用的技术方案具体如下:
一种密钥生成客户端,包括连接请求模块、应答模块、密钥请求模块和密钥计算模块,其中:
所述连接请求模块用于向另一个密钥生成客户端发送连接请求;
所述应答模块由于在接收到连接请求后,发送应答消息;
所述密钥请求模块用于向服务器请求密钥;
所述密钥计算模块用于根据服务器返回的消息计算密钥。
进一步地,所述密钥生成客户端还包括通信模块,用于与服务器和其他客户端进行通信。
进一步地,所述连接请求中包括随机的连接码和请求码。
进一步地,所述应答消息用于告知对方收到了连接请求。
进一步地,所述密钥生成客户端事先在服务器进行注册。
本发明的有益效果为:在不降低安全性的情况下,相对现有技术,本发明的方法更加简单可靠,降低了实现的复杂性,对计算能力要求低,可以应用于不同计算能力的设备。
【附图说明】
此处所说明的附图是用来提供对本发明的进一步理解,构成本申请的一部分,但并不构成对本发明的不当限定,在附图中:
图1是本发明密钥生成过程所涉及的三方;
图2是本发明密钥生成客户端的逻辑结构图。
【具体实施方式】
下面将结合附图以及具体实施例来详细说明本发明,其中的示意性实施例以及说明仅用来解释本发明,但并不作为对本发明的限定。
本发明的密钥生成客户端在运用时,逻辑上可以分成两方:密钥请求方和密钥接收方。在服务器的协助下,密钥请求方和密钥生成方之间生成密钥。
所述密钥请求方和接收方是网络上需要进行加密通信的双方。所述密钥请求方是发起所述加密通信的一方,并由所述密钥请求方发起密钥的生成过程。所述密钥接收方法是接受加密通信的一方,并配合所述密钥请求方发起的密钥生成过程。所述密钥生成客户端包括连接请求模块、应答模块、密钥请求模块和密钥计算模块。此外,所述密钥生成客户端还包括通信模块,用于与服务器和其他客户端进行通信。
所述服务器是一个中立的可信第三方,其用于在事先为需要生成密钥的各方进行注册,并为各方分别提供一个随机生成的秘密信息。例如,A到所述服务器进行注册,服务器对A的身份进行认证后,随机生成一个秘密信息Secret,优选的,为了保证足够的安全,Secret是不少于1024位的二进制数。该秘密信息提供给A,由A和服务器分别保存。
基于上述三方结构,下面对本发明生成密钥的过程进行详细说明:
(1)密钥请求方通过连接请求模块向密钥接收方发起连接请求,在连接请求中携带了一个连接码LA和请求码ID;所述连接码LA和请求码ID都是由请求模块随机生成的一个数字。
为了安全考虑,所述连接码的位数应当足够长,优选的,连接码应当与上述秘密信息Secret一样,不少于1024位。
(2)密钥接收方在收到连接请求后,由应答模块随机生成一个连接码LB,然后应答模块向密钥请求方发送一个应答消息。
与连接码LA一样,连接码LB的位数也应当足够长,优选情况下,LB与LA的位数相同。但是,LB并不包括在应答消息中,该应答消息只是告知密钥请求方,密钥接收方收到了请求,并准备好生成密钥。
(3)密钥请求方在收到应答消息后,密钥请求方的密钥请求模块向服务器发送一个密钥请求消息KeyRequestA,所述KeyRequestA中包括连接码LA、请求码ID和哈希结果HA,其中HA=Hash(SecretA⊕LA)}。
密钥接收方也通过自身的密钥请求模块同时向服务器发送另一个密钥请求消息KeyRequestB,所述KeyRequestB包括请求码ID、LC和哈希结果HB。
其中LC=LA⊕LB,HB=Hash(SecretB⊕LA⊕LB)。
其中,SecretA是密钥请求方在服务器注册时获得的秘密信息,SecretB是密钥接收方在服务器注册时获得的秘密信息。Hash是一个哈希函数,其可以使用本领域中任意一种公知的哈希算法。
密钥请求方和密钥接收方的哈希计算中都包括了其自身随机生成的数字,这样可以避免被中间人获取指定的哈希结果,保证了安全性。
(4)服务器在接收到上述两个密钥请求消息后,首先基于请求码ID确定这两个密钥请求消息是来自一对密钥请求方和接收方;然后分别对两个密钥请求消息中的哈希结果进行验证,如果有一个验证不通过,则服务器忽略这两个密钥请求消息,方法结束;如果验证都通过,则继续后续步骤。
具体验证过程是:
对于KeyRequestA,服务器自行计算Hash(SecretA⊕LA)(由于服务器事先保存了SerectA,所以服务器可以计算该Hash),判断计算结果与HA是否相等,如果不相等,则验证不通过,否则验证通过。
对于KeyRequestB,服务器自行计算Hash(SecretB⊕LA⊕LB),判断计算结果与HB是否相等,如果不相等,则验证不通过,否则验证通过。
(5)服务器随机生成一个密钥Key,分别计算KA和KB,即:
KA=Key⊕SecretA,KB=Key⊕SecretB
然后服务器将KA发送给密钥请求方,将KB发送给密钥接收方。
(6)密钥请求方接收到KA后,由其密钥计算模块计算出Key,即Key=KA⊕SecretA;
密钥接收方接收到KB后,也通过其密钥计算模块计算Key=KB⊕SecretB。
至此,密钥请求方和密钥接收方都各自获得了共同的密钥Key,从而可以基于该密钥进行加密通信等操作。
从以上过程可以看出,整个个密钥生成过程只涉及异或计算,计算过程简单,因此对密钥请求方和密钥接收方的计算能力要求很低,因此即使这两方都是计算机能力较低的设备,也可以完成密钥生成过程。并且,每一次的密钥生成过程都依赖于双方生成的连接码,并且需要可信的服务器居中验证,服务器分别验证了双方的身份后,生成密钥,因此整个过程具有足够的安全性,并且在后期可以追溯生成密钥的双方身份。
以上所述仅是本发明的较佳实施方式,故凡依本发明专利申请范围所述的构造、特征及原理所做的等效变化或修饰,均包括于本发明专利申请范围内。

Claims (1)

1.一种密钥生成客户端,其特征在于,密钥生成客户端在运用时,逻辑上可以分成两方:密钥请求方和密钥接收方,所述密钥请求方和接收方是网络上需要进行加密通信的双方;所述密钥请求方是发起所述加密通信的一方,并由所述密钥请求方发起密钥的生成过程;所述密钥接收方法是接受加密通信的一方,并配合所述密钥请求方发起的密钥生成过程;
密钥生成客户端包括连接请求模块、应答模块、密钥请求模块和密钥计算模块,其中:
所述连接请求模块用于向另一个密钥生成客户端发送连接请求;
所述应答模块用于在接收到连接请求后,发送应答消息;
所述密钥请求模块用于向服务器请求密钥;
所述密钥计算模块用于根据服务器返回的消息计算密钥;
其中,生成密钥的过程包括:
(1)密钥请求方通过连接请求模块向密钥接收方发起连接请求,该连接请求中携带了一个连接码LA和请求码ID;所述连接码LA和请求码ID均由连接请求模块随机生成的一个数字;
所述连接码不少于1024位;
(2)密钥接收方在收到连接请求后,应答模块随机生成一个连接码LB,然后应答模块向密钥请求方发送一个应答消息;
连接码LB的位数与LA的位数相同;
(3)密钥请求方收到应答消息后,密钥请求方的密钥请求模块向服务器发送一个密钥请求消息KeyRequestA,所述KeyRequestA中包括连接码LA、请求码ID和哈希结果HA,其中HA=Hash(SecretA⊕LA);
密钥接收方也通过自身的密钥请求模块同时向服务器发送另一个密钥请求消息KeyRequestB,所述KeyRequestB包括请求码ID、LC和哈希结果HB;
其中LC=LA⊕LB,HB=Hash(SecretB⊕LA⊕LB);
其中,SecretA是密钥请求方在服务器注册时获得的秘密信息,SecretB是密钥接收方在服务器注册时获得的秘密信息;Hash是一个哈希函数;
(4)服务器在接收到上述两个密钥请求消息后,首先基于请求码ID确定这两个密钥请求消息是来自一对密钥请求方和接收方;然后分别对两个密钥请求消息中的哈希结果进行验证,如果有一个验证不通过,则服务器忽略这两个密钥请求消息,方法结束;如果验证都通过,则继续后续步骤;
该验证过程是:
对于KeyRequestA,由保存了SerectA的服务器自行计算Hash(SecretA⊕LA),判断计算结果与HA是否相等,如果不相等,则验证不通过,否则验证通过;
对于KeyRequestB,服务器自行计算Hash(SecretB⊕LA⊕LB),判断计算结果与HB是否相等,如果不相等,则验证不通过,否则验证通过;
(5)服务器随机生成一个密钥Key,分别计算KA和KB,该计算包括:
KA=Key⊕SecretA,KB=Key⊕SecretB;
然后服务器将KA发送给密钥请求方,将KB发送给密钥接收方;
(6)密钥请求方接收到KA后,由其密钥计算模块计算出Key,或Key=KA⊕SecretA;
密钥接收方接收到KB后,也通过其密钥计算模块计算Key=KB⊕SecretB;
至此,密钥请求方和密钥接收方都各自获得了共同的密钥Key,从而实现了基于该密钥进行的加密通信操作。
CN201810241948.4A 2018-03-22 2018-03-22 一种密钥生成客户端 Active CN108449346B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810241948.4A CN108449346B (zh) 2018-03-22 2018-03-22 一种密钥生成客户端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810241948.4A CN108449346B (zh) 2018-03-22 2018-03-22 一种密钥生成客户端

Publications (2)

Publication Number Publication Date
CN108449346A CN108449346A (zh) 2018-08-24
CN108449346B true CN108449346B (zh) 2021-07-27

Family

ID=63196295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810241948.4A Active CN108449346B (zh) 2018-03-22 2018-03-22 一种密钥生成客户端

Country Status (1)

Country Link
CN (1) CN108449346B (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101715638A (zh) * 2007-03-20 2010-05-26 迪姆威奇软件有限责任公司 为获取解密密钥而请求密钥获取的安全电子消息系统
CN103763356A (zh) * 2014-01-08 2014-04-30 深圳大学 一种安全套接层连接的建立方法、装置及系统
CN103974241A (zh) * 2013-02-05 2014-08-06 东南大学常州研究院 一种面向Android系统移动终端的语音端到端加密方法
WO2016155826A1 (en) * 2015-04-01 2016-10-06 Telefonaktiebolaget Lm Ericsson (Publ) System, apparatus and method for load balancing
CN106535184A (zh) * 2016-10-18 2017-03-22 深圳市金立通信设备有限公司 一种密钥管理的方法和系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090138714A1 (en) * 2007-11-26 2009-05-28 Kabushiki Kaisha Toshiba Communication apparatus, key server, management server, communication server, content distribution system, communication method, and recording medium
US9647835B2 (en) * 2011-12-16 2017-05-09 Akamai Technologies, Inc. Terminating SSL connections without locally-accessible private keys
CN103166958B (zh) * 2013-02-26 2016-01-20 深圳创维数字技术有限公司 一种文件的保护方法及系统
US10135616B2 (en) * 2016-05-07 2018-11-20 Keir Finlow-Bates Revocation of cryptographic keys in the absence of a trusted central authority

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101715638A (zh) * 2007-03-20 2010-05-26 迪姆威奇软件有限责任公司 为获取解密密钥而请求密钥获取的安全电子消息系统
CN103974241A (zh) * 2013-02-05 2014-08-06 东南大学常州研究院 一种面向Android系统移动终端的语音端到端加密方法
CN103763356A (zh) * 2014-01-08 2014-04-30 深圳大学 一种安全套接层连接的建立方法、装置及系统
WO2016155826A1 (en) * 2015-04-01 2016-10-06 Telefonaktiebolaget Lm Ericsson (Publ) System, apparatus and method for load balancing
CN106535184A (zh) * 2016-10-18 2017-03-22 深圳市金立通信设备有限公司 一种密钥管理的方法和系统

Also Published As

Publication number Publication date
CN108449346A (zh) 2018-08-24

Similar Documents

Publication Publication Date Title
Chatterjee et al. Secure biometric-based authentication scheme using Chebyshev chaotic map for multi-server environment
Zhang et al. A privacy-aware PUFs-based multiserver authentication protocol in cloud-edge IoT systems using blockchain
CN111682938B (zh) 面向中心化移动定位系统的三方可认证密钥协商方法
TWI772006B (zh) 藍牙設備連接方法和藍牙設備
JP2926699B2 (ja) 通信パートナの認証方法及びシステム
JP7105308B2 (ja) デジタル署名方法、装置及びシステム
JP2008532389A (ja) 認証のための小型の公開鍵を用いたデジタル署名
CN113300836B (zh) 一种基于区块链和ecc的车载网络报文认证方法及系统
CN110351727A (zh) 一种适于无线传感网络的认证与密钥协商方法
CN113572765B (zh) 一种面向资源受限终端的轻量级身份认证密钥协商方法
CN107395627B (zh) 一种基于单向函数的轻量级认证协议
Tbatou et al. A New Mutuel Kerberos Authentication Protocol for Distributed Systems.
Ma et al. A robust authentication scheme for remote diagnosis and maintenance in 5G V2N
Lin et al. A secure cross-domain authentication scheme with perfect forward security and complete anonymity in fog computing
Zahednejad et al. A Lightweight, Secure Big Data‐Based Authentication and Key‐Agreement Scheme for IoT with Revocability
CN115955320B (zh) 一种视频会议身份认证方法
CN116318739B (zh) 一种电子数据交换方法及系统
CN108155992B (zh) 一种生成可信密钥的方法
CN108449346B (zh) 一种密钥生成客户端
CN114050897B (zh) 一种基于sm9的异步密钥协商方法及装置
CN114584975B (zh) 一种基于sdn的抗量子卫星网络接入认证方法
CN108449347B (zh) 一种密钥生成服务器
CN108155991B (zh) 一种可信密钥的生成系统
CN110572788B (zh) 基于非对称密钥池和隐式证书的无线传感器通信方法和系统
CN115913521A (zh) 基于量子密钥进行身份认证的方法

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant