Security storage method for code scanning payment terminal decoding library license

By storing the SN number of the payment terminal and the decoding library license data into the flash of the NVS area of ​​the SE terminal, and performing SN number verification during reading, the solution is that after the IMEI number of the payment terminal is tampered with, the decoding library license certificate can still be normal The problem of using it realizes the secure storage of license data of the decoding library and the function of one machine and one code.

CN119475452APending Publication Date: 2025-02-18AITIWEIER ELECTRONICS TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411485394.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-18

Smart Images

  • Figure CN119475452A_ABST
    Figure CN119475452A_ABST
Patent Text Reader

Abstract

The invention discloses a code scanning payment terminal decoding library license secure storage method, which is characterized in that decoding library license data and an SN number of a payment terminal are stored in a flash of an NVS area of an SE end by using a USB flash disk, when an AP end needs to read the decoding library license data for decoding, whether the SN number in the payment terminal is consistent with the SN number in the decoding library license data or not needs to be compared, and if the SN number in the decoding library license data is consistent with the SN number in the decoding library license data, the security of the decoding library license data is ensured. And returning the license data of the decoding library to the AP end. The method has the advantages that the license data of the decoding library and the SN number information are stored in the flash of the safe CPU through the serial port protocol, so that the data cannot be erased due to firmware upgrading, and the safety of data storage is ensured. According to the method, before the decoding library license certificate is obtained, the information of the SN number is compared, and the correct decoding library license is returned to the AP end only when the information is consistent, so that the problem that the code scanning library can be normally used after the IMEI number of the terminal is tampered is effectively avoided, and one machine with one code is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded code scanning payment terminals, and in particular to a method for securely storing a decoding library license of a code scanning payment terminal. Background Art

[0002] On embedded scanning payment terminals, the decoding library provided by the camera manufacturer is used to scan the QR code. The license certificate required for the normal operation of the decoding library is bound to the IMEI number in the payment terminal. The decoding library manufacturer hopes to achieve one device for one use. However, this method has loopholes. The IMEI number in the payment terminal can be erased and re-burned through Qualcomm's native tools. Summary of the invention

[0003] The purpose of the present invention is to provide a method for securely storing a decoding library license of a code scanning payment terminal, thereby solving the aforementioned problems existing in the prior art.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0005] A method for securely storing a decoding library license of a code scanning payment terminal uses a U disk to store the decoding library license data and the SN number of the payment terminal in the flash of the NVS area of ​​the SE end. When the AP end needs to read the decoding library license data for decoding, it is necessary to compare whether the SN number in the payment terminal is consistent with the SN number in the decoding library license data. If the two are consistent, the decoding library license data is returned to the AP end.

[0006] Preferably, the method specifically comprises the following steps:

[0007] S1. The manufacturer generates a decoding library license data bound to the IMEI number according to the IMEI number of the payment terminal and writes it into a file, puts the file in a USB flash drive and mounts the USB flash drive in the file system;

[0008] S2. The certificate download program obtains the IMEI number of the payment terminal and compares it with the IMEI number in the file. If the two are consistent, it proceeds to the next step, otherwise it exits the download program;

[0009] S3, extract relevant data information from the file and send it to the SE end of the payment terminal, which will be further stored by the SE;

[0010] S4. After receiving the relevant data information, the SE end stores the relevant data information in the flash of the NVS area of ​​the chip;

[0011] S5. After the scanning program on the AP side is started, the SN number of the payment terminal is obtained and compared with the SN number in the relevant data information in the NVS area. If they are consistent, the correct decoding license data is returned to the AP side, otherwise the scanning program is exited.

[0012] Preferably, step S1 specifically includes the following contents:

[0013] S11, providing the IMEI number of the payment terminal to the decoding library manufacturer, and the manufacturer generates decoding library license data bound to the IMEI number;

[0014] S12, write the IMEI number and the decoding library license data into a file, and place the file in the root directory of the USB flash drive;

