Two-dimensional code secret sharing method based on extended Hamming code

By using the extended Hanming code group to embed QR code redundant areas in the QR code secret sharing method, the problem of error code detection and correction when transmission, storage or tampered by the attacker is solved, and secret information is realized The efficiency of accurate recovery and QR code secret sharing technology.

CN119443139APending Publication Date: 2025-02-14JIANGYIN POLYTECHNIC COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411406951.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing QR code secret sharing method is difficult to detect and correct errors when transmitted, stored, or tampered by the attacker, resulting in the inability to recover secret information.

Method used

The QR code secret sharing method based on extended Hamming code is adopted. By generating an extended Hamming code group and embedding the QR code redundant area, the detection and correction of errors are realized, thereby ensuring the accurate recovery of secret information.

Benefits of technology

The error detection and correction of steganographic QR codes is realized, the efficiency of recovery of secret information is improved, and the reliability and security of QR code secret sharing technology is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443139A_ABST
    Figure CN119443139A_ABST
Patent Text Reader

Abstract

The invention discloses a two-dimensional code secret sharing method based on an extended Hamming code. The method comprises the following steps: firstly, secretly sharing secret information to generate a series of secret shares; then, an extended Hamming code group is generated for the secret shares by using an extended Hamming code principle, and verification information of the carrier is generated through a verification algorithm. Then, the generated extended Hamming code group is embedded into the complementary code redundant part of the two-dimensional code by using the homomorphic property of the two-dimensional code, and verification information is embedded into the remaining bits of the two-dimensional code according to the structural property of the two-dimensional code; according to the method, the high embedding capacity of the carrier is ensured, the error correctability of the steganography two-dimensional code is also realized, and error codes in the steganography two-dimensional code can be accurately detected and corrected, so that secret information is recovered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a two-dimensional code secret sharing method based on an extended Hamming code, and belongs to the technical field of secret sharing. Background Art

[0003] In the era of data confidentiality, privacy protection technology has always carried the mission of protecting the data security of all walks of life related to the national economy and people's livelihood. As an important means of privacy protection, secret sharing has recently developed rapidly in cloud computing, the Internet of Things and other fields. In previous data security solutions, private data is usually stored by users in a separate storage device. If the data is lost or maliciously tampered with, the private data will never be restored. Copying multiple copies of private data and distributing them to multiple storage devices will increase the possibility of private data being threatened. Therefore, in 1979, Shamir and Blakley first proposed the Secret Sharing (SS) scheme to solve the above problems. In the SS scheme, secret information is shared into a series of fragments, which are usually called shares or shadows. Finally, the secret can be reconstructed through a series of qualified shares. Therefore, if some shares are lost, the original secret can still be reconstructed smoothly. This avoids the concentration of secrets in the hands of a single user, achieving the purpose of dispersing risks and tolerating intrusions. Therefore, we can believe that secret sharing will be one of the important technical directions that can help the industry and meet the challenges of the era of data confidentiality in the future.

[0004] Recently, the QR code (Quick Response Code, QR Code) has become one of the most popular carriers in the information field due to its high capacity, easy reading and writing, and diversified data representation. It has been widely used in mobile payment, login, epidemic prevention and other fields. However, since the encoding and decoding rules of the QR code adopt the universal standards issued by the International Organization for Standardization ISO, anyone can easily obtain the public information contained in the QR code. Therefore, when transmitting or saving QR codes containing private information, there is a lack of privacy security protection. Therefore, the combination of QR code and secret sharing has become a research hotspot.

[0005] The current research trend of QR code secret sharing methods is mainly focused on the embedding capacity and verification capability of the carrier QR code. However, in the actual application of steganographic QR codes, QR codes are often obscured. For example, after the QR code is papered, it is easy to be stained. In addition, there may be some dishonest participants in the secret reconstruction process, who deliberately tamper with the information in the steganographic QR code to prevent the recovery of the secret information. In these cases, the secret information cannot be recovered. Therefore, a secret sharing method is urgently needed to avoid the above problems. This method can not only detect the authenticity of the steganographic QR code, but also correct these errors when there are some errors in the steganographic QR code, so as to ensure that the secret information is accurately recovered.

