├── image-dataset ├── girl.png ├── lake.png ├── lena.png ├── pens.png ├── yacht.png ├── baboon.png ├── barbara.png ├── couple.png ├── flower.png ├── flowers.png ├── fruits.png ├── monarch.png ├── peppers.png ├── soccer.png ├── ZeldaColor.png ├── airplane.png ├── cablecar.png ├── cornfield.png └── goldhill.png ├── disthamming.m ├── shiftlr.m ├── shiftrr.m ├── maximum.m ├── .github └── FUNDING.yml ├── md.m ├── DNA_decode_rule01.m ├── arnoldy.m ├── DNA_xor.m ├── arnoldx.m ├── main.m ├── DNA_encode_rule01.m ├── decryption.m ├── encryption.m └── README.md /image-dataset/girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/girl.png -------------------------------------------------------------------------------- /image-dataset/lake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/lake.png -------------------------------------------------------------------------------- /image-dataset/lena.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/lena.png -------------------------------------------------------------------------------- /image-dataset/pens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/pens.png -------------------------------------------------------------------------------- /image-dataset/yacht.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/yacht.png -------------------------------------------------------------------------------- /image-dataset/baboon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/baboon.png -------------------------------------------------------------------------------- /image-dataset/barbara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/barbara.png -------------------------------------------------------------------------------- /image-dataset/couple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/couple.png -------------------------------------------------------------------------------- /image-dataset/flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/flower.png -------------------------------------------------------------------------------- /image-dataset/flowers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/flowers.png -------------------------------------------------------------------------------- /image-dataset/fruits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/fruits.png -------------------------------------------------------------------------------- /image-dataset/monarch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/monarch.png -------------------------------------------------------------------------------- /image-dataset/peppers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/peppers.png -------------------------------------------------------------------------------- /image-dataset/soccer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/soccer.png -------------------------------------------------------------------------------- /image-dataset/ZeldaColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/ZeldaColor.png -------------------------------------------------------------------------------- /image-dataset/airplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/airplane.png -------------------------------------------------------------------------------- /image-dataset/cablecar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/cablecar.png -------------------------------------------------------------------------------- /image-dataset/cornfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/cornfield.png -------------------------------------------------------------------------------- /image-dataset/goldhill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jithinkc22j/Image_Encryption_Arnoldmap_DNA_Mandelbrotset/HEAD/image-dataset/goldhill.png -------------------------------------------------------------------------------- /disthamming.m: -------------------------------------------------------------------------------- 1 | % Hamming distance calculating function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | function [ sum ] = disthamming(x,y) 5 | 6 | 7 | disp('Created by JITHIN K C'); 8 | end 9 | % ----------------------------------------------------------------------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /shiftlr.m: -------------------------------------------------------------------------------- 1 | % Shifting function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Function for shifting matrix left to right 5 | 6 | function sht=shiftlr(ma,mdm,row) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % Step 1:Initialize the shifing units 10 | 11 | 12 | end 13 | % ----------------------------------------------------------------------------------------------------------------------------------- 14 | -------------------------------------------------------------------------------- /shiftrr.m: -------------------------------------------------------------------------------- 1 | % Shifting Function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Function for shifting matrix right to right 5 | 6 | function sht=shiftrr(ma,mdm,row) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP 1:Initialize the shifting units 10 | 11 | end 12 | % ----------------------------------------------------------------------------------------------------------------------------------- 13 | -------------------------------------------------------------------------------- /maximum.m: -------------------------------------------------------------------------------- 1 | % Max value finding function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Function for find max value of a matrix 5 | 6 | function min=maximum(ma,ro,rc) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP 1: rc=2 means row 10 | 11 | 12 | % ----------------------------------------------------------------------------------------------------------------------------------- 13 | 14 | % STEP 2: rc=1 means coloumn 15 | 16 | 17 | end 18 | % ----------------------------------------------------------------------------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | 15 | -------------------------------------------------------------------------------- /md.m: -------------------------------------------------------------------------------- 1 | % Mandelbrotset Function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Function for calculate mandelbrot set by using Modified mandelbrot set 5 | 6 | function W=md() 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP 1:Initial values for modified mandelbrot set 10 | 11 | c% ----------------------------------------------------------------------------------------------------------------------------------- 12 | 13 | % STEP 2:Generation of original mandelbrot set 14 | 15 | % ----------------------------------------------------------------------------------------------------------------------------------- 16 | 17 | % STEP 3:Generation of modified mandelbrot set 18 | 19 | end 20 | % ----------------------------------------------------------------------------------------------------------------------------------- 21 | -------------------------------------------------------------------------------- /DNA_decode_rule01.m: -------------------------------------------------------------------------------- 1 | % DNA decoding function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Function for DNA Decoding operation based on rule 01 5 | 6 | function P = DNA_decode_rule01(d,mn) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP 1:Creating an empty integer array for a DNA output 10 | 11 | % ----------------------------------------------------------------------------------------------------------------------------------- 12 | 13 | % STEP 2: Performing DNA Decoding by using DNA ACGT pattern 14 | 15 | 16 | % ----------------------------------------------------------------------------------------------------------------------------------- 17 | 18 | % STEP 3:Converting binary to decimal 19 | 20 | P = bin2dec(b); 21 | end 22 | % ----------------------------------------------------------------------------------------------------------------------------------- 23 | -------------------------------------------------------------------------------- /arnoldy.m: -------------------------------------------------------------------------------- 1 | % Arnold map - Function - y values 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % key generation using Chaotic map function (Arnold map) 5 | 6 | function [outImg]=arnoldy(o,p) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP1 : Creating empty martrix for keys 10 | 11 | % ----------------------------------------------------------------------------------------------------------------------------------- 12 | 13 | % STEP 2: Reading initial values 14 | 15 | x=o; %Initial values 16 | y=p; %Initial values 17 | % ----------------------------------------------------------------------------------------------------------------------------------- 18 | 19 | % STEP 3: Initialize number of iteration for the map 20 | 21 | ------------------------------------------------------------------------------------------------------------------- 22 | 23 | % STEP 4: Arnold map equation 24 | 25 | 26 | % ----------------------------------------------------------------------------------------------------------------------------------- 27 | 28 | % STEP 5: Output (Chaotic keys) 29 | outImg= reshape(k,[1,65536]); 30 | end 31 | % ----------------------------------------------------------------------------------------------------------------------------------- 32 | -------------------------------------------------------------------------------- /DNA_xor.m: -------------------------------------------------------------------------------- 1 | % DNA xor function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Function for DNA xor operation 5 | 6 | function b = DNA_xor(d,c) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP 1:Ceating an empty string array 10 | 11 | 12 | % ----------------------------------------------------------------------------------------------------------------------------------- 13 | 14 | % STEP 2:DNA Xor table 15 | 16 | 17 | 18 | % ----------------------------------------------------------------------------------------------------------------------------------- 19 | 20 | 21 | 22 | % ----------------------------------------------------------------------------------------------------------------------------------- 23 | 24 | 25 | % ----------------------------------------------------------------------------------------------------------------------------------- 26 | 27 | % ----------------------------------------------------------------------------------------------------------------------------------- 28 | 29 | % STEP 3: DNA Xor ouput 30 | 31 | b=[b,k]; 32 | end 33 | end 34 | 35 | % ----------------------------------------------------------------------------------------------------------------------------------- 36 | -------------------------------------------------------------------------------- /arnoldx.m: -------------------------------------------------------------------------------- 1 | % Arnold map -Function x values 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % key generation using Chaotic map function (Arnold map) 5 | 6 | function [outImg]=arnoldx(o,p) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP1 : Creating empty martrix for keys 10 | 11 | % ----------------------------------------------------------------------------------------------------------------------------------- 12 | 13 | % STEP 2: Reading initial values 14 | 15 | x=o; %Initial values 16 | y=p; %Initial values 17 | % ----------------------------------------------------------------------------------------------------------------------------------- 18 | 19 | % STEP 3: Initialize number of iteration for the map 20 | 21 | % ----------------------------------------------------------------------------------------------------------------------------------- 22 | % STEP 4: Arnold map equation 23 | 24 | 25 | % ----------------------------------------------------------------------------------------------------------------------------------- 26 | 27 | % STEP 5: Output (Chaotic keys) 28 | outImg= reshape(k,[1,65536]); 29 | end 30 | % ----------------------------------------------------------------------------------------------------------------------------------- 31 | -------------------------------------------------------------------------------- /main.m: -------------------------------------------------------------------------------- 1 | % This is the main function to perform Image encryption and decryption process 2 | % --------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Note: 5 | 6 | % All rights are under developers' and authors. You can't redistribute and/or modify the code. 7 | % If you need any special permission or need source code you can contact the author's. Redistribution without permission is illegal. 8 | 9 | % If you are using my code for your system or project, you should always cite my paper as a reference. 10 | 11 | web('https://docs.google.com/document/d/1AbCxFoUhdOCppM8novgCdOv0F9mqYe7HlBU7yX7Svx0/edit?usp=sharing') 12 | web('published_work.html') 13 | 14 | % ----------------------------------------------------------------------------------------------------------------------------------- 15 | % Input the image name here. - you can choose image from our image-dataset 16 | 17 | a=imread('/image-dataset/lena.png'); 18 | 19 | disp('Created by JITHIN K C'); 20 | 21 | % ------------------------------------------------------------------------------------------------------------------------------------ 22 | % Calling the main function of- Encryption and Decryption 23 | 24 | % Encryption: 25 | b=encryption(a); 26 | % Decryption: 27 | c=decryption(b); 28 | disp('Created by JITHIN K C'); 29 | #------------------------------------------------------------------------------------------------------------------------------------ 30 | -------------------------------------------------------------------------------- /DNA_encode_rule01.m: -------------------------------------------------------------------------------- 1 | % DNA Encoding function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | % Function for DNA encoding based on rule 01 5 | 6 | function d = DNA_encode_rule01(P,mn) 7 | % ----------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | % STEP 1:Creating an empty string array for DNA encoding 10 | 11 | 12 | % ----------------------------------------------------------------------------------------------------------------------------------- 13 | 14 | % STEP 2:DNA Convertion table 15 | 16 | for i = 1:mn 17 | 18 | % ----------------------------------------------------------------------------------------------------------------------------------- 19 | 20 | % ----------------------------------------------------------------------------------------------------------------------------------- 21 | 22 | 23 | % ----------------------------------------------------------------------------------------------------------------------------------- 24 | 25 | % ----------------------------------------------------------------------------------------------------------------------------------- 26 | 27 | % ----------------------------------------------------------------------------------------------------------------------------------- 28 | 29 | % STEP 3:DNA Encoding output 30 | 31 | 32 | 33 | end 34 | % ----------------------------------------------------------------------------------------------------------------------------------- 35 | -------------------------------------------------------------------------------- /decryption.m: -------------------------------------------------------------------------------- 1 | % Decryption - Function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | function re=decryption(a) 5 | 6 | % ----------------------------------------------------------------------------------------------------------------------------------- 7 | 8 | % STEP 1:Reading cipher image for decrypting 9 | 10 | ori=entropy(a); 11 | figure; 12 | imshow(a);title('cipherimage'); 13 | % ----------------------------------------------------------------------------------------------------------------------------------- 14 | 15 | % STEP 2: Decompose in to R,G,B 16 | 17 | 18 | figure; 19 | imshow(rn);title('diffused red'); 20 | figure; 21 | imshow(gn);title('diffused green'); 22 | figure; 23 | imshow(bn);title('diffused blue'); 24 | 25 | 26 | % ----------------------------------------------------------------------------------------------------------------------------------- 27 | 28 | % STEP 3: Chaos sequence generation 29 | 30 | 31 | % ----------------------------------------------------------------------------------------------------------------------------------- 32 | 33 | % STEP 4: Reading hammingdistance as keys 34 | 35 | 36 | % ----------------------------------------------------------------------------------------------------------------------------------- 37 | 38 | % Normalized chaotic sequence (arnold) 39 | 40 | 41 | % ----------------------------------------------------------------------------------------------------------------------------------- 42 | 43 | % STEP 5: DNA Encoding on R,G,B components 44 | 45 | % ----------------------------------------------------------------------------------------------------------------------------------- 46 | 47 | % STEP 6: DNA xor operation 48 | 49 | 50 | end 51 | % ----------------------------------------------------------------------------------------------------------------------------------- 52 | 53 | % STEP 7 : DNA Decoding 54 | 55 | 56 | % ----------------------------------------------------------------------------------------------------------------------------------- 57 | 58 | % STEP 8: confusion and permutation by mandelbrotset 59 | 60 | mdset=md(); 61 | 62 | % find minimum element 63 | % 1=coloumn_min 2=row_min 64 | % ----------------------------------------------------------------------------------------------------------------------------------- 65 | 66 | 67 | % ----------------------------------------------------------------------------------------------------------------------------------- 68 | 69 | 70 | r 71 | % ----------------------------------------------------------------------------------------------------------------------------------- 72 | 73 | 74 | figure; 75 | subplot(2,2,1);imshow(r);title('Decrypted_Red'); 76 | subplot(2,2,2);imshow(t);title('Decrypted_Green'); 77 | subplot(2,2,3);imshow(i);title('Decrypted_Blue'); 78 | 79 | 80 | % ----------------------------------------------------------------------------------------------------------------------------------- 81 | subplot(2,2,4); imshow(aa); title('Decrypted'); 82 | imwrite(aa,'itest.png'); 83 | disp('Created by JITHIN K C'); 84 | 85 | re=aa; 86 | end 87 | % ----------------------------------------------------------------------------------------------------------------------------------- 88 | -------------------------------------------------------------------------------- /encryption.m: -------------------------------------------------------------------------------- 1 | % Encryption -Function 2 | % ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | function anss=encryption(a) 5 | 6 | % STEP 1 : input original image 7 | 8 | ori=entropy(a); 9 | figure; 10 | imshow(a);title('lena original'); 11 | % ----------------------------------------------------------------------------------------------------------------------------------- 12 | 13 | % STEP 2: Decompose in to R,G,B 14 | 15 | 16 | 17 | % ----------------------------------------------------------------------------------------------------------------------------------- 18 | 19 | % STEP 3: Chaos sequence generation. 20 | 21 | X1=arnoldx(x,y); 22 | X2=arnoldx(x,y); 23 | X3=arnoldx(x,y); 24 | 25 | % Normalized chaotic sequence (arnold). 26 | 27 | 28 | % ----------------------------------------------------------------------------------------------------------------------------------- 29 | 30 | % STEP 4: DNA Encoding on R,G,B components. 31 | 32 | for i= 1:65536 33 | DR(i)=DNA_encode_rule01(R(i)); 34 | 35 | end 36 | % ----------------------------------------------------------------------------------------------------------------------------------- 37 | 38 | %STEP 5:DNA Encoding on Chaotic sequence S1,S2,S3. 39 | 40 | D1=string(); 41 | 42 | for i= 1:65536 43 | D1(i)=DNA_encode_rule01(S1(i)); 44 | 45 | end 46 | % ----------------------------------------------------------------------------------------------------------------------------------- 47 | 48 | % STEP 6: DNA xor operation on R,G,B and chaotic sequence (S1,S2,S3): 49 | 50 | 51 | for i=1:65536 52 | XDR(i)=DNA_xor(DR(i),D1(i)); 53 | 54 | end 55 | % ----------------------------------------------------------------------------------------------------------------------------------- 56 | 57 | % STEP 7: Calculating Hamming distance on R,G,B with respect to chaotic sequence: 58 | 59 | 60 | for i=1:65536 61 | HR(i)=disthamming(R(i),S1(i)); 62 | 63 | end 64 | % ----------------------------------------------------------------------------------------------------------------------------------- 65 | 66 | % for decryption 67 | 68 | % ----------------------------------------------------------------------------------------------------------------------------------- 69 | 70 | % STEP 8:DNA Encoding on Hamming distance. 71 | 72 | 73 | for i=1:65536 74 | DHR(i)=DNA_encode_rule01(HR(i),1); 75 | 76 | end 77 | % ----------------------------------------------------------------------------------------------------------------------------------- 78 | 79 | % STEP 9: DNA XOR operation on Encoded Hamming distance and Encoded Chaotic Sequence: 80 | 81 | 82 | for i=1:65536 83 | XR(i)=DNA_xor(DHR(i),D1(i)); 84 | 85 | end 86 | % ----------------------------------------------------------------------------------------------------------------------------------- 87 | 88 | % STEP 10 : DNA Decoding on XOR- Hamming and Chaotic: 89 | 90 | 91 | % ----------------------------------------------------------------------------------------------------------------------------------- 92 | 93 | % STEP 11: confusion and permutation by mandelbrotset 94 | 95 | 96 | for i=1:65536; 97 | rxt(i)=DNA_decode_rule01(XDR(i),1); 98 | 99 | end 100 | ------------------------------------------------------------------------------------------------------- 101 | 102 | % Calling Mandelbrot set function 103 | 104 | mdset=md(); 105 | 106 | % find max element 107 | % 1=coloumn_min, 2=row_min 108 | 109 | for j=1:256; 110 | mdm(j)=maximum(mdset,j,1); 111 | 112 | % ----------------------------------------------------------------------------------------------------------------------------------- 113 | 114 | % shift to right with mdm check 115 | 116 | 117 | % ----------------------------------------------------------------------------------------------------------------------------------- 118 | 119 | % STEP 12:DNA diffusion process 120 | 121 | SR=reshape(rxtp,1,65536); 122 | 123 | 124 | % diffusion using XORed Hamming and Confused R,G,B 125 | 126 | 127 | 128 | % ----------------------------------------------------------------------------------------------------------------------------------- 129 | figure; 130 | imshow(CR);title('diffused red'); 131 | imwrite(CR,'diffused red.png'); 132 | 133 | 134 | % ----------------------------------------------------------------------------------------------------------------------------------- 135 | 136 | 137 | figure; 138 | imshow(cipherimage);title('cipherimage'); 139 | 140 | 141 | disp('Created by JITHIN K C'); 142 | anss=ric; 143 | end 144 | % ----------------------------------------------------------------------------------------------------------------------------------- 145 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chaotic_Image_Encryption-Arnold-Map- 2 | 3 | Image encryption using chaotic maps (Arnold map) ,Mandelbrot set and DNA encryption 4 | 5 | % ------------------------------------------------------------------------------------------------------------------------------------ 6 | %%%%%%%%%%%%%%%%% Chaotic_Image_Encryption-Arnold-Map- %%%%%%%%%%%%%%%%%%% 7 | % ------------------------------------------------------------------------------------------------------------------------------------ 8 | Colour image encryption algorithm combining Arnold map, DNA sequence operation, and a Mandelbrot set 9 | % ------------------------------------------------------------------------------------------------------------------------------------ 10 | # Note: 11 | 12 | # All rights are under developers' and authors. You can't redistribute and/or modify the code. 13 | If you need any special permission or need source code you can contact the author's. Redistribution without permission is illegal. 14 | 15 | # If you are using my code for your system or project, you should always cite my paper as a reference. 16 | 17 | Click here to see the publications. 18 | 19 | % ------------------------------------------------------------------------------------------------------------------------------------ 20 | 21 | The proposed method of encryption scheme combines the techniques of chaotic image encryption and DNA (Deoxyribonucleic Acid) sequence operations. 22 | The encryption mechanism is applied separately on three channels (R, G and B) of the colour image with a suitable chaotic map. 23 | The map selection algorithm selects a good chaotic map based on image properties and other parameters. 24 | A method of DNA encoding is also applied after chaotic encryption. A new Mandelbrot Set based conditional shift algorithm is introduced to apply confusion effectively on R, G and B channels.Simulation and security analysis confirm that the proposed image encryption scheme demonstrates extraordinary performance in terms of security. 25 | % ------------------------------------------------------------------------------------------------------------------------------------ 26 | 27 | Image Encryption algorithm using Chaotic map Function ( Arnold map) 28 | 29 | 30 | 31 | 1. Input the Image file name and path to the main function 32 | 2. Input the value to x and y in both encryption and decryption ; The ranges starting from 33 | x,y element of (0,1,2,.....N-1) 34 | x= ; %Initial values 35 | y= ; %Initial values 36 | 3. Run the matlab file main.m 37 | % ------------------------------------------------------------------------------------------------------------------------------------ 38 | 39 | &&& -----------MATLAB FILES----------- &&& 40 | 41 | 42 | 43 | 1. Encryption - try_new_trig.m 44 | 45 | 2. Decryption - itry_new_trig.m 46 | 47 | 3. Hamming Distance - disthamming.m 48 | 49 | 4. Max of a matrix - maximum.m 50 | 51 | 5. Mandelbrot set - md.m 52 | 53 | 6. Shift left to right - shiftlr.m 54 | 55 | 7. Shift right to right - shiftrr.m 56 | 57 | 8. Arnold map function x-values - arnoldx.m 58 | 59 | 9. Arnold map function y-values - arnoldy.m (Optional - If you need use y values) 60 | 61 | 10. DNA Encoding rule 01 - DNA_encode_rule01.m 62 | 63 | 11. DNA Decoding rule 01 - DNA_decode_rule01.m 64 | 65 | 12. DNA XOR Operation - DNA_xor.m 66 | 67 | 13. Main Function - main.m 68 | 69 | % ------------------------------------------------------------------------------------------------------------------------------------ 70 | In this work, an improved image encryption scheme based on chaotic map and DNA encoding is proposed. We have selected Arnold map as the best map to be used with our encryption system.The selection of the map is accomplished by devising a simple and proper map selection strategy. 71 | Here the encryption is applied separately on each of the three channels of the colour image to enhance the security. 72 | 73 | % ------------------------------------------------------------------------------------------------------------------------------------ 74 | 75 | %%%%%%------ Data set: --------%%%%%%% 76 | % ------------------------------------------------------------------------------------------------------------------------------------ 77 | In order to fully demonstrate the advantages of our algorithm, we choose some standard colour images each with size 256 × 256. 78 | The standard colour images are selected for the image encryption process. The quality of our encryption system is analysed by performing encryption on different images with different intensity values. 79 | % ------------------------------------------------------------------------------------------------------------------------------------ 80 | %%%%%%%%%%%%%%%%%%%%%%%%%%% ------- standard colour images --------%%%%%%%%%%%%%%%%%%%%%%%%%%% 81 | 82 | % IMAGE NAME & SIZE 83 | 84 | % Airplane 256x256 85 | % Goldhill 256x256 86 | % Baboon 256x256 87 | % Lake 256x256 88 | % Barbara 256x256 89 | % Lena 256x256 90 | % Cable car 256x256 91 | % Monarch 256x256 92 | % Cornfield 256x256 93 | % Pens 256x256 94 | % Couple 256x256 95 | % Peppers 256x256 96 | % Flower 256x256 97 | % Soccer 256x256 98 | % Flowers 256x256 99 | % Yacht 256x256 100 | % Fruits 256x256 101 | % Zeldacolor 256x256 102 | % Girl 256x256 103 | 104 | Chaos in image encryption has improved the security of transmitting image data. 105 | The cipher image generated by our algorithm is not possible to decrypt by the attacker since the encryption is done 106 | using the randomly generated sequences from chaotic maps and the large keyspace eliminates brute-force attacks. 107 | %------------------------------------------------------------------------------------------------------------------------------------ 108 | 109 | %%%%%%%%%%%-------------------$$$$$$$$>>>>> BY JITHIN K C <<<<$$$$$$$$$-----------------%%%%%%%%%%%%%% 110 | @@@ for any queries please contact: jithinkc22@gmail.com 111 | --------------------------------------------------------------------------------