The Hash Algorithm Explanation

Print   

02 Nov 2017

Disclaimer:
This essay has been written and submitted by students and is not an example of our work. Please click this link to view samples of our professional work witten by our professional essay writers. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of EssayCompany.

ABSTRACT

Image Steganography is the technique of hiding secret data or information within an image to incorporate security through obscurity. In this paper an AES-128 bit based Pseudo Random Permutation (PRP) function and a Pseudo Random Hash based LSB technique has been proposed to select the bits’ insertion position of the secret information for Image Steganography. Due to the greatest Chromatic Influence of Blue among the RGB pixel model, the division of 8 bits of the secret information has been done into 3,3,2 or 4,2,2 and embedded into RGB pixel values of the Cover Image respectively. The proposed method is statistically analyzed in the terms of Image Fidelity which quantifies the minimal degradation of the perceived image file. The proposed technique is compared with the existing LSB based Image Steganography techniques and the results are found to be promoting.

KEYWORDS

Image Steganography, Pseudo Random Permutation, Hash Function, Chromatic Influence, Image Fidelity.

INTRODUCTION

Steganography, a science of hiding a secret message into some covering medium such as an image file, or an audio(wave file) or any video file, finds applications in various confidential and high security applications [7]. The applications of steganography include Confidential Communication and Secret data storing, Protection of data alteration, Access control system for digital content distribution, Media Database systems. It also plays a major role in military purposes, industrial applications to copyright and Intellectual Property Rights (IPR) [8]. At early times when the steganography concept was newly established in early 1990’s , then only simple LSB technique was used to hide a secret message inside a cover image[4], [3]. But nowadays, scholars among research fraternity have growing interest in applying new steganography techniques such as AES-128 bit encryption scheme. Using these schemes ensures that the secret message is not vulnerable to malpractices like hacking because of their relative complexity as compared to the simple LSB insertion technique.

Advanced Encryption Standard (AES) is a symmetric key encryption technique which has recently replaced the commonly used Data Encryption Standard (DES). The AES algorithm uses one of three cipher key strengths: a 128-, 192-, or 256-bit encryption key (password). Each encryption key size causes the algorithm to behave slightly differently, so the increase in key size not only offers a larger number of bits with which you can scramble the data, but also increases the complexity of the cipher algorithm.

Several image steganography techniques in the spatial and temporal domain have been proposed in the literature and most of which despite of being performed in the spatial (pixel) domain lacks the cryptographic strength in terms of robustness.

Although the existing techniques are mainly based on LSB and an enhanced version of LSB (HLSB), still many enhancements have been proposed to improve the security level of the hidden information on the grounds of robustness.

In the proposed scheme AES is implemented through Pseudo Random Permutation (PRP) which figure as central tools in the design of protocols in the shared key cryptography [2]. It can be used to model block ciphers and thereby enables the security analysis of protocols based on block-ciphers.

The paper describes the Pseudo Random Function in Section I and Pseudo Random Permutation in Section II. In section III the proposed image steganography technique has been described. The algorithm is proposed in section IV with an application and illustration. Section V gives results and performance evaluation with other LSB technique with steganalysis of the technique. Conclusion and future work are presented in latter part of the paper.

I. PSEUDO RANDOM FUNCTION

Pseudorandom functions (PRFs) figure as central tools in the design of protocols, especially those for shared-key cryptography. At one level, PRFs can be used to model block ciphers, and they thereby enable the security analysis of protocols based on block ciphers. But PRFs are also a useful conceptual starting point in contexts where block ciphers don’t quite fit the bill because of their fixed block-length[7]. A pseudo random function is a family of functions with the property that the input output behavior of a random instance of the family is computationally indistinguishable from that of a random function. Someone who has only black-box access to a function, meaning can only feed it inputs and get outputs, has a hard time telling whether the function in question is a random instance of the family in question or a random function. A PRF is exponential in its output, i.e. it takes n random bits to m = 2n random bits.

A PRF is a deterministic function f : {0, 1}n → {0, 1}n which computable in polynomial time and takes two inputs x, k ∈ {0, 1}n. We actually only consider x to be a variable and let k be a hidden random seed and function index, f(x, k) = fk(x).

Figure 1: Pseudo random function

A true random function is a look-up table with random entries. The function x → f(k(x)) should look like a random function and if it does it’s considered a good PRF. We thus need a way to decide whether a given PRF is good or not. The way to think about this is to consider having a black box which computes the function {0, 1}n → {0, 1}n. If there is a way to decide if this is

1. a true random function, or

2. a f(k(x)) with random k

then it is not a good PRF.

II. PSEUDO RANDOM PERMUTATION

