-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdecryption.m
87 lines (49 loc) · 3.01 KB
/
decryption.m
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
% Decryption - Function
% -----------------------------------------------------------------------------------------------------------------------------------
function re=decryption(a)
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 1:Reading cipher image for decrypting
ori=entropy(a);
figure;
imshow(a);title('cipherimage');
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 2: Decompose in to R,G,B
figure;
imshow(rn);title('diffused red');
figure;
imshow(gn);title('diffused green');
figure;
imshow(bn);title('diffused blue');
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 3: Chaos sequence generation
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 4: Reading hammingdistance as keys
% -----------------------------------------------------------------------------------------------------------------------------------
% Normalized chaotic sequence (arnold)
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 5: DNA Encoding on R,G,B components
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 6: DNA xor operation
end
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 7 : DNA Decoding
% -----------------------------------------------------------------------------------------------------------------------------------
% STEP 8: confusion and permutation by mandelbrotset
mdset=md();
% find minimum element
% 1=coloumn_min 2=row_min
% -----------------------------------------------------------------------------------------------------------------------------------
% -----------------------------------------------------------------------------------------------------------------------------------
r
% -----------------------------------------------------------------------------------------------------------------------------------
figure;
subplot(2,2,1);imshow(r);title('Decrypted_Red');
subplot(2,2,2);imshow(t);title('Decrypted_Green');
subplot(2,2,3);imshow(i);title('Decrypted_Blue');
% -----------------------------------------------------------------------------------------------------------------------------------
subplot(2,2,4); imshow(aa); title('Decrypted');
imwrite(aa,'itest.png');
disp('Created by JITHIN K C');
re=aa;
end
% -----------------------------------------------------------------------------------------------------------------------------------