Abstract

The Rivest-Shamir-Adleman (RSA) encryption method and the binary encoding method are assembled to form a hybrid hiding method to hide a covert digital image into a dot-matrix holographic image. First, the RSA encryption method is used to transform the covert image to form a RSA encryption data string. Then, all the elements of the RSA encryption data string are transferred into binary data. Finally, the binary data are encoded into the dot-matrix holographic image. The pixels of the dot-matrix holographic image contain seven groups of codes used for reconstructing the covert image. The seven groups of codes are identification codes, covert-image dimension codes, covert-image graylevel codes, pre-RSA bit number codes, RSA key codes, post-RSA bit number codes, and information codes. The reconstructed covert image derived from the dot-matrix holographic image and the original covert image are exactly the same.

1. Introduction

Image hiding methods can encode covert images in the space domain or in the spatial frequency domain. For space-domain encoding cases, hidden covert images can be reconstructed without any distortion usually, but their hiding security is lower often. On the other hand, for spatial-frequency-domain encoding cases, their hiding security is higher often, but there is more or less distortion for reconstructed covert images usually. Because spatial-frequency-domain encoding cases cannot reconstruct exact covert images, this paper will focus on space-domain encoding cases only. Of course, both higher security and higher noise-attack resistance are discussed here.

Many methods for hiding covert images in the space domain have been proposed. Image-transform method [1–4], cellular automata method [5], chaotic sequence method [6], image-scrambling method [7, 8], light separation method [9, 10], histogram shifting method [11, 12], and communication channel method [13] are some examples. All the methods can work well, but most of them can be applied to printed or digital images only, whereas holographic images have become very popular and they appear on credit cards and bills. Therefore, other methods for hiding covert images on holographic holograms are needed. This paper will propose a hybrid hiding method to satisfy the requirement. The proposed method transforms a covert image with the Rivest-Shamir-Adleman (RSA) encryption method and encodes the transformed data into a dot-matrix holographic image with the binary encoding method.

The RSA encryption method is widely used in electronic document security. The RSA encryption method needs keys , , and to encode and decode data [14–19]. The RSA encryption method usually uses very huge key , which is, more than 100 bits, for assuring enough high security, so it is troublesome work to use the method. This paper will assemble the RSA encryption method and the binary encoding method [20] to allow keys with only tens of bits to be used and enough high security is still assured. The RSA encryption method includes three steps. Firstly, it transforms a covert image to form a data string. Secondly, it transforms the data string to form a RSA encryption data string by using the standard RSA encryption method according to encryption keys. Finally, it transforms the RSA encryption data string to form an array. On the other hand, the binary encoding method uses binary data to denote all the element values of the RSA encryption string and encodes the binary data into a dot-matrix holographic image [21]. The pixels of the covert image contain seven groups of binary codes used for decoding the RSA encryption string. The seven groups of codes are identification codes, covert-image dimension codes, covert-image graylevel codes, pre-RSA bit number codes, RSA key codes, post-RSA bit number codes, and information codes. The RSA encryption string can be decoded directly from the dot-matrix holographic image.

Because the proposed hybrid hiding method possesses two layers of security (one layer is from the RSA encryption method and the other layer is from the binary encoding method), it can protect covert images very well. Unauthorized people can hardly reconstruct covert images correctly, but authorized people can easily reconstruct covert images correctly. Most of all, covert image reconstruction does not cause image distortion.

2. Theory

2.1. Reviewing the RSA Encryption Method

Assume that C is an -graylevel covert image for encoding, and assume that D is an matrix transformed by the RSA encryption method. For using the RSA encryption method, three keys (integers) are needed and the three keys are denoted by , , and . The key is an integer formed by the multiplication of two unequal prime numbers and ; that is,

Let an integer be formed by
Then the key should be an integer between 2 and , that is, , and the highest common factor of and is 1. The key is derived when the remainder for the division equals 1; that is,
where the symbol “mod” denotes the modulus-after-division operation.

The keys for the encoding and decoding are used as below.(1)An integer s (before the RSA encoding) modulated by the RSA encryption must be smaller than .(2)Another integer t (after the RSA encoding) is derived from the RSA encryption modulation of the integer s according to
(3)The integer s can be derived from the RSA encryption modulation of the integer t according to

Equations (6a) and (6b) are an illustration to explain the RSA encryption processes for a matrix. Equation (6a) is a matrix C before the RSA encoding and (6b) is a matrix D after the RSA encoding, where the keys , , and , and . Every element in C and its corresponding element in D have the relationships as described by (4) and (5):

2.2. The Hybrid Hiding Method

