CN1620005A - Method of safety transmitting key - Google Patents

Method of safety transmitting key Download PDF

Info

Publication number
CN1620005A
CN1620005A CN 200310103879 CN200310103879A CN1620005A CN 1620005 A CN1620005 A CN 1620005A CN 200310103879 CN200310103879 CN 200310103879 CN 200310103879 A CN200310103879 A CN 200310103879A CN 1620005 A CN1620005 A CN 1620005A
Authority
CN
China
Prior art keywords
key
random number
word
generated
transmission
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
CN 200310103879
Other languages
Chinese (zh)
Other versions
CN100421372C (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2003101038794A priority Critical patent/CN100421372C/en
Publication of CN1620005A publication Critical patent/CN1620005A/en
Application granted granted Critical
Publication of CN100421372C publication Critical patent/CN100421372C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种安全发送传输密钥的方法,预先在通信双方分别设置共享密钥,该方法包括:发送端生成随机数R1,然后利用所生成的随机数R1、共享密钥、要发送的传输密钥以及选定的加密算法生成加密密钥Kc,并计算出自身的摘要字;发送端将携带有计算出的摘要字、所生成的随机数R1和加密密钥Kc的信息发送给接收端;接收端收到信息后,先根据共享密钥、收到的随机数R1、加密密钥Kc以及选定的加密算法,获得传输密钥;并计算出自身的签名字,然后判断计算出的签名字与所收到的摘要字是否一致,如果是,则所收到信息为正确信息;否则,所收到信息为错误信息。该方法不仅能使两个实体间的密钥保密传输,而且能保证实体间相互的身份认证。

Figure 200310103879

The invention discloses a method for securely sending a transmission key. The shared key is set separately at both communication parties in advance. The method includes: the sending end generates a random number R1, and then uses the generated random number R1, shared key, and The transmission key and the selected encryption algorithm generate the encryption key Kc, and calculate its own digest word; the sender sends the information carrying the calculated digest word, the generated random number R1 and the encryption key Kc to Receiver: After receiving the information, the receiver first obtains the transmission key according to the shared key, the received random number R1, the encryption key Kc and the selected encryption algorithm; calculates its own signature, and then judges the calculation Whether the signed word is consistent with the received digest word, if yes, the received information is correct information; otherwise, the received information is wrong information. This method can not only make the key secret transmission between two entities, but also ensure mutual identity authentication between entities.

Figure 200310103879

Description

一种安全发送传输密钥的方法A method for securely sending transmission keys

技术领域technical field

本发明涉及数据安全传输技术,特别是指在客户端-服务器框架下一种安全发送传输密钥的方法。The invention relates to data security transmission technology, in particular to a method for securely sending a transmission key under the client-server framework.

背景技术Background technique

在各种通信系统尤其是移动通信系统中,为了确保用户间信息的安全保密性,安全通信的实现是非常重要的,这就需要对所传输的数据进行加密保护,进而就需要在传输数据的实体之间确定并传输加密的密钥。在一些客户端-服务器(C-S,Client-Server)框架的应用中,会涉及到唯双方的密钥传输。例如:在无线局域网(WLAN)系统中,接入控制器(AC)和接入点(AP)之间的密钥传输、AP和终端(STA)之间的密钥传输都属于Client-Server框架下的密钥传输,这里,可将一方作为Client,另一方作为Server。无论是STA与AP还是AP与AC之间,如果不进行安全保护,就会存在安全隐患。因此,当双方传输密钥时,就需要对传输的密钥信息进行保护,同时也需要对双方的身份进行认证,以保证是在合法用户之间进行相互的密钥传输。In various communication systems, especially mobile communication systems, in order to ensure the security and confidentiality of information between users, the realization of secure communication is very important, which requires encrypted protection of the transmitted data, and then requires Encrypted keys are determined and transmitted between entities. In some client-server (C-S, Client-Server) framework applications, only two-party key transmission is involved. For example: in a wireless local area network (WLAN) system, the key transmission between the access controller (AC) and the access point (AP), and the key transmission between the AP and the terminal (STA) all belong to the Client-Server framework Under the key transmission, here, one party can be used as Client, and the other party can be used as Server. Whether between STAs and APs or between APs and ACs, if security protection is not implemented, there will be security risks. Therefore, when the two parties transmit the key, they need to protect the transmitted key information, and also need to authenticate the identities of the two parties to ensure that the mutual key transmission is between legitimate users.

目前,在进行数据加密传输的任意两个实体之间,只是在建网时通过人工方式分别设置了对称密钥,而没有采用密钥传输机制。两个实体之间要传送保密信息时,一端使用所设置的密钥加密,而另一端使用相同的密钥解密,一次单向的消息传递完成保密信息传送的过程。但这种方式只能进行简单的保密信息传送,传递保密信息的两端不能进行相互认证,从而无法抵御中间人的攻击。At present, between any two entities that carry out encrypted data transmission, only symmetric keys are manually set during network construction, and no key transmission mechanism is adopted. When confidential information is to be transmitted between two entities, one end uses the set key to encrypt, and the other end uses the same key to decrypt, and a one-way message transmission completes the process of confidential information transmission. However, this method can only perform simple confidential information transmission, and the two ends of the transmission of confidential information cannot perform mutual authentication, so it cannot resist the attack of the middleman.

发明内容Contents of the invention

有鉴于此,本发明的主要目的在于提供一种安全发送传输密钥的方法,使其能保证两个实体间的密钥保密传输。In view of this, the main purpose of the present invention is to provide a method for safely sending a transmission key, so that it can ensure the secret transmission of the key between two entities.

本发明进一步的目的是保证两个实体间能够实现相互的身份认证。A further object of the present invention is to ensure mutual identity authentication between two entities.

为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:

一种安全发送传输密钥的方法,预先在通信双方分别设置共享密钥Ki,该方法进一步包括:A method for securely sending a transmission key, in which a shared key K i is set in advance at both communication parties, the method further includes:

a.发送端生成随机数R1,然后利用所生成的随机数R1、共享密钥Ki、要发送的传输密钥master_key以及选定的加密算法生成加密密钥Kc,并计算出自身的摘要字;a. The sender generates a random number R1, and then uses the generated random number R1, the shared key K i , the transmission key master_key to be sent, and the selected encryption algorithm to generate an encryption key Kc, and calculates its own digest word ;

b.发送端将携带有步骤a计算出的摘要字、所生成的随机数R1和加密密钥Kc的信息发送给接收端;b. The sending end sends the information carrying the digest word calculated in step a, the generated random number R1 and the encryption key Kc to the receiving end;

c.接收端收到步骤b所发送的信息后,先根据共享密钥Ki、收到的随机数R1、加密密钥Kc以及选定的加密算法,获得传输密钥master_key;并计算出自身的签名字,然后判断计算出的签名字与所收到的摘要字是否一致,如果是,则所收到信息为正确信息;否则,所收到信息为错误信息。c. After receiving the information sent in step b, the receiving end first obtains the transmission key master_key according to the shared key K i , the received random number R1, the encryption key Kc and the selected encryption algorithm; and calculates its own Signature word, and then judge whether the calculated signature word is consistent with the received digest word, if yes, the received information is correct information; otherwise, the received information is wrong information.

其中,步骤a中所述摘要字根据随机数R1、加密密钥Kc、要发送的传输密钥master_key以及选定的签名字算法计算得出。Wherein, the digest word in step a is calculated according to the random number R1, the encryption key Kc, the transmission key master_key to be sent and the selected signature word algorithm.

该方法还进一步包括:The method further includes:

d.接收端随机生成一个随机数R2,并计算出用于认证的摘要字R2-R,然后将所生成的随机数R2和计算出的摘要字R2-R发给发送端;d. The receiving end randomly generates a random number R2, and calculates the digest word R2-R for authentication, and then sends the generated random number R2 and the calculated digest word R2-R to the sending end;

e.发送端根据接收到的随机数R2、自身生成的加密密钥Kc、选定的签名算法f2以及要发送的传输密钥master_key,计算出自身使用的签名字,然后判断计算出的签名字与所收到的摘要字R2-R是否相等,如果相等,则认证通过对端为合法方,否则,对端为非法方,结束当前认证流程;e. The sender calculates the signature used by itself based on the received random number R2, the encryption key Kc generated by itself, the selected signature algorithm f2, and the transmission key master_key to be sent, and then judges the calculated signature Whether it is equal to the received summary word R2-R, if they are equal, the peer end is the legal party through the authentication, otherwise, the peer end is the illegal party, and the current authentication process ends;

f.发送端根据接收到的随机数R2、共享密钥Ki和选定的签名算法f2计算用于认证的摘要字R2_digt,并将该摘要字R2_digt发送给接收端;f. The sending end calculates the digest word R2_digt for authentication according to the received random number R2, the shared key K i and the selected signature algorithm f2, and sends the digest word R2_digt to the receiving end;

g.接收端根据自身生成的随机数R2、共享密钥Ki以及选定的签名算法f2计算出自身使用的签名字,然后判断计算出的签名字与所收到的摘要字R2-R是否相等,如果相等,则认证通过端端为合法方,否则,对端为非法方。g. The receiving end calculates the signature word used by itself according to the random number R2 generated by itself, the shared key Ki and the selected signature algorithm f2, and then judges whether the calculated signature word is equal to the received digest word R2-R , if they are equal, the peer end is the legal party through the authentication, otherwise, the peer end is the illegal party.

其中,步骤d所述摘要字根据共享密钥Ki、接收端生成的随机数R2、发送端生成的随机数R1以及选定的签名字算法计算得出;或者根据共享密钥Ki、接收端生成的随机数R2、要发送的传输密钥master_key以及选定的签名字算法计算得出;或是根据共享密钥Ki、接收端生成的随机数R2、发送端生成的随机数R1、要发送的传输密钥master_key以及选定的签名字算法计算得出。Wherein, the digest word in step d is calculated according to the shared key K i , the random number R2 generated by the receiving end, the random number R1 generated by the sending end and the selected signature algorithm; or based on the shared key K i , the receiving end The random number R2 generated by the receiving end, the transmission key master_key to be sent, and the selected signature algorithm are calculated; or based on the shared key K i , the random number R2 generated by the receiving end, the random number R1 generated by the sending end, It is calculated from the transmission key master_key to be sent and the selected signature algorithm.

上述方案中,所述选定的加密算法为MD5算法。所述选定的签名算法为MD5算法。所述发送端为客户端,或为服务器端。In the above solution, the selected encryption algorithm is MD5 algorithm. The selected signature algorithm is MD5 algorithm. The sending end is a client or a server.

因此,本发明所提供的安全发送传输密钥的方法,两个通信实体之间必须预先共享一个密钥,利用该预共享密钥可解决C-S框架下实体间密钥的保密传输问题。本发明通过双方的随机数以及共享密钥作为签名算法的参数,使两个通信实体间能够互相确认对方的身份,并能安全的完成传输密钥传递的过程。Therefore, in the method for safely sending transmission keys provided by the present invention, a key must be pre-shared between two communication entities, and the problem of secret key transmission between entities under the C-S framework can be solved by using the pre-shared key. The invention uses the random number and the shared key of both parties as the parameters of the signature algorithm, so that two communication entities can mutually confirm each other's identity, and can safely complete the process of transmitting the transmission key.

本发明可将进行对方身份确认的过程作为可选流程,如果不进行对方身份确认,则本发明安全传输密钥的处理流程简单易行,且节省Server端的资源;如果进行对方身份确认,则本发明将身份认证过程和密钥安全传输过程结合在一起进行,使相互的身份认证和密钥的安全传输两个过程协同工作,可保证在满足安全需求条件下有最少的传输流程。The present invention can take the process of confirming the identity of the other party as an optional process. If the identity confirmation of the other party is not performed, the processing flow of the secure transmission key of the present invention is simple and easy, and saves resources on the Server side; if the identity of the other party is confirmed, the present invention The invention combines the process of identity authentication and secure key transmission, so that the two processes of mutual identity authentication and secure key transmission work together to ensure the minimum transmission process under the condition of meeting the security requirements.

附图说明Description of drawings

图1为本发明方法的一实现流程示意图;Fig. 1 is a schematic flow chart of an implementation of the method of the present invention;

图2为本发明方法的另一实现流程示意图。Fig. 2 is a schematic flow chart of another implementation of the method of the present invention.

具体实施方式Detailed ways

下面结合附图及具体实施例对本发明再作进一步详细的说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

本发明的基本思想是:利用预共享密钥,一端将所拥有的传输密钥master_key安全的传输给另一端。具体地说就是:在Client端和Server端共享一个密钥Ki;要发送传输密钥master_key的一端生成随机数R,并利用共享密钥Ki、所生成的随机数R、选定的加密算法f1和签名算法f2以及要发送的传输密钥master_key,计算出实际发送的加密密钥和摘要字;接收传输密钥的一端根据所收到的摘要字、随机数、加密密钥以及共享密钥Ki,得到真正的传输密钥master_key,并同时计算出签名字以验证信息的正确性。The basic idea of the present invention is: using the pre-shared key, one end securely transmits the owned transmission key master_key to the other end. Specifically, a key K i is shared between the client and the server; the end to send the transmission key master_key generates a random number R, and uses the shared key K i , the generated random number R, and the selected encryption Algorithm f1, signature algorithm f2, and the transmission key master_key to be sent, calculate the encryption key and digest word actually sent; the end receiving the transmission key bases on the received digest word, random number, encryption key and shared secret Key K i , get the real transmission key master_key, and at the same time calculate the signature to verify the correctness of the information.

这里,所述共享密钥Ki通常被预先安全保存在Client端和Server端,一般该共享密钥采用物理存放方式,且在写入后任何人都不可能读取到。所述要发送的传输密钥master_key可以通过多种途径获取,比如:由随机数产生,或是预先设定。Here, the shared key K i is usually securely stored in advance at the client end and the server end. Generally, the shared key is stored in a physical manner, and no one can read it after writing. The transmission key master_key to be sent can be obtained in various ways, such as: generated by a random number, or preset.

所述选定的加密算法f1和签名算法f2可采用任意现有的算法,Client端和Server端应分别保留至少一套密钥生成算法和数字签名算法,且要求双方至少有一套相同的密钥生成算法和数字签名算法,Client端和Server端采用双方预先共同选定的加密算法和签名算法进行相应的计算。The selected encryption algorithm f1 and signature algorithm f2 can use any existing algorithm, and the client and the server should respectively retain at least one set of key generation algorithm and digital signature algorithm, and require both parties to have at least one set of the same key Generate algorithm and digital signature algorithm, client side and server side use the encryption algorithm and signature algorithm selected by both parties in advance to carry out the corresponding calculation.

所述要发送传输密钥master_key的一端可以是Client端,也可以是Server端。以下仅以Client端发送传输密钥master_key,Server端接收为例。The end to send the transmission key master_key may be the client end or the server end. The following only uses the client to send the transfer key master_key and the server to receive it as an example.

如图1所示,本发明安全发送传输密钥的方法包括以下步骤:As shown in Figure 1, the method for safely sending the transmission key of the present invention includes the following steps:

步骤101:Client端要发送自身拥有的传输密钥master_key,则Client端先随机生成一个随机数R1,然后利用共享密钥Ki、所生成的随机数R1、选定的加密算法fl,按照公式(1)产生出传输密钥master_key的加密密钥Kc:Step 101: The client side wants to send its own transmission key master_key, then the client side first randomly generates a random number R1, and then uses the shared key K i , the generated random number R1, and the selected encryption algorithm fl, according to the formula (1) Generate the encryption key Kc of the transmission key master_key:

              Kc=f1(Ki,R1)master_key    (1)并且,Client端根据所生成的随机数R1、选定的签名算法f2、计算出的加密密钥Kc,按照公式(2)计算自身当前使用的摘要字Digt:Kc=f1(Ki, R1)master_key (1) and, according to the generated random number R1, the selected signature algorithm f2, and the calculated encryption key Kc, the client calculates the currently used Summary word Digt:

              Digt=f2(R1,Kc,master_key)  (2)Digt=f2(R1, Kc, master_key) (2)

步骤102:Client端向Server端发送携带有随机数R1、加密密钥Kc以及摘要字Digt的信息{R1,Kc,Digt}。Step 102: The client sends information {R1, Kc, Digt} carrying the random number R1, the encryption key Kc, and the digest word Digt to the server.

步骤103:Server端收到该信息后,根据自身存储的共享密钥Ki、所收到的随机数R1和加密密钥Kc、选定的加密算法fl,按照公式(3)计算出接收密钥rec_key,即传输密钥master_key:Step 103: After receiving the information, the server calculates the receiving key according to the formula (3) according to the shared key Ki stored in itself, the received random number R1 and the encryption key Kc, and the selected encryption algorithm fl. The key rec_key, that is, the transmission key master_key:

         rec_key=fl(Ki,R1)Kc=master_key  (3)同时,利用所收到的随机数R1和加密密钥Kc、选定的签名算法f2以及计算出的接收密钥rec_key,按照公式(4)计算出自身使用的签名字Rec_Digt:rec_key=fl(Ki, R1)Kc=master_key (3) At the same time, using the received random number R1 and encryption key Kc, the selected signature algorithm f2 and the calculated receiving key rec_key, according to the formula (4 ) calculates the signature Rec_Digt used by itself:

         Rec_Digt=f2(R1,Kc,rec_key)  (4)  Rec_Digt=f2(R1, Kc, rec_key) (4)

步骤104:Server端判断自身计算出的签名字Rec_Digt是否与所接收到的摘要字Digt相同,如果相同,即Rec_Digt=Digt,则说明发送过来的信息是个正确的信息。如果不相同,则说明发送的信息错误,结束当前流程或是通知对端重新发送。Step 104: The server judges whether the signature Rec_Digt calculated by itself is the same as the received digest Digt. If they are the same, that is, Rec_Digt=Digt, it means that the sent information is correct. If they are not the same, it means that the sent information is wrong, end the current process or notify the peer to resend.

为了防止非法方可能的复制攻击,实现双方相互的身份认证,可选择增加步骤105~107,如图2所示。In order to prevent possible copying attacks by illegal parties and realize mutual identity authentication between the two parties, steps 105 to 107 can be added, as shown in FIG. 2 .

步骤105:Server端随机生成一个随机数R2,然后根据公式(5)计算用于认证的摘要字R2-R:Step 105: The server randomly generates a random number R2, and then calculates the digest word R2-R for authentication according to formula (5):

          R2-R=f2(Ki,R2,R1,master_key)  (5)之后,Server端将信息{R2,R2-R}发送给Client端。R2-R=f2(Ki, R2, R1, master_key) (5) Afterwards, the Server sends the information {R2, R2-R} to the Client.

这里,在计算摘要字R2-R时,公式(5)中的参数R1和master_key可以全使用,也可以只选择R1、master_key其中之一。Here, when calculating the summary word R2-R, the parameters R1 and master_key in formula (5) can be used in full, or only one of R1 and master_key can be selected.

步骤106:Client端验证R2-R正确,则认为传输密钥master_key已正确发送给Server端。具体的认证过程是:Client端根据接收到的R2、自身生成的加密密钥Kc、选定的签名算法f2以及要发送的传输密钥master_key,计算出自身使用的签名字,然后判断计算出的签名字与所收到的摘要字R2-R是否相等,如果相等,说明Server端已正确接收传输密钥master_key,且说明认证通过Server端为合法方;否则,说明Server端为非法方,结束当前流程。Step 106: The client side verifies that R2-R is correct, then it considers that the transmission key master_key has been sent to the server side correctly. The specific authentication process is: the client calculates the signature word used by itself according to the received R2, the encryption key Kc generated by itself, the selected signature algorithm f2 and the transmission key master_key to be sent, and then judges the calculated Whether the signature word is equal to the received digest word R2-R, if they are equal, it means that the server side has correctly received the transmission key master_key, and it means that the server side is a legal party through the authentication; otherwise, it means that the server side is an illegal party, and the current process.

Client端确认Server端已正确接收传输密钥master_key后,根据公式(6)计算用于认证的摘要字R2_digt:After the client confirms that the server has correctly received the transmission key master_key, it calculates the digest word R2_digt for authentication according to formula (6):

             R2_digt=f2(Ki,R2)    (6)R2_digit=f2(Ki, R2) (6)

步骤107:Client端发送带有摘要字R2_digt的数字信息给Server端,Server端通过验证所收到的、带有摘要字R2_digt的消息,可以确定第一条消息是Client端发送的消息,从而实现双方的身份确认。具体的验证过程是:Server端根据自身生成的随机数R2、共享密钥Ki以及选定的签名算法f2计算出自身使用的签名字,然后判断计算出的签名字与所收到的摘要字R2-R是否相等,如果相等,说明认证通过Client端为合法方;否则,说明Server端为非法方。Step 107: the client end sends digital information with the digest word R2_digt to the server end, and the server end can determine that the first message is the message sent by the client end by verifying the received message with the digest word R2_digt, thereby realizing Identification of both parties. The specific verification process is: the server side calculates the signature word used by itself according to the random number R2 generated by itself, the shared key Ki and the selected signature algorithm f2, and then judges the calculated signature word and the received digest word R2 Whether -R is equal, if they are equal, it means that the client side is legal if the authentication is passed; otherwise, it means that the server side is an illegal party.

如果不进行双方身份的确认,Server端就可以省略R2的生成,如此可节省Server端的资源。If the identity of both parties is not confirmed, the generation of R2 can be omitted on the server side, which can save resources on the server side.

在上述方案中,传输密钥master_key的值可以根据需要随时更新或周期性地更新,产生方法也是设定或由随机数生成等等,但安全传输过程与上述步骤完全相同,只是其中用到的传输密钥master_key值不同。In the above scheme, the value of the transmission key master_key can be updated at any time or periodically as needed, and the generation method is also set or generated by random numbers, etc., but the secure transmission process is exactly the same as the above steps, except that the The transfer key master_key values are different.

以AC为Client端,AP为Server端为例进一步说明,在本实施例中,AC、AP之间所选定的加密算法f1和签名算法f2均为MD5算法,AC要将传输密钥master_key发送给AP,实现过程是:Taking the AC as the client end and the AP as the server end as an example to further illustrate, in this embodiment, the encryption algorithm f1 and the signature algorithm f2 selected between the AC and the AP are both MD5 algorithms, and the AC needs to send the transmission key master_key For AP, the implementation process is:

1)AC先随机生成一个随机数R1,然后利用共享密钥Ki、所生成的随机数R1、选定的加密算法MD5,按照公式(7)产生出传输密钥master_key的加密密钥Kc:1) AC first randomly generates a random number R1, and then uses the shared key Ki , the generated random number R1, and the selected encryption algorithm MD5 to generate the encryption key Kc of the transmission key master_key according to formula (7):

             Kc=MD5(Ki,R1)master_key    (7)并且,AC根据所生成的随机数R1、选定的签名算法MD5、计算出的加密密钥Kc,按照公式(8)计算摘要字Digt:Kc=MD5(Ki, R1)master_key (7) And, AC calculates the digest word Digt according to the formula (8) according to the generated random number R1, the selected signature algorithm MD5, and the calculated encryption key Kc:

             Digt=MD5(R1,Kc,master_key)  (8)Digt=MD5(R1, Kc, master_key) (8)

