WO2019153110A1 - 一种传输密钥的方法、接收终端和分发终端 - Google Patents

一种传输密钥的方法、接收终端和分发终端 Download PDF

Info

Publication number
WO2019153110A1
WO2019153110A1 PCT/CN2018/075367 CN2018075367W WO2019153110A1 WO 2019153110 A1 WO2019153110 A1 WO 2019153110A1 CN 2018075367 W CN2018075367 W CN 2018075367W WO 2019153110 A1 WO2019153110 A1 WO 2019153110A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
transmission
authentication
terminal
receiving terminal
Prior art date
Application number
PCT/CN2018/075367
Other languages
English (en)
French (fr)
Inventor
唐胤曦
徐永标
Original Assignee
福建联迪商用设备有限公司
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 福建联迪商用设备有限公司 filed Critical 福建联迪商用设备有限公司
Priority to CN201880000100.0A priority Critical patent/CN108323230B/zh
Priority to PCT/CN2018/075367 priority patent/WO2019153110A1/zh
Publication of WO2019153110A1 publication Critical patent/WO2019153110A1/zh

Links

Classifications

    • 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/3271Cryptographic 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 challenge-response
    • H04L9/3273Cryptographic 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 challenge-response for mutual authentication
    • 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)
    • 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/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
    • 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
    • H04L9/3242Cryptographic 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 involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • 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/56Financial cryptography, e.g. electronic payment or e-cash