[0006] Based on the above analysis, if these errors can be corrected in the verification phase, the efficiency of the QR code secret sharing technology will be significantly improved. Therefore, this paper proposes a method that combines the QR code secret sharing technology with error correction coding to solve the above problems. The main contributions of this method are as follows:

[0007] (1) When a steganographic QR code with error correction capability is transmitted, stored, or tampered with by an attacker, resulting in errors, the secret information can be reconstructed by detecting and correcting these errors in the steganographic QR code.

[0008] (2) Secret information is embedded through the homomorphic properties of the QR code, ensuring high embedding capacity without sacrificing any of the original functions of the QR code.

[0009] (3) The verification information is embedded through the structural properties of the QR code, and the embedding of the verification information will not destroy the error correction function of the QR code. Summary of the invention

[0010] The technical problem to be solved by the present invention is: when a steganographic two-dimensional code with error correction capability is transmitted, stored or tampered with by an attacker, resulting in errors, the secret information can be reconstructed by detecting and correcting these errors in the steganographic two-dimensional code; the secret information is embedded through the homomorphic properties of the two-dimensional code, while ensuring a high embedding capacity without sacrificing any original function of the two-dimensional code; the verification information is embedded through the structural properties of the two-dimensional code, and the embedding of the verification information will not destroy the error correction function of the two-dimensional code.

[0011] The present invention adopts the following technical solutions to solve the above technical problems:

[0012] The two-dimensional code secret sharing method based on the extended Hamming code includes the following steps:

[0013] Step 1, take the finite field Galois Field (2 8) is used as the background to share secret information according to the polynomial, thereby generating n secret shares H i (1≤i≤n);

[0014] Step 2: According to the share H i Each element in (1≤i≤n) generates a corresponding extended Hamming code, thereby obtaining an extended Hamming code group for embedding;

[0015] Step 3, using the homomorphic property of the two-dimensional code, embed the generated extended Hamming code group into the redundant area of ​​the padding code of the two-dimensional code;

[0016] Step 4, using the extended Hamming code group generated by the share as the input of the verification function to obtain the verification information U to be embedded;

[0017] Step 5: embed the generated verification information into the remaining bits of the carrier QR code to obtain the final steganographic carrier QR code. i (1≤i≤n);

[0018] Step 6: During the recovery process, firstly perform the steganographic QR code Q′ i The authenticity of (1≤i≤n) is tested to avoid failure of the secret reconstruction process;

[0019] Step 7: Extract the Q′ embedded in the steganographic QR code i The extended Hamming code group in (1≤i≤n) and the error correction are performed;

[0020] Step 8, extract the secret share from the corrected extended Hamming code, and reconstruct the original secret information through k shares using the Lagrange interpolation method.

[0021] As a preferred embodiment of the present invention, the specific process of step 1 is as follows:

[0022] Assume that the secret information S(s i ,1≤i≤k×m) is k×m in bytes. Each k bytes of the secret information can be substituted for the k coefficients in the following polynomial to generate n shares H i (1≤i≤n). Since a sharing process requires k bytes of content, the size of the generated share is m bytes.

[0023] f(x)=(a0+a1x+…+a k-1 x k-1 )mod g(x)

[0024] Where x is any positive integer input value; a0, a1, …, a k-1 is the polynomial coefficient, which will be replaced by k bytes of secret information; mod is the modulus operation; g(x) = x 8+x 4 +x 3 +x+1.

[0025] As a preferred embodiment of the present invention, the specific process of step 2 is as follows:

