Disclosure of Invention
The invention provides an innovative data transmission protection scheme, which realizes the whole-course ciphertext transmission of data from a production background to POS equipment through an asymmetric key technology, a secondary encryption mechanism and integrity verification, and remarkably improves the security of a personalized process.
The technical scheme adopted by the invention is that the method for protecting data transmission during POS individuation comprises the following steps:
in the production process of the POS equipment, an asymmetric key pair is automatically generated by a safety area inside the POS equipment, wherein the asymmetric key pair comprises a public key and a private key, and the private key is only stored in the safety area of the POS equipment and is not leaked outside;
Reading a public key of the POS equipment by upper computer software, and transmitting the public key to a production background;
Decrypting the sensitive data stored in the database by the production background through the encryption machine to obtain plaintext sensitive data;
Encrypting the plaintext sensitive data by using a public key of the POS equipment by a production background to generate secondary encrypted data;
step five, transmitting the secondary encryption data to the POS equipment through upper computer software;
Step six, the POS equipment decrypts the secondary encrypted data by utilizing a private key stored in a safe area of the POS equipment to obtain plaintext sensitive data and complete personalized configuration;
The sensitive data always exist in a ciphertext form in the transmission process of the third step to the sixth step.
As a further improvement of the present invention, the asymmetric key algorithm is selected from one of RSA, ECC, DSA, and the key length satisfies RSA2048 and ECC256 strength.
In the fourth step, the production background generates a HASH digest value for the plaintext sensitive data and transmits the HASH digest value and the secondarily encrypted data to the POS device, and after the POS device decrypts, the POS device regenerates the digest value for the plaintext sensitive data by the same HASH algorithm and compares the digest value with the received HASH digest value to verify the integrity of the data.
As a further improvement of the present invention, the HASH algorithm is selected from one of SHA1, SHA256, SM 3.
As a further improvement of the invention, the asymmetric key pair is dynamically generated by the POS device in an initialization phase and automatically destroyed after the personalized configuration is completed.
As a further improvement of the present invention, the secure area is a Hardware Security Module (HSM), a Trusted Execution Environment (TEE), for ensuring physical isolation and tamper resistance of the private key.
As a further improvement of the invention, the transmission path of the secondary encryption data comprises one or more of a network, a serial port and a USB interface, and the data is kept in a ciphertext state in the transmission process.
As a further improvement of the invention, an isolated communication protocol is adopted between the encryptor and the production background, and the key management of the encryptor accords with the financial-level security standard.
In the third step, the decryption operation of the encryptor on the sensitive data and the encryption transferring operation in the fourth step are continuously executed in the secure sandbox, so that the exposure of the plaintext sensitive data to the memory in the production background is avoided.
As a further improvement of the invention, the method is suitable for the mass production scene of POS equipment, and supports the parallel execution of personalized configuration of a plurality of POS equipment.
The invention has the beneficial effects that by means of an asymmetric encryption technology, dynamic key management and a whole-course ciphertext transmission mechanism, the security of the whole link of sensitive data in the personalized POS process is ensured, meanwhile, the efficient production and the cost optimization are considered, the risk of data leakage caused by plaintext exposure in the traditional method is thoroughly eliminated, the parallel processing and flexible adaptation of multiple devices are supported, and a solution with high security and high reliability is provided for the manufacture of financial equipment.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear, the application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The invention provides a method for protecting data transmission during POS individuation, which comprises the following steps:
In the production process of the POS equipment, an asymmetric key pair is automatically generated by a safety area inside the POS equipment, wherein the asymmetric key pair comprises a public key and a private key, and the private key is only stored in the safety area of the POS equipment and is not leaked;
Step two, the upper computer software reads the public key of the POS equipment and transmits the public key to the production background;
Decrypting the sensitive data stored in the database by the production background through the encryption machine to obtain plaintext sensitive data;
encrypting the plaintext sensitive data by using a public key of the POS equipment at the production background to generate secondary encrypted data;
step five, the secondary encryption data are transmitted to POS equipment through upper computer software;
The POS equipment decrypts the secondary encrypted data by utilizing a private key stored in a safe area of the POS equipment to obtain plaintext sensitive data and complete personalized configuration;
the sensitive data always exist in the form of ciphertext in the transmission process of the third step to the sixth step.
The asymmetric key algorithm is selected from RSA, ECC, DSA, and the key length meets RSA2048 and ECC256 strength.
In the fourth step of the invention, the production background generates the HASH digest value for the plaintext sensitive data and transmits the HASH digest value and the secondary encrypted data to the POS equipment, and after the POS equipment decrypts, the HASH digest value is regenerated for the plaintext sensitive data by the same HASH algorithm and is compared with the received HASH digest value so as to verify the integrity of the data.
The HASH algorithm is selected from one of SHA1, SHA256 and SM 3.
The asymmetric key pair is dynamically generated by the POS equipment in an initialization stage, and is automatically destroyed after personalized configuration is completed.
The security area is a Hardware Security Module (HSM) and a Trusted Execution Environment (TEE) and is used for ensuring the physical isolation and tamper resistance of the private key.
The transmission path of the secondary encryption data comprises one or more of a network, a serial port and a USB interface, and the data is kept in a ciphertext state in the transmission process.
In the invention, an isolated communication protocol is adopted between the encryption machine and the production background, and the key management of the encryption machine accords with the financial security standard.
In the third step of the invention, the decryption operation of the encryption machine on the sensitive data and the encryption transferring operation in the fourth step are continuously executed in the safe sandbox, so that the exposure of the plaintext sensitive data to the memory of the production background is avoided.
The method is suitable for the mass production scene of the POS equipment, and supports the parallel execution of personalized configuration of a plurality of POS equipment.
Examples:
The implementation scenario is that a financial device manufacturing enterprise needs to perform personalized configuration on a batch of POS devices, wherein the personalized configuration comprises sensitive data such as a written device Serial Number (SN), a transaction key and the like. The conventional method has the risk of data leakage, so the secure transmission method is adopted.
The specific implementation steps are as follows:
Step one (generation and storage of asymmetric Key pair)
When the production line is started, each POS device is automatically called a Hardware Security Module (HSM) in an initialization stage, and RSA2048 asymmetric key pairs (a public key PK and a private key SK) are dynamically generated.
The private key SK is permanently stored in a secure storage area of the HSM and external access is forbidden, and the public key PK is read by upper computer software through serial communication.
Step two (public key transfer to production background)
The upper computer software transmits the public key PK to the production background server through the encrypted USB channel, and records the unique identifier (such as the MAC address) of the corresponding POS equipment.
Step three, step four (decryption and encryption of sensitive data)
The production background extracts the sensitive data (such as SN and master key MK) to be written into the POS device from the encryption database, and decrypts the sensitive data into plaintext data by using an AES-256 key through a financial-grade encryptor (conforming to PCIDSS standard).
Immediately in a secure sandbox environment, RSA encryption is carried out on the plaintext data by using the public key PK of the POS equipment, and secondary encrypted data C1 is generated.
Meanwhile, the SHA256 digest value H1 is calculated for the plaintext data and C1 and H1 are bound to the data packet.
Step five (secure transmission of encrypted data)
The data packet (c1+h1) is transmitted to the host software via the isolated network (using TLS1.3 protocol) and then sent to the corresponding POS device via the USB interface.
Step six (data decryption and integrity verification)
The HSM of the POS device decrypts the C1 by using the private key SK and restores the C1 into plaintext data.
The SHA256 digest value H2 is recalculated for the decrypted plaintext data and compared to the received H1. If H1 = H2, the verification is passed, the plaintext data is written into the safe storage area of the equipment, if not, an alarm is triggered and the configuration flow is terminated.
Key destruction and batch processing (extended implementation)
After personalized configuration is completed, the HSM of the POS equipment automatically destroys the dynamically generated private key SK, so that the temporary property of the key is ensured.
And a plurality of POS devices on the production line execute the flow in parallel, and the upper computer software manages public key transmission and data packet distribution of each device through a task queue, so that high-efficiency mass production is realized.
Key parameters and configuration examples:
(1) Asymmetric encryption algorithm RSA2048 (default) or ECC256 (applicable to low power devices)
(2) HASH algorithm SHA256 (default) or SM3 (adapting to domestic password standard scenario).
(3) The security area is realized by adopting an Infrax SLM97 series HSM chip to support physical tamper resistance and side channel attack protection.
(4) Encryptor protocol the encryptor communicates with the hardware encryption channel authenticated by the FIPS140-2 in the production background.
And (3) effect verification:
(1) The security is that the sensitive data in the transmission link is ciphertext in the whole course, even if the network is monitored or the USB interface is intercepted, an attacker can only acquire RSA encrypted data and HASH abstract and cannot restore plaintext.
(2) The efficiency is that the parallel processing capacity of 100 stations/hour is supported, and the key management bottleneck is avoided by a key dynamic generation and destruction mechanism.
(3) Compliance, meeting the requirements of the financial industry PCIPIN Security and GM/T0054-2018 standard.
Summarizing, the embodiment shows the application of the invention in POS equipment mass production through a specific operation flow, verifies the advantages of the POS equipment mass production in the aspects of high safety, high efficiency and compliance, and provides a reliable solution for financial equipment manufacture.
In summary, the method for protecting data transmission during POS personalization of the present invention fully considers production efficiency and cost effectiveness while ensuring data transmission security. By adopting the asymmetric key technology, the invention not only realizes the whole ciphertext transmission of the sensitive data, but also further enhances the safety and reliability of the data transmission through a dynamic key management and integrity checking mechanism. In addition, the method also supports the parallel execution of personalized configuration of a plurality of POS devices, and the production efficiency is obviously improved. In the aspect of cost, although some advanced security technologies and hardware modules are introduced, the overall cost is effectively reduced by optimizing key management and transmission flow, so that the scheme has wide application prospect in the field of financial equipment manufacturing. In a word, the invention provides an innovative data transmission protection scheme, provides a solution with high safety, high efficiency and compliance for the manufacture of financial equipment, and has great practical significance and popularization value.
The foregoing embodiments are merely for illustrating the technical solution of the present invention, but not for limiting the same, and although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that modifications may be made to the technical solution described in the foregoing embodiments or equivalents may be substituted for parts of the technical features thereof, and such modifications or substitutions do not depart from the spirit and scope of the technical solution of the embodiments of the present invention.