2)AC向AP发送携带有随机数R1、加密密钥Kc以及摘要字Digt的信息{R1,Kc,Digt}。2) AC sends information {R1, Kc, Digt} carrying random number R1, encryption key Kc and digest word Digt to AP.

3)AP收到该信息后,根据自身存储的共享密钥Ki、所收到的随机数R1和加密密钥Kc、选定的加密算法MD5,按照公式(9)计算出接收密钥rec_key,即传输密钥master_key:3) After receiving the information, the AP calculates the receiving key rec_key according to the formula (9) according to the shared key K i stored by itself, the received random number R1 and the encryption key Kc, and the selected encryption algorithm MD5 , that is, transfer key master_key:

         rec_key=MD5(Ki,R1)Kc=master_key  (9)同时,利用所收到的随机数R1和加密密钥Kc、选定的签名算法f2以及计算出的接收密钥rec_key,按照公式(10)计算出自身的签名字Rec_Digt:rec_key=MD5(Ki, R1)Kc=master_key (9) At the same time, using the received random number R1 and encryption key Kc, the selected signature algorithm f2 and the calculated receiving key rec_key, according to the formula (10 ) calculates its own signature Rec_Digt:

         Rec_Digt=MD5(R1,Kc,rec_key)    (10)Rec_Digt=MD5(R1, Kc, rec_key) (10)

