A method for generating and using a high-security application QR code

By generating a high-security application QR code, encrypting with SM4 algorithm and embeding server addressing information using Hamming code steganography technology, the time-consuming and error-prone problems caused by manual input during installation and deployment of application software in traditional methods are solved, and the QR code is realized at the same time to complete the installation package download and server addressing function, improving user experience and security.

CN114238981BActive Publication Date: 2025-04-01BEIJING NORTH CAROLINA STAR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111466214.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-04-01
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

When installing and deploying application software, traditional methods require manual input of server address and other parameters, which is time-consuming and error-prone, increasing inconvenience between users and manufacturers.

Method used

By generating a highly secure application QR code, the QR code has both application installation package download and server addressing functions, the server addressing information is encrypted using the SM4 algorithm, and the steganography technology based on (7,4) Hamming code is used to embed it into the QR code.

Benefits of technology

It realizes the functions of simultaneously completing application installation package download and server addressing with a QR code, which improves user experience and security, and avoids errors and inconvenience caused by manual input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114238981B_ABST
    Figure CN114238981B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating a two-dimensional code for an application program with high security and a method for using the same. A two-dimensional code image generated based on a download address of an application program installation package is used as a steganographic carrier. Server addressing information is hidden in the two-dimensional code image under the premise that the two-dimensional code is available, so that one two-dimensional code has two functions of downloading the application installation package and server addressing, thereby improving user experience. Meanwhile, the server addressing information is hidden in the two-dimensional code image after being encrypted by SM4. An illegal user needs to decipher the steganographic algorithm and SM4 at the same time to obtain the server information. Compared with a single encryption method, the security is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data security, and in particular relates to a method for generating a two-dimensional code for an application program with strong confidentiality and a method for using the same. Background Art

[0002] Some professional application software for government and enterprise users has special requirements for installation and deployment: first, it is inconvenient to provide a public Internet download address for the installation package to prevent it from being downloaded at will; second, the corresponding server needs to be privately deployed on the user side, and the server address and other parameters corresponding to the application need to be temporarily imported into the application software. If the traditional method is used, manual input is required, which is time-consuming and prone to errors, which will greatly inconvenience users, and the deployment and maintenance work of manufacturers will also be very cumbersome and prone to errors. Summary of the invention

[0003] The purpose of the present invention is to provide a method for generating and using an application QR code with high security, using one QR code to simultaneously have the two functions of application installation package downloading and server addressing, thereby improving user experience and security.

[0004] In order to achieve the above object, the solution of the present invention is:

[0005] A method for generating a two-dimensional code for an application program with high security comprises the following steps:

[0006] Step 1A, the application management platform generates a public network download address of the application installation package according to the user terminal identification information, the application management platform and the application installation package are located in different servers, and the application management platform has information about all installation packages on the application installation package download server;

[0007] Step 2A, the application management platform encodes the download address of the application installation package on the public network according to the QR code standard, obtains the final encoding information of the QR code with an error correction level not lower than level M, and uses the final encoding information of the QR code as a carrier for hiding the server addressing information;

[0008] Step 3A, encrypting the server addressing information of the application using the SM4 algorithm, and using the encrypted server addressing information as the information to be hidden;

[0009] Step 4A, using the steganography technology based on (7,4) Hamming code to embed the encrypted server addressing information into the final encoded information of the QR code, and obtain the data carrying the secret information and the error correction codeword;

[0010] Step 5A, based on the QR code standard, generates a two-dimensional code image for providing the application installation package download address and server addressing according to the encrypted QR code data and error correction codeword encoding information.

[0011] In the above step 2, the final coded information is a binary sequence that has been sorted according to the arrangement requirements of the data codewords and the error correction codewords in the two-dimensional code graphic.

[0012] In the above step 3, the server addressing information includes the server's identifier, IP address, and other information necessary for the application to establish a connection with the server.

[0013] The specific contents of the above step 4A are:

[0014] Step 4A1, dividing the carrier and the information to be hidden into blocks, dividing the carrier into blocks of 7 bits each, and dividing the information to be hidden into blocks of 3 bits each, the number of blocks for both is the same, and the number of blocks depends on the length of the information to be hidden;

[0015] Step 4A2: Use column vectors to represent the carrier blocks and the information blocks to be hidden. The i-th carrier block is recorded as column vector x i , the i-th information to be hidden is divided into blocks and recorded as column vector m i ;