Definitions

  • the present invention relates to the field of data processing, and in particular, to a method for transmitting a key, a receiving terminal, and a distribution terminal.
  • the electronic payment system includes components such as terminal equipment, acquiring platform and bank core system.
  • MK/SK Master Key/Session Key
  • the electronic payment system includes components such as terminal equipment, acquiring platform and bank core system.
  • MK/SK Master Key/Session Key
  • the electronic payment system is completed.
  • the POS Point of Sale, POS
  • the principle of the terminal device protecting transaction sensitive information is as follows: In the MK/SK key system, the POS and the acquiring platform are required to pre-synchronize the MK, and then the payment transaction terminal passes the check-in.
  • the effective mode synchronizes the SK key with the acquiring system.
  • the terminal encrypts the personal identification code through the PIK (PIN Key) key in the SK, and uses the MAK (MAC Key) in the SK to perform MAC operation on the transaction message. Ensure that the transaction is not tampered with and complete.
  • a master key MK needs to be pre-synchronized into the terminal device.
  • the POS is required to download the MK to the device through the physical connection in the security room. That is, the terminal administrator downloads the MK in the key POS directly to the sub-POS through the serial communication mode in the security room area.
  • Disadvantage 1 In the security room, the key is downloaded to the POS through the serial communication method, and the POS is required to be sent to the security room in a unified manner. A large amount of manpower is required to complete the injection of the MK, which greatly increases the operation and maintenance cost of the POS device.
  • Disadvantage 2 The factory terminal equipment should be sent to the terminal key management organization to complete the terminal key injection work, and then sent to the actual user of the terminal, which causes huge expenses for the business development, including time cost and manpower. Costs, etc., while slowing down the pace of business expansion.
  • Disadvantage 3 In the traditional way, the POS is required to directly download the MK to the device through the physical mode in the security room. The cost of the operation and maintenance of the fixed MK is very large. To save the business cost, some customers will skip the transaction. In the long run, this will pose a threat to the security of MK keys in POS devices.
  • the technical problem to be solved by the present invention is how to improve the efficiency of remote transmission of keys.
  • the technical solution adopted by the present invention is:
  • the invention provides a method for transmitting a key, comprising:
  • S1 Obtain a first authentication packet according to the unique identifier of the receiving terminal and the first random string.
  • the first authentication packet is sent to the distribution terminal, so that the distribution terminal verifies the legality of the receiving terminal according to the first authentication packet.
  • the second authentication message includes a unique identifier of the distribution terminal. Two random strings, a second MAC value, and a specific key ciphertext;
  • the present invention also provides a receiving terminal comprising one or more first processors and a first memory, the first memory storing a program and configured to perform the following steps by the one or more first processors :
  • S1 Obtain a first authentication packet according to the unique identifier of the receiving terminal and the first random string.
  • the first authentication packet is sent to the distribution terminal, so that the distribution terminal verifies the legality of the receiving terminal according to the first authentication packet.
  • the second authentication message includes a unique identifier of the distribution terminal. Two random strings, a second MAC value, and a specific key ciphertext;
  • the invention further provides a method for transmitting a key, comprising:
  • the second verification result includes a verification pass and a verification fail
  • the first authentication message includes a unique identifier of the receiving terminal, a first random string and a first MAC value
  • the receiving terminal After the second authentication packet is sent to the receiving terminal, so that the second authentication packet is verified by the legality of the receiving terminal, the receiving terminal acquires the specific key ciphertext.
  • the present invention further provides a distribution terminal comprising one or more second processors and a second memory, the second memory storing a program and configured to perform the following steps by the one or more second processors :
  • the second verification result includes a verification pass and a verification fail
  • the first authentication message includes a unique identifier of the receiving terminal, a first random string and a first MAC value
  • the receiving terminal After the second authentication packet is sent to the receiving terminal, so that the second authentication packet is verified by the legality of the receiving terminal, the receiving terminal acquires the specific key ciphertext.
  • the beneficial effects of the present invention are: only after the authentication information sent by the receiving terminal passes the verification by the distribution terminal, the distribution terminal transmits its own identity information and the specific key ciphertext to be distributed to the receiving terminal that passes the identity authentication; the receiving terminal The authenticity of the identity of the distribution terminal is verified according to the authentication packet sent by the distribution terminal. Only after the identity verification of the distribution terminal passes, the receiving terminal takes out the specific key ciphertext carried in the authentication packet and performs corresponding processing. Different from the conventional two-way identity authentication, the reliable transmission mode for transmitting important information is transmitted.
  • the present invention directly sends the information of the identity of the identifiable distribution terminal together with the specific key ciphertext to be distributed to the receiving terminal that has passed the identity authentication.
  • the authenticity of the distribution terminal is transmitted while the important key is transmitted. Since the receiving terminal has passed the identity authentication, the distribution terminal does not have the possibility of transmitting the important data to the unauthorized terminal. Therefore, the second authentication report issued by the distribution terminal The security is provided, and the receiving terminal processes the important data carried in the second packet after verifying the validity of the second authentication packet, which can effectively avoid the situation in which the malicious code sent by the unauthorized terminal is triggered. It is beneficial to ensure the security and reliability of the receiving terminal. Therefore, the method for remotely transmitting a key provided by the present invention simplifies the transmission process and improves the efficiency of remote transmission of the key while transmitting the important key securely and reliably.
  • FIG. 1 is a flow chart of a specific implementation manner of a method for transmitting a key according to the present invention
  • FIG. 2 is a structural block diagram of a specific implementation manner of a receiving terminal according to the present invention.
  • FIG. 3 is a flow chart of a specific implementation manner of a method for transmitting a key according to another embodiment of the present invention.
  • FIG. 4 is a structural block diagram of a specific implementation manner of a distribution terminal according to another embodiment of the present invention.
  • a first processor 2. a first memory; 3. a second processor; 4. a second memory.
  • the key idea of the present invention is that the present invention directly transmits the information of the identity of the identifiable distribution terminal together with the specific ciphertext to be distributed to the receiving terminal that has passed the identity authentication, and ensures the security of the ciphertext security of the specific key. Under the premise of simplifying the transmission process and improving the efficiency of the transmission key.
  • the present invention provides a method for transmitting a key, including:
  • S1 Obtain a first authentication packet according to the unique identifier of the receiving terminal and the first random string.
  • the first authentication packet is sent to the distribution terminal, so that the distribution terminal verifies the legality of the receiving terminal according to the first authentication packet.
  • the second authentication message includes a unique identifier of the distribution terminal. Two random strings, a second MAC value, and a specific key ciphertext;
  • S1 is specifically:
  • the transmission authentication key is unique
  • the 8-byte random string is authenticated differently from the prior art, and the present invention randomly generates a 16-byte string and performs complex MAC operations on the random string, and only one transmission authentication is performed on one receiving terminal.
  • the key, whose transmission authentication key is unique, is therefore difficult for the unauthorized terminal to crack the authentication method, effectively improving the effectiveness of the two-way authentication between the receiving terminal and the distribution terminal, thereby improving the security of the remote key transmission.
  • S3 is specifically:
  • the transmission authentication key is unique
  • the first verification result is set to be verified.
  • the receiving terminal verifies the validity of the second authentication packet by using only the authorized distribution terminal and the transmission authentication key of the current receiving terminal, thereby effectively improving the receiving.
  • the effectiveness of mutual authentication between the terminal and the distribution terminal improves the security of remote key transmission.
  • the transmission key management terminal synchronizes the transmission authentication key for authenticating the identity of the authorized receiving terminal with the transmission encryption key for decrypting the specific key ciphertext to the authorized distribution.
  • the terminal enables a specific key to be securely transmitted between the authorized receiving terminal and the authorized distribution terminal.
  • the specific key plaintext is written to the security chip.
  • the security chip is a device with a financial function for storing a key with high security.
  • the receiving terminal of the present invention will only use a specific key after verifying the legitimacy of a specific key source. It is stored in the security chip, which effectively avoids storing malicious code in the security chip and improves the security and reliability of the security chip.
  • the present invention further provides a receiving terminal including one or more first processors 1 and a first memory 2, wherein the first memory 2 stores a program and is configured to be configured by the one or The plurality of first processors 1 perform the following steps:
  • S1 Obtain a first authentication packet according to the unique identifier of the receiving terminal and the first random string.
  • the first authentication packet is sent to the distribution terminal, so that the distribution terminal verifies the legality of the receiving terminal according to the first authentication packet.
  • the second authentication message includes a unique identifier of the distribution terminal. Two random strings, a second MAC value, and a specific key ciphertext;
  • S1 is specifically:
  • the transmission authentication key is unique
  • S3 is specifically:
  • the transmission authentication key is unique
  • the first verification result is set to be verified.
  • the specific key plaintext is written to the security chip.
  • the present invention further provides a method for transmitting a key, including:
  • the second verification result includes a verification pass and a verification fail
  • the first authentication message includes a unique identifier of the receiving terminal, a first random string and a first MAC value
  • the receiving terminal After the second authentication packet is sent to the receiving terminal, so that the second authentication packet is verified by the legality of the receiving terminal, the receiving terminal acquires the specific key ciphertext.
  • S1 is specifically:
  • the transmission authentication key is unique
  • the second verification result is set to be verified.
  • the second authentication packet is obtained according to the unique identifier of the distribution terminal, the second random string, and the preset specific ciphertext, specifically:
  • the transmission authentication key is unique
  • the present invention further provides a distribution terminal including one or more second processors 3 and a second memory 4, the second memory 4 storing a program and configured to be configured by the one or The plurality of second processors 3 perform the following steps:
  • the second verification result includes a verification pass and a verification fail
  • the first authentication message includes a unique identifier of the receiving terminal, a first random string and a first MAC value
  • the receiving terminal After the second authentication packet is sent to the receiving terminal, so that the second authentication packet is verified by the legality of the receiving terminal, the receiving terminal acquires the specific key ciphertext.
  • S1 is specifically:
  • the transmission authentication key is unique
  • the second verification result is set to be verified.
  • the second authentication packet is obtained according to the unique identifier of the distribution terminal, the second random string, and the preset specific ciphertext, specifically:
  • the transmission authentication key is unique
  • Embodiment 1 of the present invention is:
  • This embodiment provides a method for transmitting a key, including:
  • the receiving terminal generates a transmission authentication key and a transmission encryption key; the transmission authentication key is unique; the transmission encryption key is unique;
  • the distribution terminal acquires a transmission authentication key corresponding to one or more receiving terminals from the transmission key management terminal to obtain a transmission authentication key set; each transmission authentication key in the transmission authentication key set is unique; the distribution terminal The transport key management terminal acquires a transport encryption key corresponding to one or more distribution terminals to obtain a transport encryption key set; each transport encryption key in the transport encryption key set is unique.
  • the receiving terminal is a POS machine.
  • the preliminary deployment includes preparations for the following aspects:
  • the embodiment needs to preset the same symmetric key between the receiving terminal and the distribution terminal for identity legality authentication and decrypting the specific key ciphertext, and the embodiment adopts a one-machine-one-secret solution, that is, different receiving terminals.
  • the transmission authentication key and the transmission encryption key are different. Therefore, a transmission key management terminal is needed to collect, translate, and transmit the TK key, wherein the TK key includes TK-AUK (transmission authentication key) Key) and TK-TEK (transport encryption key).
  • More than one receiving terminal transmits its own TK key to the transmission key management terminal.
  • the receiving terminal generates a plain TK key plaintext, and obtains a public key from the transport key management terminal, and then the receiving terminal obtains the TK key ciphertext by using the public key to encrypt the TK key plaintext, and uploads the ciphertext to the transport key.
  • Management terminal The TK is encrypted by the public key to ensure the security of the TK transmission process.
  • a PK key (Protect Key) for encrypting the transmitted TK key information
  • the MAK key (MAC Key) is used to calculate the MAC value corresponding to the key information of the TK to verify the integrity of the TK key information.
  • the management process of the transmission key management terminal is periodically checked, and sent to the distribution terminal by the mail setting received by the client;
  • the management process of the transmission key management terminal periodically checks and sends the FTP/SFTP settings received by the client to the distribution terminal.
  • the receiving terminal obtains the first authentication packet according to the unique identifier of the receiving terminal and the first random string. Specifically:
  • the receiving terminal randomly generates a string of 16 bytes or more to obtain a first random string
  • the transmission authentication key is unique
  • the receiving terminal encapsulates the unique identifier of the receiving terminal, the first random character string, and the first MAC value, to obtain a first authentication packet.
  • the unique transmission authentication key generated by the receiving terminal itself is TK-AUK, and the TK-AUK is used to perform MAC operation on the data consisting of the unique identifier of the receiving terminal and the first random character string, so that only the transit key is transmitted.
  • the distribution terminal that manages terminal authentication can calculate the first MAC value.
  • the algorithm of the MAC operation is an X9.19 algorithm.
  • the symmetric key algorithm generally uses the X9.9 or X9.19 algorithm for MAC operations, while the X9.19 algorithm with X9.9 is more complex and more difficult to crack.
  • the receiving terminal sends the first authentication packet to the distribution terminal, so that the distribution terminal verifies the legality of the receiving terminal according to the first authentication packet.
  • the distribution terminal verifies the first authentication packet from the receiving terminal, and obtains a second verification result.
  • the second verification result includes the verification pass and the verification fail.
  • the distribution terminal acquires a first authentication message from the receiving terminal
  • the distribution terminal acquires a transmission authentication key; the transmission authentication key is unique;
  • the distribution terminal performs MAC operation on the unique identifier of the receiving terminal and the first random character string carried in the first authentication packet according to the transmission authentication key, to obtain a fourth MAC value;
  • the distribution terminal sets the second verification result as verification pass.
  • the distribution terminal acquires the transmission authentication key TK-AUK corresponding to the receiving terminal from the transmission authentication key set according to the unique identifier of the receiving terminal in the first authentication packet, and the transmission authentication key adopted by the authorized distribution terminal
  • the key is the same as the receiving terminal, so the MAC value obtained by performing MAC operation on the same data information is the same.
  • the terminal that receives the first authentication message is an unauthorized terminal, since the unauthorized terminal does not know the transmission authentication key TK-AUK, it cannot obtain the same MAC value and cannot pass the authentication.
  • the initial value of the MAC operation is the unique identifier of the receiving terminal and the 16 direct random string. The randomness of the initial value is strong and very complicated, and it is difficult for the unauthorized terminal to obtain the first MAC value by means of brute force attack. The reliability is higher.
  • the distribution terminal obtains the second authentication message according to the unique identifier of the distribution terminal, the second random character string, and the preset specific key ciphertext. Specifically:
  • the distribution terminal randomly generates a string of 16 bytes or more to obtain a second random string
  • the distribution terminal acquires a transmission authentication key; the transmission authentication key is unique;
  • the distribution terminal performs MAC operation on the unique identifier of the distribution terminal and the second random character string according to the transmission authentication key to obtain a second MAC value;
  • the distribution terminal encapsulates the unique identifier of the distribution terminal, the second random string, and the second MAC value, to obtain a second authentication packet.
  • the distribution terminal uses the transmission authentication key TK-AUK to perform MAC operation on the data consisting of the unique identifier of the distribution terminal and the second plaintext. Since the embodiment uses one machine and one secret, only the receiving terminal that has been authenticated by the distribution terminal is used. The second authentication packet can be authenticated effectively. If the distribution terminal misroutes the second authentication certificate to another authorized receiving terminal, the authentication terminal cannot pass the authentication, and the distribution terminal does not receive the request for the distribution key.
  • the distribution terminal performs encryption processing on the specific key MK using the CBC mode of the transmission encryption keys TK-TEK and 3DES corresponding to the receiving terminal.
  • the second authentication message further includes a key attribute and a method of using the key.
  • the key attribute flag key type such as DES, 3DES
  • the receiving terminal confirms the key encryption and decryption algorithm according to the key attribute; the usage mode of the key indicates the use of the key and the storage area, and the receiving terminal can perform the key Classification can limit access to programs that are not available on the receiving terminal, and the program only allows access to specific categories of keys.
  • the distribution terminal sends the second authentication packet to the receiving terminal, so that the receiving terminal obtains the specific key ciphertext after the second authentication packet is verified by the legality of the receiving terminal. .
  • the receiving terminal verifies the second authentication packet from the distribution terminal, to obtain a first verification result; the first verification result includes a verification pass and the verification fails; the second authentication message includes a unique identifier of the distribution terminal. a second random string, a second MAC value, and a specific key ciphertext. Specifically:
  • the receiving terminal performs MAC operation on the unique identifier of the distribution terminal and the second random character string carried in the second authentication packet according to the transmission authentication key, to obtain a third MAC value;
  • the receiving terminal sets the first verification result as the verification pass.
  • the receiving terminal decrypts the specific key ciphertext to obtain a specific key plaintext; and the receiving terminal writes the specific key plaintext to the security chip.
  • the present embodiment adopts a preset symmetric key scheme for mutual authentication, and the distribution terminal and the receiving terminal pre-synchronize the TK-AUK key, and both parties verify the authentication information of the other party by using the MAC encryption method of the X9.19 algorithm. Since TK-AUK is one machine and one secret, as long as both parties have passed MAC authentication, the two-way authentication is completed, which is the guarantee of the validity of the remote key distribution scheme.
  • the core secret content in this scheme is a specific key MK distributed by the distribution terminal.
  • the distribution terminal organizes the distributed key block by using an effective and reliable method, and invokes the application service of the hardware encryption machine to encrypt the MK key by TK-TEK, and the TK-TEK is one machine and one secret, only the distribution terminal and the corresponding
  • the receiving terminal holds the transmission encryption key, and the third party cannot directly obtain the MK key body. It can be seen that the distribution of the MK key satisfies the confidentiality requirement.
  • TK-TEK is randomly generated by the POS, and then sent to the transmission key management terminal through a secure and reliable method, and then synchronized to the distribution terminal by the transmission encryption key agreed between the transmission key management terminal and the distribution terminal, and the distribution terminal After receiving the TK and storing the encryption key locally, it can be seen that the TK-TEK meets the confidentiality requirements from generation, transmission, and storage. In summary, the generation, processing, transmission, and storage of key distributions meet confidentiality requirements.
  • This scheme adopts the method of MAC encryption operation to ensure the integrity and certifiability of the transmitted data.
  • both parties use the TK-AUK to perform the MAC encryption operation of the X9.19 algorithm on the key information in the exchange message, and the TK-AUK is one machine and one secret, and only the same TK-AUK is held. It is possible to pass the MAC check. It can be seen that the transmission data of the scheme has the characteristics of integrity and certifiability.
  • Embodiment 2 of the present invention is:
  • the embodiment provides a receiving terminal including one or more first processors 1 and a first memory 2, the first memory 2 storing a program and configured to be configured by the one or more first processors 1 Perform the following steps:
  • S2 Obtain a first authentication packet according to the unique identifier of the receiving terminal and the first random string; specifically:
  • the transmission authentication key is unique
  • the second authentication message includes a unique identifier of the distribution terminal. Two random strings, a second MAC value, and a specific key ciphertext; specifically:
  • the transmission authentication key is unique
  • the first verification result is set to be verified.
  • This embodiment provides a method for transmitting a key, including:
  • S1 Obtain a transmission authentication key corresponding to one or more receiving terminals from the transmission key management terminal, to obtain a transmission authentication key set; each transmission authentication key in the transmission authentication key set is unique;
  • the second verification result includes the verification pass and the verification fail
  • the first authentication message includes a unique identifier of the receiving terminal, The first random string and the first MAC value; specifically:
  • the transmission authentication key is unique
  • the second verification result is set to be verified.
  • the second authentication packet is obtained according to the unique identifier of the distribution terminal, the second random character string, and the preset specific key ciphertext; specifically:
  • the transmission authentication key is unique
  • the receiving terminal After the second authentication packet is sent to the receiving terminal, so that the second authentication packet is verified by the legality of the receiving terminal, the receiving terminal acquires the specific key ciphertext.
  • the present invention provides a method for remotely transmitting a key, a receiving terminal, and a distribution terminal, which are different from the conventional two-party identity authentication, and then transmit a reliable transmission mode of important information.
  • the present invention directly verifies the distribution terminal.
  • the identity information is sent to the receiving terminal that has passed the identity authentication together with the specific key ciphertext to be distributed, and the important key is transmitted while authenticating the distribution terminal's legality. Since the receiving terminal has passed the identity authentication, the distribution terminal does not exist. The possibility of transmitting the important data to the unauthorized terminal. Therefore, the second authentication message sent by the distribution terminal is secure, and the receiving terminal checks the validity of the second authentication message before the second message.
  • the method for remotely transmitting a key provided by the present invention simplifies the transmission process and improves the efficiency of remote transmission of the key while transmitting the important key securely and reliably.
  • the 8-byte random string is authenticated differently from the prior art, and the present invention randomly generates a 16-byte character string and performs complex MAC operations on the random string, and only one transmission authentication key is received by one receiving terminal.
  • the transmission authentication key is unique.
  • the unauthorized terminal to crack the authentication method, which effectively improves the effectiveness of the two-way authentication between the receiving terminal and the distribution terminal, thereby improving the security of the remote key transmission.
  • the receiving terminal verifies the validity of the second authentication packet by using only the authorized distribution terminal and the transmission authentication key of the current receiving terminal, thereby effectively improving the receiving terminal and
  • the effectiveness of mutual authentication between distribution terminals increases the security of remote key transmission.
  • the transport key management terminal synchronizes the transport authentication key used for authenticating the identity of the authorized receiving terminal with the transport encryption key for decrypting the specific key ciphertext to the authorized distribution terminal, A specific key can be securely transmitted between the authorized receiving terminal and the authorized distribution terminal.
  • the security chip is a device with a financial function for storing a security key with a high security.
  • the receiving terminal of the present invention stores the specific key only after verifying the legitimacy of the specific key source.
  • the malicious code is effectively stored in the security chip, which improves the security and reliability of the security chip.

