## 1. Introduction

The last few years witnessed an increased interest in information security. Effective security requires protection of all systems involved including applications, clouds, end devices, gateways, etc. In the modern world, a huge amount of data is constantly being transferred, which makes securing these data a challenging task. With data transfers happening in multiple spheres of life, including healthcare and social interactions, people’s safety and privacy could be in danger if data are not protected properly. As presented in

Figure 1, typically data travels through end devices, the Internet and a cloud; moreover, data can also travel among various end devices [

1]. While it is important to protect data on the end devices, it is equally important to protect it during data exchange. One of the ways to secure data is to hide it. The huge amount of data exchanged nowadays adds additional obscurity to the already hidden data, thus further complicating the task of protected data presence detection and data infiltration. To hide data an information embedding algorithm can be applied. The algorithm can be used along with more conventional information protection techniques such as cryptography to create more secure systems. A few particular applications that use embedding methods to achieve security will be discussed in the following sections of this work.

The process of data hiding using an information embedding algorithm can be described as follows. The media data that are used as inconspicuous objects is called cover media. Using an algorithm and a key the secret message is embedded in the cover media. The cover media with a secret message is transferred through the channel. At this stage, the object that contains secret information should be indistinguishable from ordinary objects. When the media reaches its destination, the secret message is extracted from it using the algorithm and the key. However, there may not always be an option to safely transfer additional information such as the key. In other cases, the additional security in form of an information hiding key may not be required. This work proposes the method that does not depend on any information besides the algorithm itself and the length of the transferred message. The latter could be arranged to be a fixed value as it is most often possible to lengthen the message to a given bigger size.

All information embedding algorithms try to obtain three main qualities, imperceptibility, capacity, and robustness against various cover processing attacks. This is a complicated task as these qualities contend with each other. Imperceptibility refers to the third party’s inability to discover embedded information, capacity to the amount of information that can be covered in the cover without damaging it, and robustness to the amount and type of medium modifications that a message can withstand.

Different types of media can serve as cover objects including digital audio, video, and images. Digital images tend to have high redundancy, availability, and popularity [

2]. Those features facilitate the task of information hiding. This work focuses exclusively on digital images.

Information embedding into digital images can be performed either in spatial or in the transform domain. Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT), and Discrete Wavelet Transform (DWT) are some of the most widespread choices for transform domain techniques. DFT is a window transformation. It is usually applied independently to separated parts of a cover image. This could lead to appearance of notable boundaries among separated parts and visual quality deterioration of a cover image. DCT is a special case of DFT; however, it is less computationally expensive. The third most widespread transform in digital image processing is DWT. DWT refers to a family of transformations with varying properties. When compared to DFT and DCT, DWT has advantage of not being a window transform; thus, during the embedding process in image’s frequency domain the image does not split into separated parts. Moreover, even if embedding artifacts are visible, they are still smoother than when using DFT or DCT.

The present study focuses on enhancing the effectiveness of information embedding into digital images that could be used to improve data security. The main contribution of the present study is as follows:

A novel ternary logic-based technique of information embedding into digital objects is proposed. The technique allows reducing the number of changes in a digital image that are required to embed a message of a given length. This feature leads to improved effectiveness of the information embedding.

A novel ternary logic and the Chinese remainder theorem-based algorithm of information embedding is proposed. The ternary logic is implemented through the Chinese remainder theorem. Moreover, the Chinese remainder theorem enables rigorous mathematical tools of the number theory to be used in the task of information embedding effectiveness enhancement. The most prominent features of the proposed algorithm are imperceptibility qualities and an option not to transfer any side information.

Multiple applications of information embedding techniques are analyzed. The most suitable application for the proposed technique is suggested.

The rest of the paper is organized as follows. The review of related works is presented in

Section 2. In

Section 3, the proposed information embedding algorithm is described. An experimental evaluation of the algorithm is presented in

