GB2617878A - Halftone secret sharing and extracting method based on optimal data allocation - Google Patents

Halftone secret sharing and extracting method based on optimal data allocation Download PDF

Info

Publication number
GB2617878A
GB2617878A GB2210856.7A GB202210856A GB2617878A GB 2617878 A GB2617878 A GB 2617878A GB 202210856 A GB202210856 A GB 202210856A GB 2617878 A GB2617878 A GB 2617878A
Authority
GB
United Kingdom
Prior art keywords
halftone
secret
shares
shared data
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB2210856.7A
Other versions
GB2617878B (en
GB202210856D0 (en
Inventor
Ding Haiyang
Zhang Zhenzhen
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Graphic Communication
Original Assignee
Beijing Institute of Graphic Communication
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Graphic Communication filed Critical Beijing Institute of Graphic Communication
Publication of GB202210856D0 publication Critical patent/GB202210856D0/en
Publication of GB2617878A publication Critical patent/GB2617878A/en
Application granted granted Critical
Publication of GB2617878B publication Critical patent/GB2617878B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/405Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels
    • H04N1/4051Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels producing a dispersed dots halftone pattern, the dots having substantially the same size
    • H04N1/4052Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels producing a dispersed dots halftone pattern, the dots having substantially the same size by error diffusion, i.e. transferring the binarising error to neighbouring dot decisions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/34Encoding or coding, e.g. Huffman coding or error correction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Image Processing (AREA)

Abstract

A halftone secret sharing method comprises encrypting an original secret image T and encrypted secret image D, constructing m(k-1)-degree polynomials, wherein each polynomial generates a shared data set for each constant coefficient, and m shared data sets are generated in total, m and k each being a positive integer greater than 1. Subsequently, n hidable shares X1-Xn are generated according to the m shared data sets and the encrypted secret image D by using an optimal data allocation algorithm, wherein n is a positive greater than 1, and the optimal data allocation algorithm considers data of to-be-hidden carrier images first, and then generates hidable shares. The n hidable shares X1-Xn are hidden into n halftone secret shares separately with a halftone self-hiding algorithm to obtain first halftone secret shares O1-On and secret data that has not been shared correctly is recorded into corresponding shares O1-On to obtain second shares P1-Pn. Numbers and cyclic redundancy check (CRC) codes of the n hidable shares are recorded into corresponding shares P1-Pn to obtain final shares H1-Hn.

Description

HALFTONE SECRET SHARING AND EXTRACTING METHOD BASED ON
OPTIMAL DATA ALLOCATION
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of image hiding, and in particular to a halftone secret sharing and extracting method based on optimal data allocation.
BACKGROUND ART
[0002] The halftone image is considered as a special image carrier and only expressed by black and white color values. Conceptually, the halftone image can be taken as a binary image. Different from the binary image after image segmentation that highlights dissimilarities between a foreground and a background, the halftone image is intended to reveal the original image as lossless as possible with the only two values.
[0003] As an important way for image hiding, image sharing is more secure and convenient. Specifically, N binary shares are generated by the image sharing for an original binary secret image, and any K shares are selected from the N binary shares to reveal the original image.
[0004] According to existing technologies, when the shares are hidden into carrier images, it is inevitable to intentionally modify data of the halftone carrier images. However, in order to ensure the quality of the halftone image, the modification in the hiding process must be restricted to some extent. As a result, a part of to-be-hidden shared data cannot be hidden effectively, and there are bit errors when the shares are extracted. When the secret image is calculated with the extracted shares, the bit errors are significantly aggravated. The aggravation of the bit errors in the extracted shares is associated with the data of the carrier images. In the existing technologies, during generation of to-be-hidden shares, the shared data are allocated randomly without considerations to the carrier images, which fails to effectively address the above problem. Therefore, there is still significant room for improvement in accuracy of the extracted shares and the accuracy of the extracted secret image.
SUMMARY
[0005] An objective of the present disclosure is to provide a halftone secret sharing and extracting method based on optimal data allocation The present disclosure can effectively overcome bit errors of the extracted shares due to quality limitations of the halftone images, obviously improve the accuracy of the extracted shares, and ensure the accuracy of the extracted secret image.
[0006] In order to achieve the above objective, the present disclosure provides the following technical solutions: [0007] The present disclosure provides a halftone secret sharing method based on optimal data allocation, including: [0008] encrypting an original secret image T to generate an encrypted secret image D; [0009] constructing m (k-1)-degree polynomials, where the polynomials each are configured to generate a shared data set for each constant coefficient, and m shared data sets are generated in total, m and k each being a positive integer greater than 1; [0010] generating n hidable shares XI-Xn according to the m shared data sets and the encrypted secret image D by using an optimal data allocation algorithm, where n is a positive integer greater than 1, and the optimal data allocation algorithm is configured to first consider data of to-be-hidden carrier images, and then generate hidable shares; [0011] hiding the n hidable shares XI-Xn into n halftone secret shares separately with a halftone self-hiding algorithm to obtain first halftone secret shares 01-0n; [0012] recording secret data, which cannot be shared correctly, into corresponding ones of the first halftone secret shares 01-On to obtain second halftone secret shares P1-Pn; and [0013] recording numbers and cyclic redundancy check (CRC) codes of the n hidable shares into corresponding ones of the second halftone secret shares P1 -Pn to obtain final halftone secret shares Hl-Hn.
[0014] The present disclosure further provides a halftone secret extracting method based on optimal data allocation, including: [0015] acquiring final halftone secret shares H1 -Hn obtained with the above halftone secret sharing method; [0016] extracting from the final halftone secret shares Hl-Hn with a halftone image self-extraction algorithm to obtain n extracted shares R1-Rn, n being a positive integer greater than 1; [0017] extracting numbers and CRC codes of shares in the final halftone secret shares Hl-Hn; [0018] determining, according to the numbers and the CRC codes of the shares, whether the n extracted shares Rl-Rn are correct; [0019] recording a correct share Ric if yes; [0020] recording an erroneous share Me if no [0021] selecting any k extracted shares when the number of the correct shares is greater than or equal to k, and extracting an encrypted secret image D by Lagrange interpolation, k being a positive integer greater than 1; [0022] decrypting the encrypted secret image D to obtain an original secret image T; and [0023] generating an updated correct share Riec and a correct halftone secret share Hic according to the encrypted secret image D, the correct share Ric and the erroneous share Rie on the basis of m shared data sets, the m shared data sets being obtained by constructing m (k-1)-degree polynomials according to the halftone secret sharing method.
[0024] According to the specific embodiments provided by the present disclosure, the present disclosure achieves the following technical effects: 100251 With the optimal data allocation method, the halftone secret sharing and extracting method based on optimal data allocation provided by the present disclosure effectively overcome bit errors of the extracted shares due to quality limitations of the halftone images, obviously improve the accuracy of the extracted shares, and ensure the accuracy of the extracted secret image. Moreover, for the extracted erroneous share, the correct halftone secret share can be generated in combination with the extracted secret image without affecting other correct shares.
BRIEF DESCRIPTION OF THE DRAWINGS
[0026] To describe the technical solutions in the embodiments of the present disclosure or in the prior art more clearly, the accompanying drawings required for the embodiments are briefly described below. Apparently, the accompanying drawings in the following description show merely some embodiments of the present disclosure, and those of ordinary skill in the art may still derive other accompanying drawings from these accompanying drawings without creative efforts.
[0027] FIG. 1 is a flowchart illustrating a halftone secret sharing method based on optimal data allocation according to Embodiment 1 of the present disclosure; and [0028] FIG. 2 is a flowchart illustrating a halftone secret extracting method based on optimal data allocation according to Embodiment 2 of the present disclosure.
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] The technical solutions of the embodiments of the present disclosure are clearly and completely described below with reference to the accompanying drawings Apparently, the described embodiments are merely a part rather than all of the embodiments of the present disclosure All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
[0030] Halftone secret sharing refers to the polynomial-based (k,n) halftone secret sharing [1]. For [1], see Ding Haiyang, Li Zichen, Bi Wei, (k, n) halftone visual cryptography based on Shamir's secret sharing, The Journal of China Universities of Posts and Telecommunications, 2018, 25(2):60-76. According to the algorithm, a binary secret pattern can be hidden into n halftone images, and then the secret pattern can be extracted from any k halftone images by Lagrange interpolation. Specifically, the original binary secret image is shared into n meaningless shares with the polynomial-based secret sharing. The n meaningless shares are hidden into n halftone images with a halftone image self-hiding algorithm. N shares are extracted from n halftone shares with halftone image self-extraction. The secret image is extracted from any k shares in the n extracted shares by Lagrange interpolation.
[0031] In spite of some advantages of the algorithm, there is still significant room for improvement in the accuracy of extracted shares and the accuracy of extracted secret image. [0032] An objective of the present disclosure is to provide a halftone secret sharing and extracting method based on optimal data allocation. The present disclosure can effectively overcome bit errors of the extracted shares due to quality limitations of the halftone images, obviously improve the accuracy of the extracted shares, and ensure the accuracy of the extracted secret image.
[0033] To make the above-mentioned objective, features, and advantages of the present disclosure clearer and more comprehensible, the present disclosure will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0034] Embodiment I: [0035] Referring to FIG. 1, the present disclosure provides a halftone secret sharing method based on optimal data allocation, including the following steps: [0036] Al: Encrypt an original secret image T to generate an encrypted secret image D. [0037] A2: Construct m (k-1)-degree polynomials, where the polynomials each are configured to generate a shared data set for each constant coefficient, and m shared data sets are generated in total, m and k each being a positive integer greater than 1.
[0038] Al Generate n hidable shares XI-Xn according to the m shared data sets and the encrypted secret image D by using an optimal data allocation algorithm, where n is a positive integer greater than 1, and the optimal data allocation algorithm is configured to first consider data of to-be-hidden carrier images, and then generate hidable shares.
[0039] A4: Hide the n hidable shares XI-Xn into n halftone secret shares separately with a halftone self-hiding algorithm to obtain first halftone secret shares 01-0n.
[0040] AS: Record secret data, which cannot be shared correctly, into corresponding ones of the first halftone secret shares 0 I-On to obtain second halftone secret shares P I-Pn.
[0041] A6: Record numbers and CRC codes of the n hidable shares into corresponding ones of the second halftone secret shares Pl-Pn to obtain final halftone secret shares H1 -Hn.
[0042] In Step Al, the original secret image T is encrypted with Arnold scrambling, namely positions of pixels in the original secret image are transformed, so as to scramble the coordinates and generate new disorderly images. The number KN of times that the new disorderly images are transformed into the original image is dependent on a width and a height of the image. For example, in response to the image with the width and height of 256x256, KN=192, and the new disorderly images are restored to the original image after transformed for 192 times.
[0043] In the embodiment, the original secret image T is subjected to scrambling transform for key times to obtain the encrypted secret image D. Herein, the original secret image T has the width and height of WxH, and the encrypted secret image D also has the width and height of WxH. Key serves as an encryption key. With scrambling for KN-key times, the image D can be restored into the original secret image T. This step can make the original secret image more secure and the data distribution of the image more random.
[0044] In Step A2, m (k-1)-degree polynomials are constructed. Each polynomial is configured to generate available shared data for each constant coefficient (a0), and there are m shared data sets A in total.
[0045] With the (3,4) sharing mode for example (k=3, N=4), an original image D can be generated into four shares X1-X4, and the original image D can be extracted by selecting any three shares (such as Xl, X2, X4).
[0046] There are eight (m=8) 2-degree (k-1=2) polynomials. Each polynomial generates multiple sets of available data for each a0. The multiple sets of available data are sorted in an ascending manner according to values of a number of 1-4 to serve as an available shared data set A. [0047] With the polynomial f(x)=(a0+2x+1x2)m od17 for example, if a0=1(0001), different values are substituted to calculate y values. Sorting is performed according to values of a number of 1-4 to obtain the data set shown in Table 1.
00481 Table 1 Shared data set correspondinQ to s ecial ol nomial if a0=1 Number x Y The number of 1 in x and y 1 8(1000) 13(1101) 4 2 110011) 80000) 4 3 140110) 4(0100) 4 4 2(0010) 9(1001) 3 5(0101) 2(0010) 3 6 100010) 2(0010) 3 7 130101) 9(1001) 5 8 15(1111) 1(0001) 5 9 1(0001) 4(0100) 2 4(0100) 80000) 2 11 6(0110) 150111) 6 12 7(0111) 13(1101) 6 13 9(1001) 15(1111) 6 [0049] Step A3 of generating n hidable shares X1-Xn according to the m shared data sets and the encrypted secret image D by using an optimal data allocation algorithm specifically includes: [0050] A31: Divide the encrypted secret image D into g parts to obtain g secret data, g=(WxH)/4, W and H being a width and a height of the secret image separately, and g being a positive integer greater than 1.
[0051] A32: Take each of the secret data as a constant coefficient, and substitute the constant coefficient into the shared data sets A in Step A2 to obtain m shared data subsets.
100521 A33: Select n groups of shared data from each of the shared data subsets, and implement hiding in carrier images Yl-Yn sequentially with the halftone self-hiding algorithm.
[0053] A34: Determine whether present n groups of shared data can be hidden completely and correctly to obtain a first determination result.
100541 A35: Try a next combination in a present shared data set if the first determination result is no. [0055] A36: Determine whether shared data hidden completely and correctly exist in the present shared data set to obtain a second determination result.
[0056] A37: Continuously search a next shared data set if the second determination result is no, until a combination of shared data hidden completely and correctly is searched.
[0057] A38: Store the searched shared data hidden completely and correctly to corresponding positions of the shares X1-Xn.
100581 A39: Record, if there are no shared data hidden completely and correctly after all shared data sets are traversed, present secret data and positions of the corresponding shared data, and set shared data at corresponding positions of the shares Xl-Xn as 0.
100591 In the embodiment, the encrypted secret image D is decomposed into W/44-1 parts of 4-bit data. Each part of 4-bit data serves as one secret data, and the secret data is assumed to be a0. Before shared data are generated, n to-be-hidden carrier images Yl-Yn for hiding the shares are analyzed. N sets of optimal shared data are searched according to a0 by using the optimal data allocation algorithm, and stored to corresponding positions of the shares X1-Xn. The generated shares XI-Xn each have a width and a height of 2W x1-1.
[0060] The data allocation algorithm in the previous solution is as follows: 100611 According to the secret data a0 at the present position, any polynomial is selected. A shared data set corresponding to the a0 is searched, and any n groups of shared data are selected and shared to corresponding positions of n shares. N shares XI-Xn are generated. Since data of the to-be-hidden carrier images Yl-Yn are not considered, the shares in X1-Xn cannot be hidden correctly due to too large toggling distortion when the halftone self-hiding algorithm is used, and errors are caused when the shares are extracted.
[0062] The optimal data allocation algorithm in the present disclosure is as follows: [0063] According to the secret data a0 at the present position, shared data sets corresponding to the a0 are searched in the generated m polynomial-based data sets A, and there are m shared data subsets. Before shared data are determined, carrier images Yl-Yn of to-be-hidden shared data are analyzed. N groups of shared data are selected from the shared data subset corresponding to each polynomial, and there may be a variety of combinations. For each combination, the data at corresponding positions of the carrier images Yl-Yn are hidden with the halftone self-hiding algorithm. If the data cannot be hidden completely and correctly, a next combination is tried. If a combination of the shared data hidden completely and correctly cannot be searched under the present polynomial, a shared data set under a next polynomial is searched until a combination of shared data hidden completely and correctly is searched. The searched n groups of optimal shared data are stored to the corresponding positions of the shares XI-Xn. If there are no shared data which are hidden completely and correctly after shared data sets under all polynomials are traversed, the present secret data and positions corresponding to the shared data are recorded, and shared data at corresponding positions of the shares X1-Xn are all set as 0.
[0064] With the (3,4) sharing mode for example, if the present secret data a0=1(0001), m=8. Taking the polynomial f(x)=(a0-(2x+ I x2)mod17 for example, the Generated shared data are shown in Table 1.
[0065] According to the previous data allocation method, any polynomial is selected from eight polynomials. Assuming that the polynomial f(x)=(a0+2x+ lx2)mod17 is selected, four groups of data are randomly selected from Table 1 (for example, the first, second, third and fourth groups of shared data are selected). The four groups of shared data are allocated to corresponding positions of shares Xl-X4. When the halftone self-hiding algorithm is executed, since specific data of carrier images Y1-Y4 are not considered, the four groups of shared data may not be hidden correctly at corresponding positions of the carrier images Y I-Y4 due to too large toggling distortion, and an error is caused when the shares are extracted.
[0066] According to the optimal data allocation method in the present disclosure, corresponding shared data sets are searched according to a0=1 under the eight polynomials, and there are eight shared data subsets.
[0067] Before shared data are determined, carrier images YI-Y4 of the to-be-hidden shared data are analyzed. Four groups of shared data are selected from the shared data subset corresponding to each polynomial. Assuming that the polynomial f(x)=(a0+2x+1x2)mod I 7 is selected, four sets of shared data are selected from 13 sets of shared data in Table 1, and there are P3 combinations. For each combination, the shared data at the corresponding positions of the carrier images YI-Y4 are hidden with the halftone self-hiding algorithm. If the shared data cannot be hidden completely and correctly, a next combination is tried, until the four groups of shared data which can be hidden completely and correctly are searched.
[0068] If a combination of the shared data which can be hidden completely and correctly cannot be searched under the present polynomial, a shared data set under a next polynomial is searched until a combination of the shared data which are hidden completely and correctly is searched. The searched four groups of optimal shared data are stored to the corresponding positions of the shares X1-X4.
[0069] If there is no combination of the shared data which are hidden completely and correctly after shared data sets under all polynomials are traversed, the present secret data and positions corresponding to the shared data are recorded, and shared data at corresponding positions of the shares X1-X4 are all set as 0.
[0070] Step A4 of hiding the n hidable shares X1-Xn into n halftone secret shares separately with a halftone self-hiding algorithm to obtain first halftone secret shares 01-On specifically includes: [0071] A41: Divide each of the carrier images Yl-Yn into a first upper part Yil and a first lower part Yi2, the carrier images Yl-Yn each having a resolution of 2Wx2H, and the first upper part Yi I and the first lower part Yi2 each having a resolution of 2W8I-1.
[0072] A42: Hide a target share into the first upper part Yil and the first lower part Yi2 with the halftone self-hiding algorithm to obtain a diffusion error for last two lines in the first upper part Yil.
[0073] A43: Merge the diffusion error for the last two lines in the first upper part Yi 1 with the first lower part Yi2 to obtain a new first lower part Yi2'.
[0074] A44: Rehide the target share into the first upper part Yil and the new first lower part Yi2' with the halftone self-tiding algorithm to obtain an upper hidden image and a lower hidden image.
[0075] A45: Not implement information hiding at the corresponding positions of the carrier images Yl-Yn if shared data at present positions of the shares XI -Xn are all 0.
[0076] A46: Combine the upper hidden image and the lower hidden image to obtain a first halftone image.
[0077] A47: Obtain the first halftone secret shares 01-On according to all of the first halftone images generated by the shares.
10078] Through the above process, the n shares X1 -Xn can be separately hidden into the n first halftone secret shares 01-0n. Each first halftone secret share has a width and a height of 2W x 2H.
[0079] Step AS of recording secret data, which cannot be shared correctly, into corresponding ones of the first halftone secret shares 01-On to obtain second halftone secret shares P I-Pn specifically includes: [0080] A51: Record the secret data, which cannot be shared correctly, into a next line of each of the first halftone secret shares 01-0n, and pad a zero behind if the line is not sufficiently filled to obtain a second halftone image.
100811 A52: Obtain the second halftone secret shares P 1 -Pn according to all of the second halftone images.
[0082] In the embodiment, for the secret data which cannot be shared correctly, the corresponding position coordinates are recorded. With the secret data as a0, shared data are generated with the secret sharing method in the literature [1]. Specifically, any a0 data set corresponding to a polynomial is selected, and any n groups of shared data are selected and allocated to n carrier images. Positions of shared data which cannot be shared correctly and the corresponding shared data are sequentially written into a tail of a halftone secret share in a binary mode, namely a line is increased behind the generated first halftone image to record the positions of the shared data which cannot be shared correctly and the corresponding shared data, and zero is padded behind if the line is not sufficiently filled.
[0083] In this way, each generated second halftone secret share has the width and height of 2W/(2H+1).
[0084] Step A6 of recording numbers and CRC codes of the n hidable shares into corresponding ones of the second halftone secret shares P 1-Pn to obtain final halftone secret shares Hl-Hn specifically includes: [0085] A61: Record the numbers and the CRC codes of the shares into a next line of each of the second halftone secret shares P1-Pn, and pad the zero behind if the line is not sufficiently filled to obtain a third halftone image.
[0086] A62: Obtain the final halftone secret shares HI-Hn according to all of the third halftone images [0087] In the embodiment, CRC codes are generated for the n shares XI-Xn in Step A3. A number i and a CRC code of an ith share Xi are directly recorded at a tail of an ith halftone image Hi, namely a line is increased behind the second halftone image to record the number and the CRC code of the share, and zero is filled behind if the line is not sufficiently filled.
[0088] In this way, each generated third halftone secret share has the width and height of 2W/(2H+2).
[0089] With the optimal data allocation method, the present disclosure effectively overcomes bit errors of the extracted shares due to quality limitations of the halftone images, obviously improves the accuracy of the extracted shares, and ensures the accuracy of the extracted secret image.
[0090] Embodiment 2: [0091] Referring to FIG. 2, the present disclosure provides a halftone secret extracting method based on optimal data allocation, including the following steps: [0092] B1: Acquire final halftone secret shares HI-Hn obtained with the halftone secret sharing method based on optimal data allocation in Embodiment I. [0093] B2: Extract from the final halftone secret shares Hl-Hn with a halftone image self-extraction algorithm to obtain n extracted shares R1-Rn, n being a positive integer greater than 1.
[0094] B3: Extract numbers and CRC codes of shares in the final halftone secret shares Hl-Hn. [0095] B4: Determine, according to the numbers and the CRC codes of the shares, whether the n extracted shares R1-Rn are correct.
[0096] B5: Record a correct share Ric if yes.
[0097] B6: Record an erroneous share Rie if no [0098] B7: Select any k extracted shares when the number of the correct shares is greater than or equal to k, and extract an encrypted secret image D by Lagrange interpolation, k being a positive integer greater than I. [0099] B8: Decrypt the encrypted secret image D to obtain an original secret image T [0100] B9: Generate an updated correct share Riec and a correct halftone secret share Hic according to the encrypted secret image D, the correct share Ric and the erroneous share Rie on the basis of m shared data sets, the m shared data sets being obtained by constructing m (k-1)-degree polynomials according to the halftone secret sharing method in Embodiment I. [0101] Step B2 of extracting from the final halftone secret shares Hl-Hn with a halftone image self-extraction algorithm to obtain n extracted shares R1-Rn specifically includes: [0102] B21: Remove two bottommost lines of image data in the final halftone secret shares Hl-Hn to obtain fourth halftone images.
[0103] B22: Divide each of n fourth halftone images into a second upper part Hi l' and a second lower part Hi2'.
[0104] B23: Perform exclusive NOR (NNOR) operation on corresponding pixels of the second upper part Hi I' and the second lower part Hi2' in each of the fourth halftone images to obtain n initial extracted shares.
[0105] B24: Acquire a penultimate line of data in the final halftone secret shares H1 -Hn, and sequentially extract positions of shared data which cannot be shared correctly and the shared data.
[0106] B25: Substitute the positions of the shared data which cannot be shared correctly and the shared data into the n initial extracted shares to obtain the n extracted shares RI-Rn.
[0107] In the embodiment, two bottommost lines of image data are removed from an ith final halftone secret share Hi to obtain a fourth halftone image Hi' having a width and a height of 2W x 2H.
[0108] The fourth halftone image Hi' is divided into a second upper part Hi and a second lower part I-1i2'. Both the second upper part Hi I' and the second lower part FliT have a resolution of 2W1-1.
[0109] )(NOR operation is performed on corresponding pixels of the second upper part Hi l' and the second lower part Hi2' to obtain n initial extracted shares.
[0110] A (2H+1) line of data in the ith final halftone share Hi are acquired. Positions of shared data which cannot be shared correctly and the shared data are extracted sequentially. The shared data are substituted into corresponding positions of the n initial extracted shares R 1-Rn to obtain n extracted shares R1-Rn.
10111] Step B3 of extracting numbers and CRC codes of shares in the final halftone secret shares Hl-Hn specifically includes: [0112] B31: Acquire a last line of data in the final halftone secret shares Hl-Hn.
[0443] B32: Extract the numbers i of the shares and the CRC codes of the corresponding shares according to the last line of data.
[0114] In the embodiment, a (2H+2)th line of data in the ith final halftone secret share Hi are acquired, a number i of the share is extracted, and a CRC code of the corresponding share is extracted and recorded as CRCil [0115] The CRC code is calculated according to an ith extracted share, and recorded as CRCi2. [0116] Whether the CRCil is the same as the CRCi2 is compared. The present extracted share Ri is extracted correctly if yes. The present extracted share Ri is extracted erroneously if no. [0117] The correct share is recorded as Ric, while the erroneous share is recorded as Rie. Regardless of whether the share is correct or erroneous, the number of the share keeps unchanged.
[0118] For example, there are extracted shares R1-R4, and it is verified that the shares R1, R2 and R4 are extracted correctly while the share R3 is extracted erroneously. In this case, the correct shares are recorded as R I c, R2c and R4c, and the erroneous share is recorded as R3e. [0119] In Step B7, any k shares are selected from the extracted correct shares. Each share is decomposed into W/4x H sets of 8-bit shared data. There are k groups of shared data corresponding to the k shares. The original data a0 which is 4-bit is calculated by Lagrange interpolation. With secret data extracted based on a0, encrypted secret image D that has a width and a height of W/1-1 is extracted.
[0120] For example, the encrypted secret image D is extracted by the Lagrange interpolation with the correct shares Ric, R2c and R4c.
[0121] Step B9 of generating an updated correct share Riec and a correct halftone secret share Hic according to the encrypted secret image D, the correct share Ric and the erroneous share Pie on the basis of m shared data sets specifically includes: 101221 B91: Divide the encrypted secret image D into g parts to obtain g secret data, g=(W/1-1)/4, W and H being a width and a height of the secret image separately, and g being a positive integer greater than 1.
[0123] B92: Take each of the secret data as a constant coefficient, and substitute the constant coefficient into the shared data sets A in Step A2 in Embodiment 1 to obtain m shared data subsets.
[0124] B93: Extract correct shared data from a present position of the correct share Ric, and determine a unique shared data set according to the correct shared data and the m shared data subsets.
[0125] B94: Remove used correct shared data from the unique shared data set to obtain a remaining shared data set.
[0126] B95: Obtain, according to the remaining shared data set by using the optimal data allocation algorithm, shared data which are hidden completely and correctly.
[0127] B96: Store the shared data which are hidden completely and correctly to a corresponding position of the correct share to obtain an updated correct share Riec.
[0128] B97: Hide the updated correct share into a halftone secret share with a halftone self-hiding algorithm to obtain an updated first halftone secret share.
[0129] B98: Extract a (2H+1)th line of data from an original halftone secret share Hi corresponding to the erroneous share Pie, the line of data being configured to record positions of shared data which cannot be shared correctly and the shared data; and record the line of data into the corresponding updated first halftone secret share to obtain an updated second halftone secret share.
[0130] B99: Record a number and a CRC code of the updated correct share Riec into the corresponding updated second halftone secret share to obtain the correct halftone secret share Hic.
[0131] In the embodiment, it is assumed that there are one erroneous share and n-1 correct shares.
[0132] The encrypted secret image D is decomposed into W/4><H parts of 4-bit data. Each part of 4-bit data set serves as one secret data. It is assumed that the secret data is a0. According to the secret data a0 at the present position, shared data subsets corresponding to the a0 are searched in the m polynomial-based data sets, and there are m shared data subsets. N-1 groups of shared data are searched from present positions of the n-1 correct shares, and these shared data are searched in the m shared data subsets. If the unique data set can be searched, it is indicated that the shared data at the present position come from the data subset corresponding to the polynomial. In the data subset, used n-1 sets of the shared data are excluded, and appropriate shared data are searched in the remaining shared data according to the optimal data allocation algorithm and stored to the corresponding positions of the correct shares Riec. If the n-1 sets of the shared data at the present positions are all 0, the present positions of the Rice are also 0.
[0133] By performing the halftone self-hiding algorithm, 2Wx2H halftone image data are generated and placed into front 211 lines of the correct halftone secret share Hic. A (2H+1)th line of data in the ith final halftone share Hi are extracted, and placed into a (2H+1)th line in the correct halftone secret share Hic. The number and CRC code of the share are increased, and placed into a (2H+2)th line in the correct halftone secret share Hic.
[0134] Through the above process, the correct halftone secret share Hic is generated.
[0135] With the (3,4) sharing mode for example, four shares are extracted, the correct shares are Ric, R2c and R4c, and the erroneous share is R3e. Without affecting other correct shares, a correct halftone secret share H3c is generated.
[0136] The encrypted secret image D is decomposed into W/4 H parts of 4-bit data recorded as a0. Assuming that the present secret data is a0=1(0001), m=8, and data subsets corresponding to eight polynomials are searched.
[0137] It is assumed that shared data from present positions of the correct shares R1 c, R2c and R4c are 8(1000)13(1101), 14(1110)4(0100) and 5(0101)2(0010). By searching the three groups of data in the eight data subsets, a well-determined polynomial f(x)=(a0+2x+10mod17 is found, with the corresponding shared data shown in Table I. [0138] The three groups of shared data used by the positions of the correct shares Ric, R2c and R4c are excluded, and remaining 10 groups of shared data are shown in Table 2. The 10 groups of data are all available data.
01391 Table 2 RemaininQ available data set if a0=1 Number x y The number of 1 in x and y 1 11(1011) 80000) 4 2 2(0010) 9(1001) 3 3 10(1010) 2(0010) 3 4 130101) 90001) 5 15(1111) 1(0001) 5 6 1(0001) 4(0100) , 7 4(0100) 80000) , 8 6(0110) 15(1111) 6 9 7(0111) 13(1101) 6 9(1001) 15(1111) 6 [0140] The 10 groups of shared data are sequentially analyzed at a corresponding position of a to-be-hidden carrier image Y3, so as to find shared data which can be hidden completely and correctly, and store the shared data to the corresponding position of an updated correct share R3 ec.
[0141] By implementing the halftone self-hiding algorithm on the updated correct share R3ec, 2Wx2H halftone image data are generated and placed into front 2H lines of the correct halftone secret share H3c. A (2H+1)th line of data in the original third halftone secret share 1-13 are extracted, and placed into a (2H+1)th line in the correct halftone secret share H3c. Numbers and CRC codes of the shared data are increased, and placed into a (2H+2)th line in the correct halftone secret share H3c.
[0142] Through the above process, the correct halftone secret share H3c is generated.
[0143] The present disclosure hides a secret image into n halftone secret shares with a secret sharing algorithm based on optimal data allocation, extracts n shares from the n halftone secret shares, records correct shares and erroneous shares, and selects any k correct shares to extract the secret image. With the optimal data allocation method, the present disclosure effectively overcomes bit errors of the extracted shares due to quality limitations of the halftone images, obviously improve the accuracy of the extracted shares, and ensure the accuracy of the extracted secret image. Moreover, for the extracted erroneous share, the correct halftone secret share can be generated in combination with the extracted secret image and the correct share without affecting other correct shares.
[0144] Each embodiment of the present specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts between the embodiments may refer to each other.
[0145] In this specification, some specific embodiments are used for illustration of the principles and implementations of the present disclosure. The description of the foregoing embodiments is used to help illustrate the method of the present disclosure and the core ideas thereof In addition, persons of ordinary skill in the art can make various modifications in terms of specific implementations and the scope of application in accordance with the ideas of the present disclosure. In conclusion, the content of the present description shall not be construed as limitations to the present disclosure.