Let T be a matrix to encode an covert image C, and let H be a holographic image for hiding the matrix T. All the binary data encoded in the matrix T are binary codes and they are categorized into seven groups of codes, identification codes, covert-image dimension codes, covert-image graylevel codes, pre-RSA bit number codes, RSA key codes, post-RSA bit codes, and information codes. Identification codes are used to judge if the codes encoded in the matrix T belong to the binary encoding method or not; covert-image dimension codes and are used to denote the size of the covert image; covert-image graylevel codes are used to denote the graylevels of the covert image; pre-RSA bit number codes are used to denote the number of bits corresponding to every element of a data string before the RSA encryption; RSA key codes are used for the RSA encoding and decoding; and post-RSA bit number codes are used to denote the number of bits corresponding to every element of a data string after the RSA encryption. All the above six groups of codes are located at the first row of the matrix T. Information codes are used to denote the binary data encoded from the data string after the RSA encryption and they are located at the second to final rows of the matrix T.

To avoid using too many similar equations in this paper, an equation for plural uses is defined as
where is an integer; all , and are 0 or 1; and is another integer.

Identification codes are a set of private binary codes used to judge if the data hidden in the covert image is encoded with the binary encoding method or not. The bit amount of the codes has to be big enough, for example, 1111001111001010110000110000 with 28 bits. The codes locate at bits 1~28 in the first row of the matrix T.

Covert-image dimension codes and are used to derive the size of the covert image, and they include two sets of ten binary codes. The parameter M is indicated by the first set of ten binary codes , and . The relationship of and ~ is similar to (7), but every has to be replaced by , and and . The parameter is indicated by the second set of ten binary codes , and . The relationship of and ~ is similar to (7), but every has to be replaced by , and and . The codes locate at bits 29~48 in the first row of the matrix T.

Covert-image graylevel codes are used to derive the parameter corresponding to the graylevels of the covert image. The parameter is indicated by six binary codes , and . The relationship of and ~ is similar to (7), but every has to be replaced by , and and . The codes locate at bits 49~54 in the first row of the matrix T.

Pre-RSA bit number codes are used to denote the number of bits corresponding to every element of a data string for the RSA encryption process. The parameter is indicated by six binary codes , and . The relationship of and ~ is similar to (7), but every has to be replaced by , and and . The codes locate at bits 55~60 in the first row of the matrix T.

RSA key codes are used to denote the keys and . Although three keys , , and are needed for encoding and decoding data strings, is needed for the encoding only. The key is indicated by thirty-five binary codes , and . The relationship of n and ~ is similar to (7), but every has to be replaced by , and and . The codes locate at bits 61~95 in the first row of the matrix T. The key is indicated by thirty-five binary codes , and . The relationship of d and ~ is similar to (7), but every has to be replaced by , and and . The codes locate at bits 96~130 in the first row of the matrix T.

Post-RSA bit number codes are used to specify the number of bits corresponding to every element of the RSA encryption data string. The parameter a is indicated by six binary codes , and . The relationship of a and ~ is similar to (7), but every has to be replaced by a, and and . The codes locate at bits 131~136 in the first row of the matrix T.

Information codes are used to reconstruct the RSA encryption data string for decoding the covert image C.

2.3. Encoding Processes

The processes to encode the covert image C into the holographic image H are explained below.

Set a binary-data array R with elements. The elements of R are copied from identification codes (for the first range), covert-image dimension codes (for the second range), covert-image graylevel codes (for the third range), pre-RSA bit number codes (for the fourth range), RSA key codes (for the fifth range), and post-RSA bit number codes (for the sixth range), whereas the other elements of R not copied from the six groups of codes are all set as 0.

The elements of the covert image C are copied to form the elements (from the left side to the right side) of a string A with elements from the first row to the last row (the first priority) and from the left side to the right side (the second priority).

Decompose every element A(k) of A into (because the covert image possesses graylevels) binary codes according to

Create a binary-data string B with elements according to
where and .

Create a data string E with elements from the elements of the binary-data string B (all b bits of binary data are used to form an element of the data string for the RSA encryption) according to
where .

Transform the data string E with elements to a data string F with elements by using (4) with the keys and .

Decompose every element F(k) of F into a binary codes (all a bits of binary data are used to denote every element of the RSA encryption data string) according to
where .

Create a binary-data string G with elements according to
where and .

Copy all of the binary elements of G (from the left side to the right side) to form a binary-data matrix S (from the first row to the last row and from the left side to the right side). Since the amount of the elements of G is smaller than , there are elements in S not copied from the elements of G. The values of these extra elements are all set as 0.

Combine the binary-data array R and the binary-data matrix S to form a binary-data matrix T. The first row of T comes from R, and the other rows of T come from S.

Equations (13a)–(13i) illustrate an example of the encoding processes. The binary-data array R with elements is shown in (13a), the covert matrix C is shown in (13b), the data string A is shown in (13c), the binary-data string B is shown in (13d), the data string E is shown in (13e), the RSA encryption data string F with the keys is shown in (13f), the binary-data string G is shown in (13g), the binary-data matrix S is shown in (13h), and the binary-data matrix T is shown in (13i):

