Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

chaotic(tent map ) decryption

3 vues (au cours des 30 derniers jours)
Rahaf mutlaq
Rahaf mutlaq le 13 Mar 2019
Clôturé : Walter Roberson le 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.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by