Claims (10)

  1. WHAT IS CLAIMED IS: I. A halftone secret sharing method based on optimal data allocation, comprising: encrypting an original secret image T to generate an encrypted secret image D; constructing m (k-1)-degree polynomials, wherein the polynomials each are configured to generate a shared data set for each constant coefficient, and m shared data sets are generated in total, m and k each being a positive integer greater than 1; generating n hidable shares X1-Xn according to the m shared data sets and the encrypted secret image D by using an optimal data allocation algorithm, wherein n is a positive integer greater than I, and the optimal data allocation algorithm is configured to consider data of to-be-hidden carrier images firstly, and then generate hidable shares; hiding the n hidable shares X1-Xn into n halftone secret shares separately with a halftone self-hiding algorithm to obtain first halftone secret shares 01-0n; recording secret data, which are not shared correctly, into corresponding ones of the first halftone secret shares 01 -On to obtain second halftone secret shares P1-Pm; and recording numbers and cyclic redundancy check (CRC) codes of the n hidable shares into corresponding ones of the second halftone secret shares P1-Pn to obtain final halftone secret shares H I -Tin.
  2. 2. The halftone secret sharing method based on optimal data allocation according to claim 1, wherein the encrypting a secret image to generate an encrypted secret image specifically comprises: encrypting the secret image with Arnold scrambling.
  3. 3. The halftone secret sharing method based on optimal data allocation according to claim 1, wherein the generating n hidable shares Xi-Xn according to the m shared data sets and the encrypted secret image D by using an optimal data allocation algorithm specifically comprises: dividing the encrypted secret image D into g parts to obtain g secret data, g=(W/11)/4, W and H being a width and a height of the secret image separately, and g being a positive integer greater than 1; taking each of the secret data as a constant coefficient, and substituting the constant coefficient into the shared data sets to obtain m shared data subsets; selecting n groups of shared data from each of the shared data subsets, and hiding carrier images Yl-Yn sequentially with the halftone self-hiding algorithm; determining whether present n groups of shared data are hidden completely and correctly to obtain a first determination result; trying a next combination in a present shared data set if the first determination result is no; determining whether shared data hidden completely and correctly exist in the present shared data set to obtain a second determination result, continuously searching a next shared data set if the second determination result is no, until a combination of shared data hidden completely and correctly is searched; storing the searched shared data hidden completely and correctly to corresponding positions of the shares X1-Xn; and recording, if there are no shared data hidden completely and correctly after all shared data sets are traversed, present secret data and positions of the corresponding shared data, and setting shared data at corresponding positions of the shares Xl-Xn as 0.
  4. 4. The halftone secret sharing method based on optimal data allocation according to claim wherein the hiding the n hidable shares XI-Xn into n halftone secret shares separately with a halftone self-hiding algorithm to obtain first halftone secret shares 01-On specifically comprises dividing each of the carrier images Yl-Yn into a first upper part Yil and a first lower part Yi2; hiding a target share into the first upper part 'ii I and the first lower part Yi2 with the halftone self-hiding algorithm to obtain a diffusion error for last two lines in the first upper part Yil; merging the diffusion error for the last two lines in the first upper part Int with the first lower part Yi2 to obtain a new first lower part Yi2'; rehiding the target share into the first upper part Yil and the new first lower part Yi2' with the halftone self-hiding algorithm to obtain an upper hidden image and a lower hidden image; combining the upper hidden image and the lower hidden image to obtain a first halftone image; and obtaining the first halftone secret shares 01-On according to all of the first halftone images generated by the shares
  5. 5. The halftone secret sharing method based on optimal data allocation according to claim 4, wherein the recording secret data, which are not shared correctly, into corresponding ones of the first halftone secret shares 01-On to obtain second halftone secret shares PI-Pn specifically comprises: recording the secret data, which are not shared correctly, into a next line of each of the first halftone secret shares 01-0n, and padding a zero behind if the line is not sufficiently filled to obtain a second halftone image; and obtaining the second halftone secret shares P I-Pn according to all of the second halftone images.
  6. 6. The halftone secret sharing method based on optimal data allocation according to claim 5, wherein the recording numbers and CRC codes of the n hidable shares into corresponding ones of the second halftone secret shares P1 -Pn to obtain final halftone secret shares H 1 -Hn specifically comprises: recording the numbers and the CRC codes of the shares into a next line of each of the second halftone secret shares P1 -Pn, and padding the zero behind if the line is not sufficiently filled to obtain a third halftone image; and obtaining the final halftone secret shares Hl-Hn according to all of the third halftone images.
  7. 7. A halftone secret extracting method based on optimal data allocation, comprising: acquiring final halftone secret shares Hl-Hn obtained with the halftone secret sharing method according to any one of claims 1 to 6; extracting from the final halftone secret shares HI -Hn with a halftone image self-extraction algorithm to obtain n extracted shares Rl-Rn, n being a positive integer greater than 1; extracting numbers and cyclic redundancy check (CRC) codes of shares in the final halftone secret shares HI-Hn; determining, according to the numbers and the CRC codes of the shares, whether the n extracted shares R1 -Rn are correct; recording a correct share Ric if yes; recording an erroneous share Pie if no; selecting any k extracted shares when the number of the correct shares is greater than or equal to k, and extracting an encrypted secret image D by Lagrange interpolation decrypting the encrypted secret image D to obtain an original secret image T; and generating an updated correct share Riec and a correct halftone secret share Hic according to the encrypted secret image D, the correct share Ric and the erroneous share Rie on the basis of m shared data sets, the m shared data sets being obtained by constructing m (kW-degree polynomials according to the halftone secret sharing method of claim 1.
  8. 8 The halftone secret extracting method based on optimal data allocation according to claim 7, wherein the extracting from the final halftone secret shares Hl-Hn with a halftone image self-extraction algorithm to obtain n extracted shares R1-Rn specifically comprises: removing two bottommost lines of image data in the final halftone secret shares HI-Hn to obtain fourth halftone images; dividing each of n fourth halftone images into a second upper part Hil' and a second lower part 1E2'; performing exclusive NOR (CNOR) operation on corresponding pixels of the second upper part Hi]' and the second lower part Hi2' in each of the fourth halftone images to obtain n initial extracted shares; acquiring a penultimate line of data in the final halftone secret shares Hi-fin, and sequentially extracting positions of shared data which are not shared correctly and the shared data; and substituting the positions of the shared data which are not shared correctly and the shared data into the n initial extracted shares to obtain the n extracted shares R1-Rn.
  9. 9. The halftone secret extracting method based on optimal data allocation according to claim 7, wherein the extracting numbers and CRC codes of shares in the final halftone secret shares H1-1-In specifically comprises: acquiring a last line of data in the final halftone secret shares HI -Fin; and extracting the numbers i of the shares and the CRC codes of the corresponding shares according to the last line of data.
  10. 10. The halftone secret extracting method based on optimal data allocation according to claim 7, wherein the generating an updated correct share Riec and a correct halftone secret share Hic according to the encrypted secret image D, the correct share Ric and the erroneous share Rie on the basis of m shared data sets specifically comprises: dividing the encrypted secret image D into g parts to obtain g secret data, g=(WxH)/4, W and H being a width and a height of the secret image separately, and g being a positive integer greater than 1; obtaining m shared data subsets by taking each of the secret data as a constant coefficient; extracting correct shared data from a present position of the correct share Ric, and determining a unique shared data set according to the correct shared data and the m shared data sets; removing used correct shared data from the unique shared data set to obtain a remaining shared data set; obtaining, according to the remaining shared data set by using the optimal data allocation algorithm, shared data which are hidden completely and correctly; storing the shared data which are hidden completely and correctly to the corresponding position of the correct share to obtain the updated correct share Riec; hiding the updated correct share into a halftone secret share with a halftone self-hiding algorithm to obtain an updated first halftone secret share; extracting a (2H+1)th line of data from an original halftone secret share Hi corresponding to the erroneous share Rie, the line of data being configured to record positions of shared data which are not shared correctly and the shared data; and recording the line of data into the corresponding updated first halftone secret share to obtain an updated second halftone secret share; and recording a number and a CRC code of the updated correct share Riec into the corresponding updated second halftone secret share to obtain the correct halftone secret share Hic.