[0026] For a share H i , each element B(b i ,0≤i≤7) is divided into the upper four bits (b7b6b5b4) and the lower four bits (b3b2b1b0) in binary form, and then used as the input of the (8, 4) extended Hamming code generation function to obtain the extended Hamming code group CG. i = {C1, C2} (1≤i≤m), each extended Hamming code is 1 byte, so each extended Hamming code group is 2 bytes. Until every element in the share is shared, the extended Hamming code group CG for embedding into the carrier QR code is finally obtained. i ={C1,C2}(1≤i≤m), the total embedding size of the extended Hamming code group is 2×m bytes.

[0027]

[0028] where F EHC (·) represents the generating function of the extended Hamming code.

[0029] As a preferred solution of the present invention, the specific process of step 3 is as follows:

[0030] In the embedded extended Hamming code group CG i Previously, it was necessary to select a suitable carrier QR code to determine whether it had enough padding redundancy to accommodate the CG i According to the selected carrier QR code's filling area, CG i The number of embeddable groups can be calculated; the formula for calculating the number of embeddable groups of the extended Hamming code group is:

[0031]

[0032] Among them, l CG represents the number of embeddable groups of the extended Hamming code group, R represents the total number of code elements in the data area, p represents the total number of fragments in the two-dimensional code, and M j represents the number of bits of the encoding rule in the jth fragment, I j The number of bits of the character count indicator in the jth segment, D j It represents the number of bits of data in the jth fragment, and T represents the number of bits of the data area terminator.

[0033] Then, according to the homomorphic property of Reed-Solomon coding, the extended Hamming code group CG iEmbedded into the carrier QR code. Assume that the selected carrier QR code can be embedded with a Hamming code group length l CG =m. In the embedding process, first decode the carrier two-dimensional code to complete the code P i (1≤i≤l CG ×2), where the padding code P i The number and extended Hamming code group CG i = {C1, C2} (1≤i≤m) has the same number of extended Hamming codes. Then add the padding code (P 2i-1 ||P 2i )(1≤i≤m) and the extended Hamming code group CG i (1≤i≤m) performs bitwise XOR operation to obtain the XOR result bit stream O; the method is as follows:

[0034] O=XOR((P 2i-1 ||P 2i ),CG i )

[0035] Among them, O represents the result after XOR, and XOR represents the XOR operation.

[0036] Then, enough zeros are added to the front of the bit stream O after XOR to make the length of the bit stream O the same as the length of the information area. The resulting bit stream after zero padding is regarded as O'. Since the data area of ​​the two-dimensional code consists of a total of R code elements and each code element consists of 8 bits, the number of zeros that need to be padded is 8×R-(l CG ×2×8). The calculation process of zero padding is as follows:

[0037] O′=(0...0||O)

[0038] Among them, || represents the additional operation, and the number of additional zeros is 8×R-(l CG ×2×8).

[0039] Then, the error correction code E corresponding to the bit stream O′ is calculated according to the Reed-Solomon (RS) coding, and the obtained error correction code is appended to the bit stream O′ to obtain a new RS code NR.