[0016] Step 4A3, calculate in Indicates XOR operation, Hx i Represents the check matrix H and column vector x after replacing the sum operation in the vector multiplication operation with an XOR operation i The product of , the check matrix H is as follows:

[0017]

[0018] Step 4A4, calculate d i =[4 2 1]s i , d i is the row vector [4 2 1] and the column vector s i The product of

[0019] Step 4A5, if d i = 0, then let y i =x i , if d i ≠0, then the column vector x i The d i The result after negating the elements is recorded as y i ,y i That is, it is a confidential carrier that carries secret information;

[0020] Step 4A6, repeating steps 4A3-4A5 until all the information to be hidden is embedded in the carrier;

[0021] Step 4A7, use y iReplace the x in the final QR code encoding information i Corresponding data, obtain the encrypted final QR code data and the encoding information of the error correction codeword.

[0022] A highly secure application QR code usage method is used to use the QR code generated above; it is characterized by comprising the following steps:

[0023] Step 1B, using a QR code scanner to identify the QR code image, obtain the application installation package download address, and download the application installation package;

[0024] Step 2B, when performing server addressing, use the barcode scanner in the application to identify the QR code image and extract the server addressing information from the QR code image.

[0025] The specific contents of the above step 2B are:

[0026] Step 2B1, according to the QR code standard, parse the two-dimensional code image to obtain the data and error correction codeword information before data error correction, and sort them according to the arrangement rules of the embedding process to obtain the secret data and error correction codeword encoding information, that is, the secret carrier;

[0027] Step 2B2, dividing the secret carrier into blocks of 7 bits each, the number of blocks depends on the length of the information to be extracted, and each 3 bits of secret information corresponds to one carrier block;

[0028] Step 2B3, use column vectors to represent the secret carrier blocks and the extracted information blocks, and record the i-th secret carrier block as column vector y i , the extracted i-th information block is recorded as column vector m i ';

[0029] Step 2B4, calculate m i '=Hy i , Hy i Represents the matrix H and column vector y after replacing the sum operation in the vector multiplication operation with an XOR operation i The product of , H is the check matrix used when embedding information;

[0030] Step 2B5, repeating step 2B4 until all the secret information is extracted to obtain the encrypted server addressing information;

[0031] Step 2B6, decrypting the secret information obtained in step 2B5 using the SM4 algorithm to obtain the server's identification, IP address, and related information necessary for the application to establish a connection with the server;

[0032] Step 2B7, the application establishes communication with the server according to the above server addressing information. After the communication is successfully established, the application stores the server addressing information securely locally, thus completing the server addressing of the application.

[0033] Among them, the SM4 key used in the QR code generation and parsing process is pre-generated during development and securely stored in the management platform and application.

[0034] Among them, the system administrator generates a download of the application installation package and a server addressable QR code image for the user on the server side and sends it to the corresponding user.

[0035] After adopting the above scheme, the present invention has the following improvements:

[0036] (1) The present invention uses a two-dimensional code image generated based on the download address of the application installation package as a steganographic carrier, and hides the server addressing information in the two-dimensional code image while ensuring that the two-dimensional code is available, so that one two-dimensional code has both the functions of application installation package downloading and server addressing;

[0037] (2) The server addressing information is encrypted by SM4 and hidden in the QR code image. Illegal users need to decipher both the steganographic algorithm and SM4 to obtain the server information. Compared with a single encryption method, the security is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a flow chart of generating a QR code according to the present invention;

[0039] Figure 2 It is a flow chart of installing application program and server addressing of the present invention. DETAILED DESCRIPTION

[0040] The technical solutions and beneficial effects of the present invention will be described in detail below with reference to the accompanying drawings.

[0041] like Figure 1 As shown, the present invention provides a method for generating a two-dimensional code for an application with high security, comprising the following steps:

[0042] Step 1A, the application management platform generates a public network download address of the application installation package according to the user terminal identification information, the application management platform and the application installation package are located in different servers, and the application management platform has information about all installation packages on the application installation package download server;

[0043] Step 2A, the application management platform encodes the download address of the above application installation package on the public network according to the QR code standard (refer to ISO / IEC 18004-2006, Information technology. Automatic identification and data capture techniques. QR Code 2005 bar code symbology specification [S]. ISO / IEC 18004, 2006.), and obtains the final encoding information of the QR code with an error correction level not lower than level M (error correction capability 15%), the final encoding information is a binary sequence that has been sorted according to the arrangement requirements of the data codewords and the error correction codewords in the two-dimensional code graphic, and the final encoding information of the QR code is used as a carrier for hiding the server addressing information;

