A Two-domain Data Hiding Scheme for Data Signature in Integrated Online Services Applications

There is confidential data in integrated online services applications. The data needs to be hidden before transmission on the Internet, and the data authenticity should be assured. Information hiding technology is an effective way of protecting the confidential data and may be used for assuring data authenticity. A Two-domain data hiding scheme (TDHS) is introduced in the paper to protect contract document authenticity in grid system. TDHS aims to embed confidential data into signature image in both spatial and frequency domain. LSB-like algorithm is used to generate a signature image Hs by embedding feature data of contract document into the original signature image H in the spatial domain. Then DCT algorithm is adopted to embed the watermark in signature image Hs in the frequency domain, and generate signature image Hs ready . The signature image Hs ready is inserted into the contract document. When received the document with signature, the recipient can verify its authenticity. The feasibility of TDHS is verified through experiments.


Introduction
There are many contract documents in the power grid business systems. These documents need to be signed remotely and may have some confidential data. The contract documents signing is a process of mutual trust between both parties. However, there are some people who maliciously use other people's signatures to forge the contents of the contract documents for profit. Therefore, an effective method is necessary for providing authenticity of the contract document signature and preventing signatures from being fraudulently used.
In this case, the information hiding/data hiding/steganography technology can provide a good protection method for the electronic signature image. Information hiding is a technology that embeds data in digital media for copyright protection or secret communication [1]. Compared with encryption technology, multi-form data can be unknowingly transmitted to the recipient [2]. The cover of information hiding is multimedia data, including images, text, audio, video, etc. Since images are one of the most important media in power grid business systems, a lot of emphasis has been placed on image steganography [3]. Digital watermarking technology is to embed specific digital information (identity information, serial numbers, text or image logos, etc.) into media data to achieve privacy protection, information security or copyright protection.  [4]. For the method based on the spatial domain, the secret information is directly embedded in the image pixel value. Typical methods include least significant bit (LSB) [5], prediction error [6], histogram-based method [7], modular operation [8], quantization-based method [9] and other methods. Algorithms based on the spatial domain have little effect on the quality of the cover image, and the amount of embedding is large. However, it usually has poor robustness. In order to improve the robustness, researchers proposed to embed secret information into the transform domain. Typical methods include steganography based on Discrete Cosine Transform (DCT) [10], Discrete Wavelet Transform (DWT) [11] and Discrete Fourier Transform (DFT) [12].
This paper presents a two-domain data hiding scheme (TDHS) for data signature in grid system, which combines hand signature, feature data embedding in spatial domain and digital watermark embedding in frequency domain.
The innovations of this paper are as follows: 1) A Two-domain Data Hiding scheme is designed for hiding confidential data in contract document signature in power grid business system and for verifying the authenticity of the signature; 2) In TDHS, the feature data of the contract text and a watermark is embedded in spatial and frequency domain respectively, in order to hide data and verify authenticity effectively; 3) The feasibility of TDHS is verified by an experimental implementation in detail. The paper is organized as follows. The structure of TDHS is introduced in Section 2. The document feature data and embedding algorithm in spatial domain and watermark embedding algorithm in frequency domain are presented in Section 3 and Section 4 respectively. An experimental implementation is described in Section 5. Finally, Section 6 concludes the paper.

Two-domain Data Hiding scheme (TDHS)
TDHS is designed for provide authenticity of the contract document signature and prevent signatures from being fraudulently used. The structure and procedure of TDHS is shown in Figure 1.
The signatory extracts the text feature value of the contract document. The feature data may be the frequency or position of the text in the text message [14]. The feature data is embedded into the signature image H from a signatory, in the spatial domain, and a new image is obtained. Since the feature value of the document only corresponds to the document to which it belongs, this information can be used to check whether the content has been modified.
Next, the image is transformed into a frequency domain image using discrete cosine transform (DCT). The watermark image is also transformed into a frequency domain image with DCT. Then the two images are merged into a new image imageA in frequency domain. The imageA is transformed into a spatial domain image ( ) through inverse discrete cosine transform [13]. Finally, image is insterted into contract document and the signing process is finished. When received the signed contract document, the recipient firstly separates the contract document file and the signature image . Then, the document feature data A of the electronic contract document is calculated from the contract document file. Next, the feature data B is recovered from . The two kinds of feature data, A and B, are compared to verify whether they have the same value.
After that, the signature image is transformed into a frequency domain image by discrete cosine transform, the watermark image is extracted in frequency domain. Then the recovered watermark image is compared with the stub watermark image to verify whether it is acceptable.
If the above two-stage verification is passed, the contract document can be accepted.