[0040] NR=(O′||E)=(O′||F RS (O′)

[0041] Among them, F RS (·) represents the generating function of Reed-Solomon coding.

[0042] Finally, the original RS code OR in the carrier QR code is XORed with the new RS code NR to obtain the RS code FR that can be embedded, and the original RS code OR in the carrier QR code is replaced with the RS code FR; the method is as follows:

[0043] OR←FR=XOR(OR,NR)

[0044] Among them, OR represents the RS code of the original carrier QR code, NR represents the newly generated RS code, FR represents the final embeddable RS code, XOR represents the exclusive OR operation, and “←” is the replacement operation.

[0045] As a preferred solution of the present invention, the specific process of step 4 is as follows:

[0046] Extended Hamming code group CG generated by shares i (1≤i≤m) is used as the input of the hash function (in the experiment of this article, the hash function uses SHA-1). At the same time, in order to prevent attackers from using other participants’ steganographic QR codes to destroy the verification phase, it is necessary to add the identification ID of the steganographic QR code to the input of the hash function. j (1≤j≤n). Therefore, this paper uses the HMAC algorithm to bitwise XOR the 160-bit output of the hash function to generate a length l with the remainder bits. A Verification information of the carrier QR code of equal length U={u i |1≤u i ≤l A}; The calculation formula for verification information U is:

[0047]

[0048] in represents the extended Hamming code group generated by the jth share, ID j represents the identity number of the jth steganographic QR code, || represents an additional operation, XOR<·> represents a group XOR operation, F K (x) represents the hash algorithm (SHA-1 is used in this article).

[0049] As a preferred solution of the present invention, the specific process of step 5 is as follows:

[0050] The generated verification information is embedded into the remaining bits of the carrier QR code to obtain the final steganographic carrier QR code. i (1≤i≤n). After all the extended Hamming code groups generated by all shares and their verification information are embedded, the embedding process ends here.

[0051] As a preferred solution of the present invention, the specific process of step 6 is as follows:

[0052] In the verification phase, firstly, the steganographic QR code Q′ iThe previously embedded verification information U is read from the remaining bits of (1≤i≤n). Then, according to the extended Hamming code group hidden in the jth steganographic QR code, To generate verification information U'. And compare U with U'. If the results are inconsistent, it means that there is an error in the steganographic QR code. The calculation formula of verification information U' is as follows:

[0053]

[0054] in represents the extended Hamming code group embedded in the jth steganographic QR code, ID j (1≤j≤n) represents the identity number of the jth steganographic QR code, || represents the additional operation, XOR<·> represents the group XOR operation, F K (x) represents the hash algorithm (SHA-1 is used in this article).

[0055] As a preferred solution of the present invention, the specific process of step 7 is as follows:

[0056] If there is a single bit error, this scheme can use the (8,4) extended Hamming code theory to detect the codeword and correct it. i (1≤i≤2×m), the recovery calculation process is as follows:

[0057] C″ i =F EHCC (C′ i )

[0058] Where C″ i represents the corrected extended Hamming code, F EHCC (·) represents the correction function of the extended Hamming code.

[0059] As a preferred solution of the present invention, the specific process of step 8 is as follows:

[0060] Finally, extract the corrected codeword C″ i ={c j The high 4 bits (c7c6c5c4) in |1≤j≤8}(1≤i≤2×m) form a byte element in a share, thereby extracting a qualified share with a share size of m bytes. Then, the Lagrange interpolation method is used to reconstruct the original secret information through k shares.

[0061]

[0062] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0063] The two-dimensional code secret sharing method based on extended Hamming code proposed by the present invention generates the extended Hamming code from the secret share and then embeds it into the carrier, thereby realizing the error correctability of the steganographic two-dimensional code and accurately detecting and correcting the code errors existing in the steganographic two-dimensional code. The generated extended Hamming code group is embedded into the redundant part of the padding code of the two-dimensional code through the homomorphic property of the two-dimensional code, ensuring that a high embedding capacity is achieved without sacrificing any original function of the two-dimensional code. The verification information is embedded through the structural property of the two-dimensional code, and the original error correction function of the two-dimensional code will not be destroyed due to the embedding of the verification information. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 It is a flow chart of a two-dimensional code secret sharing method based on extended Hamming code of the present invention.

[0065] Figure 2 (a)-(h) are effect diagrams of embodiments of the present invention. DETAILED DESCRIPTION

[0066] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0067] The present invention proposes a two-dimensional code secret sharing method based on extended Hamming code, and the working flow diagram is as follows: Figure 1 As shown, the specific implementation includes the following steps:

[0068] (1) Assume that the secret information S(s i ,1≤i≤k×m) is k×m in bytes. Each k bytes of the secret information can be substituted for the k coefficients in the following polynomial to generate n shares H i (1≤i≤n). Since a sharing process requires k bytes of content, the size of the generated share is m bytes.

