Research on Chaotic Sequence Image Encryption Algorithm Based on MATLAB

Research on Chaotic Sequence Image Encryption Algorithm Based on MATLAB





1. Purpose and Significance



Familiar with matlab, use matlab schedule, use matlab words and deeds data encryption to ensure the security of digital image information, chaotic sequence has the characteristics of easy generation, sensitive initial conditions and chaotic parameters, and has been widely used in the field of image encryption in recent years. Use the necessary algorithm to encrypt and decrypt the information row to ensure the protection of the information.





2. Research Status

With the rapid development of Internet technology and multimedia technology, digital information can be conveniently and quickly posted on the Internet in different forms. Multimedia communication is an important means of information exchange for adults. Rentong.com exchanges various information, conducts e-commerce, etc. Therefore, the security and confidentiality of information is becoming more and more important. The security and confidentiality of information not only has a great relationship with the country's politics, military and diplomacy, but also has a great relationship with the country's economy, business activities and individuals. With the advent of the information society, digital information and networks have become an important part of people's lives. While they bring us convenience, they also bring us hidden dangers: sensitive information may be easily stolen, tampered with, illegally Replication and dissemination, etc. Therefore, information security has become the focus of people's concern, and it is also a hot spot and difficulty in today's research.

Multimedia data, especially images, contain more information than traditional text, and thus become an important means of information utilization in human society. Therefore, the research on multimedia information security protection technology is particularly important. Multimedia information security is a multidisciplinary research topic integrating mathematics, cryptography, information theory, probability theory, computational complexity theory, computer network and other computer application technologies. .


3. Design content



Use the chaotic sequence image encryption technology to process the image to make the encrypted image.



4. Development environment


MATLAB





5. Analysis and design

1. Experimental requirements

Use matlab to hide image information and realize information encryption.

2. Design principle

Use the XOR operation to hide the data, use the same data continuously to perform the XOR operation on the image data twice, and the image data will not change, and use this feature to encrypt and protect the image information. The password entered by the user must be any data between 0 and 1 for encryption, and the passwords entered by the encrypted program and the decrypted program must be consistent to decrypt correctly.



v2-4d385d1bffc5827a2ba30906c283565b_b.jpg








6. Source code





The encryption program code is as follows:

clear;clc;
x=imread('','bmp');%读取图像信息
[a b c]=size(x);%将图像的大小赋给a b c
N=a*b;%定义变量 N并赋值
m(1)=input('请输入密钥 :');%用户输入加密密码
disp('加密中 ...');%显示提示信息
for i=1:N-1%进行 N-1 次循环
m(i+1)=4*m(i)-4*m(i)^2;%循环产生密码
end




m=mod(1000*m,256);%1000*m除以 256 的余数
m=uint8(m);%强制转换为无符号整型
n=1;%定义变量 n
for i=1:a
for j=1:b
e(i,j)=bitxor(m(n),x(i,j)); %将图像信息藏在e(i ,j)矩阵中进行异或运算
n=n+1;
end
end
imwrite(e,'加密后的 ','bmp');%显示解密成功提示信息
disp('加密成功 ');
winopen(' 加密后的 ');%显示加密后图片
解密程序代码:
clear;clc;
x=imread('  加密后的 ','bmp');%读取图像信息
[a b c]=size(x);%将加密后图像的大小赋给 a b c
N=a*b;
m(1)=input('请输入密钥:');%用户输入预设加密密码
disp('解密中 ');
for i=1:N-1%进行 N-1 次循环
m(i+1)=4*m(i)-4*m(i)^2;%循环产生原密码
End
m=mod(1000*m,256);
m=uint8(m);
n=1;
for i=1:a
for j=1:b
e(i,j)=bitxor(m(n),x(i,j));% m(n)xor(m ( n ) xor
x(i,j))==x(i,j)%不带进位加法半加运算
n=n+1;
end
end
imwrite(e,'解密后的 ','bmp');%将解密的图像输出命名为
disp('解密成功 ');%显示解密成功提示信息
winopen(' 解密后的 ');%显示解密后图片