4)AP判断自身计算出的签名字Rec_Digt是否与所接收到的摘要字Digt相同,如果相同,即Rec_Digt=Digt,则说明发送过来的信息是个正确的信息。如果不相同,则说明发送的信息错误,结束当前流程或是通知对端重新发送。4) The AP judges whether the signature Rec_Digt calculated by itself is the same as the received digest Digt. If they are the same, that is, Rec_Digt=Digt, it means that the information sent is correct. If they are not the same, it means that the sent information is wrong, end the current process or notify the peer to resend.

然后,AP随机生成一个随机数R2,并根据公式(11)计算用于认证的摘要字R2-R:Then, the AP randomly generates a random number R2, and calculates the digest word R2-R for authentication according to the formula (11):

         R2-R=MD5(Ki,R2,R1,master_key)  (11)  R2-R=MD5(Ki, R2, R1, master_key) (11)

5)AP将信息{R2,R2-R}发送给AC,AC验证R2-R正确,则可以认为master_key已正确发送给AP。5) AP sends the information {R2, R2-R} to AC, and AC verifies that R2-R is correct, then it can be considered that the master_key has been sent to AP correctly.

之后,AC计算用于认证的摘要字,并将计算出的签名字数字信息发送给AP,AP通过验证所收到消息可确定第一条消息是由AC发送的消息,如此即可实现身份确认,有效防止非法方可能的复制攻击。Afterwards, the AC calculates the digest word used for authentication, and sends the calculated signature word digital information to the AP, and the AP can confirm that the first message is sent by the AC by verifying the received message, so that identity confirmation can be realized , effectively preventing possible copying attacks by illegal parties.