[0069] f(x)=(a0+a1x+…+a k-1 x k-1 )mod g(x) (1)

[0070] Where x is any positive integer input value; a0, a1, …, a k-1 is the polynomial coefficient, which will be replaced by k bytes of secret information; mod is the modulus operation; g(x) = x 8 +x 4 +x 3 +x+1.

[0071] (2) For a share H i , each element B(b i,0≤i≤7) is divided into the upper four bits (b7b6b5b4) and the lower four bits (b3b2b1b0) in binary form, and then used as the input of the (8, 4) extended Hamming code generation function to obtain the extended Hamming code group CG. i = {C1, C2} (1≤i≤m), each extended Hamming code is 1 byte, so each extended Hamming code group is 2 bytes. Until every element in the share is shared, the extended Hamming code group CG for embedding into the carrier QR code is finally obtained. i ={C1,C2}(1≤i≤m), the total embedding size of the extended Hamming code group is 2×m bytes.

[0072]

[0073] where F EHC (·) represents the generating function of the extended Hamming code.

[0074] (3) In the embedded extended Hamming code group CG i Previously, it was necessary to select a suitable carrier QR code to determine whether it had enough padding redundancy to accommodate the CG i According to the selected carrier QR code filling area, CG i The number of embeddable groups can be calculated; the formula for calculating the number of embeddable groups of the extended Hamming code group is:

[0075]

[0076] Among them, l CG represents the number of embeddable groups of the extended Hamming code group, R represents the total number of code elements in the data area, p represents the total number of fragments in the two-dimensional code, and M j Indicates the number of bits of the encoding rule in the jth fragment, I j The number of bits of the character count indicator in the jth segment, D j It represents the number of bits of data in the jth fragment, and T represents the number of bits of the data area terminator.

[0077] Then, according to the homomorphic property of Reed-Solomon coding, the extended Hamming code group CG i Embedded into the carrier QR code. Assume that the selected carrier QR code can be embedded with a Hamming code group length l CG =m. In the embedding process, first decode the carrier two-dimensional code to complete the code P i (1≤i≤l CG ×2), where the padding code P i The number and extended Hamming code group CG i = {C1, C2} (1≤i≤m) has the same number of extended Hamming codes. Then add the padding code (P 2i-1 ||P2i )(1≤i≤m) and the extended Hamming code group CG i (1≤i≤m) performs bitwise XOR operation to obtain the XOR result bit stream O; the method is as follows:

[0078] O=XOR((P 2i-1 ||P 2i ),CG i ) (4)

[0079] Among them, O represents the result after XOR, and XOR represents the XOR operation.

[0080] Then, enough zeros are added to the front of the bit stream O after XOR to make the length of the bit stream O the same as the length of the information area. The resulting bit stream after zero padding is regarded as O'. Since the data area of ​​the two-dimensional code consists of a total of R code elements and each code element consists of 8 bits, the number of zeros that need to be padded is 8×R-(l CG ×2×8). The calculation process of zero padding is as follows:

[0081] O′=(0...0||O) (5)

[0082] Among them, || represents the additional operation, and the number of additional zeros is 8×R-(l CG ×2×8).

[0083] Then, the error correction code E corresponding to the bit stream O′ is calculated according to the Reed-Solomon (RS) coding, and the obtained error correction code is appended to the bit stream O′ to obtain a new RS code NR.

[0084] NR=(O′||E)=(O′||F RS (O′)) (6)

[0085] Among them, F RS (·) represents the generating function of Reed-Solomon coding.

[0086] Finally, the original RS code OR in the carrier QR code is XORed with the new RS code NR to obtain the RS code FR that can be embedded, and the original RS code OR in the carrier QR code is replaced with the RS code FR; the method is as follows:

[0087] OR←FR=XOR(OR,NR) (7)