2.4. Decoding Processes

The processes for reconstructing the covert image from the dot-matrix holographic image H are explained below.

Determine every element of the binary-data matrix T from every grating dot feature of the dot-matrix holographic image H according to the specified grating dot feature.

Check the identification codes located at bits 1~28 in the first row of T to judge whether the covert image H* contains codes encoded by the binary encoding method or not.

According to the codes located at bits in the first row of T decode the parameters , and .

Copy the first elements in the second to final rows (from the top to the bottom and from the left side to the right side) of T to form the elements (from the left side to the right side) of the binary-data string G.

Create the data string F with elements from the elements of the binary-data matrix G according to
where .

Transform the data string F with elements to a data string E with by using (5) with the keys n and d.

Decompose every element E(k) of E into b binary codes according to
and form a binary-data matrix B with elements according to
where .

Create a data string A with elements from the elements of the binary-data matrix B according to
where .

Create the matrix C from the data string A with elements according to
where and .

3. Experiments

Figure 1 is used as the covert images, where Figure 1(a) is a 128-graylevel image and Figure 1(b) is a binary image. Figure 2 shows a 256-graylevel image used as the host image for two simulations.

The first experiment for encoding the covert image in Figure 1(a) by assembling the modified RSA encryption method and the binary encoding method to form a holographic image H is shown below. The elements in the binary-data string R are firstly determined, where R is used to encode identification codes, covert-image dimension codes, covert-image graylevel codes, pre-RSA bit number codes, RSA key codes, and post-RSA bit number codes. The first to 28th elements (the first range) in R are specified as the identification codes, and they are set as 1111001111001010110000110000. The 29th to 48th elements (the second range) in R are specified as the covert-image dimension codes. Since the size of the covert image in Figure 1(a) is , the dimension codes for M are 0000111101 (i.e., ) and they are encoded at the 29th to 38th elements in R. The dimension codes for N are also 0000111101 and they are encoded at the 39th to 48th elements in R. The 49th to 54th elements (the third range) in R are specified as the covert-image graylevel codes. Since the parameter g of the covert image used in this case is seven (i.e., ), the codes are 000110 (i.e., ). The 55th to 60th elements (the fourth range) in R are specified as the pre-RSA bit number codes. Because the selected pre-RSA bit number b in this case is four, the codes are 000011 (i.e., ). The 61st to 130th elements (the fifth range) in R are specified as the RSA key codes for the keys n and d. Because the key n both for the encoding and decoding is set as 247, the 61st to 130th elements in R are 00000000000000000000000000010010011 (i.e., ). Because the key e for the encoding is set as 11, the key d for the decoding must equal 59. Therefore, the 96th to 130th elements in R are 00000000000000000000000000000111001 (i.e., ). The 131st to 136th elements (the sixth range) in the first row of R are the post-RSA bit number codes. Because the selected post-RSA bit number a used in this case is eight, the 131st to 136th elements in the first row of R are 000110 (i.e., ). The 137th to 256th elements in the first row of R are all set as 0.

After that, create the binary-data string G by encoding the modified RSA encryption data string F. Then copy the binary-data elements of G to form the binary-data matrix S. Because the matrix S contains 65280 elements and the binary-data string G only contains 57344 elements, the values of the extra 7936 elements of S are all set as 0. The binary-data matrix T combined from the binary-data string R and the binary-data matrix S is shown in Figure 3. Figure 4 shows a dot-matrix holographic image (composed of many grating dots) created by a two-beam writer (Sparkle) [22]. The holographic image is used to hide the binary-data T for the covert image in Figure 1(a). The holographic image is on a Shipley 1813 photoresist plate and it contains grating dots. All the grating dots have the same grating pitch of 1 m, but they have different grating orientations. The relation between the orientation (measured from the -axis) of a grating dot and the gray value of a corresponding image pixel in Figure 2 is

The grating dot pitch is about 63.5 . The size of the holographic image is about 16.2 mm 16.2 mm. The grating dots in the same column or row should be in a line for a dot-matrix hologram without hiding binary data, whereas the grating dots in the same column are in two separated lines for the dot-matrix hologram in Figure 4. The grating dots in the right line are used to denote the datum “1” and the grating dots in the left line are used to denote the datum “0”. The distance between the two lines is about 15 . All the grating dots on the hologram in Figure 4 correctly hide the data in the binary-data matrix T for Figure 3. Figure 5 shows some of the grating dots at the upper-right corner of the dot-matrix holographic image. The original covert image C and the reconstructed covert image derived from the holographic image H are exactly the same.

Figure 5

Some grating dots at the upper-right corner of the dot-matrix holographic image H for Figure 1(a).

