Research Article

A Novel Three-Layer QR Code Based on Secret Sharing Scheme and Liner Code

Algorithm 2

Information sharing and embedding Algorithm.
Input: Carrier QR code images C1, C2, …, C2p of size m × n, Shared key seed, Privacy QR code with size of m × n as the second layer information, The third layer information s.
Output: shares QR1, QR2, …, QR2p with size of 3m × 3n.
Step 1: Construct a random matrix block , The third layer information stream s is zero-filled to obtain s, which satisfies length(s) mod p = 0.
Step 2: Let i = 1, j = 1, cover is an empty matrix. i and j represent the rows and columns of the carrier QR code, respectively.
Step 3: If Ck (i, j) (k = 1, 2, …, 2p) belongs to the functional patterns of QR code, go to Step 5. Else, select the corresponding column vector in the random matrix, and let , , where “” represents the merger of the matrix. Calculate the XOR result of each column element of the random matrix block by .
Step 4: If , go to Step 5. Else, let .
Step 5: Let j = j + 1, if j > n, go to Step 6. Else, go to Step 3.
Step 6: Let i = i + 1, if i > m, go to Step 7. Else, go to Step 3.
Step 7: The carrier data , the secret information s, the matrix dry_index and the shared key seed are taking as the input of wet paper codes and the array that carries the secret information is the output. Then, calculate and divide the diff into blocks by per p bits. Each block is treated as a column vector and all the vectors are arranged in order to form the matrix .
Step 8: Let x = 1, y = 1. x and y represent the rows and columns of the carrier QR code, respectively.
Step 9: If the column of the is equal to , let . Else, find the number same column in the , of which the corresponding column number is recorded as h, and calculate .
Step 10: If Ck (x, y) (k = 1, 2, …, 2p) belongs to the functional patterns of QR code, let . Else, calculate and .
Step 11: Let y = y + 1, if y > n, go to Step 12. Else, go to Step 9.
Step 12: Let x = x + 1, if x ≤ m, go to Step 9. Else, output the QR code shares QR1, QR2, …, QR2p.