[0088] Among them, OR represents the RS code of the original carrier QR code, NR represents the newly generated RS code, FR represents the final embeddable RS code, XOR represents the exclusive OR operation, and “←” is the replacement operation.

[0089] (4) Extended Hamming code group CG generated by shares i(1≤i≤m) is used as the input of the hash function (in the experiment of this article, the hash function uses SHA-1). At the same time, in order to prevent attackers from using other participants’ steganographic QR codes to destroy the verification phase, it is necessary to add the identification ID of the steganographic QR code to the input of the hash function. j (1≤j≤n). Therefore, this paper uses the HMAC algorithm to bitwise XOR the 160-bit output of the hash function to generate a length l with the remainder bits. A Verification information of the carrier QR code of equal length U={u i |1≤u i ≤l A}; The calculation formula for verification information U is:

[0090]

[0091] in represents the extended Hamming code group generated by the jth share, ID j represents the identity number of the jth steganographic QR code, || represents an additional operation, XOR<·> represents a group XOR operation, F K (x) represents the hash algorithm (SHA-1 is used in this article).

[0092] (5) Embed the generated verification information into the remaining bits of the carrier QR code to obtain the final steganographic carrier QR code. i (1≤i≤n). After all the extended Hamming code groups generated by all shares and their verification information are embedded, the embedding process ends here.

[0093] (6) In the verification phase, firstly, the steganographic QR code Q′ i The previously embedded verification information U is read from the remaining bits of (1≤i≤n). Then, according to the extended Hamming code group hidden in the jth steganographic QR code, To generate verification information U'. And compare U with U'. If the results are inconsistent, it means that there is an error in the steganographic QR code. The calculation formula of verification information U' is as follows:

[0094]

[0095] in represents the extended Hamming code group embedded in the jth steganographic QR code, ID j (1≤j≤n) represents the identity number of the jth steganographic QR code, || represents the additional operation, XOR<·> represents the group XOR operation, F K (x) represents the hash algorithm (SHA-1 is used in this article).

[0096] (7) If there is a single bit error, this scheme can use the (8,4) extended Hamming code theory to detect the codeword and correct it. i (1≤i≤2×m), the recovery calculation process is as follows:

[0097] C″ i =F EHCC (C′ i ) (10)

[0098] Where C″ i represents the corrected extended Hamming code, F EHCC (·) represents the correction function of the extended Hamming code.

[0099] (8) Finally, extract the corrected codeword C″ i ={c j The high 4 bits (c7c6c5c4) in |1≤j≤8}(1≤i≤2×m) form a byte element in a share, thereby extracting a qualified share with a share size of m bytes. Then, the Lagrange interpolation method is used to reconstruct the original secret information through k shares.

[0100]

[0101] In order to test the experimental effect of the present invention, this embodiment takes the (2,3) threshold as an example to explain the experimental results in detail. In the experiment, this article uses the information with the content "Password: I Love JYPC!!!" as the secret information, and the 4-H (4 represents the version number, H represents the error correction capability) two-dimensional code with the public information content "CoverCodei" (1≤i≤3) as the carrier two-dimensional code.

[0102] The experimental results are as follows Figure 2 shown. Figure 2 (a) is the secret message "Password: I Love JYPC!!!", and the secret message length is 24 bytes in total. Figure 2 (b)-(d) show three 4-H carrier QR codes according to ISO / IEC 18004, and their residual bit length is 7 bits. Figure 2 (e)-(g) show three steganographic QR codes implemented by the embedding algorithm in this paper. Even if these steganographic QR codes are embedded with secret information, we can still read their public information through a QR code scanner. Figure 2 (h) shows the reconstructed secret message, which is reconstructed from the extended Hamming code share in the stego-QR code.