Document Feature Value and Spatial Embedding Algorithm
The document feature data is the feature value calculated from the contract document [15]. Just like the human gene, the document feature data may be also unique. For different documents, the frequency of use of the text, the order of the text, and the grammatical structure will be different. The difference can be regarded as the feature data for recognition of the document. The selection of the feature data can be the frequency of one or more characters in the entire document, or one or more characters in the entire document.
Spatial embedding algorithm is an embedding algorithm that can embed large-capacity data into an image. It has the characteristics of simple embedding process, but has low robustness. Once it is maliciously attacked, the embedded information will be difficult to recover. The commonly used embedding algorithm in spatial domain is the least significant bit(LSB) algorithm which is adopted in this paper.
Embedding the feature data of the document into the image using the spatial embedding algorithm is like to assigning a unique identification to the document [16]. Whenever the content is modified, inconsistencies will be detected in the verification process.
Steps for embedding document feature values in spatial domain is as follows.
1) The signatory prepares the contract document to be signed, and provides the corresponding original signature image H, and uses the extraction algorithm to extract the feature data of the document; 2) The width and height of the original electronic signature image H are adjusted to an integer multiple of M, and the adjusted image is divided into blocks according to M×M to obtain a total of n blocks. In this paper, M=8; 3) The feature data is binarized and converted into a binary string, n bits are selected from the string, and the spatial embedding method is adopted to embed each image block separately; 4) Combine the above n images with embedded information together to form a signature image after the feature data is embedded.
The process of embedding document feature values in spatial domain is shown in Figure 2.  Figure 2. Process of embedding in spatial domain

Frequency Domain Watermark Embedding Algorithm
When the signature image is ready, the watermark image is to be embedded in the frequency domain. The watermark image w is an image that is unique [17].
The frequency domain watermark embedding adopts the discrete cosine transforms method. The DCT formula is as follows.

If
, the positive and negative transformations of the discrete cosine transform can be simplified as: , Where,  1) Read the signature image and the watermark image after the airspace information is embedded; 2) The signature image is divided into a combination of 8×8 image blocks that do not cover each other; ℎ , , 0 , ℎ , ,0 , 8 3) Divide the watermark image into a combination of 2×2 blocks.
Convert the embedded host image by the inverse transformation of DCT; The process of embedding a watermark image in the frequency domain is shown in Figure 3.

Experimental results
The experimental implementation is carried out according to the embedded algorithms described above. Python is used to write the simulating program. The hardware and software environment used in the experiment is CPU: Intel(R) Core (TM) i7-10700 @ 2.  Figure 4. Image of the document to be signed Figure 5. Watermark image The contract document to be signed and transmitted is shown in Figure 4. A watermark image in this experiment is shown in Figure 5.
Three images with different sizes, different backgrounds are used as signature image in the experiment, as shown in Figure 6. is generated. Image is inserted into the contract document, as shown in Figure  7. At this time, the data hiding and signing process is finished. The contract document obtained is ready for transmitting from the signatory to recipient.  is calculated from the contract document file. Next, the feature data B is recovered from . The two kinks of feature data, A and B, are compared to verify whether they have the same value, as shown in Figure 8 a). a) b) Figure 8. The extracted watermark image The signature image is transformed into a frequency domain image by discrete cosine transform, the watermark image is extracted in frequency domain, as shown in Figure 8 b). Then the recovered watermark image is compared with the stub watermark image to verify whether it is acceptable.
The watermark and feature value comparisons give an acceptable result, so the signed contract document is accepted.

Conclusion
Multi-form data exists in the power grid business system. Some data may like contract documents contain critical information for business. The contract documents need to be signed and require verification of authenticity. This paper present TDHS, an effective method, to provide authenticity of the contract document signature and prevent signatures from being fraudulently used.
TDHS embeds contract document feature data into signature image in spatial domain. LSB-like algorithm is used to complete the data hiding process and generate a signature image . Then DCT algorithm is used to embed the watermark in signature image in the frequency domain, and generate signature image . The signing work is done by inserting signature image into the contract document. TDHS makes the recipient easy to verify the authenticity of contract documents with signature.
We implanted a prototype TDHS system, which shows the feasibility of our design. In the future, we will make further improvements to TDHS and enhance its performance.