Abstract

本发明涉及数据处理领域,尤其涉及一种远程传输密钥的方法、接收终端和分发终端。本发明通过根据接收终端的唯一标识和第一随机字符串得到第一认证报文;发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性;验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。实现提高远程传输密钥的效率。

Description

一种传输密钥的方法、接收终端和分发终端 技术领域
本发明涉及数据处理领域,尤其涉及一种传输密钥的方法、接收终端和分发终端。
背景技术
随着电子支付产业的迅速发展,比如银行卡支付、消费卡支付、行业卡支付以及其它借由网络的电子支付技术,以其快捷方便的特点越来越受到人们的欢迎。
电子支付系统包括终端设备、收单平台和银行核心系统等组成部分。为了确保支付过程中消费者个人敏感信息的安全性,要求对交易过程中对个人敏感信息进行加密处理,主要通过主密钥/工作密钥(Master Key/Session Key, MK/SK)的密钥体系来完成。以POS(Point of Sale,POS)的消费交易为例,终端设备保护交易敏感信息的原理如下:在MK/SK密钥体系中,要求POS与收单平台预先同步MK,随后支付交易终端通过签到等有效方式与收单系统同步SK密钥,终端通过SK中的PIK(PIN Key)密钥对个人识别码进行加密处理,使用SK中的MAK(MAC Key)对交易报文进行MAC运行,以保证交易不被篡改且完整。
在MK/SK密钥系统中,需要将一个主密钥MK预先同步到终端设备中。传统上,要求POS在安全房中通过物理连接方式下载MK到设备中,即终端管理员在安全房区域中,通过串口通讯的方式,将密钥母POS中的MK直接下载到子POS中。
但是,这种传统的将MK密钥同步至POS终端的方法存在以下几个缺点:
缺点1:在安全房中,通过串口通讯方式下载密钥到POS中,要求POS统一送到安全房中,需要大量的人力来完成MK的注入,大大增加了POS设备的运维成本。
缺点2:出厂的终端设备应先送往终端密钥管理机构,完成终端密钥注入工作后,再重新发往终端的实际使用方,这对业务开展造成了巨大的开销,包括时间成本和人力成本等,同时减缓了业务扩展的速度。
缺点3:由于传统方式中,要求POS在安全房中通过物理方式,直接下载MK到设备中,固MK定期更换的事务运维成本巨大,为节约业务成本,有些客户会略去该事务,而长期而言,这将对POS设备中的MK密钥安全造成威胁。
技术问题
本发明所要解决的技术问题是:如何提高远程传输密钥的效率。
技术解决方案
为了解决上述技术问题,本发明采用的技术方案为:
本发明提供一种传输密钥的方法,包括:
S1、根据接收终端的唯一标识和第一随机字符串得到第一认证报文;
S2、发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性;
S3、验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;
S4、当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。
本发明还提供一种接收终端,包括一个或多个第一处理器及第一存储器,所述第一存储器存储有程序,并且被配置成由所述一个或多个第一处理器执行以下步骤:
S1、根据接收终端的唯一标识和第一随机字符串得到第一认证报文;
S2、发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性;
S3、验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;
S4、当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。
本发明另提供一种传输密钥的方法,包括:
S1、验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过;所述第一认证报文包括所述接收终端的唯一标识符、第一随机字符串和第一MAC值;
S2、当所述第二验证结果为验证通过时,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文;
S3、发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
本发明再提供一种分发终端,包括一个或多个第二处理器及第二存储器,所述第二存储器存储有程序,并且被配置成由所述一个或多个第二处理器执行以下步骤:
S1、验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过;所述第一认证报文包括所述接收终端的唯一标识符、第一随机字符串和第一MAC值;
S2、当所述第二验证结果为验证通过时,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文;
S3、发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
有益效果
本发明的有益效果在于:只有当接收终端发送的认证信息通过分发终端的验证后,分发终端才将自身的身份信息以及需要分发的特定密钥密文发送至通过身份认证的接收终端;接收终端先根据分发终端发送的认证报文验证分发终端的身份合法性,只有当分发终端的身份验证通过后,接收终端才将认证报文中携带的特定密钥密文取出,进行相应的处理。区别于常规的双方身份认证通过后才传输重要信息的可靠传输方式,本发明直接将可验证分发终端身份的信息和待分发的特定密钥密文一起发送至已通过身份认证的接收终端,在认证分发终端身法合法性的同时传递重要密钥,由于接收终端已通过身份认证,分发终端不存在将重要数据传输至非授权终端的可能性,因此,分发终端所下发的第二认证报文具有安全性,并且,接收终端在验证第二认证报文的合法性后才对第二报文中所携带的重要数据进行处理,可有效避免触发非授权的终端发送的恶意代码的情况,有利于保障接收终端的安全性和可靠性。因此,本发明所提供的远程传输密钥的方法,在安全可靠地远程传输重要密钥的同时,简化了传输的流程,提高了远程传输密钥的效率。
附图说明
图1为本发明提供的一种传输密钥的方法的具体实施方式的流程框图;
图2为本发明还提供的一种接收终端的具体实施方式的结构框图;
图3为本发明另提供的一种传输密钥的方法的具体实施方式的流程框图;
图4为本发明再提供的一种分发终端的具体实施方式的结构框图;
标号说明:
1、第一处理器;2、第一存储器;3、第二处理器;4、第二存储器。
本发明的最佳实施方式
在此处键入本发明的最佳实施方式描述段落。
本发明的实施方式
本发明的关键构思在于:本发明直接将可验证分发终端身份的信息和待分发的特定密钥密文一起发送至已通过身份认证的接收终端,在保证传输特定密钥密文安全性可靠性的前提下简化了传输流程,提高了传输密钥的效率。
请参照图1至图4,
如图1所示,本发明提供一种传输密钥的方法,包括:
S1、根据接收终端的唯一标识和第一随机字符串得到第一认证报文;
S2、发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性;
S3、验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;
S4、当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。
进一步地,所述S1具体为:
随机生成16字节以上的字符串,得到第一随机字符串;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述接收终端的唯一标识和所述第一随机字符串进行MAC运算,得到第一MAC值;
封装所述接收终端的唯一标识、所述第一随机字符串和所述第一MAC值,得到第一认证报文。
由上述描述可知,区别于现有技术对8字节随机字符串进行认证,本发明随机生成16字节的字符串,并对随机字符串进行复杂的MAC运算,并且一个接收终端只有一个传输认证密钥,其传输认证密钥具有唯一性,因此,非授权终端难以破解认证方法,有效提高了接收终端和分发终端之间双向认证的有效性,从而提高了远程密钥传输的安全性。
进一步地,所述S3具体为:
获取来自所述分发终端的第二认证报文;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述第二认证报文中携带的分发终端的唯一标识和第二随机字符串进行MAC运算,得到第三MAC值;
当所述第二MAC值和所述第三MAC值相同时,设置所述第一验证结果为验证通过。
由上述描述可知,接收终端获取来自分发终端的第二认证报文后,通过只有授权的分发终端和当前的接收终端具有的传输认证密钥验证第二认证报文的合法性,有效提高了接收终端和分发终端之间双向认证的有效性,从而提高了远程密钥传输的安全性。
进一步地,还包括:
生成传输认证密钥和传输加密密钥;所述传输认证密钥具有唯一性;所述传输加密密钥具有唯一性;
发送所述传输认证密钥和所述传输加密密钥至传输密钥管理终端,以使传输密钥管理终端同步所述传输认证密钥和所述传输加密密钥至所述分发终端。
由上述描述可知,由上述描述可知,通过传输密钥管理终端将授权的接收终端中用于认证身份合法性的传输认证密钥和解密特定密钥密文的传输加密密钥同步至授权的分发终端,使得授权的接收终端和授权的分发终端之间可安全地传输特定密钥。
进一步地,还包括:
将所述特定密钥明文写入安全芯片。
由上述描述可知,安全芯片是具有金融功能的终端用于存储重要密钥的安全性较高的装置,本发明的接收终端只有在验证了特定密钥来源的合法性后才会将特定密钥存储于安全芯片中,有效避免了将恶意代码存储至安全芯片中,提高了安全芯片的安全性和可靠性。
如图2所示,本发明还提供一种接收终端,包括一个或多个第一处理器1及第一存储器2,所述第一存储器2存储有程序,并且被配置成由所述一个或多个第一处理器1执行以下步骤:
S1、根据接收终端的唯一标识和第一随机字符串得到第一认证报文;
S2、发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性;
S3、验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;
S4、当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。
进一步地,所述S1具体为:
随机生成16字节以上的字符串,得到第一随机字符串;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述接收终端的唯一标识和所述第一随机字符串进行MAC运算,得到第一MAC值;
封装所述接收终端的唯一标识、所述第一随机字符串和所述第一MAC值,得到第一认证报文。
进一步地,所述S3具体为:
获取来自所述分发终端的第二认证报文;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述第二认证报文中携带的分发终端的唯一标识和第二随机字符串进行MAC运算,得到第三MAC值;
当所述第二MAC值和所述第三MAC值相同时,设置所述第一验证结果为验证通过。
进一步地,还包括:
生成传输认证密钥和传输加密密钥;所述传输认证密钥具有唯一性;所述传输加密密钥具有唯一性;
发送所述传输认证密钥和所述传输加密密钥至传输密钥管理终端,以使传输密钥管理终端同步所述传输认证密钥和所述传输加密密钥至所述分发终端。
进一步地,还包括:
将所述特定密钥明文写入安全芯片。
如图3所示,本发明另提供一种传输密钥的方法,包括:
S1、验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过;所述第一认证报文包括所述接收终端的唯一标识符、第一随机字符串和第一MAC值;
S2、当所述第二验证结果为验证通过时,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文;
S3、发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
进一步地,所述S1具体为:
获取来自所述接收终端的第一认证报文;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述第一认证报文中携带的接收终端的唯一标识和第一随机字符串进行MAC运算,得到第四MAC值;
当所述第一MAC值和所述第四MAC值相同时,设置所述第二验证结果为验证通过。
进一步地,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文,具体为:
随机生成16字节以上的字符串,得到第二随机字符串;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述分发终端的唯一标识和所述第二随机字符串进行MAC运算,得到第二MAC值;
封装所述分发终端的唯一标识、所述第二随机字符串和所述第二MAC值,得到第二认证报文。
进一步地,还包括:
从传输密钥管理终端获取与一个以上接收终端对应的传输认证密钥,得到传输认证密钥集合;所述传输认证密钥集合中的每一传输认证密钥具有唯一性;
从传输密钥管理终端获取与一个以上分发终端对应的传输加密密钥,得到传输加密密钥集合;所述传输加密密钥集合中的每一传输加密密钥具有唯一性。
如图4所示,本发明再提供一种分发终端,包括一个或多个第二处理器3及第二存储器4,所述第二存储器4存储有程序,并且被配置成由所述一个或多个第二处理器3执行以下步骤:
S1、验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过;所述第一认证报文包括所述接收终端的唯一标识符、第一随机字符串和第一MAC值;
S2、当所述第二验证结果为验证通过时,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文;
S3、发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
进一步地,所述S1具体为:
获取来自所述接收终端的第一认证报文;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述第一认证报文中携带的接收终端的唯一标识和第一随机字符串进行MAC运算,得到第四MAC值;
当所述第一MAC值和所述第四MAC值相同时,设置所述第二验证结果为验证通过。
进一步地,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文,具体为:
随机生成16字节以上的字符串,得到第二随机字符串;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述分发终端的唯一标识和所述第二随机字符串进行MAC运算,得到第二MAC值;
封装所述分发终端的唯一标识、所述第二随机字符串和所述第二MAC值,得到第二认证报文。
进一步地,还包括:
从传输密钥管理终端获取与一个以上接收终端对应的传输认证密钥,得到传输认证密钥集合;所述传输认证密钥集合中的每一传输认证密钥具有唯一性;
从传输密钥管理终端获取与一个以上分发终端对应的传输加密密钥,得到传输加密密钥集合;所述传输加密密钥集合中的每一传输加密密钥具有唯一性。
本发明的实施例一为:
本实施例提供一种传输密钥的方法,包括:
S1、接收终端生成传输认证密钥和传输加密密钥;所述传输认证密钥具有唯一性;所述传输加密密钥具有唯一性;
接收终端发送所述传输认证密钥和所述传输加密密钥至传输密钥管理终端,以使传输密钥管理终端同步所述传输认证密钥和所述传输加密密钥至所述分发终端;
分发终端从传输密钥管理终端获取与一个以上接收终端对应的传输认证密钥,得到传输认证密钥集合;所述传输认证密钥集合中的每一传输认证密钥具有唯一性;分发终端从传输密钥管理终端获取与一个以上分发终端对应的传输加密密钥,得到传输加密密钥集合;所述传输加密密钥集合中的每一传输加密密钥具有唯一性。
可选地,所述接收终端为POS机。
其中,前期部署包括以下几个方面的准备工作:
(1)传输密钥管理终端搭建
因为本实施例需在接收终端和分发终端之间预置相同的对称密钥进行身份合法性认证和解密特定密钥密文,且本实施例采用一机一密的解决方案,即不同接收终端所采用的传输认证密钥和传输加密密钥均不同,因此,需搭建一传输密钥管理终端,用于采集、翻译、和传输TK密钥,其中TK密钥包括TK-AUK(传输认证密钥)和TK-TEK(传输加密密钥)。
(2)一个以上接收终端将自身的TK密钥发送至传输密钥管理终端。
其中,由接收终端生成随机TK密钥明文,并向传输密钥管理终端获取公钥,然后接收终端使用公钥加密TK密钥明文得到TK密钥密文,并将密文上传给传输密钥管理终端。通过公钥加密TK,保证TK传输过程的安全性。
(3)传输密钥管理终端与分发终端之间同步TK密钥。
为保证TK在传输过程中的安全性,要求传输密钥管理终端和分发终端之间约定保护TK的保护密钥,其包含两个部分:
其一,PK密钥(Protect Key),用于加密传输的TK的密钥信息;
其二,MAK密钥(MAC Key),用于计算与TK的密钥信息对应的MAC值,以验证TK的密钥信息的完整性。
(4)TK文件的传输。
传输密钥管理终端将TK的密钥信息写入到文件中,通过两种有效的方式进行传输:
其一,通过电子邮件的方式,由传输密钥管理终端的管理进程定期检查,通过客户接收的邮件设定发送到分发终端;
其二,通过FTP/SFTP的方式,由传输密钥管理终端的管理进程定期检查,通过客户接收的FTP/SFTP设定发送到分发终端。
S2、接收终端根据接收终端的唯一标识和第一随机字符串得到第一认证报文。具体为:
接收终端随机生成16字节以上的字符串,得到第一随机字符串;
接收终端获取传输认证密钥;所述传输认证密钥具有唯一性;
接收终端根据所述传输认证密钥对所述接收终端的唯一标识和所述第一随机字符串进行MAC运算,得到第一MAC值;
接收终端封装所述接收终端的唯一标识、所述第一随机字符串和所述第一MAC值,得到第一认证报文。
其中,接收终端自身生成的具有唯一性的传输认证密钥为TK-AUK,使用TK-AUK对由接收终端的唯一标识和第一随机字符串组成的数据进行MAC运算,使得只有经过传输密钥管理终端认证的分发终端可计算出第一MAC值。
优选地,所述MAC运算的算法为X9.19算法。
其中,在金融支付领域,对称密钥算法一般使用X9.9或X9.19算法进行MAC运算,而X9.19相对X9.9的算法复杂性更高,被破解的难度更大。
S3、接收终端发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性。
S4、分发终端验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过。具体为:
分发终端获取来自所述接收终端的第一认证报文;
分发终端获取传输认证密钥;所述传输认证密钥具有唯一性;
分发终端根据所述传输认证密钥对所述第一认证报文中携带的接收终端的唯一标识和第一随机字符串进行MAC运算,得到第四MAC值;
当所述第一MAC值和所述第四MAC值相同时,分发终端设置所述第二验证结果为验证通过。
其中,分发终端根据第一认证报文中接收终端的唯一标识,从传输认证密钥集合中获取与该接收终端对应的传输认证密钥TK-AUK,由于授权的分发终端所采用的传输认证密钥与接收终端相同,因此,对相同的数据信息进行MAC运算所得到的MAC值相同。若接收到第一认证报文的终端是非授权的终端,由于非授权的终端不知道传输认证密钥TK-AUK,因此,其无法得出相同的MAC值,无法通过认证。此外,进行MAC运算的初始值为接收终端的唯一标识和16直接的随机字符串,初始值的随机性强且十分复杂,非授权的终端难以通过暴力破解等方式得出第一MAC值,认证的可靠性较高。
S5、当所述第二验证结果为验证通过时,分发终端根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文。具体为:
分发终端随机生成16字节以上的字符串,得到第二随机字符串;
分发终端获取传输认证密钥;所述传输认证密钥具有唯一性;
分发终端根据所述传输认证密钥对所述分发终端的唯一标识和所述第二随机字符串进行MAC运算,得到第二MAC值;
分发终端封装所述分发终端的唯一标识、所述第二随机字符串和所述第二MAC值,得到第二认证报文。
其中,分发终端使用传输认证密钥TK-AUK对由分发终端的唯一标识和第二明文组成的数据进行MAC运算,由于本实施例采用一机一密,使得只有已通过分发终端认证的接收终端可对第二认证报文进行有效的身份认证。若分发终端将第二认证证书错发至其它授权的接收终端,则无法通过认证,分发终端不会接收到分发密钥的请求。
其中,分发终端使用与所述接收终端对应的传输加密密钥TK-TEK和3DES的CBC模式对特定密钥MK进行加密处理。
优选地,所述第二认证报文还包括密钥属性和密钥的使用方法。
其中,密钥属性标志密钥类型,如DES、3DES,接收终端根据密钥属性确认密钥加解密算法;密钥的使用方式标示该密钥的用途以及存储区域,接收终端可对密钥进行分类,可限制接收终端上不通的程序访问,程序只允许访问特定类别的密钥。
S6、分发终端发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
S7、接收终端验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文。具体为:
接收终端获取来自所述分发终端的第二认证报文;
接收终端获取传输认证密钥;
接收终端根据所述传输认证密钥对所述第二认证报文中携带的分发终端的唯一标识和第二随机字符串进行MAC运算,得到第三MAC值;
当所述第二MAC值和所述第三MAC值相同时,接收终端设置所述第一验证结果为验证通过。
S8、当所述第一验证结果为验证通过时,接收终端解密所述特定密钥密文,得到特定密钥明文;接收终端将所述特定密钥明文写入安全芯片。
由上述描述可知,本实施例采用预置对称密钥的方案进行双向认证,分发终端和接收终端预先同步了TK-AUK密钥,双方通过使用X9.19算法的MAC加密方法验证对方的认证信息,由于TK-AUK是一机一密的,只要双方均通过了MAC验证则完成双向认证,是远程密钥分发方案的有效性保证。
本方案中的核心机密内容是由分发终端分发的特定密钥MK。分发终端使用有效可靠的方法组织分发的密钥块,调用硬件加密机的应用服务以TK-TEK对MK密钥进行加密处理,且TK-TEK是一机一密的,只有分发终端和对应的接收终端持有该传输加密密钥,第三方并无法直接获取MK密钥主体,可见MK密钥的分发是满足机密性要求的。
TK-TEK是由POS随机生成的,之后通过安全可靠的方法上送到传输密钥管理终端,再通过传输密钥管理终端和分发终端之间约定的传输加密密钥同步给分发终端,分发终端接收TK后本地存储加密密钥,可见TK-TEK从生成、传输、以及存储均满足机密性要求。综上,密钥分发的生成、处理、传输、以及存储是满足机密性要求的。
本方案采用MAC加密运算的方法,保证传输数据的完整性和可认证性。密钥分发过程中,双方均通过TK-AUK对交换报文中的关键信息进行X9.19算法的MAC加密运算,且TK-AUK是一机一密的,只有持有相同的TK-AUK才可能通过MAC校验。由此可见,本方案的传输数据具有完整性和可认证性的特点。
本发明的实施例二为:
本实施例提供一种接收终端,包括一个或多个第一处理器1及第一存储器2,所述第一存储器2存储有程序,并且被配置成由所述一个或多个第一处理器1执行以下步骤:
S1、生成传输认证密钥和传输加密密钥;所述传输认证密钥具有唯一性;所述传输加密密钥具有唯一性;
发送所述传输认证密钥和所述传输加密密钥至传输密钥管理终端,以使传输密钥管理终端同步所述传输认证密钥和所述传输加密密钥至所述分发终端。
S2、根据接收终端的唯一标识和第一随机字符串得到第一认证报文;具体为:
随机生成16字节以上的字符串,得到第一随机字符串;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述接收终端的唯一标识和所述第一随机字符串进行MAC运算,得到第一MAC值;
封装所述接收终端的唯一标识、所述第一随机字符串和所述第一MAC值,得到第一认证报文。
S3、发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性。
S4、验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;具体为:
获取来自所述分发终端的第二认证报文;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述第二认证报文中携带的分发终端的唯一标识和第二随机字符串进行MAC运算,得到第三MAC值;
当所述第二MAC值和所述第三MAC值相同时,设置所述第一验证结果为验证通过。
S5、当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。
S6、将所述特定密钥明文写入安全芯片。
本发明提供的实施例三为:
本实施例提供一种传输密钥的方法,包括:
S1、从传输密钥管理终端获取与一个以上接收终端对应的传输认证密钥,得到传输认证密钥集合;所述传输认证密钥集合中的每一传输认证密钥具有唯一性;
从传输密钥管理终端获取与一个以上分发终端对应的传输加密密钥,得到传输加密密钥集合;所述传输加密密钥集合中的每一传输加密密钥具有唯一性。
S2、验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过;所述第一认证报文包括所述接收终端的唯一标识符、第一随机字符串和第一MAC值;具体为:
获取来自所述接收终端的第一认证报文;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述第一认证报文中携带的接收终端的唯一标识和第一随机字符串进行MAC运算,得到第四MAC值;
当所述第一MAC值和所述第四MAC值相同时,设置所述第二验证结果为验证通过。
S3、当所述第二验证结果为验证通过时,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文;具体为:
随机生成16字节以上的字符串,得到第二随机字符串;
获取传输认证密钥;所述传输认证密钥具有唯一性;
根据所述传输认证密钥对所述分发终端的唯一标识和所述第二随机字符串进行MAC运算,得到第二MAC值;
封装所述分发终端的唯一标识、所述第二随机字符串和所述第二MAC值,得到第二认证报文。
S4、发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
综上所述,本发明提供的一种远程传输密钥的方法、接收终端和分发终端,区别于常规的双方身份认证通过后才传输重要信息的可靠传输方式,本发明直接将可验证分发终端身份的信息和待分发的特定密钥密文一起发送至已通过身份认证的接收终端,在认证分发终端身法合法性的同时传递重要密钥,由于接收终端已通过身份认证,分发终端不存在将重要数据传输至非授权终端的可能性,因此,分发终端所下发的第二认证报文具有安全性,并且,接收终端在验证第二认证报文的合法性后才对第二报文中所携带的重要数据进行处理,可有效避免触发非授权的终端发送的恶意代码的情况,有利于保障接收终端的安全性和可靠性。因此,本发明所提供的远程传输密钥的方法,在安全可靠地远程传输重要密钥的同时,简化了传输的流程,提高了远程传输密钥的效率。进一步地,区别于现有技术对8字节随机字符串进行认证,本发明随机生成16字节的字符串,并对随机字符串进行复杂的MAC运算,并且一个接收终端只有一个传输认证密钥,其传输认证密钥具有唯一性,因此,非授权终端难以破解认证方法,有效提高了接收终端和分发终端之间双向认证的有效性,从而提高了远程密钥传输的安全性。进一步地,接收终端获取来自分发终端的第二认证报文后,通过只有授权的分发终端和当前的接收终端具有的传输认证密钥验证第二认证报文的合法性,有效提高了接收终端和分发终端之间双向认证的有效性,从而提高了远程密钥传输的安全性。进一步地,由上述描述可知,通过传输密钥管理终端将授权的接收终端中用于认证身份合法性的传输认证密钥和解密特定密钥密文的传输加密密钥同步至授权的分发终端,使得授权的接收终端和授权的分发终端之间可安全地传输特定密钥。进一步地,安全芯片是具有金融功能的终端用于存储重要密钥的安全性较高的装置,本发明的接收终端只有在验证了特定密钥来源的合法性后才会将特定密钥存储于安全芯片中,有效避免了将恶意代码存储至安全芯片中,提高了安全芯片的安全性和可靠性。