Section 4. Finally, the discussion and conclusion are given in

Section 5 and

Section 6.

## 2. Related Works

A large body of literature on data security and information embedding provides a basis for the present study.

Although the art of hiding information in inconspicuous objects has been practiced for a long time, its modern and scientific formulation is often considered to be introduced by Simmons through the “Prisoners Problem” [

3]. Anderson and Petitcolas [

4] adopt the aforementioned “Prisoners Problem” in work that provides a deep insight into information hiding theory. The article presents the unified terminology on the subject and discusses the main obstacles in the information hiding field. Ultimately, the authors demonstrate the advantages of using pixels blocks parity in the embedding process. Despite the fact that the work presents a comprehensive theory overview, it does not focus on more particular questions such as media types. The more practical introduction to the information concealment in digital media is provided by Johnson and Jajodia [

5]. The authors present a brief history of the subject and give an overview of the most prominent issues concerning digital images steganography such as image formats and common approaches to information hiding. Steganography is a term used for a type of covert communication that works by hiding secret messages in inconspicuous objects that are sent to the intended destination. The relatively up-to-date steganography techniques survey is presented in [

2].

The aforementioned works provide an overview of the subject while the following ones present some information hiding methods. Data concealment methods often manipulate the least significant bits (LSBs) in images to embed data imperceptibly. In [

6], LSB substitution based spatial domain steganography is applied to the medical images. Contrary to LSB techniques, the intermediate significant bit substitution is used in [

7]. The latter technique is reversible meaning that the cover image can be restored at the receiver side. In [

8], the quantization index modulation method (QIM) is presented. The method embeds information by modulating indices with the embedded information and then quantizing the cover media with the associated sequence of quantizers. Another common technique is difference expansion. The information hiding scheme utilizing difference expansion is presented in [

9]. In this scheme side information in the form of a tracing table is produced during the information concealment process. The table is recommended to be transmitted separately from the cover image to extract a secret message. Pixel value differencing and hamming distance are used in the data hiding method for Absolute Moment Block Truncations Coding compressed images in [

10]. Lastly, there are histogram shifting based schemes. The reversible information hiding technique based on reducing invalid shifting of pixels in histogram shifting is presented in [

11].

Adaptive data hiding schemes aim to exploit the cover properties to achieve better results. In [

12], the embedding is performed into parts of the image corresponding to edges due to the fact that humans are less sensitive to changes in those parts compared to the smooth locations. In [

13], the adaptive algorithm of information unmistakable embedding into digital images is presented. This algorithm’s adaptivity is in the choice of secret message bits distribution among cover coefficients which is made possible by the introduction of the “empty” value. Such adaptivity results in higher imperceptibility.

Information can take many forms and data hiding schemes are dependent on the media they are intended to be used with. For instance, in [

14] steganography for printed matter that can be employed in the anti-counterfeiting for product external packing in the Internet of Things (IoT) is discussed, in [

15] the secret message is embedded into the cover of a quantum channel in steganography protocol for Fog Cloud IoT and in [

16] the noise resilient audio steganography technique is proposed to be used in IoT networks.

The following works deal with digital image steganography. In [

17], the EGC protocol aimed at securing data in IoT is introduced. It employs both cryptography and image steganography techniques. For steganography, the Matrix XOR encoding is implemented. In [

18], the S-CycleGAN approach that embeds a secret message in the process of image-to-image translation is presented. The security is improved via the steganalysis module and the technique is adapted to secure IoT communications. In [

19], the approach based on the generative adversarial networks is demonstrated. Instead of embedding secret data into original cover images, the scheme hides them in the generated foreground object region of the generated images.

Moreover, data hiding methods seem to present special interest in the IoT-healthcare field. In [

20], the data securing model for IoT-based healthcare systems that exploits hybrid embedding and steganography in the DWT domain is proposed. Steganography, among other things, serves to remove the suspicion in having concealed information. In [

21], the method for the secure embedding of electronic patient records into medical images is demonstrated. It uses optimal pixel repetition and pixel permutation to hide data in an imperceptible way and achieve high embedding capacity. Another scheme to be used in the Internet of Medical Things is proposed in [

11].