[0044] Step 3A, using the SM4 algorithm to encrypt the server addressing information of the application, the server addressing information includes the server identifier, IP address and other information necessary for the application to establish a connection with the server, and the encrypted server addressing information is used as the information to be hidden;

[0045] Step 4A, using the steganography technology based on (7,4) Hamming code to embed the encrypted server addressing information into the final encoded information of the QR code, to obtain the data carrying the secret information and the error correction codeword. The specific operation of information hiding is as follows:

[0046] 1) Divide the carrier and the information to be hidden into blocks, where the carrier is divided into blocks of 7 bits each and the information to be hidden is divided into blocks of 3 bits each. The number of blocks for both is the same, and the number of blocks depends on the length of the information to be hidden.

[0047] 2) Use column vectors to represent the carrier blocks and the information blocks to be hidden, and record the i-th carrier block as column vector x i , the i-th information to be hidden is divided into blocks and recorded as column vector m i ;

[0048] 3) Calculation in Indicates XOR operation, Hx i Represents the check matrix H and column vector x after replacing the sum operation in the vector multiplication operation with an XOR operation i The product of , the check matrix H is as follows:

[0049]

[0050] 4) Calculate d i =[4 2 1]s i , d iis the row vector [4 2 1] and the column vector s i The product of

[0051] 5) If d i = 0, then let y i =x i , if d i ≠0, then the column vector x i The d i The result after negating the elements is recorded as y i ,y i That is, it is a confidential carrier that carries secret information;

[0052] 6) Repeat steps 3)-5) of the information embedding process until all the information to be hidden is embedded in the carrier;

[0053] 7) Use y i Replace the x in the final QR code encoding information i Corresponding data, obtain the encrypted final QR code data and the encoding information of the error correction codeword;

[0054] Step 5A, based on the QR code standard, generates a two-dimensional code image for providing the application installation package download address and server addressing according to the encrypted QR code data and error correction codeword encoding information.

[0055] like Figure 2 As shown, the present invention also provides a method of using the aforementioned two-dimensional code. After the user terminal obtains the aforementioned two-dimensional code image, the application is installed and the server is addressed according to the following steps:

[0056] Step 1B, when downloading the installation package, use a common QR code scanner to identify the QR code image to obtain the application installation package download address, and download the application installation package;

[0057] Step 2B: When performing server addressing, you need to use the barcode scanner in the application to identify the above QR code image and extract the server addressing information from the QR code image. The specific operations are as follows:

[0058] 1) According to the QR code standard, the two-dimensional code image is parsed to obtain the data and error correction codeword information before data error correction, and the data is sorted according to the arrangement rules of the embedding process to obtain the secret data and error correction codeword encoding information, i.e., the secret carrier;

[0059] 2) Divide the secret carrier into blocks of 7 bits each. The number of blocks depends on the length of the information to be extracted. Every 3 bits of secret information corresponds to one carrier block.

[0060] 3) Use column vectors to represent the secret carrier blocks and the extracted information blocks, and record the i-th secret carrier block as column vector yi , the extracted i-th information block is recorded as column vector m i ';

[0061] 4) Calculate m i '=Hy i , Hy i Represents the matrix H and column vector y after replacing the sum operation in the vector multiplication operation with an XOR operation i The product of , H is the check matrix used when embedding information;

[0062] 5) Repeat step 4) of the extraction process until all the secret information is extracted to obtain the encrypted server addressing information;

[0063] 6) Use the SM4 algorithm to decrypt the secret information obtained in step 5) to obtain the server's identification, IP address, and related information necessary for the application to establish a connection with the server;

[0064] 7) The application establishes communication with the server according to the above server addressing information. After the communication is successfully established, the application stores the server addressing information securely locally, thus completing the server addressing of the application;

[0065] Step 3B, the SM4 key used in the QR code generation and parsing process is pre-generated during development and securely stored in the management platform and application, and an integrity check function is added to the SM4 algorithm to ensure the authenticity and correctness of the server addressing information;

[0066] Step 4B: In actual use, the system administrator generates a download and server addressing QR code image of the application installation package for the user on the server side and sends it to the corresponding user.