Claims (18)

  1. 一种传输密钥的方法,其特征在于,包括:
    S1、根据接收终端的唯一标识和第一随机字符串得到第一认证报文;
    S2、发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性;
    S3、验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;
    S4、当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。
  2. 根据权利要求1所述的传输密钥的方法,其特征在于,所述S1具体为:
    随机生成16字节以上的字符串,得到第一随机字符串;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述接收终端的唯一标识和所述第一随机字符串进行MAC运算,得到第一MAC值;
    封装所述接收终端的唯一标识、所述第一随机字符串和所述第一MAC值,得到第一认证报文。
  3. 根据权利要求1所述的传输密钥的方法,其特征在于,所述S3具体为:
    获取来自所述分发终端的第二认证报文;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述第二认证报文中携带的分发终端的唯一标识和第二随机字符串进行MAC运算,得到第三MAC值;
    当所述第二MAC值和所述第三MAC值相同时,设置所述第一验证结果为验证通过。
  4. 根据权利要求1所述的传输密钥的方法,其特征在于,还包括:
    生成传输认证密钥和传输加密密钥;所述传输认证密钥具有唯一性;所述传输加密密钥具有唯一性;
    发送所述传输认证密钥和所述传输加密密钥至传输密钥管理终端,以使传输密钥管理终端同步所述传输认证密钥和所述传输加密密钥至所述分发终端。
  5. 根据权利要求1所述的传输密钥的方法,其特征在于,还包括:
    将所述特定密钥明文写入安全芯片。
  6. 一种接收终端,其特征在于,包括一个或多个第一处理器及第一存储器,所述第一存储器存储有程序,并且被配置成由所述一个或多个第一处理器执行以下步骤:
    S1、根据接收终端的唯一标识和第一随机字符串得到第一认证报文;
    S2、发送所述第一认证报文至分发终端,以使分发终端根据所述第一认证报文验证接收终端的合法性;
    S3、验证来自所述分发终端的第二认证报文,得到第一验证结果;所述第一验证结果包括验证通过和验证未通过;所述第二认证报文包括分发终端的唯一标识、第二随机字符串、第二MAC值和特定密钥密文;
    S4、当所述第一验证结果为验证通过时,解密所述特定密钥密文,得到特定密钥明文。
  7. 根据权利要求6所述的接收终端,其特征在于,所述S1具体为:
    随机生成16字节以上的字符串,得到第一随机字符串;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述接收终端的唯一标识和所述第一随机字符串进行MAC运算,得到第一MAC值;
    封装所述接收终端的唯一标识、所述第一随机字符串和所述第一MAC值,得到第一认证报文。
  8. 根据权利要求6所述的接收终端,其特征在于,所述S3具体为:
    获取来自所述分发终端的第二认证报文;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述第二认证报文中携带的分发终端的唯一标识和第二随机字符串进行MAC运算,得到第三MAC值;
    当所述第二MAC值和所述第三MAC值相同时,设置所述第一验证结果为验证通过。
  9. 根据权利要求6所述的接收终端,其特征在于,还包括:
    生成传输认证密钥和传输加密密钥;所述传输认证密钥具有唯一性;所述传输加密密钥具有唯一性;
    发送所述传输认证密钥和所述传输加密密钥至传输密钥管理终端,以使传输密钥管理终端同步所述传输认证密钥和所述传输加密密钥至所述分发终端。
  10. 根据权利要求6所述的接收终端,其特征在于,还包括:
    将所述特定密钥明文写入安全芯片。
  11. 一种传输密钥的方法,其特征在于,包括:
    S1、验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过;所述第一认证报文包括所述接收终端的唯一标识符、第一随机字符串和第一MAC值;
    S2、当所述第二验证结果为验证通过时,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文;
    S3、发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
  12. 根据权利要求11所述的传输密钥的方法,其特征在于,所述S1具体为:
    获取来自所述接收终端的第一认证报文;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述第一认证报文中携带的接收终端的唯一标识和第一随机字符串进行MAC运算,得到第四MAC值;
    当所述第一MAC值和所述第四MAC值相同时,设置所述第二验证结果为验证通过。
  13. 根据权利要求11所述的传输密钥的方法,其特征在于,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文,具体为:
    随机生成16字节以上的字符串,得到第二随机字符串;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述分发终端的唯一标识和所述第二随机字符串进行MAC运算,得到第二MAC值;
    封装所述分发终端的唯一标识、所述第二随机字符串和所述第二MAC值,得到第二认证报文。
  14. 根据权利要求11所述的传输密钥的方法,其特征在于,还包括:
    从传输密钥管理终端获取与一个以上接收终端对应的传输认证密钥,得到传输认证密钥集合;所述传输认证密钥集合中的每一传输认证密钥具有唯一性;
    从传输密钥管理终端获取与一个以上分发终端对应的传输加密密钥,得到传输加密密钥集合;所述传输加密密钥集合中的每一传输加密密钥具有唯一性。
  15. 一种分发终端,其特征在于,包括一个或多个第二处理器及第二存储器,所述第二存储器存储有程序,并且被配置成由所述一个或多个第二处理器执行以下步骤:
    S1、验证来自接收终端的第一认证报文,得到第二验证结果;所述第二验证结果包括验证通过和验证未通过;所述第一认证报文包括所述接收终端的唯一标识符、第一随机字符串和第一MAC值;
    S2、当所述第二验证结果为验证通过时,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文;
    S3、发送所述第二认证报文至所述接收终端,以使所述第二认证报文通过所述接收终端的合法性验证后,所述接收终端获取所述特定密钥密文。
  16. 根据权利要求15所述的分发终端,其特征在于,所述S1具体为:
    获取来自所述接收终端的第一认证报文;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述第一认证报文中携带的接收终端的唯一标识和第一随机字符串进行MAC运算,得到第四MAC值;
    当所述第一MAC值和所述第四MAC值相同时,设置所述第二验证结果为验证通过。
  17. 根据权利要求15所述的分发终端,其特征在于,根据分发终端的唯一标识符、第二随机字符串和预设的特定密钥密文得到第二认证报文,具体为:
    随机生成16字节以上的字符串,得到第二随机字符串;
    获取传输认证密钥;所述传输认证密钥具有唯一性;
    根据所述传输认证密钥对所述分发终端的唯一标识和所述第二随机字符串进行MAC运算,得到第二MAC值;
    封装所述分发终端的唯一标识、所述第二随机字符串和所述第二MAC值,得到第二认证报文。
  18. 根据权利要求15所述的分发终端,其特征在于,还包括:
    从传输密钥管理终端获取与一个以上接收终端对应的传输认证密钥,得到传输认证密钥集合;所述传输认证密钥集合中的每一传输认证密钥具有唯一性;
    从传输密钥管理终端获取与一个以上分发终端对应的传输加密密钥,得到传输加密密钥集合;所述传输加密密钥集合中的每一传输加密密钥具有唯一性。
