WO2018120938A1 - 密钥离线传输方法、终端和存储介质 - Google Patents

密钥离线传输方法、终端和存储介质 Download PDF

Info

Publication number
WO2018120938A1
WO2018120938A1 PCT/CN2017/102972 CN2017102972W WO2018120938A1 WO 2018120938 A1 WO2018120938 A1 WO 2018120938A1 CN 2017102972 W CN2017102972 W CN 2017102972W WO 2018120938 A1 WO2018120938 A1 WO 2018120938A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
downloading
sales terminal
terminal
receiving
Prior art date
Application number
PCT/CN2017/102972
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 百富计算机技术(深圳)有限公司
Publication of WO2018120938A1 publication Critical patent/WO2018120938A1/zh

Links

Images

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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key 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) using key encryption key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key 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) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • 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/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a key offline transmission method, a terminal, and a storage medium.
  • POS terminal point of sales point As the front-end hardware device of the financial payment system has also developed rapidly.
  • POS terminals using various new technologies have emerged rapidly, such as Bluetooth POS terminals.
  • POS terminals need to encrypt transaction sensitive information because they involve personal account and property security.
  • the sales terminal for downloading the key is limited by the network environment, and when it is only accessible to the transaction network and cannot access other networks, the key transmission cannot be performed with the sales terminal for providing the key.
  • a key offline transmission method a terminal, and a storage medium are provided.
  • a key offline transmission method includes:
  • a terminal comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor such that the processor performs the following steps:
  • One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of:
  • 1 is an application environment diagram of a key offline transmission method in an embodiment
  • FIG. 2 is a schematic structural diagram of a terminal in an embodiment
  • FIG. 3 is a schematic flowchart of a method for offline transmission of a key in an embodiment
  • FIG. 4 is a schematic flowchart of a step of generating a to-be-downloaded key in an embodiment
  • FIG. 5 is a schematic flowchart of a step of obtaining a second key according to a basic key and a key sequence number in an embodiment
  • FIG. 6 is a timing diagram of a method for offline transmission of a key in an embodiment
  • FIG. 7 is a structural block diagram of a terminal in an embodiment
  • FIG. 8 is a structural block diagram of a terminal in another embodiment.
  • FIG. 1 is an application environment diagram of a key offline transmission method in an embodiment.
  • the key offline transmission method is applied to a key offline download system.
  • the key offline download system includes a sales terminal 110 for providing a key and a sales terminal 120 for downloading a key, and the sales terminal 110 for providing a key is established through the data transmission interface with the sales terminal 120 for downloading the key.
  • Serial communication connection The sales terminal 110 for providing a key is used to generate and manage a key, and may be a POS terminal or the like for providing a key.
  • the sales terminal 120 for downloading a key is used to acquire a key generated by the sales terminal 110 for providing a key, and may be a POS terminal or the like for receiving a key.
  • FIG. 2 is a schematic diagram showing the internal structure of a terminal in an embodiment.
  • the terminal can be as shown in FIG.
  • the terminal for providing a key includes a processor connected through a system bus, a nonvolatile storage medium, an internal memory, a serial interface, a display screen, and an input device.
  • the non-volatile storage medium of the terminal stores an operating system and a database.
  • the processor is used to provide computing and control capabilities to support the operation of the entire terminal.
  • Computer readable instructions may be stored in the internal memory in the terminal, and when the computer readable instructions are executed by the processor, the processor may be caused to perform a key offline transmission method.
  • the serial interface is used for serial communication with the sales terminal for downloading the key, such as sending the to-be-downloaded key to the sales terminal for downloading the key, receiving the confirmation message returned by the sales terminal for downloading the key, and the like.
  • the display screen can be a liquid crystal display or an electronic ink display screen
  • the input device can be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the terminal housing, or an external keyboard. Touchpad or mouse. It will be understood by those skilled in the art that the structure shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied.
  • the specific terminal may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
  • a key offline transmission method is provided. This embodiment is applied to the sales terminal 110 for providing a key in FIG. 1 as an example.
  • the method specifically includes the following steps:
  • the data transmission port refers to a physical interface for transmitting data.
  • the serial port is a serial interface, also known as a serial communication interface or a serial communication interface (usually referred to as a COM interface (Cluster Communication Port)), and is an expansion interface using serial communication.
  • a serial communication connection is a communication connection established between two hardware devices through a physical dedicated line to connect to a physical interface.
  • the data transmission port of the sales terminal for providing the key may be connected to the data transmission port of the sales terminal for downloading the key through the physical line, at the sales terminal for providing the key, and for downloading the key.
  • a serial port-based communication connection is established between the sales terminals so that data exchange is performed between the sales terminal for providing the key and the sales terminal for downloading the key through the serial communication connection.
  • S304 Receive a transmission key sent by a sales terminal for downloading a key through a serial communication connection.
  • the transport key refers to a key used to encrypt the transmitted data.
  • the transport key can be either a symmetric key or an asymmetric key.
  • a symmetric key is the same key used by both parties to the data transmission.
  • the asymmetric key includes two keys: a public key (public key) and a private key (private key). In the data transmission, two keys are needed to perform encryption and decryption respectively.
  • step S304 includes receiving a public key sent by the sales terminal for downloading the key; the public key is generated by the sales terminal for downloading the key according to a built-in key generation algorithm. Specifically, the sales terminal for downloading the key may generate a key pair of the public key and the private key according to an RSA algorithm. After the key pair is generated, the generated key pair is verified. The sales terminal for downloading the key can verify the correctness of the key pair by encrypting and decrypting a random number.
  • the generation of the random number is randomly generated by a random function (random) in the C language standard library, and the random number is encrypted by using the public key, and then the random number is decrypted by the private key, if the decrypted result and the generated result are generated If the random numbers are the same, it is determined that the generated key pair is correct.
  • the sales terminal for downloading the key After determining that the generated key pair is correct, the sales terminal for downloading the key encapsulates the public key as a transmission key into the key request data packet, and then adds a header, a trailer, and a check code to the key request packet.
  • the added key request packet is sent to the sales terminal for providing the key through the established serial port-based communication connection.
  • the check code is a check code that is set in advance for performing packet verification.
  • the sales terminal for downloading the key and/or the sales terminal for providing the key identifies the type of the transmitted data packet by the check code.
  • the sales terminal for downloading the key may generate a transport key according to a DES algorithm (Data Encryption Standard), encapsulate the transport key into a key request packet, and request data for the key.
  • the packet adds a header, a trailer, and a checksum, and the added key request packet is sent to the sales terminal for providing the key through the established serial-based communication connection.
  • the sales terminal for providing the key parses the received key request data packet, and extracts the key. Find the checksum included in the packet. If the check code indicates that the data packet is a key request data packet encapsulating a transport key, extracting the encapsulated transport key from the key request data packet; if the check code indicates the key request data packet If the data packet is not requested for the key encapsulating the transport key, the key request packet is discarded.
  • the sales terminal for providing the key encrypts the to-be-downloaded key by using the obtained transport key, and loads the encrypted key to be downloaded into the key response data packet, and then
  • the key response packet adds a header, a trailer, and a check code, and sends the added key response packet to the sales terminal for downloading the key through the established serial-based communication connection.
  • the sales terminal for downloading the key parses the received key response data packet, and extracts the key response data packet.
  • Check code included If the check code indicates that the data packet is a key response data packet encapsulating the to-be-downloaded key, decrypt the key response data packet by using the transport key, and extract the encapsulated key to be downloaded; The code indicates that the key request packet is not a key reply packet encapsulating the transport key, and the key response packet is discarded.
  • the transport key used for decryption is identical to the key sent by the sales terminal for downloading the key to the sales terminal for providing the key.
  • the transport key used for decryption is the private key corresponding to the transmitted public key.
  • step S310 includes: receiving a confirmation message fed back by the sales terminal for downloading the key; the confirmation message is generated by the sales terminal for downloading the key according to the built-in key generation algorithm, and the public key The corresponding private key is decrypted with the download key and generated.
  • the encrypted key to be downloaded can be decrypted only by using the private key corresponding to the public key for encrypting the to-be-downloaded key, thereby further ensuring the security of the key transmission.
  • the sales terminal for downloading the key decrypts the key response data packet by the transmission key, extracts the encapsulated to-be-downloaded key, and stores the extracted key to the secure storage area of the sales terminal for downloading the key.
  • the safe storage area refers to the PCIDSS (Payment Card Industry) Data Security Standard Payment Card Industry Data Security Standard) PINPAD (Personal Identification Number Personal Digital Assistant Personal Key Assistant) key storage area. Security of key storage is guaranteed by the PCI authentication key storage area.
  • the sales terminal for downloading the key After storing the extracted key, the sales terminal for downloading the key transmits confirmation information to the sales terminal for providing the key through the established serial communication connection to notify the completion of the download of the sales terminal key for providing the key.
  • the confirmation message is a data string configured in advance by the sales terminal for providing the key and the sales terminal for downloading the key based on the serial communication protocol.
  • the data string is configured at the time of configuration to characterize the completion of the sales terminal download key for downloading the key.
  • the sales terminal for providing the key and the sales terminal for downloading the key may agree in advance as the data string " ⁇ x02 ⁇ x30 ⁇ x30 ⁇ x34 ⁇ x32 ⁇ x31 ⁇ x30 ⁇ x30 ⁇ x03" as the confirmation information.
  • the sales terminal for providing the key determines that the sales terminal download key for downloading the key is completed, disconnected and used for downloading the key. Serial communication connection between sales terminals.
  • the above key offline transmission method establishes a serial communication connection with a sales terminal for downloading a key through a data transmission port, and provides a transmission channel for performing key transmission under offline conditions. Then, the key to be downloaded is encrypted by the transmission key sent by the sales terminal for downloading the key, which ensures the security of the key to be downloaded during transmission.
  • the key to be downloaded in the key offline transmission method includes a first key and a second key that are independent of each other.
  • the key offline transmission method further includes the step of generating a key to be downloaded, which specifically includes the following steps:
  • the administrator refers to the person who performs key management.
  • the administrator can log in to the sales terminal for providing the key by using the administrator account, input the first key component for generating the first key, the second key component for generating the second key, and the administrator account.
  • Key serial number is the Key Set Identifier KSI and the device identification number. (Device Identifier DID) and Transaction Counter TC are combined.
  • the key identification number is used to uniquely identify a key
  • the device identification number is used to uniquely identify a sales terminal for downloading a key
  • the transaction count identifier is used to uniquely identify a transaction.
  • the key identification number, the device identification number, and the transaction count identifier may each be a character string including at least one of a number, a letter, and a symbol.
  • the DID is pre-agreed as five bytes and is specifically 00002.
  • the KSI is specifically pre-agreed as eight bytes FFFFF03001. Since the transaction is not performed during the key generation phase, the transaction count flag is 0, then the KSN is FFFFF03001000020.
  • the sales terminal for providing the key may provide an interface for inputting characters only through an administrator account, and after detecting an operation acting on the character input interface, acquiring an input for generating the first key.
  • the first key is a key for encrypting data.
  • the preset logical operation mode refers to a preset calculation method for calculating the first key component to obtain the first key, such as an exclusive OR operation.
  • the first key is a TMK (Terminal Master Key).
  • the first key component is two 16-byte character strings
  • the administrator can input the verification for the first key component after logging in to the sales terminal for providing the key by the administrator account.
  • the KCV (Key Check Value) check code of the first key component After the first key component is verified by the KCV (Key Check Value) check code, the obtained first key component is calculated according to a preset logical operation manner to obtain the first key.
  • the KCV check code is a partial ciphertext data obtained by encrypting specified data using a key component.
  • the administrator uses the first 4 bytes of data encrypted by 8 key components of 0x00 as KCV.
  • the sales terminal for downloading the key receives the key component, it encrypts 8 0x00 encryption keys using the key component.
  • the first 4 bytes of the encryption result are compared with the KCV. If they match, the key component is correct. If it is inconsistent, it indicates that the key component is wrong.
  • first key component M1 AB AB AB CD CD CD CD EF EF EF 12 34 56 78
  • first key component M1 KCV check code M1_KCV: 88 6D 67 5A
  • first key component M2 12 34 56 78
  • KCV check code of the first key component M2 M2_KCV : 19 85 BB 83
  • the KCV verifies that each key component is successful, the first key is generated, and the first key is an exclusive OR operation M1 Xor M2 on the two first key components, and the first key is B9.
  • the second key component includes an LMK key component for generating an LMK (Local Master Key), a ZMK key component for generating a ZMK (Zone Master Key), and a BDK for generating a BDK.
  • the LMK key component, the ZMK key component, and the BDK key component are mutually independent and distinct key components.
  • the sales terminal for providing the key can be LMK.
  • the sales terminal for providing the key may first use the KCV check code to check the key component. After the verification is successful, any two of the key components are XORed, and the obtained result is XORed with the third key component to obtain the LMK and stored in the sales terminal for providing the key. Secure storage area.
  • the safe house environment refers to a security zone that is authenticated by PCI or a security zone that is in real-time monitoring state. Since the LMK key component is separately input into the plaintext component by the administrator account, it is necessary to input in the safe room environment to ensure that the key component displayed in the plaintext is not leaked.
  • the LMK can be used to encrypt and decrypt the key components used to generate the subsequent keys.
  • the sales terminal for providing the key can continue to generate the ZMK in the same key generation manner and deposit it into the secure storage area of the sales terminal for providing the key. Specifically, the sales terminal for providing the key obtains three administrators to input the LMK encrypted by the administrator account respectively.
  • the ZMK key component is used, the previously acquired ZMK key component is stored in the secure storage area, and then after the acquisition of the three ZMK key components is completed by the sales terminal for providing the key, the three encrypted ZMKs are used by the LMK.
  • the key component is 3DES decrypted to generate ZMK.
  • the ZMK key component has been previously subjected to 3DES (Triple Data Encryption Standard triple data encryption algorithm) using LMK. ZMK can be used to encrypt and decrypt key components used to generate subsequent keys.
  • the sales terminal for providing the key can continue to generate the BDK in the same key generation manner and deposit it into the secure storage area of the sales terminal for providing the key.
  • the sales terminal for providing the key stores the BDK key component acquired in advance to the secure storage area when the three administrators respectively input the BDK key component encrypted by the LMK or the ZMK through the administrator account. Then, after obtaining the three BDK key components after the sales terminal for providing the key completes, the three encrypted BDK key components are decrypted by 3DES using LMK or ZMK to generate the BDK.
  • the BDK key component has been previously subjected to 3DES (Triple Data Encryption Standard triple data encryption algorithm) using LMK or ZMK.
  • the BDK generated by the sales terminal for providing the key is the base key.
  • the second key is also a key for encrypting data, and is a key different from and independent of the first key.
  • the first key and the second key encrypt the data in different ways.
  • the second key is IPEK (Initial PIN Encrypting Key).
  • the to-be-downloaded key includes a first key and a second key that are independent of each other, the first key is generated by the first key component, and the second key is composed of the second key component and the key sequence.
  • the number is the same, and multiple keys are used to ensure the security of data transmission.
  • the generated second key is related to the key sequence number, and the different key sequence numbers generate different second keys, thereby avoiding the problem that the keys are completely identical and the risk of key leakage is high.
  • step S408 specifically includes the following steps:
  • S502 Encrypt the base key and the key sequence number according to the built-in key encryption method to obtain the first part of the second key.
  • the sales terminal for providing the key may use the 3DES encryption algorithm to the base key
  • the BDK encrypts with the key sequence number KSN to obtain the first part of the second key.
  • the first part of the second key may be the left half of the IPEK.
  • the sales terminal for providing the key may configure a character string for converting the base key in advance.
  • the sales terminal for providing the key may perform a XOR operation on the pre-configured string for converting the base key with the base key to obtain the converted base key.
  • S506 Encrypt the converted base key and the key sequence number according to the built-in key encryption method to obtain the second part of the second key.
  • the sales terminal for providing the key may encrypt the converted base key BDK and the key sequence number KSN by using a 3DES encryption algorithm to obtain a second part of the second key.
  • the second part of the second key can be the right half of the IPEK.
  • the second key for performing the first key encryption is generated by the multi-step key generation step, which further ensures the security of the key.
  • the process of generating an IPEK by a sales terminal for providing a key is as follows:
  • the LMK key component L1 acquired by the sales terminal for providing the key is 11 11 11 11 11 11 11 11 11 11 11 11 11 11, and the KCV check code L1_KCV of the LMK key component L1 is 82 E1 36 65,
  • the LMK key component L2 is 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22,
  • the KCV check code L2_KCV of the LMK key component L2 is 00 96 2B 60
  • the LMK key component L3 is 21 07 65 4B A3 98FE DC CD EF 89 3A B4 56 70
  • KCV check code L3_KCV of LMK key component L3 is 3F 5F 93 61.
  • the medium ZMK key component Z1 acquired by the sales terminal for providing the key is 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44
  • the KCV check code Z1_KCV of the ZMK key component Z1 is E2 F2 43 40
  • ZMK key component Z2 is 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
  • KCV check code Z2_KCV of ZMK key component Z2 is 0C D7 DC 49
  • ZMK key component Z3 is 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66
  • the check code Z3_KCV is B0 B5 63 C2.
  • the medium BDK key component B1 acquired by the sales terminal for providing the key is 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77
  • BK key component B2 KCV check code B2_KCV is F9 F4 FB D3
  • BDK key component B3 is 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99
  • the KCV check code B3_KCV of the BDK key component B3 is 0F 2F CF 4A.
  • the sales terminal for providing the key can also generate the BDK based on the acquired ciphertext.
  • step S302 in the key transmission method specifically includes the step of downloading the key.
  • the sales terminal sends an authentication instruction based on serial communication; receives an authentication message fed back by the sales terminal for downloading the key according to the authentication command; after the authentication message is verified, passes through the data transmission port and the key for downloading the key
  • the sales terminal establishes a serial communication connection.
  • the sales terminal for providing the key and the sales terminal for downloading the key may configure the authentication command and the authentication message based on the serial communication protocol in advance.
  • a string of characters that can be transmitted based on the serial port is used as an authentication command, and another string of characters is configured as an authentication message corresponding to the authentication command.
  • the sales terminal for providing the key may send an authentication instruction based on the serial port communication to the sales terminal for downloading the key, and the sales terminal receiving the key for downloading analyzes the identity verification instruction, and after the analysis is completed, the The authentication message corresponding to the authentication instruction is fed back, and the sales terminal for providing the key performs the parsing and verification after receiving the identity verification message fed back by the sales terminal for downloading the key, and passes the data transmission port after the verification is passed. Establish a serial communication connection with the sales terminal for downloading the key.
  • the sales terminal for providing the key sends 8 bytes " ⁇ x02 ⁇ x30 ⁇ x30 ⁇ x32 ⁇ x31 ⁇ x30 ⁇ x03 ⁇ x30" to the sales terminal for downloading the key for downloading the key.
  • the sales terminal After receiving the data sent by the sales terminal for providing the key and verifying the success, the sales terminal sends 10 bytes of data " ⁇ x02 ⁇ x30 ⁇ x30 ⁇ x34 ⁇ x31 ⁇ x30 ⁇ x30 ⁇ x30 ⁇ x03 ⁇ x36"
  • the sales terminal for providing the key and the sales terminal for downloading the key are based on the serial port communication connection. Successfully started communication.
  • the serial port-based communication connection is established after the identity authentication based on the serial communication protocol is successful with the sales terminal for downloading the key, thereby further ensuring the security of the key download.
  • FIG. 6 is a timing diagram of key offline transmission in an embodiment.
  • the administrator logs in the sales terminal for providing the key through the administrator account, inputs the LMK key component, and the sales terminal for providing the key becomes the LMK according to the LMK key component; the sales terminal for providing the key is further based on the input.
  • the ZMK key component is ZMK; then the BDK is generated according to the input BDK key component or the BDK according to the input BDK ciphertext; the IPEK is generated according to the input KSN and BDK, and the TMK is generated according to the TMK key component.
  • the sales terminal for providing the key After generating the IPEK and the TMK, the sales terminal for providing the key sends an authentication instruction based on the serial communication to the sales terminal for downloading the key; and receiving the authentication of the sales terminal for downloading the key according to the authentication instruction feedback The message; after the authentication message is verified, a serial communication connection is established through the data transmission port with the sales terminal for downloading the key.
  • the sales terminal for downloading the key transmits the generated public key in the public-private key pair to the sales terminal for providing the key, and the sales terminal for providing the key encrypts the generated IPEK and/or according to the received public key.
  • TMK sending the encrypted IPEK and/or TMK to the sales terminal for downloading the key, and the sales terminal for downloading the key decrypts the encrypted IPEK and/or TMK according to the private key corresponding to the public key.
  • the decrypted IPEK and/or TMK are stored to the secure storage area, and a confirmation message is fed back to the sales terminal for providing the key, notifying that the sales terminal key download for providing the key is completed.
  • a structural block diagram of a terminal 700 is provided.
  • the internal structure of the terminal can be referred to the terminal shown in FIG. 2.
  • Each of the modules described below can be implemented in whole or in part by software, hardware, or a combination thereof.
  • the terminal 700 includes a serial communication establishing module 701, a receiving module 702, an encryption module 703, a sending module 704, and a confirming module 705.
  • the serial communication establishing module 701 is configured to establish a serial communication connection with the sales terminal for downloading the key through the data transmission port.
  • the receiving module 702 is configured to receive, by using a serial communication connection, a transmission key sent by a sales terminal for downloading a key.
  • the encryption module 703 is configured to encrypt the to-be-downloaded key by using a transport key.
  • the sending module 704 is configured to send the encrypted to-be-downloaded key to the sales terminal for downloading the key.
  • the confirmation module 705 is configured to receive a confirmation message fed back by the sales terminal for downloading the key; and disconnect the serial communication connection with the sales terminal for downloading the key according to the confirmation message.
  • the terminal 700 establishes a serial communication connection with a sales terminal for downloading a key through a data transmission port, and provides a transmission channel for performing key transmission under offline conditions.
  • the transmission key sent by the sales terminal of the key encrypts the key to be downloaded, which ensures the security of the key to be downloaded during transmission.
  • the serial communication establishing module 701 is further configured to send an authentication instruction based on serial communication to the sales terminal for downloading the key; and receive an authentication message fed back by the sales terminal for downloading the key according to the identity verification instruction. After the authentication message is verified, a serial communication connection is established through the data transmission port with the sales terminal for downloading the key.
  • the serial port-based communication connection is established after the identity authentication based on the serial communication protocol is successful with the sales terminal for downloading the key, thereby further ensuring the security of the key download.
  • the receiving module 702 is further configured to receive a public key sent by the sales terminal for downloading the key; the public key is generated by the sales terminal for downloading the key according to a built-in key generation algorithm.
  • the confirmation module 705 is further configured to receive a confirmation message fed back by the sales terminal for downloading the key; the confirmation message is generated by the sales terminal for downloading the key according to the built-in key generation algorithm and the private key corresponding to the public key Generated after decryption with the download key.
  • the encrypted key to be downloaded can be decrypted only by using the private key corresponding to the public key for encrypting the to-be-downloaded key, thereby further ensuring the security of the key transmission.
  • a structural block diagram of a terminal 800 is provided.
  • the internal structure of the terminal can be referred to the terminal shown in FIG. 2.
  • Each of the modules described below can be implemented in whole or in part by software, hardware, or a combination thereof.
  • the terminal 800 includes a key generation module 801, a serial communication establishment module 802, a receiving module 803, an encryption module 804, a sending module 805, and a confirmation module 806.
  • a key generation module 801 configured to acquire, by using an administrator account, a first key component for generating a first key, a second key component for generating a second key, and a key sequence number;
  • the first key component is calculated according to a preset logical operation manner to obtain a first key;
  • the obtained second key component is calculated according to a preset logical operation manner to obtain a basic key; according to the basic key and the key serial number Obtain the second key.
  • the serial communication establishing module 801 is configured to establish a serial communication connection with the sales terminal for downloading the key through the data transmission port.
  • the receiving module 802 is configured to receive, by using a serial communication connection, a transport key sent by a sales terminal for downloading a key.
  • the encryption module 803 is configured to encrypt the to-be-downloaded key by using a transport key.
  • the sending module 804 is configured to send the encrypted to-be-downloaded key to the sales terminal for downloading the key.
  • the confirmation module 805 is configured to receive a confirmation message fed back by the sales terminal for downloading the key; and disconnect the serial communication connection with the sales terminal for downloading the key according to the confirmation message.
  • the to-be-downloaded key includes a first key and a second key that are independent of each other, the first key is generated by the first key component, and the second key is composed of the second key component and the key serial number.
  • the generated second key is related to the key sequence number, and the different key sequence numbers generate different second keys, thereby avoiding the problem that the keys are completely identical and the risk of key leakage is high.
  • the key generation module 801 is further configured to encrypt the base key and the key sequence number according to the built-in key encryption manner to obtain the first part of the second key; and convert the basis according to a preset logical operation manner. Key; encrypt the converted base key and key sequence number according to the built-in key encryption method to obtain the second part of the second key; combine the second part of the second key and the second part of the second key Get the second key.
  • the second key for performing the first key encryption is generated by the multi-step key generation step, thereby further ensuring the security of the key.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