The listed studies provide important insights into the field of information concealment as well as enable to indicate the ideas that could be applied in the improved steganographic scheme.

## 3. Proposed Method

In the proposed scheme information hiding is performed into the digital images’ frequency domain. Multiple methods can be used to transfer an image from spatial to frequency domain and back. In this work, the Integer Wavelet Transform (IWT) is chosen due to its ease of use. It is a variation of DWT which differs by the use of integer coefficients instead of real ones. That helps to significantly lower the number of errors in an extracted secret message introduced by the use of an information hiding algorithm, hence maintaining communications at a more dependable level. IWT groups frequency coefficients into four groups that are approximate, horizontal, vertical, and diagonal coefficients denoted as cA, cH, cV and cD.

The process of information embedding can be either scalar or block. In scalar embedding, one bit of secret message is embedded into one image pixel or coefficient. On the other hand, in block embedding, more than one pixel or coefficient is used as one embedding element in which one bit is placed. Both are used in the current work. The symbol

$k$ denotes the number of frequency coefficients that are taken as one embedding element. Its value depends on the bit per pixel (bpp) value:

$bpp=\frac{n}{H\xb7W}$, where

$n$ is the message length;

$H$,

$W$ are height and width of the image in pixels. The number of frequency coefficients in one embedding element

$k$ can be found as (1):

when

$k=1$ the embedding is scalar otherwise it is block. In the first case coefficients are changed to correspond to the message bits. In the second case coefficients in the block are changed in such a way that a block function corresponds to the given message bits. The function that relates block coefficients

${e}_{1},{e}_{2}\dots {e}_{k}$ with one scalar value

$x$ is required for the second case. The following function (2) is chosen due to the minimal changes in

${e}_{1},{e}_{2}\dots {e}_{k}$ that could lead to the change of

$x$.

The algorithm makes use of the Chinese remainder theorem (CRT). According to it if

${a}_{1},{a}_{2},\dots {a}_{n}$ are pairwise coprime and

${r}_{1},{r}_{2},\dots {r}_{n}$ are integers such that

$0\le {r}_{j}<{a}_{j}$ for

$j=1,2,\dots n$ then there exists one and only one

$x<{{\displaystyle \prod}}_{i=1}^{n}{a}_{i}$ such that:

where “

$\equiv $” denotes modular congruence.

The presented algorithm implements the adaptive embedding i.e., the dissimilarities between the image before and after the embedding process and minimized. In order to do so the binary secret message is first transformed to the ternary form though the addition of “empty” values [

13] (

Figure 2). Moreover, the use of empty values enables to perform embedding adaptively without a necessity to exchange additional information such as the key. Further, the empty value is denoted as −1. To optimize the time complexity of the algorithm an adaptive search is done separately for cover space fragments of a set size of 8 embedding elements. The process described is illustrated in

Figure 3.

The novelty of the proposed scheme is combining CRT and the empty values concept to achieve good imperceptibly. The following form of CRT is used:

The

$a$ values are chosen to minimize cover distortion as

${a}_{1}=2,{a}_{2}=3$. It is possible to use different values as long as they are coprime, however, higher

$a$ values lead to lower imperceptibility and increase the time complexity of the proposed scheme. The

${r}_{1},{r}_{2}$ are found from

${a}_{1},{a}_{2}$ and

$x={{\displaystyle \sum}}_{i=1}^{k}{e}_{i}$. Next, it is possible to link

${r}_{1},{r}_{2}$ to the ternary embedded message value

$m$ using the following logic (3):

Further the algorithm of information embedding is presented. Indexes 2 and 3 will be used to denote binary and ternary vectors, respectively.