PCT/CN2018/075367 2018-02-06 2018-02-06 一种传输密钥的方法、接收终端和分发终端 WO2019153110A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880000100.0A CN108323230B (zh) 2018-02-06 2018-02-06 一种传输密钥的方法、接收终端和分发终端
PCT/CN2018/075367 WO2019153110A1 (zh) 2018-02-06 2018-02-06 一种传输密钥的方法、接收终端和分发终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/075367 WO2019153110A1 (zh) 2018-02-06 2018-02-06 一种传输密钥的方法、接收终端和分发终端

Publications (1)

Publication Number Publication Date
WO2019153110A1 true WO2019153110A1 (zh) 2019-08-15

Family

ID=62895883

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/075367 WO2019153110A1 (zh) 2018-02-06 2018-02-06 一种传输密钥的方法、接收终端和分发终端

Country Status (2)

Country Link
CN (1) CN108323230B (zh)
WO (1) WO2019153110A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114599033A (zh) * 2022-05-10 2022-06-07 中移(上海)信息通信科技有限公司 一种通信鉴权处理方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831303B (zh) * 2018-12-24 2021-09-14 华升智建科技(深圳)有限公司 一种可用低端8位单片机实现的高强度随机加密方法
CN109792380B (zh) * 2018-12-27 2022-08-16 福建联迪商用设备有限公司 一种传递密钥的方法、终端及系统
CN109861796B (zh) * 2019-03-05 2021-12-21 生迪智慧科技有限公司 通信连接方法、客户端、云端及可读存储介质
CN112118210B (zh) * 2019-06-20 2023-09-01 阿里巴巴集团控股有限公司 一种认证密钥配置方法、设备、系统及存储介质
CN115118440B (zh) * 2022-08-29 2023-01-20 北京智芯微电子科技有限公司 终端数字身份的写入方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006022469A1 (en) * 2004-08-25 2006-03-02 Electronics And Telecommunications Research Institute Method for security association negociation with extensible authentication protocol in wireless portable internet system
CN101729503A (zh) * 2008-10-23 2010-06-09 中兴通讯股份有限公司 密钥分发方法和系统
CN102685741A (zh) * 2011-03-09 2012-09-19 华为终端有限公司 接入认证处理方法及系统、终端和网络设备
CN106656488A (zh) * 2016-12-07 2017-05-10 百富计算机技术(深圳)有限公司 一种pos终端的密钥下载方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2548331B1 (en) * 2010-03-19 2014-11-26 MR.QR10 GmbH & Co. KG System and method for communicating between different entities using different data portions for different channels
WO2013035267A1 (ja) * 2011-09-06 2013-03-14 パナソニック株式会社 記録媒体装置、端末装置、配信装置、制御方法、プログラム、及びプログラムの記録媒体
CN103237005A (zh) * 2013-03-15 2013-08-07 福建联迪商用设备有限公司 密钥管理方法及系统
CN105743654A (zh) * 2016-02-02 2016-07-06 上海动联信息技术股份有限公司 一种pos机密钥远程下载的服务系统以及密钥下载方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006022469A1 (en) * 2004-08-25 2006-03-02 Electronics And Telecommunications Research Institute Method for security association negociation with extensible authentication protocol in wireless portable internet system
CN101729503A (zh) * 2008-10-23 2010-06-09 中兴通讯股份有限公司 密钥分发方法和系统
CN102685741A (zh) * 2011-03-09 2012-09-19 华为终端有限公司 接入认证处理方法及系统、终端和网络设备
CN106656488A (zh) * 2016-12-07 2017-05-10 百富计算机技术(深圳)有限公司 一种pos终端的密钥下载方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114599033A (zh) * 2022-05-10 2022-06-07 中移(上海)信息通信科技有限公司 一种通信鉴权处理方法及装置
CN114599033B (zh) * 2022-05-10 2022-08-16 中移(上海)信息通信科技有限公司 一种通信鉴权处理方法及装置