一种密钥离线传输方法,包括:通过数据传输端口与用于下载密钥的销售终端建立串口通信连接;通过所述串口通信连接接收所述用于下载密钥的销售终端发送的传输密钥;通过所述传输密钥加密待下载密钥;将加密后的所述待下载密钥发送至所述用于下载密钥的销售终端;接收所述用于下载密钥的销售终端反馈的确认消息;根据所述确认消息断开与所述用于下载密钥的销售终端间的串口通信连接。

Description

密钥离线传输方法、终端和存储介质
相关申请的交叉引用
本申请要求于2016年12月27日提交中国专利局,申请号为201611226904.1,发明名称为“密钥离线传输方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种密钥离线传输方法、终端和存储介质。
背景技术
随着移动支付技术快速发展,销售终端(POS终端Point ofsales销售点终端)作为金融支付***的前端硬件设备,也发生了快速发展,采用各种新型技术的POS终端快速涌现,如蓝牙POS终端、智能POS终端和云POS终端等。POS终端因为涉及个人账户和财产安全,需要对交易敏感信息进行加密。然而,用于下载密钥的销售终端受网络环境的限制,在只能接入交易网络而无法接入其他网络时,无法与用于提供密钥的销售终端进行密钥传输。
发明内容
根据本申请的各种实施例,提供一种密钥离线传输方法、终端和存储介质。
一种密钥离线传输方法,包括:
通过数据传输端口与用于下载密钥的销售终端建立串口通信连接;
通过所述串口通信连接接收所述用于下载密钥的销售终端发送的传输密钥;
通过所述传输密钥加密待下载密钥;
将加密后的所述待下载密钥发送至所述用于下载密钥的销售终端;
接收所述用于下载密钥的销售终端反馈的确认消息;及
根据所述确认消息断开与所述用于下载密钥的销售终端间的串口通信连接。
一种终端,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
通过数据传输端口与用于下载密钥的销售终端建立串口通信连接;
通过所述串口通信连接接收所述用于下载密钥的销售终端发送的传输密钥;
通过所述传输密钥加密待下载密钥;
将加密后的所述待下载密钥发送至所述用于下载密钥的销售终端;
接收所述用于下载密钥的销售终端反馈的确认消息;及
根据所述确认消息断开与所述用于下载密钥的销售终端间的串口通信连接。
一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
通过数据传输端口与用于下载密钥的销售终端建立串口通信连接;
通过所述串口通信连接接收所述用于下载密钥的销售终端发送的传输密钥;
通过所述传输密钥加密待下载密钥;
将加密后的所述待下载密钥发送至所述用于下载密钥的销售终端;
接收所述用于下载密钥的销售终端反馈的确认消息;及
根据所述确认消息断开与所述用于下载密钥的销售终端间的串口通信连接。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为一个实施例中密钥离线传输方法的应用环境图;
图2为一个实施例中终端的结构示意图;
图3为一个实施例中密钥离线传输方法的流程示意图;
图4为一个实施例中生成待下载密钥的步骤的流程示意图;
图5为一个实施例中根据基础密钥和密钥序列号获得第二密钥的步骤的流程示意图;
图6为一个实施例中密钥离线传输方法的时序图;
图7为一个实施例中终端的结构框图;
图8为另一个实施例中终端的结构框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中密钥离线传输方法的应用环境图。参照图1,该密钥离线传输方法应用于密钥离线下载***。密钥离线下载***包括用于提供密钥的销售终端110和用于下载密钥的销售终端120,用于提供密钥的销售终端110通过数据传输接口与用于下载密钥的销售终端120建立串口通信连接。用于提供密钥的销售终端110用于生成并管理密钥,可以是用于提供密钥的POS终端等。用于下载密钥的销售终端120用于获取用于提供密钥的销售终端110生成的密钥,可以是用于接收密钥的POS终端等。
图2为一个实施例中终端的内部结构示意图。该终端可以是如图1所示的 用于提供密钥的销售终端110。如图2所示,该用于提供密钥的终端包括通过***总线连接的处理器、非易失性存储介质、内存储器、串行接口、显示屏和输入装置。其中,终端的非易失性存储介质存储有操作***和数据库。该处理器用于提供计算和控制能力,支撑整个终端的运行。终端中的内存储器中可储存有计算机可读指令,该计算机可读指令被所述处理器执行时,可使得所述处理器执行一种密钥离线传输方法。串行接口用于与用于下载密钥的销售终端进行串口通信,如发送待下载密钥至用于下载密钥的销售终端,接收用于下载密钥的销售终端返回的确认消息等。显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是终端外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的终端的限定,具体的终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
如图3所示,在一个实施例中,提供了一种密钥离线传输方法,本实施例以该方法应用于上述图1中的用于提供密钥的销售终端110来举例说明。该方法具体包括如下步骤:
S302,通过数据传输端口与用于下载密钥的销售终端建立串口通信连接。
其中,数据传输端口是指用于传输数据的物理接口。串口即串行接口,也称串行通信接口或串行通讯接口(通常指COM接口(Cluster Communication Port串行通讯端口)),是采用串行通信方式的扩展接口。串口通信连接是指两个硬件设备之间通过物理专线连接物理接口建立的通信连接。
具体地,用于提供密钥的销售终端的数据传输端口可通过物理专线与用于下载密钥的销售终端的数据传输端口连接,在用于提供密钥的销售终端和用于下载密钥的销售终端之间建立基于串口的通信连接,以使得用于提供密钥的销售终端和用于下载密钥的销售终端之间通过该串口通信连接进行数据交互。
S304,通过串口通信连接接收用于下载密钥的销售终端发送的传输密钥。
其中,传输密钥是指用于加密传输数据的密钥。传输密钥可以是对称密钥,也可以是非对称密钥。对称密钥是数据传输双方使用相同的密钥。非对称密钥包括两个密钥:公开密钥(Public Key,简称公钥)和私有密钥(Private Key,简称私钥),数据传输中需要两个密钥来分别进行加密和解密。
在一个实施例中,步骤S304包括:接收用于下载密钥的销售终端发送的公钥;公钥由用于下载密钥的销售终端根据内置的密钥生成算法生成。具体地,用于下载密钥的销售终端可根据RSA加密算法(RSA algorithm)生成公钥与私钥的密钥对。在生成密钥对后,对生成的密钥对进行验证。用于下载密钥的销售终端可通过对一段随机数进行加密解密来验证密钥对的正确性。其中,随机数的生成是通过C语言标准库中的随机函数(random)随机生成的,使用公钥加密这串随机数,再用私钥解密这串随机数,如果解密后的结果与生成的随机数是相同,则判定生成的密钥对是正确的。
用于下载密钥的销售终端在判定生成的密钥对正确后,将公钥作为传输密钥封装入密钥请求数据包,再为密钥请求数据包添加包头、包尾和校验码,将添加完成的密钥请求数据包通过建立的基于串口的通信连接发送至用于提供密钥的销售终端。其中,校验码是事先设定的用于进行数据包校验的校验码。用于下载密钥的销售终端和/或用于提供密钥的销售终端通过该校验码标识发送的数据包的类型。
在一个实施例中,用于下载密钥的销售终端可根据DES算法(Data Encryption Standard,数据加密标准)生成传输密钥,将传输密钥封装入密钥请求数据包,再为密钥请求数据包添加包头、包尾和校验码,将添加完成的密钥请求数据包通过建立的基于串口的通信连接发送至用于提供密钥的销售终端。
S306,通过传输密钥加密待下载密钥。
具体地,用于提供密钥的销售终端在接收到用于下载密钥的销售终端发送的密钥请求数据包后,对接收到的密钥请求数据包进行解析,提取密钥请 求数据包中包括的校验码。若该校验码表示该数据包为封装了传输密钥的密钥请求数据包,则从该密钥请求数据包中提取封装的传输密钥;若该校验码表示该密钥请求数据包不为封装了传输密钥的密钥请求数据包,则将该密钥请求数据包丢弃。
S308,将加密后的待下载密钥发送至用于下载密钥的销售终端。
具体地,用于提供密钥的销售终端在提取到传输密钥后,将使用获取的传输密钥加密待下载密钥,将加密后的待下载密钥装入密钥应答数据包,再为密钥应答数据包添加包头、包尾和校验码,将添加完成的密钥应答数据包通过建立的基于串口的通信连接发送至用于下载密钥的销售终端。
S310,接收用于下载密钥的销售终端反馈的确认消息。
具体地,用于下载密钥的销售终端在接收到用于下载密钥的销售终端发送的密钥应答数据包后,对接收到的密钥应答数据包进行解析,提取密钥应答数据包中包括的校验码。若该校验码表示该数据包为封装了待下载密钥的密钥应答数据包,则使用传输密钥对该密钥应答数据包进行解密,提取封装的待下载密钥;若该校验码表示该密钥请求数据包不为封装了传输密钥的密钥应答数据包,则将该密钥应答数据包丢弃。
其中,当传输密钥为对称密钥时,用于解密的传输密钥与用于下载密钥的销售终端发送至用于提供密钥的销售终端的密钥一致。当传输密钥为非对称密钥时,用于解密的传输密钥是与发送的公钥对应的私钥。
在一个实施例中,步骤S310包括:接收用于下载密钥的销售终端反馈的确认消息;确认消息由用于下载密钥的销售终端按照根据内置的密钥生成算法生成的,且与公钥对应的私钥解密带下载密钥后生成。在本实施例中,只有使用与加密待下载密钥的公钥对应的私钥才能对加密后的待下载密钥进行解密,进一步保证了密钥传输的安全性。
用于下载密钥的销售终端在通过传输密钥对密钥应答数据包进行解密,提取封装的待下载密钥后,将提取的密钥存储至用于下载密钥的销售终端的安全存储区域。其中,安全存储区域是指通过PCIDSS(Payment Card Industry  Data Security Standard支付卡行业数据安全标准)认证的PINPAD(Personal Identification Number Personal Digital Assistant个人标识的个人数字助手)密钥保存区域。通过PCI认证密钥保存区域可保证密钥存储的安全性。
用于下载密钥的销售终端在存储提取的密钥后,通过建立的串口通信连接向用于提供密钥的销售终端发送确认信息,以通知用于提供密钥的销售终端密钥下载完成。其中,确认消息是用于提供密钥的销售终端与用于下载密钥的销售终端预先基于串口通信协议配置的数据串。该数据串在配置时被设定为表征用于下载密钥的销售终端下载密钥完成。比如,用于提供密钥的销售终端与用于下载密钥的销售终端可事先约定数据串“\x02\x30\x30\x34\x32\x31\x30\x30\x03”作为确认信息。
S312,根据确认消息断开与用于下载密钥的销售终端间的串口通信连接。
具体地,用于提供密钥的销售终端在接收到用于下载密钥的销售终端发送的确认消息后判定用于下载密钥的销售终端下载密钥完成,断开与用于下载密钥的销售终端间的串口通信连接。
上述密钥离线传输方法,通过数据传输端口与用于下载密钥的销售终端建立串口通信连接,提供了离线条件下进行密钥传输的传输通道。再通过用于下载密钥的销售终端发送的传输密钥对需要下载的密钥进行加密,保证了待下载密钥在传输过程中的安全性。
在一个实施例中,密钥离线传输方法中待下载密钥包括相互独立的第一密钥和第二密钥。如图4所示,步骤S302之前,密钥离线传输方法还包括生成待下载密钥的步骤,具体包括如下步骤:
S402,获取通过管理员账号输入的用于生成第一密钥的第一密钥分量、用于生成第二密钥的第二密钥分量以及密钥序列号。
其中,管理员是指进行密钥管理的人员。管理员可通过管理员账号登录用于提供密钥的销售终端,通过管理员账号输入用于生成第一密钥的第一密钥分量、用于生成第二密钥的第二密钥分量以及密钥序列号。密钥序列号(Key Serial Number KSN)由密钥标识号(Key Set Identifier KSI)、设备标识号 (Device Identifier DID)和交易计数标识(Transaction Counter TC)组合而成。
密钥标识号用于唯一标识一个密钥,设备标识号用于唯一标识一台用于下载密钥的销售终端,交易计数标识用于唯一标识一次交易。密钥标识号、设备标识号和交易计数标识均可以是包括数字、字母和符号中的至少一种字符的字符串。比如:DID事先约定为五个字节具体为00002,KSI具体为事先约定为八个字节FFFFF03001,由于在密钥生成阶段,未进行交易,故交易计数标识为0,那么KSN为FFFFF03001000020。
具体地,用于提供密钥的销售终端可提供仅可通过管理员账号用于进行字符输入的界面,在检测到作用于字符输入界面的操作后,获取输入的用于生成第一密钥的第一密钥分量、用于生成第二密钥的第二密钥分量以及密钥序列号。
S404,将获取的第一密钥分量按照预设的逻辑运算方式计算得到第一密钥。
具体地,第一密钥是用于加密数据的密钥。预设的逻辑运算方式是指预先设置的用于对第一密钥分量进行计算得到第一密钥的计算方式,比如异或运算等。在本实施例中,第一密钥为TMK(Terminal Master Key终端主密钥)。
在一个实施例中,第一密钥分量为两个16字节的字符串,管理员可在通过管理员账号登录用于提供密钥的销售终端输入第一密钥分量后输入用于校验第一密钥分量的KCV(Key Check Value)校验码。在通过KCV(Key Check Value)校验码校验第一密钥分量通过后,将获取的第一密钥分量按照预设的逻辑运算方式计算得到第一密钥。
KCV校验码是指使用密钥分量对指定数据加密后的部分密文数据。比如:管理员使用密钥分量8个0x00加密后的前4个字节数据当做KCV,当用于下载密钥的销售终端接收到密钥分量后,使用密钥分量对8个0x00加密得到加密结果,将加密结果前4个字节与KCV做比较,如果一致,则表示密钥分量是正确的,如果不一致,则表示密钥分量是错误的。
举例说明,若用于下载密钥的销售终端获取的通过管理员账号输入的两 个16字节密钥分量和两个4字节KCV校验码分别为:第一密钥分量M1:AB AB AB AB CD CD CD CD EF EF EF EF 12 34 56 78,第一密钥分量M1的KCV校验码:M1_KCV:88 6D 67 5A,第一密钥分量M2:12 34 56 78 90 AB AB CD CD EF EF AC AC BD BD EF,第一密钥分量M2的KCV校验码:M2_KCV:19 85 BB 83,经KCV验证各密钥分量成功后开始生成第一密钥,第一密钥为对两个第一密钥分量做异或运算M1 Xor M2,得到第一密钥为B9 9F FD D3 5D 66 66 00 22 00 00 43 BE 89 EB 97。
S406,将获取的第二密钥分量按照预设的逻辑运算方式计算得到基础密钥。
其中,第二密钥分量包括用于生成LMK(Local Master Key本地主密钥)的LMK密钥分量、用于生成ZMK(Zone Master Key区域主密钥)的ZMK密钥分量和用于生成BDK(Base Derivation Key根密钥)的BDK密钥分量。LMK密钥分量、ZMK密钥分量与BDK密钥分量是相互独立且不同的密钥分量。
具体地,用于提供密钥的销售终端可先生成LMK。在安全屋环境中,用于提供密钥的销售终端在获取三个管理员通过管理员账号分别输入LMK密钥分量和KCV校验码后,可先采用KCV校验码对密钥分量进行校验,在校验成功后,对其中任意两个密钥分量进行异或运算,得到的结果再和第三个密钥分量进行异或运算,得到LMK并存入用于提供密钥的销售终端的安全存储区域。
其中,安全屋环境是指通过PCI认证的安全区域,或者处于实时监控状态下的安全区域等。由于通过管理员账号分别输入LMK密钥分量为明文显示的密钥分量,因此需要在安全屋环境下进行输入以保证明文显示的密钥分量不被泄露。LMK可用来对用于生成后续密钥的密钥分量进行加密和解密。
用于提供密钥的销售终端可采用相同的密钥生成方式继续生成ZMK并存入用于提供密钥的销售终端的安全存储区域。具体地,用于提供密钥的销售终端在先后获取三个管理员通过管理员账号分别输入经过LMK加密的 ZMK密钥分量时,将在先获取的ZMK密钥分量存储至安全存储区域,然后在用于提供密钥的销售终端完成获取三个ZMK密钥分量后,用LMK对三个加密后的ZMK密钥分量进行3DES解密,以生成ZMK。其中,ZMK密钥分量事先已用LMK进行3DES(Triple Data Encryption Standard三重数据加密算法)。ZMK可用来对用于生成后续密钥的密钥分量进行加密和解密。
用于提供密钥的销售终端可采用相同的密钥生成方式继续生成BDK并存入用于提供密钥的销售终端的安全存储区域。具体地,用于提供密钥的销售终端在先后获取三个管理员通过管理员账号分别输入经过LMK或者ZMK加密的BDK密钥分量时,将在先获取的BDK密钥分量存储至安全存储区域,然后在用于提供密钥的销售终端完成获取三个BDK密钥分量后,用LMK或者ZMK对三个加密后的BDK密钥分量进行3DES解密,以生成BDK。其中,BDK密钥分量事先已用LMK或者ZMK进行3DES(Triple Data Encryption Standard三重数据加密算法)。用于提供密钥的销售终端生成的BDK即为基础密钥。
S408,根据基础密钥和密钥序列号获得第二密钥。
具体地,第二密钥也是用于加密数据的密钥,是与第一密钥不同且相互独立的密钥。第一密钥与第二密钥对数据进行加密的方式不同。在本实施例中,第二密钥为IPEK(Initial PIN Encrypting Key初始密码加密密钥)
在本实施例中,待下载密钥包括相互独立的第一密钥和第二密钥,第一密钥由第一密钥分量生成,第二密钥由第二密钥分量以及密钥序列号相同,通过多个密钥以保证数据传输的安全性。而且,生成的第二密钥与密钥序列号有关,不同的密钥序列号生成不同的第二密钥,避免了密钥完全相同而导致密钥泄露风险高的问题。
在一个实施例中,步骤S408具体包括如下步骤:
S502,按照内置的密钥加密方式对基础密钥和密钥序列号进行加密,得到第二密钥第一部分。
具体地,用于提供密钥的销售终端可采用3DES加密算法对基础密钥 BDK与密钥序列号KSN进行加密,得到第二密钥第一部分。第二密钥第一部分可以是IPEK的左半部分。
S504,根据预设的逻辑运算方式转化基础密钥。
具体地,用于提供密钥的销售终端可事先配置用于转化基础密钥的字符串。在第二密钥生成阶段,用于提供密钥的销售终端可将预先配置的用于转化基础密钥的字符串与基础密钥进行异或运算得到转化后的基础密钥。
S506,按照内置的密钥加密方式对转化后的基础密钥和密钥序列号进行加密,得到第二密钥第二部分。
具体地,用于提供密钥的销售终端可采用3DES加密算法对转化后的基础密钥BDK与密钥序列号KSN进行加密,得到第二密钥第二部分。第二密钥第二部分可以是IPEK的右半部分。
S508,将第二密钥第一部分和第二密钥第二部分组合得到第二密钥。
在本实施例中,通过多步密钥生成步骤生成用于进行第一密钥加密的第二密钥,进一步保证了密钥的安全性。
举例说明,用于提供密钥的销售终端生成IPEK过程具体如下:
用于提供密钥的销售终端获取的LMK密钥分量L1为11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11,LMK密钥分量L1的KCV校验码L1_KCV为82 E1 36 65,LMK密钥分量L2为22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22,LMK密钥分量L2的KCV校验码L2_KCV为00 96 2B 60,LMK密钥分量L3为21 07 65 4B A3 98FE DC CD EF 89 3A B4 56 70 12,LMK密钥分量L3的KCV校验码L3_KCV为3F 5F 93 61。用于提供密钥的销售终端使用KCV码验证各密钥分量输入正确后,将三个LMK密钥分量进行异或运算生成LMK=L1 Xor L2 Xor L3=12 34 56 78 90 AB CD EF FE DC BA 09 87 65 43 21。
用于提供密钥的销售终端获取的中ZMK密钥分量Z1为44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44,ZMK密钥分量Z1的KCV校验码Z1_KCV为E2 F2 43 40,ZMK密钥分量Z2为55 55 55 55 55 55 55 55 55 55 55 55 55 55  55 55,ZMK密钥分量Z2的KCV校验码Z2_KCV为0C D7 DC 49,ZMK密钥分量Z3为66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66,ZMK密钥分量Z3的KCV校验码Z3_KCV为B0 B5 63 C2。用于提供密钥的销售终端使用KCV码验证各密钥分量输入正确后,将三个ZMK密钥分量进行异或运算生成ZMK=Z1 Xor Z2 Xor Z3=77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77。
用于提供密钥的销售终端获取的中BDK密钥分量B1为77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77,BDK密钥分量B1的KCV校验码B1_KCV为4C BE 91 BE,BDK密钥分量B2为88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88,BDK密钥分量B2的KCV校验码B2_KCV为F9 F4 FB D3,BDK密钥分量B3为99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99,BDK密钥分量B3的KCV校验码B3_KCV为0F 2F CF 4A。用于提供密钥的销售终端使用KCV码验证各密钥分量输入正确后,将三个BDK密钥分量进行异或运算生成BDK=B1 Xor B2 Xor B3=66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66。
用于提供密钥的销售终端还可根据获取的密文生成BDK。具体地,BDK密文为12 34 56 78 90 AB CD EF AB CD EF AB CD EF AB CD,用ZMK对BDK密文进行3SES解密得到BDK_明文=3DES(ZMK,B_密文)=EA A2 AD CB 97 37 13 37 EA A2 AD CB 97 37 13 37,即为BDK。
用于提供密钥的销售终端获取的KSN为FFFFF03001000020,生成的BDK为66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66,将KSN和BDK进行3DS加密作为IPEK的左半部分IPEK(left)=3DES(BDK,KSN)=5E6A7318D60EF47D。用于提供密钥的销售终端再将BDK与用于转化BDK的“C0C0 C0C0 0000 0000 C0C0 C0C0 0000 0000”进行异或运算,得到转化后的BDK为A6 A6 A6 A6 66 66 66 66 A6 A6 A6 A6 66 66 66 66,再将转化后的BDK和KSN进行3DES加密作为IPEK的右半部分IPEK(right)=3DES(异或结果,KSN)=B2B56CC92CC92EB6。那么IPEK=IPEK(left)+IPEK(right)=F781F00BFF6F83A4 B2B56CC92CC92EB6。
在一个实施例中,密钥传输方法中步骤S302具体包括向用于下载密钥的 销售终端发送基于串口通信的身份验证指令;接收用于下载密钥的销售终端根据身份验证指令反馈的身份验证消息;在对身份验证消息验证通过后,通过数据传输端口与用于下载密钥的销售终端建立串口通信连接。
具体地,用于提供密钥的销售终端和用于下载密钥的销售终端可事先配置基于串口通信协议的身份验证指令和身份验证消息。将可基于串口传输的一串字符作为身份验证指令,并配置另一串字符作为与该身份验证指令对应的身份验证消息。用于提供密钥的销售终端可向用于下载密钥的销售终端发送基于串口通信的身份验证指令,接收用于下载密钥的销售终端对身份验证指令进行解析,在解析完成后,将与身份验证指令对应的身份验证消息进行反馈,用于提供密钥的销售终端在接收到用于下载密钥的销售终端反馈的身份验证消息后,进行解析验证,在验证通过后,通过数据传输端口与用于下载密钥的销售终端建立串口通信连接。
举例说明,用于提供密钥的销售终端发送8个字节″\x02\x30\x30\x32\x31\x30\x03\x30″给用于下载密钥的销售终端,用于下载密钥的销售终端收到用于提供密钥的销售终端发来的数据并验证成功后,发送10个字节的数据″\x02\x30\x30\x34\x31\x30\x30\x30\x03\x36″应答回用于提供密钥的销售终端,用于提供密钥的销售终端收到应答后验证成功后,则用于提供密钥的销售终端与用于下载密钥的销售终端基于串口的通信连接成功开始通讯。
本实施例中,在与用于下载密钥的销售终端间基于串口通信协议的身份认证成功后才建立基于串口的通信连接,进一步保障了密钥下载的安全性。
如图6所示为一个实施例中密钥离线传输时序图。管理员通过管理员账户登录用于提供密钥的销售终端,输入LMK密钥分量,用于提供密钥的销售终端根据LMK密钥分量成LMK;用于提供密钥的销售终端再根据输入的ZMK密钥分量成ZMK;然后根据输入的BDK密钥分量成BDK或者根据输入的BDK密文生成BDK;再根据输入的KSN和BDK生成IPEK,并根据TMK密钥分量生成TMK。
用于提供密钥的销售终端在生成IPEK和TMK后,向用于下载密钥的销售终端发送基于串口通信的身份验证指令;接收用于下载密钥的销售终端根据身份验证指令反馈的身份验证消息;在对身份验证消息验证通过后,通过数据传输端口与用于下载密钥的销售终端建立串口通信连接。
用于下载密钥的销售终端将生成的公私密钥对中的公钥发送至用于提供密钥的销售终端,用于提供密钥的销售终端根据接收到的公钥加密生成的IPEK和/或TMK,将加密后的IPEK和/或TMK发送至用于下载密钥的销售终端,用于下载密钥的销售终端再根据与公钥对应的私钥解密加密后的IPEK和/或TMK,并将解密后的IPEK和/或TMK存储至安全存储区域,并向用于提供密钥的销售终端反馈确认消息,通知用于提供密钥的销售终端密钥下载完成。
如图7所示,在一个实施例中,提供了一种终端700的结构框图。该终端的内部结构可参照如图2所示的终端。下述的每个模块可全部或部分通过软件、硬件或其组合来实现。
参照图7,终端700包括:串口通信建立模块701、接收模块702、加密模块703、发送模块704和确认模块705。
串口通信建立模块701,用于通过数据传输端口与用于下载密钥的销售终端建立串口通信连接。
接收模块702,用于通过串口通信连接接收用于下载密钥的销售终端发送的传输密钥。
加密模块703,用于通过传输密钥加密待下载密钥。
发送模块704,用于将加密后的待下载密钥发送至用于下载密钥的销售终端。
确认模块705,用于接收用于下载密钥的销售终端反馈的确认消息;根据确认消息断开与用于下载密钥的销售终端间的串口通信连接。
上述终端700,通过数据传输端口与用于下载密钥的销售终端建立串口通信连接,提供了离线条件下进行密钥传输的传输通道。再通过用于下载密 钥的销售终端发送的传输密钥对需要下载的密钥进行加密,保证了待下载密钥在传输过程中的安全性。
在一个实施例中,串口通信建立模块701还用于向用于下载密钥的销售终端发送基于串口通信的身份验证指令;接收用于下载密钥的销售终端根据身份验证指令反馈的身份验证消息;在对身份验证消息验证通过后,通过数据传输端口与用于下载密钥的销售终端建立串口通信连接。
本实施例中,在与用于下载密钥的销售终端间基于串口通信协议的身份认证成功后才建立基于串口的通信连接,进一步保障了密钥下载的安全性。
在一个实施例中,接收模块702还用于接收用于下载密钥的销售终端发送的公钥;公钥由用于下载密钥的销售终端根据内置的密钥生成算法生成。
确认模块705还用于接收用于下载密钥的销售终端反馈的确认消息;确认消息由用于下载密钥的销售终端按照根据内置的密钥生成算法生成的,且与公钥对应的私钥解密带下载密钥后生成。
在本实施例中,只有使用与加密待下载密钥的公钥对应的私钥才能对加密后的待下载密钥进行解密,进一步保证了密钥传输的安全性。
如图8所示,在一个实施例中,提供了一种终端800的结构框图。该终端的内部结构可参照如图2所示的终端。下述的每个模块可全部或部分通过软件、硬件或其组合来实现。
参考图8,终端800包括:密钥生成模块801、串口通信建立模块802、接收模块803、加密模块804、发送模块805和确认模块806。
密钥生成模块801,用于获取通过管理员账号输入的用于生成第一密钥的第一密钥分量、用于生成第二密钥的第二密钥分量以及密钥序列号;将获取的第一密钥分量按照预设的逻辑运算方式计算得到第一密钥;将获取的第二密钥分量按照预设的逻辑运算方式计算得到基础密钥;根据基础密钥和密钥序列号获得第二密钥。
串口通信建立模块801,用于通过数据传输端口与用于下载密钥的销售终端建立串口通信连接。
接收模块802,用于通过串口通信连接接收用于下载密钥的销售终端发送的传输密钥。
加密模块803,用于通过传输密钥加密待下载密钥。
发送模块804,用于将加密后的待下载密钥发送至用于下载密钥的销售终端。
确认模块805,用于接收用于下载密钥的销售终端反馈的确认消息;根据确认消息断开与用于下载密钥的销售终端间的串口通信连接。
本实施例中,待下载密钥包括相互独立的第一密钥和第二密钥,第一密钥由第一密钥分量生成,第二密钥由第二密钥分量以及密钥序列号相同,通过多个密钥以保证数据传输的安全性。而且,生成的第二密钥与密钥序列号有关,不同的密钥序列号生成不同的第二密钥,避免了密钥完全相同而导致密钥泄露风险高的问题。
在一个实施例中,密钥生成模块801还用于按照内置的密钥加密方式对基础密钥和密钥序列号进行加密,得到第二密钥第一部分;根据预设的逻辑运算方式转化基础密钥;按照内置的密钥加密方式对转化后的基础密钥和密钥序列号进行加密,得到第二密钥第二部分;将第二密钥第一部分和第二密钥第二部分组合得到第二密钥。
本实施例中,通过多步密钥生成步骤生成用于进行第一密钥加密的第二密钥,进一步保证了密钥的安全性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (18)

  1. 一种密钥离线传输方法,包括:
    通过数据传输端口与用于下载密钥的销售终端建立串口通信连接;
    通过所述串口通信连接接收所述用于下载密钥的销售终端发送的传输密钥;
    通过所述传输密钥加密待下载密钥;
    将加密后的所述待下载密钥发送至所述用于下载密钥的销售终端;
    接收所述用于下载密钥的销售终端反馈的确认消息;及
    根据所述确认消息断开与所述用于下载密钥的销售终端间的串口通信连接。
  2. 根据权利要求1所述的方法,其特征在于,所述待下载密钥包括相互独立的第一密钥和第二密钥;
    所述通过数据传输端口与用于下载密钥的销售终端建立串口通信连接之前,所述方法包括:
    获取通过管理员账号输入的用于生成第一密钥的第一密钥分量、用于生成第二密钥的第二密钥分量以及密钥序列号;
    将获取的第一密钥分量按照预设的逻辑运算方式计算得到第一密钥;
    将获取的第二密钥分量按照预设的逻辑运算方式计算得到基础密钥;及
    根据所述基础密钥和所述密钥序列号获得第二密钥。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述基础密钥和所述密钥序列号获得第二密钥包括:
    按照内置的密钥加密方式对所述基础密钥和所述密钥序列号进行加密,得到第二密钥第一部分;
    根据预设的逻辑运算方式转化所述基础密钥;
    按照内置的密钥加密方式对转化后的所述基础密钥和所述密钥序列号进行加密,得到第二密钥第二部分;及
    将所述第二密钥第一部分和所述第二密钥第二部分组合得到第二密钥。
  4. 根据权利要求1所述的方法,其特征在于,所述通过数据传输端口与用于下载密钥的销售终端建立串口通信连接包括:
    向所述用于下载密钥的销售终端发送基于串口通信的身份验证指令;
    接收所述用于下载密钥的销售终端根据所述身份验证指令反馈的身份验证消息;及
    在对所述身份验证消息验证通过后,通过数据传输端口与所述用于下载密钥的销售终端建立串口通信连接。
  5. 根据权利要求1所述的方法,其特征在于,所述接收所述用于下载密钥的销售终端发送的传输密钥包括:
    接收所述用于下载密钥的销售终端发送的公钥;所述公钥由所述用于下载密钥的销售终端根据内置的密钥生成算法生成;
    所述接收所述用于下载密钥的销售终端反馈的确认消息包括:
    接收所述用于下载密钥的销售终端反馈的确认消息;所述确认消息由所述用于下载密钥的销售终端按照根据所述内置的密钥生成算法生成的,且与所述公钥对应的私钥解密所述带下载密钥后生成。
  6. 根据权利要求1所述的方法,其特征在于,所述接收所述用于下载密钥的销售终端反馈的确认消息包括:
    接收所述用于下载密钥的销售终端,将加密后的所述待下载密钥解密、且存储至所述用于下载密钥的销售终端的安全存储区域后反馈的确认消息。
  7. 一种终端,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    通过数据传输端口与用于下载密钥的销售终端建立串口通信连接;
    通过所述串口通信连接接收所述用于下载密钥的销售终端发送的传输密钥;
    通过所述传输密钥加密待下载密钥;
    将加密后的所述待下载密钥发送至所述用于下载密钥的销售终端;
    接收所述用于下载密钥的销售终端反馈的确认消息;及
    根据所述确认消息断开与所述用于下载密钥的销售终端间的串口通信连接。
  8. 根据权利要求7所述的终端,其特征在于,所述待下载密钥包括相互独立的第一密钥和第二密钥;
    所述计算机可读指令被所述处理器执行时,使得所述处理器在执行所述通过数据传输端口与用于下载密钥的销售终端建立串口通信连接的步骤之前,执行以下步骤:
    获取通过管理员账号输入的用于生成第一密钥的第一密钥分量、用于生成第二密钥的第二密钥分量以及密钥序列号;
    将获取的第一密钥分量按照预设的逻辑运算方式计算得到第一密钥;
    将获取的第二密钥分量按照预设的逻辑运算方式计算得到基础密钥;及
    根据所述基础密钥和所述密钥序列号获得第二密钥。
  9. 根据权利要求8所述的终端,其特征在于,所述根据所述基础密钥和所述密钥序列号获得第二密钥包括:
    按照内置的密钥加密方式对所述基础密钥和所述密钥序列号进行加密,得到第二密钥第一部分;
    根据预设的逻辑运算方式转化所述基础密钥;
    按照内置的密钥加密方式对转化后的所述基础密钥和所述密钥序列号进行加密,得到第二密钥第二部分;及
    将所述第二密钥第一部分和所述第二密钥第二部分组合得到第二密钥。
  10. 根据权利要求7所述的终端,其特征在于,所述通过数据传输端口与用于下载密钥的销售终端建立串口通信连接包括:
    向所述用于下载密钥的销售终端发送基于串口通信的身份验证指令;
    接收所述用于下载密钥的销售终端根据所述身份验证指令反馈的身份验证消息;及
    在对所述身份验证消息验证通过后,通过数据传输端口与所述用于下载 密钥的销售终端建立串口通信连接。
  11. 根据权利要求7所述的终端,其特征在于,所述接收所述用于下载密钥的销售终端发送的传输密钥包括:
    接收所述用于下载密钥的销售终端发送的公钥;所述公钥由所述用于下载密钥的销售终端根据内置的密钥生成算法生成;
    所述接收所述用于下载密钥的销售终端反馈的确认消息包括:
    接收所述用于下载密钥的销售终端反馈的确认消息;所述确认消息由所述用于下载密钥的销售终端按照根据所述内置的密钥生成算法生成的,且与所述公钥对应的私钥解密所述带下载密钥后生成。
  12. 根据权利要求7所述的终端,其特征在于,所述接收所述用于下载密钥的销售终端反馈的确认消息包括:
    接收所述用于下载密钥的销售终端,将加密后的所述待下载密钥解密、且存储至所述用于下载密钥的销售终端的安全存储区域后反馈的确认消息。
  13. 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    通过数据传输端口与用于下载密钥的销售终端建立串口通信连接;
    通过所述串口通信连接接收所述用于下载密钥的销售终端发送的传输密钥;
    通过所述传输密钥加密待下载密钥;
    将加密后的所述待下载密钥发送至所述用于下载密钥的销售终端;
    接收所述用于下载密钥的销售终端反馈的确认消息;及
    根据所述确认消息断开与所述用于下载密钥的销售终端间的串口通信连接。
  14. 根据权利要求13所述的存储介质,其特征在于,所述待下载密钥包括相互独立的第一密钥和第二密钥;
    所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或 多个处理器在执行所述通过数据传输端口与用于下载密钥的销售终端建立串口通信连接的步骤之前,执行以下步骤:
    获取通过管理员账号输入的用于生成第一密钥的第一密钥分量、用于生成第二密钥的第二密钥分量以及密钥序列号;
    将获取的第一密钥分量按照预设的逻辑运算方式计算得到第一密钥;
    将获取的第二密钥分量按照预设的逻辑运算方式计算得到基础密钥;及
    根据所述基础密钥和所述密钥序列号获得第二密钥。
  15. 根据权利要求13所述的存储介质,其特征在于,所述根据所述基础密钥和所述密钥序列号获得第二密钥包括:
    按照内置的密钥加密方式对所述基础密钥和所述密钥序列号进行加密,得到第二密钥第一部分;
    根据预设的逻辑运算方式转化所述基础密钥;
    按照内置的密钥加密方式对转化后的所述基础密钥和所述密钥序列号进行加密,得到第二密钥第二部分;及
    将所述第二密钥第一部分和所述第二密钥第二部分组合得到第二密钥。
  16. 根据权利要求13所述的存储介质,其特征在于,所述通过数据传输端口与用于下载密钥的销售终端建立串口通信连接包括:
    向所述用于下载密钥的销售终端发送基于串口通信的身份验证指令;
    接收所述用于下载密钥的销售终端根据所述身份验证指令反馈的身份验证消息;及
    在对所述身份验证消息验证通过后,通过数据传输端口与所述用于下载密钥的销售终端建立串口通信连接。
  17. 根据权利要求13所述的存储介质,其特征在于,所述接收所述用于下载密钥的销售终端发送的传输密钥包括:
    接收所述用于下载密钥的销售终端发送的公钥;所述公钥由所述用于下载密钥的销售终端根据内置的密钥生成算法生成;
    所述接收所述用于下载密钥的销售终端反馈的确认消息包括:
    接收所述用于下载密钥的销售终端反馈的确认消息;所述确认消息由所述用于下载密钥的销售终端按照根据所述内置的密钥生成算法生成的,且与所述公钥对应的私钥解密所述带下载密钥后生成。
  18. 根据权利要求13所述的存储介质,其特征在于,所述接收所述用于下载密钥的销售终端反馈的确认消息包括:
    接收所述用于下载密钥的销售终端,将加密后的所述待下载密钥解密、且存储至所述用于下载密钥的销售终端的安全存储区域后反馈的确认消息。
