-
Notifications
You must be signed in to change notification settings - Fork 0
/
Descrption
32 lines (29 loc) · 3.34 KB
/
Descrption
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
When the user run the application, the user will interact with two options from which he has to choose one.
1. Encode
2. Decode
Encoding:
If user selects for encode, application will ask the user to select image file (where the data needs to be hidden).
Next the user has to enter the data which needs to be encrypted.
Now, the program will convert the encoding data into 8-bit binary form using ASCII value of characters. Now this 8-bit binary value will be onto the image and the pixels where the data is hidden will be modified according to the 8-bit binary data.
And now the application will apply chaos theory to randomize the bits of the image and the final output image is generated with a name provided.
Decoding:
• If user selects for decryption, application will ask for a saved encrypted image and it will further show the decrypted image as the output.
• The resulting image will look exactly the same as the original image, this is because we're only modifying the pixel values by 1. So whenever a person sees this image, he/she won't be able to detect whether there is a hidden data within it.
• We read the image and then get all the last bits of every pixel of the image. After that, we keep decoding until we see that stopping criteria.
ALGORITHM:
ENCODING:-
1. Implement a function to convert any type of data into binary, we will use this to convert the secret data and pixel values to binary in the encoding and decoding phase.
2. Reading the image using cv2.imread() function.
3. Counting the maximum bytes available to encode the data.
4. Checking whether we can encode all the data into the image.
5. Adding a stopping criteria, this will be as indicator for the decoder to stop decoding whenever it sees this (feel free to implement a better and more efficient one).
6. Finally, modifying the last bit of each pixel and replacing it by the data bit.
7. The shuffled image is encrypted using pseudo-random binary sequence generated by taking key values for Henon map.
Step 1: choose the initial value of (X1,Y1) for Henon map. This value works as an initial secret symmetric key for Henon map.
Step 2: Henon map work as a key stream generator for cryptosystem. The size of sequence depends upon the size of image. If the image size is m×n then the number of henon sequence will be 8×m×n obtained by equation.
Step 3: Experimental analysis conclude that cut-off point, 0.3, has been determined so that the sequence is balanced. The decimal values are then converted into binary values depending upon this threshold value as given in equation where Z is a binary sequence.
Step 4: Henon sequence is then reduced by combining each consecutive 8 bits into one decimal value.
Step 5: Encryption is done by bitwise Exclusive-OR operation between shuffled image and sequence generated in step 4.
DECODING:
1. Since, the chaotic system behavior is deterministic so reconstruction of image using the same key (X1, Y1) at decryption end gives the shuffled image. This shuffled image is further arranged in an order exactly opposite of the way done for encryption as mentioned in Tier-1. Finally, the original image is obtained at receiver’s end.
2. We read the image and then get all the last bits of every pixel of the image. After that, we keep decoding until we see that stopping criteria.