其中,所述AC或AP端的验证具体是:AC或AP计算自身使用的签名字,并比较计算出的签名字与所收到的摘要字,如果相同,则说明认证通过,对方为合法方;否则,说明认证失败,对方为非法方。Wherein, the verification at the AC or AP side is specifically: the AC or AP calculates the signature used by itself, and compares the calculated signature with the received digest, if they are the same, it means that the authentication is passed and the other party is a legal party; Otherwise, the authentication fails, and the other party is an illegal party.

在上述过程中,AC可随时或周期性地更新传输密钥master_key值,但安全传输过程与上述步骤完全相同。In the above process, the AC can update the transmission key master_key value at any time or periodically, but the secure transmission process is exactly the same as the above steps.

以上描述的方案,可适用于任意的C-S架构,总之,以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The solutions described above are applicable to any C-S architecture. In a word, the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.

Claims (7)

1、一种安全发送传输密钥的方法,预先在通信双方分别设置共享密钥Ki,其特征在于,该方法进一步包括:1. A method for securely sending a transmission key, in which the shared key K i is respectively set at both communication parties in advance, characterized in that the method further comprises: a.发送端生成随机数R1,然后利用所生成的随机数R1、共享密钥Ki、要发送的传输密钥master_key以及选定的加密算法生成加密密钥Kc,并计算出自身的摘要字;a. The sender generates a random number R1, and then uses the generated random number R1, the shared key K i , the transmission key master_key to be sent, and the selected encryption algorithm to generate an encryption key Kc, and calculates its own digest word ; b.发送端将携带有步骤a计算出的摘要字、所生成的随机数R1和加密密钥Kc的信息发送给接收端;b. The sending end sends the information carrying the digest word calculated in step a, the generated random number R1 and the encryption key Kc to the receiving end; c.接收端收到步骤b所发送的信息后,先根据共享密钥Ki、收到的随机数R1、加密密钥Kc以及选定的加密算法,获得传输密钥master_key;并计算出自身的签名字,然后判断计算出的签名字与所收到的摘要字是否一致,如果是,则所收到信息为正确信息;否则,所收到信息为错误信息。c. After receiving the information sent in step b, the receiving end first obtains the transmission key master_key according to the shared key K i , the received random number R1, the encryption key Kc and the selected encryption algorithm; and calculates its own Signature word, and then judge whether the calculated signature word is consistent with the received digest word, if yes, the received information is correct information; otherwise, the received information is wrong information. 2、根据权利要求1所述的方法,其特征在于,步骤a中所述摘要字根据随机数R1、加密密钥Kc、要发送的传输密钥master_key以及选定的签名字算法计算得出。2. The method according to claim 1, wherein the digest word in step a is calculated based on the random number R1, the encryption key Kc, the transmission key master_key to be sent and the selected signature algorithm. 3、根据权利要求1所述的方法,其特征在于,该方法进一步包括:3. The method according to claim 1, further comprising: d.接收端随机生成一个随机数R2,并计算出用于认证的摘要字R2-R,然后将所生成的随机数R2和计算出的摘要字R2-R发给发送端;d. The receiving end randomly generates a random number R2, and calculates the digest word R2-R for authentication, and then sends the generated random number R2 and the calculated digest word R2-R to the sending end; e.发送端根据接收到的随机数R2、自身生成的加密密钥Kc、选定的签名算法f2以及要发送的传输密钥master_key,计算出自身使用的签名字,然后判断计算出的签名字与所收到的摘要字R2-R是否相等,如果相等,则认证通过对端为合法方,否则,对端为非法方,结束当前认证流程;e. The sender calculates the signature used by itself based on the received random number R2, the encryption key Kc generated by itself, the selected signature algorithm f2, and the transmission key master_key to be sent, and then judges the calculated signature Whether it is equal to the received summary word R2-R, if they are equal, the peer end is the legal party through the authentication, otherwise, the peer end is the illegal party, and the current authentication process ends; f.发送端根据接收到的随机数R2、共享密钥Ki和选定的签名算法f2计算用于认证的摘要字R2_digt,并将该摘要字R2_digt发送给接收端;f. The sending end calculates the digest word R2_digt for authentication according to the received random number R2, the shared key K i and the selected signature algorithm f2, and sends the digest word R2_digt to the receiving end; g.接收端根据自身生成的随机数R2、共享密钥Ki以及选定的签名算法f2计算出自身使用的签名字,然后判断计算出的签名字与所收到的摘要字R2-R是否相等,如果相等,则认证通过端端为合法方,否则,对端为非法方。g. The receiving end calculates the signature word used by itself according to the random number R2 generated by itself, the shared key Ki and the selected signature algorithm f2, and then judges whether the calculated signature word is equal to the received digest word R2-R , if they are equal, the peer end is the legal party through the authentication, otherwise, the peer end is the illegal party. 4、根据权利要求3所述的方法,其特征在于,步骤d所述摘要字根据共享密钥Ki、接收端生成的随机数R2、发送端生成的随机数R1以及选定的签名字算法计算得出;或者根据共享密钥Ki、接收端生成的随机数R2、要发送的传输密钥master_key以及选定的签名字算法计算得出;或是根据共享密钥Ki、接收端生成的随机数R2、发送端生成的随机数R1、要发送的传输密钥master_key以及选定的签名字算法计算得出。4. The method according to claim 3, wherein the digest word in step d is based on the shared key K i , the random number R2 generated by the receiving end, the random number R1 generated by the sending end, and the selected signature algorithm Calculated; or calculated based on the shared key K i , the random number R2 generated by the receiving end, the transmission key master_key to be sent, and the selected signature algorithm; or based on the shared key K i , generated by the receiving end The random number R2 generated by the sender, the random number R1 generated by the sender, the transmission key master_key to be sent, and the selected signature algorithm are calculated. 5、根据权利要求1、2或3所述的方法,其特征在于,所述选定的加密算法为MD5算法。5. The method according to claim 1, 2 or 3, characterized in that the selected encryption algorithm is MD5 algorithm. 6、根据权利要求1、2、3或4所述的方法,其特征在于,所述选定的签名算法为MD5算法。6. The method according to claim 1, 2, 3 or 4, characterized in that the selected signature algorithm is MD5 algorithm. 7、根据权利要求1、3或4所述的方法,其特征在于,所述发送端为客户端,或为服务器端。7. The method according to claim 1, 3 or 4, characterized in that the sending end is a client or a server.
CNB2003101038794A 2003-11-18 2003-11-18 A method for securely sending transmission keys Expired - Fee Related CN100421372C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2003101038794A CN100421372C (en) 2003-11-18 2003-11-18 A method for securely sending transmission keys

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2003101038794A CN100421372C (en) 2003-11-18 2003-11-18 A method for securely sending transmission keys