The second experiment for encoding Figure 1(b) is shown below. The first to 28th elements in R are also specified as the identification codes, and they are set as 1111001111001010110000110000. The 29th to 48th elements in R are specified as the covert-image dimension codes. Since the size of the covert image in Figure 1(b) is , the dimension codes for M are 0001111101 (i.e., ) and they are encoded at the 29th to 38th elements in R; the dimension codes for N are also 0001111101 and they are encoded at the 39th to 48th elements in R. The 49th to 54th elements in R are specified as the covert-image graylevel codes. Since the parameter g of the covert image used in this case is one (i.e., ), the codes are 000000 (i.e., ). The 55th to 60th elements (the fourth range) in R are specified as the pre-RSA bit number codes. Because the selected pre-RSA bit number b in this case is eight, the 55th to 60th elements in R are 000111 (i.e., ). The 61st to 130th elements in R are specified as the RSA key codes for the keys n and d. Because the key n is set as 323, the 61st to 130th elements in R are 00000000000000000000000000011011111 (i.e., ). Because the key e is set as 23, the key d must equal 263. Therefore, the 96th to 130th elements in R are 00000000000000000000000000100000101 (i.e., ). The 131st to 136th elements in the first row of R are the post-RSA bit number codes. Because the selected post-RSA bit number a used in this case is ten, the 131st to 136th elements in the first row of R are 001000 (i.e., ). The 137th to 256th elements in the first row of R are all set as 0.

After that, create the 20480 binary-data string G by encoding the 14096 RSA encryption data string F. Then copy the binary-data elements of G to form the 255256 binary-data matrix S. Because the matrix S contains elements and the binary-data string G only contains 20480 elements, the values of the extra 44800 elements of S are all set as 0. The binary-data matrix T combined from the binary-data string R and the binary-data matrix S is shown in Figure 6. The dot-matrix holographic image H for this case is shown in Figure 7, almost the same as that in Figure 4. Some of the grating dots at the left-upper corner of the dot-matrix holographic image H are shown in Figure 8. All the grating dots on the holographic image correctly hide the data in the binary-data matrix T for Figure 6. The original covert image C and the reconstructed covert image derived from the holographic image H are exactly the same.

Some grating dots at the upper-left corner of the dot-matrix holographic image H for Figure 1(b).

The above-mentioned processes for encoding the covert image C can be concluded as follows: use C, , and to form G and R; use G and R to form T; and hide T to form H. On the other hand, the processes for reconstructing C* can be concluded as follows: derive T from H; use T to form G and R; and use n, d, G, and R to form C*. Since the reconstruction possesses are the reversed version of the encoding processes, the former are not demonstrated here.

4. Discussions

The values of , and are determined according to the idea of a designer and no reasons are needed. Because these values are uncertain for unauthorized people, the binary encoding method has high security.

The proposed hiding method is only demonstrated for clearness and simplification in this paper. If higher security is needed for the hiding method, more complex processes can be used, for example, changing the specified code positions in R, changing the length of selected bit number codes, or changing the values of , and .

The security of the proposed method depends on both the RSA encryption and the binary encoding method. For the RSA encryption, a very big is not necessary for the proposed method because private RSA keys unknown for unauthorized people are used (normal RSA encryption methods use public keys known by everyone). For the binary encoding method, it is difficult to decode codes because many uncertain parameters (for unauthorized people) are used. Both the RSA encryption and the binary encoding method have high security, so the security of the proposed method is high.

The direct calculation for is not accepted by a computer usually because the number is too huge. Therefore, a calculation accepted by a computer is needed. A simple method is to multiply with and do the modulus-after-division operation with n for d-1 times; that is,

5. Conclusions

The proposed hiding method combines the RSA encryption method and the binary encoding method to encrypt a covert image C into a dot-matrix holographic image H. The RSA encryption method uses the covert image C to form a RSA encryption data string. The binary encoding method encodes the RSA encryption data string into binary codes and encodes the binary codes into the dot-matrix holographic image H. The reconstructed covert image can be decoded directly from the dot-matrix holographic image H. Furthermore, there is no distortion for the decoding work of the covert image.

Conflict of Interests

The authors declare no conflict of interests regarding all the aspects related to this paper.

Acknowledgment

This paper was partially supported by the National Science Council of the Republic of China (Grant no. NSC 102-2221-E-129-004 and Grant no. NSC 101-2221-E-262-008).

We are committed to sharing findings related to COVID-19 as quickly and safely as possible. Any author submitting a COVID-19 paper should notify us at help@hindawi.com to ensure their research is fast-tracked and made available on a preprint server as soon as possible. We will be providing unlimited waivers of publication charges for accepted articles related to COVID-19. Sign up here as a reviewer to help fast-track new submissions.