[0103] 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 two-dimensional code secret sharing method based on extended Hamming code, characterized in that: The steps include: Step 1, take the finite field Galois Field (2 8 ) is used as the background to share secret information according to the polynomial, thereby generating n secret shares H i (1≤i≤n); Step 2: According to the share H i Each element in (1≤i≤n) generates a corresponding extended Hamming code, thereby obtaining an extended Hamming code group for embedding; Step 3, using the homomorphic property of the two-dimensional code, embed the generated extended Hamming code group into the redundant area of ​​the padding code of the two-dimensional code; Step 4, using the extended Hamming code group generated by the share as the input of the verification function to obtain the verification information U to be embedded; Step 5: embed the generated verification information into the remaining bits of the carrier QR code to obtain the final steganographic carrier QR code. i (1≤i≤n); Step 6: During the recovery process, firstly perform the steganographic QR code Q′ i The authenticity of (1≤i≤n) is tested to avoid failure of the secret reconstruction process; Step 7: Extract the Q′ embedded in the steganographic QR code i The extended Hamming code group in (1≤i≤n) is used to correct the bit errors; Step 8, extract the secret share from the corrected extended Hamming code, and reconstruct the original secret information through k shares using the Lagrange interpolation method.

2. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 1 is as follows: Assume that the secret information S(s i , 1≤i≤k×m) is k×m in bytes. Each k bytes of the secret information can be substituted for the k coefficients in the following polynomial to generate n shares H i (1≤i≤n). Since a sharing process requires k bytes of content, the size of the generated share is m bytes. f(x)=(a0+a1x+…+a k-1 x k-1 )mod g(x) Where x is any positive integer input value; a0, a i , …, a k-1 is the polynomial coefficient, which will be replaced by k bytes of secret information; mod is the modulus operation; g(x) = x 8 +x 4 +x 3 +x+1.

3. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 2 is as follows: For a share H i , each element B(b i , 0≤i≤7) is divided into the upper four bits (b7b6b5b4) and the lower four bits (b3b2b1b0) in binary form, and then used as the input of the (8, 4) extended Hamming code generation function to obtain the extended Hamming code group CG i ={C1, C2}(1≤i≤m), each extended Hamming code is 1 byte, so each extended Hamming code group is 2 bytes. Until every element in the share is shared, the extended Hamming code group CG for embedding into the carrier QR code is finally obtained. i ={C1, C2}(1≤i≤m), the total embedding size of the extended Hamming code group is 2×m bytes. Among them, F EHC (·) represents the generating function of the extended Hamming code.

4. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 3 is as follows: In the embedded extended Hamming code group CG i Previously, it was necessary to select a suitable carrier QR code to determine whether it had enough padding redundancy to accommodate the CG i According to the selected carrier QR code filling area, CG i The number of embeddable groups can be calculated; the formula for calculating the number of embeddable groups of the extended Hamming code group is: Among them, l CG represents the number of embeddable groups of the extended Hamming code group, R represents the total number of code elements in the data area, p represents the total number of fragments in the two-dimensional code, and M j Indicates the number of bits of the encoding rule in the jth fragment, I j The number of bits of the character count indicator in the jth segment, D j It represents the number of bits of data in the jth fragment, and T represents the number of bits of the data area terminator. Then, according to the homomorphic property of Reed-Solomon coding, the extended Hamming code group CG i Embedded into the carrier QR code. Assume that the selected carrier QR code can be embedded with a Hamming code group length l CG =m. In the embedding process, first decode the carrier two-dimensional code to complete the code P i (1≤i≤l CG ×2), where the padding code P i The number and extended Hamming code group CG i = {C1, C2} (1≤i≤m) has the same number of extended Hamming codes. Then add the padding code (P 2i-1 ||P 2i )(1≤i≤m) and the extended Hamming code group CG i (1≤i≤m) performs bitwise XOR operation to obtain the XOR result bit stream O; the method is as follows: O=XOR((P 2i-1 ||P 2i ),CG i ) Among them, O represents the result after XOR, and XOR represents the XOR operation. Then, enough zeros are added to the front of the bit stream O after XOR to make the length of the bit stream O the same as the length of the information area. The resulting bit stream after zero padding is regarded as O'. Since the data area of ​​the two-dimensional code consists of a total of R code elements and each code element consists of 8 bits, the number of zeros that need to be padded is 8×R-(l CG ×2×8). The calculation process of zero padding is as follows: O′=(0…0||O) Among them, || represents the additional operation, and the number of additional zeros is 8×R-(l CG ×2×8). Then, the error correction code E corresponding to the bit stream O′ is calculated according to the Reed-Solomon (RS) code, and the obtained error correction code is appended to the bit stream O′ to obtain a new RS code NR. NR=(O′||E)=(O′||F RS (O′)) Among them, F RS (·) represents the generating function of Reed-Solomon coding. Finally, the original RS code OR in the carrier QR code is XORed with the new RS code NR to obtain the RS code FR that can be embedded, and the original RS code OR in the carrier QR code is replaced with the RS code FR; the method is as follows: OR←FR=XOR(OR,NR) Among them, OR represents the RS code of the original carrier QR code, NR represents the newly generated RS code, FR represents the final embeddable RS code, XOR represents the exclusive OR operation, and "←" is the replacement operation.

5. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 4 is as follows: Extended Hamming code group CG generated by shares i (1≤i≤m) is used as the input of the hash function (in the experiment of this article, the hash function uses SHA-1). At the same time, in order to prevent attackers from using other participants’ steganographic QR codes to destroy the verification phase, it is necessary to add the identification ID of the steganographic QR code to the input of the hash function. j (1≤j≤n). Therefore, this paper uses the HMAC algorithm to bitwise XOR the 160-bit output of the hash function to generate a length l with the remainder bits. A Verification information of the carrier QR code of equal length U={u i |1≤u i ≤l A }; The calculation formula for verification information U is: in represents the extended Hamming code group generated by the jth share, ID j represents the identity number of the jth steganographic QR code, || represents an additional operation, XOR<·> represents a group XOR operation, and F K (x) represents the hash algorithm (SHA-1 is used in this article).

6. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 5 is as follows: The generated verification information is embedded into the remaining bits of the carrier QR code to obtain the final steganographic carrier QR code. i (1≤i≤n). After all the extended Hamming code groups generated by all shares and their verification information are embedded, the embedding process ends here.

7. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 6 is as follows: In the verification phase, firstly, the steganographic QR code Q′ i The previously embedded verification information U is read from the remaining bits of (1≤i≤n). Then, according to the extended Hamming code group hidden in the jth steganographic QR code, To generate verification information U'. And compare U with U'. If the results are inconsistent, it means that there is an error in the steganographic QR code. The calculation formula of verification information U' is as follows: in represents the extended Hamming code group embedded in the jth steganographic QR code, ID j (1≤j≤n) represents the identity number of the jth steganographic QR code, || represents an additional operation, XOR<·> represents a group XOR operation, and F K (x) represents the hash algorithm (SHA-1 is used in this article).

8. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 7 is as follows: If there is a single bit error, this scheme can use the (8, 4) extended Hamming code theory to detect the codeword and correct it. For a codeword C with a bit error; (1≤i≤2×m), the recovery calculation process is as follows: C i =F EHCC (C i ) Where C″ i represents the corrected extended Hamming code, F EHCC (·) represents the correction function of the extended Hamming code.

9. The two-dimensional code secret sharing method based on extended Hamming code according to claim 1, characterized in that: The specific process of step 8 is as follows: Finally, extract the corrected codeword C″ i ={c j The high 4 bits (c7c6c5c4) in |1≤j≤8}(1≤i≤2×m) form a byte element in a share, thereby extracting a qualified share with a share size of m bytes. Then, the Lagrange interpolation method is used to reconstruct the original secret information through k shares.