PCT/CN2017/102972 2016-12-27 2017-09-22 密钥离线传输方法、终端和存储介质 WO2018120938A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611226904.1A CN106712939A (zh) 2016-12-27 2016-12-27 密钥离线传输方法和装置
CN201611226904.1 2016-12-27

Publications (1)

Publication Number Publication Date
WO2018120938A1 true WO2018120938A1 (zh) 2018-07-05

Family

ID=58896516

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102972 WO2018120938A1 (zh) 2016-12-27 2017-09-22 密钥离线传输方法、终端和存储介质

Country Status (2)

Country Link
CN (1) CN106712939A (zh)
WO (1) WO2018120938A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464188A (zh) * 2020-12-14 2021-03-09 艾体威尔电子技术(北京)有限公司 一种支付终端与外设密码键盘的绑定方法
CN112910878A (zh) * 2021-01-28 2021-06-04 武汉市博畅软件开发有限公司 一种基于串口通信的数据传输方法及***

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106712939A (zh) * 2016-12-27 2017-05-24 百富计算机技术(深圳)有限公司 密钥离线传输方法和装置
CN109274500B (zh) * 2018-10-15 2020-06-02 百富计算机技术(深圳)有限公司 一种密钥下载方法、客户端、密码设备及终端设备
CN111815815B (zh) * 2020-06-22 2022-06-24 合肥智辉空间科技有限责任公司 一种电子锁安全***
CN111881463A (zh) * 2020-07-17 2020-11-03 盛视科技股份有限公司 一种串口通信加密方法、***及串口设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673443A (zh) * 2009-09-28 2010-03-17 广州市国安信息工程有限公司 网络收银机***及其实现方法
CN103716320A (zh) * 2013-03-15 2014-04-09 福建联迪商用设备有限公司 一种终端主密钥tmk安全下载方法及***
EP3104548A1 (en) * 2015-06-08 2016-12-14 Nxp B.V. Method and system for facilitating secure communication
CN106712939A (zh) * 2016-12-27 2017-05-24 百富计算机技术(深圳)有限公司 密钥离线传输方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930644B (zh) * 2009-06-25 2014-04-16 ***股份有限公司 一种银行卡支付***中主密钥安全自动下载的方法及其***
CN105978856B (zh) * 2016-04-18 2019-01-25 随行付支付有限公司 一种pos机密钥下载方法、装置及***

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673443A (zh) * 2009-09-28 2010-03-17 广州市国安信息工程有限公司 网络收银机***及其实现方法
CN103716320A (zh) * 2013-03-15 2014-04-09 福建联迪商用设备有限公司 一种终端主密钥tmk安全下载方法及***
CN103714634A (zh) * 2013-03-15 2014-04-09 福建联迪商用设备有限公司 一种安全下载终端主密钥的方法及***
EP3104548A1 (en) * 2015-06-08 2016-12-14 Nxp B.V. Method and system for facilitating secure communication
CN106712939A (zh) * 2016-12-27 2017-05-24 百富计算机技术(深圳)有限公司 密钥离线传输方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464188A (zh) * 2020-12-14 2021-03-09 艾体威尔电子技术(北京)有限公司 一种支付终端与外设密码键盘的绑定方法
CN112464188B (zh) * 2020-12-14 2023-10-31 艾体威尔电子技术(北京)有限公司 一种支付终端与外设密码键盘的绑定方法
CN112910878A (zh) * 2021-01-28 2021-06-04 武汉市博畅软件开发有限公司 一种基于串口通信的数据传输方法及***