GB2210856.7A 2022-04-22 2022-07-25 Halftone secret sharing and extracting method based on optimal data allocation Active GB2617878B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210428470.2A CN114913048A (en) 2022-04-22 2022-04-22 Halftone secret sharing method and halftone secret extraction method based on optimized data distribution

Publications (3)

Publication Number Publication Date
GB202210856D0 GB202210856D0 (en) 2022-09-07
GB2617878A true GB2617878A (en) 2023-10-25
GB2617878B GB2617878B (en) 2024-05-29

Family

ID=82764496

Family Applications (1)

Application Number Title Priority Date Filing Date
GB2210856.7A Active GB2617878B (en) 2022-04-22 2022-07-25 Halftone secret sharing and extracting method based on optimal data allocation

Country Status (2)

Country Link
CN (1) CN114913048A (en)
GB (1) GB2617878B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0690365A (en) * 1992-07-20 1994-03-29 Ricoh Co Ltd Facsimile equipment and privacy communication method for facsimile equipment
CN109274855A (en) * 2018-07-31 2019-01-25 北京印刷学院 A kind of (k, n) halftoning visual encryption method based on characteristic area
CN113190807A (en) * 2021-05-31 2021-07-30 中国人民武装警察部队工程大学 Ciphertext domain reversible information hiding method based on image secret sharing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0690365A (en) * 1992-07-20 1994-03-29 Ricoh Co Ltd Facsimile equipment and privacy communication method for facsimile equipment
CN109274855A (en) * 2018-07-31 2019-01-25 北京印刷学院 A kind of (k, n) halftoning visual encryption method based on characteristic area
CN113190807A (en) * 2021-05-31 2021-07-30 中国人民武装警察部队工程大学 Ciphertext domain reversible information hiding method based on image secret sharing