[0015] S13. The payment terminal mounts the USB flash drive to a directory in the file system.

[0016] Preferably, the file in step S12 is a txt file; the txt file stores the SN number of the payment terminal, the IMEI number of the payment terminal and the decoding library license data bound to the IMEI number of the payment terminal.

[0017] Preferably, the directory in step S13 is the / mnt / sdcard directory.

[0018] Preferably, when the payment terminal mounts the USB flash drive to the / mnt / sdcard directory of the file system, the application can read and write txt files in the directory through the directory.

[0019] Preferably, the relevant data information in step S3 includes the decoding library license data and the SN number of the payment terminal.

[0020] Preferably, in step S4, the SE end calls the write flash interface to store the decoding library license data and the SN number of the payment terminal in the NVS area of ​​the chip.

[0021] Preferably, step S5 is specifically as follows: after the barcode scanning program on the AP side is started, the decoding library license interface is called to obtain the SN number in the terminal, and then compared with the decoding library license stored in the NVS area and the SN number of the payment terminal. If the SN number of the payment terminal is consistent, the correct decoding license data is returned to the AP side.

[0022] The beneficial effect of the present invention is that the decoding library license data and SN number information are stored in the flash of the secure CPU through the serial port protocol, which not only ensures that the data will not be erased due to firmware upgrades, but also ensures the security of data storage. Before obtaining the decoding library license certificate, the SN number information is compared first, and the correct decoding library license is returned to the AP end only when the information is consistent, effectively avoiding the problem that the code scanning library can be used normally after the terminal IMEI number is tampered with, thereby ensuring one machine with one code. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a logic block diagram of a method in an embodiment of the present invention;

[0024] Figure 2 is a flow chart of a method in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation methods described herein are only used to explain the present invention and are not used to limit the present invention.

[0026] like Figure 1 and Figure 2 As shown, in this embodiment, a method for securely storing the decoding library license of a scanning payment terminal is provided. This method stores the decoding library license data (certificate) and the SN number of the payment terminal in the NVS area of ​​the SE flash through a USB flash drive. When the AP needs to read the license data for decoding, it first needs to verify whether the SN number in the device is consistent with the SN number in the license data. If they are consistent, the license data is returned. This secure storage method completely achieves one machine and one code. Even if the IMEI information on the AP side is tampered with, the same decoding library certificate cannot be used. Specifically, the following steps are included:

[0027] (1) Provide the IMEI number in the payment terminal to the decoding library manufacturer, and the manufacturer generates a decoding library license bound to the IMEI number.

[0028] (2) Write the IMEI number and license data into a txt file and place the txt file in the root directory of the USB drive.

[0029] The Txt content is as follows:

[0030] SN:00057000608

[0031] IMEI:861863060000006

[0032] LIC:xe3o5iVwmU6EzOY54B4mrA1byHgZOm94a04tqdz / F6MpNOJMwrpOm7RrCHCt9OthDzJ9HTtbzGCGcIAlU1GsmEac+pElQlsV3GtHEZvnVjL=

[0033] (3) The payment terminal mounts the USB flash drive to the / mnt / sdcard directory of the file system. The application can read and write txt files in this directory.

[0034] (4) The certificate download program obtains the IMEI number of the payment terminal and compares it with the IMEI number read in the txt file. If they are consistent, proceed to the next step. If they are inconsistent, exit the program.

[0035] (5) The decoding library license data and SN number obtained in txt are sent to the SE of the payment terminal through the serial communication protocol, and are further stored by the SE.

[0036] (6) The SE receives the license data + SN number, calls the write flash interface, and stores the data in the flash in the NVS (non volatile storage) area of ​​the chip.

[0037] (7) After the barcode scanning program on the AP side is started, call the decoding library license interface.

[0038] (8) First, obtain the SN number in the terminal, and then compare it with the license + SN number stored in the NVS area. If the SN numbers are consistent, return the correct license data to the AP.

[0039] (9) The code scanning program decodes successfully.