Also Published As

Publication number Publication date
CN106712939A (zh) 2017-05-24

Similar Documents

Publication Publication Date Title
WO2018120938A1 (zh) 密钥离线传输方法、终端和存储介质
CN103118027B (zh) 基于国密算法建立tls通道的方法
CN109088889B (zh) 一种ssl加解密方法、***及计算机可读存储介质
CN108377190B (zh) 一种认证设备及其工作方法
US9887838B2 (en) Method and device for secure communications over a network using a hardware security engine
CN112737779B (zh) 一种密码机服务方法、装置、密码机及存储介质
WO2021196915A1 (zh) 基于加密、解密操作的数据传输方法、***和计算机设备
US20230353390A1 (en) Method for upgrading certificate of pos terminal, server, and pos terminal
CN111435913B (zh) 一种物联网终端的身份认证方法、装置和存储介质
WO2018090763A1 (zh) 一种终端主密钥的设置方法和装置
WO2015161689A1 (zh) 一种基于协商密钥的数据处理方法
US12003629B2 (en) Secure server digital signature generation for post-quantum cryptography key encapsulations
TW202121868A (zh) 資料的加解密方法、裝置、存儲介質及加密文件
CN111181723B (zh) 物联网设备间离线安全认证的方法和装置
CN111131416A (zh) 业务服务的提供方法和装置、存储介质、电子装置
CN108199847B (zh) 数字安全处理方法、计算机设备及存储介质
WO2015135398A1 (zh) 一种基于协商密钥的数据处理方法
CN104836784A (zh) 一种信息处理方法、客户端和服务器
CN109905384B (zh) 数据迁移方法及***
CN111614621A (zh) 物联网通信方法和***
CN111654503A (zh) 一种远程管控方法、装置、设备及存储介质
CN109510711B (zh) 一种网络通信方法、服务器、客户端及***
CN113411187A (zh) 身份认证方法和***、存储介质及处理器
US20240106633A1 (en) Account opening methods, systems, and apparatuses
CN112600667B (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: 17887951

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: 17887951

Country of ref document: EP

Kind code of ref document: A1