**Input:**

Cover image, binary secret message ${M}_{2}$ of length ${n}_{2}$.

**Output:**

Image with secret message embedded.

**Step 1.** Determine $k$ using ${n}_{2}$ and (1).

**Step 2.** Divide the cover image into not overlapping blocks 8 × 8 pixels.

**Step 3.** Apply IWT to each block 8 × 8 pixels.

**Step 4.** Determine the length of message fragment corresponding to each cover space fragment:

**Step 4.1.** Every set of $k$ coefficients results in one embedding element $x$ (2). The resulting length of the embedding space is $s=W\xb7H/k$ where $W$, $H$ are width and height of the cover image.

**Step 4.2.** One fragment contains 8 elements. The number of fragments is $f=s/8$.

**Step 4.3.** The secret message is divided regularly among embedding fragments. For each fragment there are vector ${b}_{2}$ of length ${n}_{2}/f$ from ${M}_{2}$ and vector ${b}_{3}$ of length 8 from the ternary message ${M}_{3}$.

**Step 5.** Using the extraction algorithm get the ternary message ${M}_{3}$ of length ${n}_{3}$ from the cover image (${n}_{2}\le {n}_{3}$). ${M}_{3}$ will contain 0, 1 and empty values that are denoted as −1.

**Step 6.** For each fragment all possible distributions of

${b}_{2}$ among

${b}_{3}$ are considered (

Figure 2). The

${b}^{\prime}$ is

${b}_{2}$ with empty values added such that the Hamming distance between

${b}^{\prime}$ and

${b}_{3}$ is minimal.

**Step 7.** In each fragment the determined ${b}^{\prime}$ message fragment is embedded.

**Step 7.1.** Using CRT, condition (3) and fixed ${a}_{1},{a}_{2}$ the $m$ is determined.

**Step 7.2.** The $x$ is incremented or decremented resulting in ${x}^{\prime}$ until $m={m}^{\prime}$ where ${m}^{\prime}$ is a value from ${b}^{\prime}$ corresponding to the current fragment. The final change in $x$ is $c={x}^{\prime}-x$.

**Step 7.3.** The number $c$ is pseudo-randomly distributed among $k$ coefficients. The $x$ changes to ${x}^{\prime}$ and the corresponding value from $m$ to ${m}^{\prime}$.

**Step 8.** Apply inverse IWT to each block 8 × 8 pixels.

**Step 9.** Join blocks. The final image contains secret message.

The information extraction algorithm is presented below.

**Input:**

Image with secret message embedded, length of secret message ${n}_{2}$.

**Output:**

Binary secret message ${M}_{2}$.

**Step 1.** Determine $k$ using ${n}_{2}$ and (1).

**Step 2.** Divide the cover image into not crossed blocks 8 × 8 pixels.

**Step 3.** Apply IWT to each block 8 × 8 pixels.

**Step 4.** Determine the number of message bits per fragment as $\frac{8\xb7k\xb7{n}_{2}}{W\xb7H}$.

**Step 5.** Iterate through all fragments and extract a corresponding number of message bits missing empty values.

**Step 5.1.** Using CRT, condition (3) and fixed ${a}_{1},{a}_{2}$ the $m$ is determined. Append this value to the vector ${M}_{2}$ or set ${M}_{2}=m$ if it does not exist yet.

For illustration purposes, a flowchart demonstrating shortened embedding and extraction processes is given in

Figure 4. To look more closely on the embedding process, given one element consisting, for example, of frequency coefficients

${e}_{1}=132,{e}_{2}=0,{e}_{3}=-14,{e}_{4}=5$ (in this case

$k=4$, thus there are four coefficients) those coefficients are connected to one scalar value

$x$ with accordance to (2) as

$x=131+0+\left(-16\right)+5=123$. Using

$x$ and

${a}_{1}=2,{a}_{2}=3$ the

${r}_{1}$ and

