• 大小: 143.29 KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-09-15
  • 语言: Matlab
  • 标签: MATLAB  混沌  加密  

资源简介

用MATLAB编程实现的将混沌应用于图像加密的算法。

资源截图

代码片段和文件信息

clear;clc;
x=imread(‘加密后的lena.bmp‘‘bmp‘);
[a b c]=size(x);
N=a*b;
m(1)=input(‘请输入密钥:   ‘);
disp(‘解密中‘);
for i=1:N-1
    m(i+1)=4*m(i)-4*m(i)^2;
end
m=mod(1000*m256);
m=uint8(m);
n=1;
for i=1:a
    for j=1:b
        e(ij)=bitxor(m(n)x(ij));
        n=n+1;
    end
end
imwrite(e‘解密后的lena.bmp‘‘bmp‘);
disp(‘解密成功‘);
winopen(‘解密后的lena.bmp‘);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        388  2006-06-07 14:53  5956456image_encryption\image encryption\decrypt1.m

     文件        382  2006-06-07 14:58  5956456image_encryption\image encryption\encrypt1.m

     文件      66616  2005-11-09 20:04  5956456image_encryption\image encryption\lena.bmp

     文件      66614  2009-04-22 14:07  5956456image_encryption\image encryption\加密后的lena.bmp

     文件      66614  2009-04-22 14:09  5956456image_encryption\image encryption\解密后的lena.bmp

    ..A.SH.     16896  2009-05-11 13:56  5956456image_encryption\image encryption\Thumbs.db

     目录          0  2009-04-25 21:18  5956456image_encryption\image encryption

     目录          0  2009-04-25 21:18  5956456image_encryption

----------- ---------  ---------- -----  ----

               217728                    9


评论

共有 条评论