Also Published As

Publication number Publication date
GB2617878B (en) 2024-05-29
CN114913048A (en) 2022-08-16
GB202210856D0 (en) 2022-09-07

Similar Documents

Publication Publication Date Title
Yang et al. Property analysis of XOR-based visual cryptography
Li et al. Improvements of a two-in-one image secret sharing scheme based on gray mixing model
US20140105382A1 (en) Data Encryption and Decryption Method and Apparatus
US7558961B2 (en) Systems and methods for embedding messages in look-up tables
US20060149762A1 (en) Key information processing method, device thereof, and program
JP2006020292A (en) Information processing method, and information processing apparatus
US10853917B2 (en) Color image authentication method based on palette compression technique
JP3923796B2 (en) Two-dimensional code, two-dimensional code creation method, two-dimensional code decoding method, apparatus for executing the method, program for executing the method on a computer, and computer-readable recording medium recording the program
Afarin et al. Image encryption using genetic algorithm
US20210234709A1 (en) Integrated circuit performing authentication using challenge-response protocol and method of using the integrated circuit
RU2422901C2 (en) Information processing device and information processing method
CN115641130A (en) Method, device and equipment for generating transaction record ID based on improved snowflake algorithm
Askari et al. A novel visual secret sharing scheme without image size expansion
CA2725617A1 (en) Method and system for predictive scaling of colour mapped images
CN112116672A (en) Color image saving thumbnail encryption algorithm based on genetic algorithm
JP4771504B2 (en) Distributed image generating apparatus, distributed image generating method, and computer-readable storage medium
CN110032894B (en) Database log recording method and system and database log detection method
GB2617878A (en) Halftone secret sharing and extracting method based on optimal data allocation
Kamal et al. A Novel Remedy for Image Encryption and Data Hiding
CN110086955B (en) Large-capacity image steganography method
US7210042B2 (en) Device information generating device, device information generating method, control data generating device, control data generating method, content utilizing device, content utilizing method, and storage medium
Chou et al. A (2, 3) Threshold secret sharing scheme using sudoku
Bawaneh et al. A novel RGB image steganography using simulated annealing and LCG via LSB
JPS63214067A (en) Method for synthesizing data with picture
JP5077439B2 (en) Image encryption device / decryption device, image encryption method / decryption method, image encryption program / decryption program