${r}_{2}$ are determined as

${r}_{1}=123mod2=1$,

${r}_{2}=123mod3=0$. The

$m$ is determined in accordance with (3) as

$m=1\left(mod2\right)+0\left(mod2\right)=1$. The

$m$ is compared against the intended value

${m}^{\prime}$ and because they differ the

${x}^{\prime}$ (initially

${x}^{\prime}=x$) is decremented or incremented by 1 until

$m={m}^{\prime}$. After a few tries the

${x}^{\prime}=120$ is found (

${r}_{1}=120mod2=0$,

${r}_{2}=120mod3=0,$ $m=0\left(mod2\right)+0\left(mod2\right)=0$). The difference

$c={x}^{\prime}-x=-3$ is calculated and the initial frequency coefficients are modified so

${e}_{1}+{e}_{2}+{e}_{3}+{e}_{4}=131+0+\left(-16\right)+5=120.$ During extraction, frequency coefficients {131, 0, −16, 5} are used to calculate

$x,\text{}\mathrm{then}\text{}{r}_{1}$,

${r}_{2}$ and

$m$ in the same manner as during embedding.

The evaluation of the presented algorithm is located in the next section.

## 5. Discussion

This work presents a novel adaptive information embedding scheme based on the Chinese remainder theorem. Experiments to evaluate the scheme were held in MATLAB and results are presented in the current work. The scheme is shown to achieve imperceptibility and capacity as high as 44.5 dB for secret messages of 1 bpp. The example image before and after the embedding process is provided along with histograms. Images as well as histograms do not seem to differ in any significant way. Good imperceptibility qualities are achieved through adaptive embedding that lowers the number of changed coefficients by 5%. The number of mistaken extracted bits caused by the proposed embedding scheme is evaluated using BER and on average it equals $1.9\times {10}^{-3}$. This number is tolerable. Moreover, the advantage of the presented scheme is the ability to not exchange any additional information by setting the secret message size constant. The comparisons with other information embedding techniques indicate relatively good imperceptibility and capacity qualities of the proposed scheme.

One important limitation of the proposed scheme is high time complexity. However, the method is asymmetric, with embedding time being larger than the extraction time. Thus, it is proposed to process embedding on high-performance servers while extraction can occur at end devices.

The data hiding scheme could be used in various applications involving data transfers. One relevant area where research on security is rapidly evolving is IoT. Multiple data hiding schemes to be used in IoT have already been proposed. The differences of the proposed scheme and other data security with data hiding schemes are presented in

Table 5.

Overall, the analysis of applications of embedding methods indicates that they could be divided into two big groups. Further subgrouping depends on the particular task. The aforementioned two groups are:

- (1).
Both embedding and extraction algorithms are lightweight and could be processed on server and end device. There could be a hidden transmission of end device’s data (sensors reading, end device state and actions, etc.) towards the server and transmission of data and commands that are needed to control the end device from the server towards the end device.

- (2).
The embedding algorithm is computationally complex while an extraction algorithm is lightweight. In that case, it is challenging to perform the embedding on end devices with low power consumption. Thus, it is better to have a simplex channel between the server and the end device. However, it is still possible to organize a feedback channel if the embedding is performed not on a low-powered device but on a significantly more powerful mobile device that is used as a gateway.

The proposed method belongs to the second group. Its potential applications are presented in

Figure 12.

In the first application, a server transfers confidential data towards an end device without intermediate devices. The second application is a more interesting case and appropriate for the Wearable Internet of Things (WIoT). In this case, a person wears some number of low-powered IoT devices (such as glucose monitors, pacemakers) and a more powerful mobile device (such as a mobile phone, a tablet, a notebook) that serves as a gateway. Wearable devices produce data and send them to a gateway. The gateway embeds data into images (e.g., taken with a camera) and sends images to the server. The proposed algorithm’s characteristics makes it suitable for the former application.