Also Published As

Publication number Publication date
CN108323230B (zh) 2021-03-05
CN108323230A (zh) 2018-07-24

Similar Documents

Publication Publication Date Title
CN110881048B (zh) 基于身份认证的安全通讯方法及装置
CN108323230B (zh) 一种传输密钥的方法、接收终端和分发终端
CN108513704B (zh) 终端主密钥的远程分发方法及其系统
WO2014139343A1 (zh) 密钥下载方法、管理方法、下载管理方法及装置和系统
CN111740844A (zh) 基于硬件的国密算法的ssl通信方法及装置
CN102025503B (zh) 一种集群环境下数据安全实现方法和一种高安全性的集群
CN107800675A (zh) 一种数据传输方法、终端以及服务器
CN111614621B (zh) 物联网通信方法和系统
CN107104795B (zh) Rsa密钥对和证书的注入方法、架构及系统
CN107135070A (zh) Rsa密钥对和证书的注入方法、架构及系统
CN109547208B (zh) 金融电子设备主密钥在线分发方法及系统
CN111435390A (zh) 一种配电终端运维工具安全防护方法
CN112020038A (zh) 一种适用于轨道交通移动应用的国产加密终端
CN112217635B (zh) 一种基于区块链和高速加密卡的信息加密传输方法及系统
CN106712939A (zh) 密钥离线传输方法和装置
TWI476629B (zh) Data security and security systems and methods
CN113591109B (zh) 可信执行环境与云端通信的方法及系统
CN111435389A (zh) 一种配电终端运维工具安全防护系统
CN104883260B (zh) 证件信息处理和验证方法、处理终端及验证服务器
CN108401493B (zh) 一种传输密钥的方法、接收终端及分发终端
CN108323231B (zh) 一种传输密钥的方法、接收终端和分发终端
CN112787990B (zh) 一种电力终端可信接入认证方法和系统
CN114091055A (zh) 一种量子加密信息传输系统
EP3185504A1 (en) Security management system for securing a communication between a remote server and an electronic device
CN114095156B (zh) 一种轨道交通移动终端数据保护方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18905577

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18905577

Country of ref document: EP

Kind code of ref document: A1