Publications (2)

Publication Number Publication Date
CN1620005A true CN1620005A (en) 2005-05-25
CN100421372C CN100421372C (en) 2008-09-24

Family

ID=34756825

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003101038794A Expired - Fee Related CN100421372C (en) 2003-11-18 2003-11-18 A method for securely sending transmission keys

Country Status (1)

Country Link
CN (1) CN100421372C (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008065341A2 (en) 2006-12-01 2008-06-05 David Irvine Distributed network system
CN1905436B (en) * 2005-07-28 2010-05-05 北京航空航天大学 Method for ensuring data exchange safety
CN101401465B (en) * 2006-01-24 2010-11-03 英国电讯有限公司 Method and system for recursive authentication in a mobile network
CN101203025B (en) * 2006-12-15 2010-11-10 上海晨兴电子科技有限公司 Method for transmitting and receiving safe mobile message
CN101196973B (en) * 2006-12-04 2011-01-05 华为技术有限公司 A digital copyright protection method and system thereof
CN102075327A (en) * 2010-12-21 2011-05-25 北京握奇数据系统有限公司 Method, device and system for unlocking electronic key
CN102742250A (en) * 2012-03-13 2012-10-17 华为终端有限公司 Secret key transmitting method based on transport layer safety, intelligent meter reading terminal and server
CN101631017B (en) * 2008-07-14 2012-11-28 索尼株式会社 Information processing device, and information processing system
CN103107977A (en) * 2011-11-10 2013-05-15 中兴通讯股份有限公司 Method and system for information secure transmission and access service node
CN103870768A (en) * 2012-12-13 2014-06-18 北京计算机技术及应用研究所 Authentication method and system between disk array and computer or storage medium
CN104980269A (en) * 2014-04-03 2015-10-14 华为技术有限公司 Secret key sharing method, device and system
CN105207772A (en) * 2014-06-12 2015-12-30 纳格拉影像股份有限公司 Cryptographic method for securely exchanging messages and device and system for implementing this method
CN105323060A (en) * 2015-11-05 2016-02-10 同济大学 Encryption method for secure communication based on joint channel and user identification code
CN105512520A (en) * 2015-12-02 2016-04-20 厦门雅迅网络股份有限公司 Anti-cloning vehicle-mounted system and work method thereof
CN105684346A (en) * 2013-09-27 2016-06-15 金雅拓股份有限公司 Method for securing over-the-air communication between a mobile application and a gateway
CN105763331A (en) * 2014-12-19 2016-07-13 北大方正集团有限公司 Data encryption method, device, data decryption method and device
CN105959279A (en) * 2016-04-29 2016-09-21 大连理工大学 Computer information transmission system and method based on encryption processing
CN108183795A (en) * 2017-12-29 2018-06-19 新开普电子股份有限公司 All-purpose card key management method
CN109446752A (en) * 2018-12-13 2019-03-08 苏州科达科技股份有限公司 Rights file management method, system, equipment and storage medium
CN109905405A (en) * 2013-06-24 2019-06-18 黑莓有限公司 Safety method for lawful intercept
CN112118223A (en) * 2020-08-11 2020-12-22 北京智芯微电子科技有限公司 Authentication method of master station and terminal, master station, terminal and storage medium
WO2022021992A1 (en) * 2020-07-31 2022-02-03 深圳市燃气集团股份有限公司 Data transmission method and system based on nb-iot communication, and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997031448A1 (en) * 1996-02-21 1997-08-28 Card Call Service Co., Ltd. Communication method using common key
US6094487A (en) * 1998-03-04 2000-07-25 At&T Corporation Apparatus and method for encryption key generation
CN1338841A (en) * 2000-08-11 2002-03-06 海南格方网络安全有限公司 Intelligent key for security authentication of computer

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1905436B (en) * 2005-07-28 2010-05-05 北京航空航天大学 Method for ensuring data exchange safety
CN101401465B (en) * 2006-01-24 2010-11-03 英国电讯有限公司 Method and system for recursive authentication in a mobile network
EP2472430A1 (en) 2006-12-01 2012-07-04 David Irvine Self encryption
WO2008065341A2 (en) 2006-12-01 2008-06-05 David Irvine Distributed network system
CN101196973B (en) * 2006-12-04 2011-01-05 华为技术有限公司 A digital copyright protection method and system thereof
CN101203025B (en) * 2006-12-15 2010-11-10 上海晨兴电子科技有限公司 Method for transmitting and receiving safe mobile message
CN101631017B (en) * 2008-07-14 2012-11-28 索尼株式会社 Information processing device, and information processing system
CN102075327A (en) * 2010-12-21 2011-05-25 北京握奇数据系统有限公司 Method, device and system for unlocking electronic key
CN102075327B (en) * 2010-12-21 2013-04-24 北京握奇数据系统有限公司 Method, device and system for unlocking electronic key
CN103107977A (en) * 2011-11-10 2013-05-15 中兴通讯股份有限公司 Method and system for information secure transmission and access service node
CN102742250A (en) * 2012-03-13 2012-10-17 华为终端有限公司 Secret key transmitting method based on transport layer safety, intelligent meter reading terminal and server
WO2013134927A1 (en) * 2012-03-13 2013-09-19 华为终端有限公司 Transport layer security-based key delivery method, smart meter reading terminal and server
CN102742250B (en) * 2012-03-13 2015-01-28 华为终端有限公司 Secret key transmitting method based on transport layer safety, intelligent meter reading terminal and server
CN103870768A (en) * 2012-12-13 2014-06-18 北京计算机技术及应用研究所 Authentication method and system between disk array and computer or storage medium
CN109905405A (en) * 2013-06-24 2019-06-18 黑莓有限公司 Safety method for lawful intercept
CN109905405B (en) * 2013-06-24 2021-10-22 黑莓有限公司 Security method for lawful interception
US11032324B2 (en) 2013-06-24 2021-06-08 Blackberry Limited Securing method for lawful interception
US11943262B2 (en) 2013-06-24 2024-03-26 Malikie Innovations Limited Securing method for lawful interception
CN105684346A (en) * 2013-09-27 2016-06-15 金雅拓股份有限公司 Method for securing over-the-air communication between a mobile application and a gateway
CN105684346B (en) * 2013-09-27 2019-11-19 金雅拓股份有限公司 Method for securing over-the-air communications between mobile applications and gateways
CN104980269A (en) * 2014-04-03 2015-10-14 华为技术有限公司 Secret key sharing method, device and system
CN105207772B (en) * 2014-06-12 2018-08-10 纳格拉影像股份有限公司 It safely exchanges the encryption method of message and realizes the equipment and system of this method
CN105207772A (en) * 2014-06-12 2015-12-30 纳格拉影像股份有限公司 Cryptographic method for securely exchanging messages and device and system for implementing this method
CN105763331A (en) * 2014-12-19 2016-07-13 北大方正集团有限公司 Data encryption method, device, data decryption method and device
CN105323060A (en) * 2015-11-05 2016-02-10 同济大学 Encryption method for secure communication based on joint channel and user identification code
CN105512520B (en) * 2015-12-02 2020-09-11 厦门雅迅网络股份有限公司 An anti-cloning vehicle system and its working method
CN105512520A (en) * 2015-12-02 2016-04-20 厦门雅迅网络股份有限公司 Anti-cloning vehicle-mounted system and work method thereof
CN105959279A (en) * 2016-04-29 2016-09-21 大连理工大学 Computer information transmission system and method based on encryption processing
CN108183795A (en) * 2017-12-29 2018-06-19 新开普电子股份有限公司 All-purpose card key management method
CN109446752A (en) * 2018-12-13 2019-03-08 苏州科达科技股份有限公司 Rights file management method, system, equipment and storage medium
WO2022021992A1 (en) * 2020-07-31 2022-02-03 深圳市燃气集团股份有限公司 Data transmission method and system based on nb-iot communication, and medium
CN112118223A (en) * 2020-08-11 2020-12-22 北京智芯微电子科技有限公司 Authentication method of master station and terminal, master station, terminal and storage medium

Also Published As

Publication number Publication date
CN100421372C (en) 2008-09-24

Similar Documents

Publication Publication Date Title
CN1620005A (en) Method of safety transmitting key
CN109559122B (en) Block chain data transmission method and block chain data transmission system
US8254581B2 (en) Lightweight key distribution and management method for sensor networks
US7350069B2 (en) System and method which employs a multi user secure scheme utilizing shared keys
KR102304831B1 (en) Encryption systems and method using permutaion group based cryptographic techniques
CN1846397A (en) Two-factor authenticated key exchange method and authentication method using the same, and recording medium storing program including the same
CN1864384A (en) System and method for protecting network management frames
CN1186580A (en) Method for computer-aided key exchange between user computer equipment U and network computer equipment N
CN114339735B (en) Method for authenticating anonymous access of world integrated network based on NTRU
CN1280727A (en) Security of data connections
CN1312991A (en) Seque processing for authentication of wireless communications device
CN1132479C (en) Authentication methods for cellular communicaltions systems
CN101039180A (en) Method and system for generating and transmitting key
CN110048849B (en) Multi-layer protection session key negotiation method
CN120200750B (en) Secure communication system and method for vehicle-mounted ad hoc networks based on NTRU lattice cryptography
CN1564509A (en) Key consaltation method in radio LAN
CN1297107C (en) Key distribution method based on preshared key
CN103795728A (en) EAP authentication method capable of hiding identities and suitable for resource-constrained terminal
CN1905436A (en) Method for ensuring data exchange safety
CN118337386B (en) Network security communication method, storage medium, device and computer program product based on improved enhanced quantum security encryption algorithm
CN1770681A (en) Conversation key safety distributing method under wireless environment
CN1668000A (en) Authentication and encryption method for wireless network
CN1571407A (en) A safety authentication method based on media gateway control protocol
CN100344208C (en) Identification method for preventing replay attack
CN1555151A (en) Method for secret communication of embedded equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080924

Termination date: 20131118