Pseudo random permutations (PRPs) also called block ciphers are derived from Pseudo Random Functions. PRPs are used in variety of application scenarios for example they are used in cryptographic constructions for permuting a list of items. They can be used to generate pseudo-random unique tokens in a special format. They can also be used to encrypt data in a small domain, such as encrypting a 9-digit social security number into another 9-digit number.

Pseudo random functions is that it allows one to use the results to produce an n-bit cipher that can be used to encrypt more than 2n/2 blocks . In the proposed scheme pseudo random permutation plays a very important role in addition to the AES-128 bit algorithm.

III. PROPOSED SCHEME

The technique is an AES-128 bit PRP and Pseudo Random Hash based LSB Technique for Image Steganography has been proposed. The flow diagram of the same has been shown in Figure 2.

In the computer’s language an image is not more than array of numbers that represent light intensities at various points (pixels).These are the only pixel which make up the image’s raster data. A common image size is 640 ´ 480 pixels and 256 colors (or 8 bits per pixel). Such an image could contain about 300 kb of data.

Figure 2: Proposed Scheme

The storage of digital images is usually done in 8 bits or 24 bits. But in general, 24 bit representation is used for steganographic purposes as it provides the most space for hiding the secret data. A Pixel consists of 3 primary colors Red, Green, and Blue i.e. the famous R.G.B color model. All color variations are derived from these colors only [6]. Each one of the primary colors is represented by 8-bit representation making a total of 24 bits i.e.3 bytes per pixel to represent a color value. Also, the size of the file depends on pixel representation. For example, suppose we have a 24-bit image 1,024 pixels wide by 768 pixels high—a common resolution for higher solution graphics. Such an image has more than two million pixels, each having such a definition, which would produce a file exceeding 2 Mbytes.

The proposed technique takes the secret data (or message).then it converts each letter of the secret message into its corresponding 8-bit binary representation [5]. Then for each such 8-bit binary representation its gray code representation is taken and then with each letter’s position bit (again represented to 8-bit binary) a bit wise XOR operation is done. This whole scheme is done so as to increase the complexity of the scheme and hence the most important characteristic i.e. SECURITY. Then this final string is put into the Advanced Encryption Standard (AES) algorithm.

The stego-system encoder will usually require a key to operate, and this key would also be used at the extraction phase. This is a security measure designed to protect the secret message. Without a key, it would be possible for someone to correctly extract the message if they managed to get hold of the embedding or extracting algorithms [1]. Keeping in mind this factor, the proposed scheme makes use of the AES algorithm which automatically uses key as the security parameter.

Now depending on the least significant bit of the final string produced by AES algorithm , the distribution of the bits of the secret message takes place[3] .The proposed scheme makes the distribution of 3,3,2 when the lsb is ‘0’ and the distribution of 4,2,2 otherwise. 3,3,2 means that placement of 3 bits of the secret message into R(red) pixel, another 3 bits in G (green) pixel and the rest 2 in B (blue) pixel. These distribution pattern is taken because the chromatic influence of blue to the human eye is more that red and green pixel.

HASH ALGORITHM EXPLANATION:

The embedding positions of the eight bits out of the four (4) available bits of LSB is obtained using a hash function of the form,

k = p%n (1)

where, k is LSB bit position within the pixel, p represents the position of each hidden image pixel and n is number of bits of LSB which is 4 for the present case.

The intended receiver follows the reverse steps to decode the secret data. During decoding the stego-image is again broken into pixels after reading the header information [6]. Using the same hash function which is known to the intended receiver, the data of the secret message is regenerated. The extracted stream of the secret information is used to authenticate the image.

IV. PROPOSED ALGORITHM

STEP 1: Input image file.

STEP 2: Read required information of the cover image.

STEP 3: Break the image into individual Red, Green and Blue pixels.

Characteristic phases of the proposed scheme:

GRAY CODE CONVERSION

STEP 1: Find 8-bit representation of each letter of the secret data.

STEP 2: Find Gray code of each 8-bit representation

STEP 3: Xor with position bit to get a final string to be input into next phase.

The above algorithm can be exemplified in Figure 4.

B) AES-128 BIT ENCRYPTION

Figure 3: AES Encryption

Figure 4: Gray Code Conversion

C) PSEUDO RANDOM HASH BASED EMBEDDING OF SECRET MESSAGE

STEP 1: Check the output string for LSB.

STEP 2: If LSB is ‘0’ then the distribution of secret data is done in 3,3,2 fashion, otherwise the distribution is done in 4,2,2 fashion.

STEP 3: Apply the formula k=p%n to decide the placement of secret data’ bits into the cover image.

ILLUSTRATION:

Consider a RGB pixel value of the cover image as below

R: 10110111

G: 10010100

B: 11001001

and let a byte representation of the secret message is

10001000