[0067] The above embodiments are only for illustrating the technical idea of ​​the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for generating a two-dimensional code for an application program with high security, characterized in that The steps include: Step 1A, the application management platform generates a public network download address of the application installation package according to the user terminal identification information, the application management platform and the application installation package are located in different servers, and the application management platform has information about all installation packages on the application installation package download server; Step 2A, the application management platform encodes the download address of the application installation package on the public network according to the QR code standard, obtains the final encoding information of the QR code with an error correction level not lower than level M, and uses the final encoding information of the QR code as a carrier for hiding the server addressing information; Step 3A, encrypting the server addressing information of the application using the SM4 algorithm, and using the encrypted server addressing information as the information to be hidden; Step 4A, using the steganography technology based on (7,4) Hamming code to embed the encrypted server addressing information into the final encoded information of the QR code, and obtain the data carrying the secret information and the error correction codeword; Step 5A, based on the QR code standard, generating a QR code image for providing the download address of the application installation package and the server addressing according to the encrypted QR code data and the error correction codeword encoding information; The specific content of step 4A is: Step 4A1, dividing the carrier and the information to be hidden into blocks, dividing the carrier into blocks of 7 bits each, and dividing the information to be hidden into blocks of 3 bits each, the number of blocks for both is the same, and the number of blocks depends on the length of the information to be hidden; Step 4A2: Use column vectors to represent the carrier blocks and the information blocks to be hidden. The i-th carrier block is recorded as column vector x i , the i-th information to be hidden is divided into blocks and recorded as column vector m i ; Step 4A3, calculate in Indicates XOR operation, Hx i Represents the check matrix H and column vector x after replacing the sum operation in the vector multiplication operation with an XOR operation i The product of , the check matrix H is as follows: Step 4A4, calculate d i =[4 2 1]s i , d i is the row vector [4 2 1] and the column vector s i The product of Step 4A5, if d i = 0, then let y i =x i , if d i ≠0, then the column vector x i The d i The result after negating the elements is recorded as y i ,y i That is, it is a confidential carrier that carries secret information; Step 4A6, repeating steps 4A3-4A5 until all the information to be hidden is embedded in the carrier; Step 4A7, use y i Replace the x in the final QR code encoding information i Corresponding data, obtain the encrypted final QR code data and the encoding information of the error correction codeword.

2. The generation method according to claim 1, characterized in that: In step 2, the final coded information is a binary sequence that has been sorted according to the arrangement requirements of the data codewords and the error correction codewords in the two-dimensional code graphic.

3. The generation method according to claim 1, characterized in that: In step 3, the server addressing information includes the server's identifier, IP address, and other information necessary for the application to establish a connection with the server.

4. A highly secure application QR code usage method, used for using the QR code generated by claim 1; characterized in that The steps include: Step 1B, using a QR code scanner to identify the QR code image, obtain the application installation package download address, and download the application installation package; Step 2B, when performing server addressing, use the barcode scanner in the application to identify the QR code image and extract the server addressing information from the QR code image; The specific content of step 2B is: Step 2B1, according to the QR code standard, parse the two-dimensional code image to obtain the data and error correction codeword information before data error correction, and sort them according to the arrangement rules of the embedding process to obtain the secret data and error correction codeword encoding information, that is, the secret carrier; Step 2B2, dividing the secret carrier into blocks of 7 bits each, the number of blocks depends on the length of the information to be extracted, and each 3 bits of secret information corresponds to one carrier block; Step 2B3, use column vectors to represent the secret carrier blocks and the extracted information blocks, and record the i-th secret carrier block as column vector y i , the extracted i-th information block is recorded as column vector m i '; Step 2B4, calculate m i '=Hy i , Hy i Represents the matrix H and column vector y after replacing the sum operation in the vector multiplication operation with an XOR operation i The product of , H is the check matrix used when embedding information; Step 2B5, repeating step 2B4 until all the secret information is extracted to obtain the encrypted server addressing information; Step 2B6, decrypt the secret information obtained in step 2B5 using the SM4 algorithm to obtain the server's identifier, IP address, and related information necessary for the application to establish a connection with the server; Step 2B7, the application establishes communication with the server according to the above server addressing information. After the communication is successfully established, the application stores the server addressing information securely locally, thus completing the server addressing of the application.

5. The method of use according to claim 4, characterized in that: The specific content of step 2B is: the key of SM4 used in the process of QR code generation and parsing is pre-generated during development and securely stored in the management platform and application.

6. The method of use according to claim 4, characterized in that: The specific content of step 2B is: the system administrator generates a download and server addressing QR code image of the application installation package for the user on the server side and sends it to the corresponding user.

Citation Information

Patent Citations

  • Server and software downloading and registration method based on once code-scanning

    CN104796491A

  • Method and apparatus for the remote supply, display and / or presentation of dynamic informative contents

    CN105917328A