Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

chaotic(tent map ) decryption

3 visualizzazioni (ultimi 30 giorni)
Rahaf mutlaq
Rahaf mutlaq il 13 Mar 2019
Chiuso: Walter Roberson il 13 Mar 2019
hello everyone
I've wrote code to encrypt image by using chaotic system tent map and it works
but i don't know how to dycrypt the image (I've use XOR with encryption )
i tried xor with decryption but it didn't work
so please may someone help me with that
here is the code;
I = imread('lena.bmp');
[ a , b , c ] = size (I);
N = a*b*c ;
u = 1.99; %initial value
x = linspace(0,1,N); % create a vector of x-positions
outputs = zeros(size(I));
for ii = 1 : numel(I)
if x(ii) < 0.5
Y(ii)=u*x(ii);
elseif x(ii) >= 0.5
Y(ii)=u*(1-x(ii));
outputs(ii) = Y(ii);
end
end
TR = outputs > (100/256);
II = double (I);
I2D = II > (100/256); % images of type double are in the range 0 to 1.(SO NO NEED TO CONVERT IT BINARY)
XXX= xor(TR,I2D);
XR =double (XXX) ;
figure(1);
imshow(I)
title('input image')
figure(2);
imshow(XR)
title('encrypted image ')
algorithm :
The chaotic tent map is given by:
we use the chaotic tent map to implement encryption process. The image encryption algorithm proposed in this paper consists of the following major steps:
  • Read plain-images (original image) (Ma×bMa×b), get size of M, e.g., use [a, b, c] to save the size of M, a=256a=256, b=256b=256, c=3c=3, let N=abcN=abc, and initiate control parameter (μμ) of the chaotic tent map;
  • Input the secret (encryption) key x0x0 into the algorithm. Iterate the chaotic tent map N times using system (2), and obtain the key array x(n), the size of x(n) is N;
  • Encrypt each element of matrix (Ma×bMa×b) using the key array x(n), that is, mix the original image (Ma×bMa×b) components with the key array x(n);
  • The resulting image of step (3) is the ciphered image.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by