Now since the lsb of the secret message is ‘0’ so, the message is embedded in groups of 3, 3 and 2 in the respective RGB LSBs positions.

LSB is lowest bit in a series of binary numbers, so in this case for R it will be 1, 0 for G and 1 for B. The proposed technique is applied in four lowest LSBs in each pixel value. So the LSBs for the above RGB values are:

R : 0111

G : 0100

B : 1001

The positions of insertion are obtained from the hash function given in equation (1). The value of n number of bits of LSB for the present case is 4. Using the hash function let the position of embedding (k) returned for a particular iteration are

k = 1,2,3 for R.

k = 4,1,2 for G

k = 3,4 for B

Considering the above positions of insertion, the bits from the message are inserted in four LSB positions and resulting RGB pixel value are as given below.

R: 10111001

G: 10011000

B: 11001000

Thus all the eight bits of the message are embedded in three bytes and number of bits actually changed is six (06) out of twenty four (24) bits. Further these six (06) bits are randomly distributed which increases the robustness of the scheme.

Figure 5: HASH Algorithm

DECODING SCHEME:

Reverse hash algorithm

To decode the message, the valid user follows the reverse step. As the hash function (1) is known to the intended the user, it calculates the k values to get the position of insertion. Taking the same embedded RGB value as above,

R: 10111001

G: 10011000

B: 11001000

The hash function will return the following k values for this particular iteration.

k = 1,2,3 for R.

k = 4,1,2 for G

k = 3,4 for B

using these k values which represent the four LSB positions, the data of the secret message is found as below, 10001000

which is same as the data of secret message.

Reverse AES algorithm

AES -128 bit decryption algorithm is followed to get back the required message.

Reverse the gray code conversion

STEP 1: Xor the encrypted message with position bit to obtain the Gray code.

STEP 2: Find the 8-bit binary representation from the obtained Gray code.

STEP 3: Find the character from the 8-bit binary representation.

By following this procedure, the secret message will be extracted by the intended receiver.

V. RESULTS AND PERFORMANCE EVALUATION

In order to statistically evaluate any robust steganography technique mainly two attributes viz. imperceptibility and capacity are measured, both in case of cover image and stego- image. Additionally some objective measures, the Mean Squared Error, Peak Signal to Noise Ratio and Image Fidelity between stego-image and cover image are measured and then analyzed.

The simulation of the proposed work for the respective AES 128 bit encryption scheme has been performed on 2.13GHz I3 CPU installed with 4GB RAM running Windows 7 in MATLAB R 2010A stable release.

The performance characteristic parameters along with the detailed statistical analysis are summarized as :-

(b)

Figure 6: Baboon (a) Orignal image (b) Encrypted Image

(b)

Figure 7: Barbara (a) Orignal image (b) Encrypted Image

(b)

Figure 8: Lena (a) Orignal image (b) Encrypted Image

Table 1: Comparison of other techniques with proposed scheme

Figure 9: Analysis of n-bit proposed scheme

CONCLUSION

In order to improve the steganographic robustness, the paper proposes an AES-128 bit PRP based technique for encrypting the secret message and a Pseudo Random Hash based technique for embedding the randomly distributed secret message pixel bits in the cover image. The proposed scheme efficiently utilizes the cover image file in spatial domain to conceal the presence of sensitive secret message regardless of its format. Although the proposed scheme is applied to .bmp files but it can be very efficiently applied to other formats with minor procedural modifications. By analyzing the statistical information of the stego-image in the experimental tests, the proposed scheme provides reasonable security against statistical cryptanalysis.

FUTURE SCOPE

Although AES-128 bit Pseudo Random Permutation encryption scheme has a good potential for defining security in the domain of image steganography due to its very high cryptographic strength, there is still scope to enhance the cryptographic strength by exploring the different 192 and 256 versions of AES. Considering the risks involved in transmitting the private key, the proposed image steganography can be very efficiently extended to incorporate one of the most secure public key cryptographic systems such as elliptic curve cryptography and hyper elliptic curve cryptography and also include the Shamir’s Secret Sharing Algorithm to enhance the security parameter.



rev

Our Service Portfolio

jb

Want To Place An Order Quickly?

Then shoot us a message on Whatsapp, WeChat or Gmail. We are available 24/7 to assist you.

whatsapp

Do not panic, you are at the right place

jb

Visit Our essay writting help page to get all the details and guidence on availing our assiatance service.

Get 20% Discount, Now
£19 £14/ Per Page
14 days delivery time

Our writting assistance service is undoubtedly one of the most affordable writting assistance services and we have highly qualified professionls to help you with your work. So what are you waiting for, click below to order now.

Get An Instant Quote

ORDER TODAY!

Our experts are ready to assist you, call us to get a free quote or order now to get succeed in your academics writing.

Get a Free Quote Order Now