[0040] By adopting the above technical solution disclosed in the present invention, the following beneficial effects are obtained:

[0041] The present invention provides a method for securely storing a decoding library license of a code scanning payment terminal. The decoding library license data and SN number information are stored in the flash of a secure CPU through a serial port protocol, which not only ensures that the data will not be erased due to firmware upgrades, but also ensures the security of data storage. Before obtaining the decoding library license certificate, the SN number information is compared first, and the correct decoding library license is returned to the AP end only when the information is consistent, effectively avoiding the problem that the code scanning library can be used normally after the terminal IMEI number is tampered with, thereby ensuring one machine with one code.

[0042] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.

Claims

1. A method for securely storing a decoding library license for a scanning code payment terminal, characterized in that: Use a USB flash drive to store the decoding library license data and the SN number of the payment terminal in the flash of the NVS area of ​​the SE end. When the AP end needs to read the decoding library license data for decoding, it is necessary to compare whether the SN number in the payment terminal is consistent with the SN number in the decoding library license data. If the two are consistent, the decoding library license data is returned to the AP end.

2. The method for securely storing the decoding library license of a scanning code payment terminal according to claim 1, characterized in that: The specific steps include: S1. The manufacturer generates a decoding library license data bound to the IMEI number according to the IMEI number of the payment terminal and writes it into a file, puts the file in a USB flash drive and mounts the USB flash drive in the file system; S2. The certificate download program obtains the IMEI number of the payment terminal and compares it with the IMEI number in the file. If the two are consistent, it proceeds to the next step, otherwise it exits the download program; S3, extract relevant data information from the file and send it to the SE end of the payment terminal, which will be further stored by the SE; S4. After receiving the relevant data information, the SE end stores the relevant data information in the flash of the NVS area of ​​the chip; S5. After the scanning program on the AP side is started, the SN number of the payment terminal is obtained and compared with the SN number in the relevant data information in the NVS area. If they are consistent, the correct decoding license data is returned to the AP side, otherwise the scanning program is exited.

3. The method for securely storing the decoding library license of a scanning code payment terminal according to claim 1, characterized in that: Step S1 specifically includes the following contents: S11, providing the IMEI number of the payment terminal to the decoding library manufacturer, and the manufacturer generates decoding library license data bound to the IMEI number; S12, write the IMEI number and the decoding library license data into a file, and place the file in the root directory of the USB flash drive; S13. The payment terminal mounts the USB flash drive to a directory in the file system.

4. The method for securely storing the decoding library license of a scanning code payment terminal according to claim 3 is characterized in that: The file in step S12 is a txt file; the txt file stores the SN number of the payment terminal, the IMEI number of the payment terminal and the decoding library license data bound to the IMEI number of the payment terminal.

5. The method for securely storing the decoding library license of a scanning code payment terminal according to claim 3 is characterized in that: The directory in step S13 is the / mnt / sdcard directory.

6. The method for securely storing the decoding library license of a scanning code payment terminal according to claim 4, characterized in that: When the payment terminal mounts the USB flash drive to the / mnt / sdcard directory of the file system, the application can read and write txt files in the directory.

7. The method for securely storing the decoding library license of a scanning code payment terminal according to claim 1, characterized in that: The relevant data information in step S3 includes the decoding library license data and the SN number of the payment terminal.

8. The method for securely storing the decoding library license of a code scanning payment terminal according to claim 7, characterized in that: In step S4, the SE end calls the write flash interface to store the decoding library license data and the SN number of the payment terminal in the NVS area of ​​the chip.

9. The method for securely storing the decoding library license of a code scanning payment terminal according to claim 8, characterized in that: Step S5 specifically includes: after the barcode scanning program on the AP side is started, the decoding library license interface is called to obtain the SN number in the terminal, and then compared with the decoding library license stored in the NVS area and the SN number of the payment terminal. If the SN number of the payment terminal is consistent, the correct decoding license data is returned to the AP side.