基于MATLAB的混沌序列图像加密算法的研究


1. Purpose and Significance



Familiar with matlab, use matlab schedule, use matlab words and deeds data encryption to ensure the security of digital image information, chaotic sequence has the characteristics of easy generation, sensitive initial conditions and chaotic parameters, and has been widely used in the field of image encryption in recent years. Use the necessary algorithm to encrypt and decrypt the information row to ensure the protection of the information.





2. Research Status

With the rapid development of Internet technology and multimedia technology, digital information can be conveniently and quickly posted on the Internet in different forms. Multimedia communication is an important means of information exchange for adults. Rentong.com exchanges various information, conducts e-commerce, etc. Therefore, the security and confidentiality of information is becoming more and more important. The security and confidentiality of information not only has a great relationship with the country's politics, military and diplomacy, but also has a great relationship with the country's economy, business activities and individuals. With the advent of the information society, digital information and networks have become an important part of people's lives. While they bring us convenience, they also bring us hidden dangers: sensitive information may be easily stolen, tampered with, illegally Replication and dissemination, etc. Therefore, information security has become the focus of people's concern, and it is also a hot spot and difficulty in today's research.

Multimedia data, especially images, contain more information than traditional text, and thus become an important means of information utilization in human society. Therefore, the research on multimedia information security protection technology is particularly important. Multimedia information security is a multidisciplinary research topic integrating mathematics, cryptography, information theory, probability theory, computational complexity theory, computer network and other computer application technologies. .


3. Design content



Use the chaotic sequence image encryption technology to process the image to make the encrypted image.



4. Development environment


MATLAB





5. Analysis and design

1. Experimental requirements

Use matlab to hide image information and realize information encryption.

2. Design principle

Use the XOR operation to hide the data, use the same data continuously to perform the XOR operation on the image data twice, and the image data will not change, and use this feature to encrypt and protect the image information. The password entered by the user must be any data between 0 and 1 for encryption, and the passwords entered by the encrypted program and the decrypted program must be consistent to decrypt correctly.



v2-4d385d1bffc5827a2ba30906c283565b_b.jpg








6. Source code





The encryption program code is as follows:

clear;clc;
x=imread('','bmp');%读取图像信息
[a b c]=size(x);%将图像的大小赋给a b c
N=a*b;%定义变量 N并赋值
m(1)=input('请输入密钥 :');%用户输入加密密码
disp('加密中 ...');%显示提示信息
for i=1:N-1%进行 N-1 次循环
m(i+1)=4*m(i)-4*m(i)^2;%循环产生密码
end




m=mod(1000*m,256);%1000*m除以 256 的余数
m=uint8(m);%强制转换为无符号整型
n=1;%定义变量 n
for i=1:a
for j=1:b
e(i,j)=bitxor(m(n),x(i,j)); %将图像信息藏在e(i ,j)矩阵中进行异或运算
n=n+1;
end
end
imwrite(e,'加密后的 ','bmp');%显示解密成功提示信息
disp('加密成功 ');
winopen(' 加密后的 ');%显示加密后图片
解密程序代码:
clear;clc;
x=imread('  加密后的 ','bmp');%读取图像信息
[a b c]=size(x);%将加密后图像的大小赋给 a b c
N=a*b;
m(1)=input('请输入密钥:');%用户输入预设加密密码
disp('解密中 ');
for i=1:N-1%进行 N-1 次循环
m(i+1)=4*m(i)-4*m(i)^2;%循环产生原密码
End
m=mod(1000*m,256);
m=uint8(m);
n=1;
for i=1:a
for j=1:b
e(i,j)=bitxor(m(n),x(i,j));% m(n)xor(m ( n ) xor
x(i,j))==x(i,j)%不带进位加法半加运算
n=n+1;
end
end
imwrite(e,'解密后的 ','bmp');%将解密的图像输出命名为
disp('解密成功 ');%显示解密成功提示信息
winopen(' 解密后的 ');%显示解密后图片

Guess you like

Origin blog.csdn.net/TuTu998/article/details/120177084