├── An image encryption scheme based on Lorenz Hyperchaotic System and RSA algorithm-科研业绩成果材料附件.pdf ├── README.md ├── RSA ├── Copy_of_RSA.m ├── RSA.m ├── RSA_test.m ├── prime_produce.m └── rsa_code.m ├── encryption ├── BACIExpect.m ├── ENTROPYtest.m ├── GF257Table.m ├── GF257TableEx.m ├── House.tiff ├── ImCoef.m ├── ImCoef_test.m ├── Lake.tiff ├── Lena.bmp ├── LookUpGF257.m ├── LookUpGF257Ex.m ├── LookUpGF257Ex2.m ├── Male.tiff ├── NPCRUACI.m ├── NPCRUACIBACI.m ├── Peppers.tiff ├── TpDecrypt.m ├── TpEncrypt.m ├── Tree.tiff ├── UACIExpect.m ├── UACIExpect_test.m ├── gray21.512.tiff ├── hist_test.m ├── img_hist.m ├── lena256.bmp ├── lena512.bmp ├── lena512color.tiff ├── noise_attack.m ├── ruler.512.tiff └── variances.m ├── pictures ├── 5.1.09.tiff ├── 5.1.10.tiff ├── 5.1.11.tiff ├── 5.1.12.tiff ├── 5.1.13.tiff ├── 5.1.14.tiff ├── 5.2.08.tiff ├── 5.2.09.tiff ├── 5.3.01.tiff ├── 5.3.02.tiff ├── 7.1.01.tiff ├── 7.1.02.tiff ├── 7.1.03.tiff ├── 7.1.04.tiff ├── 7.1.05.tiff ├── 7.1.06.tiff ├── 7.1.07.tiff ├── 7.1.08.tiff ├── 7.1.09.tiff ├── 7.1.10.tiff ├── 7.2.01.tiff ├── boat.512.tiff ├── gray21.512.tiff └── ruler.512.tiff └── test_code ├── Copy_of_ImCoef_test.m ├── Copy_of_code4_25.m ├── Copy_of_crypt_test.m ├── code4_14.m ├── code4_16.m ├── code4_18.m ├── code4_19.m ├── code4_21.m ├── code4_22.m ├── code4_23.m ├── code4_24.m ├── code4_25.m ├── crypt_test.m └── crypt_test_color.m /An image encryption scheme based on Lorenz Hyperchaotic System and RSA algorithm-科研业绩成果材料附件.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/An image encryption scheme based on Lorenz Hyperchaotic System and RSA algorithm-科研业绩成果材料附件.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm 2 | This research proposes a new image encryption scheme based on Lorenz hyperchaotic system and Rivest-Shamir-Adleman (RSA) algorithm. Firstly, the initial values of the Lorenz hyperchaotic system are generated by RSA algorithm, and the keystream is produced iteratively. In order to change the position and gray value of the pixel, the image data are hidden by additive mode diffusion. Secondly, the diffusion image matrix is reshaped into a one-dimensional image matrix, which is confused without repetition to hide the image data again. Then, the finite field diffusion algorithm is executed to realize the third hiding of the image information. In order to diffuse the pixel information into the entire cipher image, the additive mode diffusion algorithm needs to be looped twice. Finally, the cipher image can be obtained. The experimental results prove that the image encryption scheme proposed in this research is effective, and has strong anti-attack and key sensitivity. Moreover, the security of this encryption scheme relies on the RSA algorithm, which has high security. 3 | 具体的实验过程可以参考我的CSDN博客,超混沌Lorenz系统图像加密(MATLAB):https://blog.csdn.net/qq_36439087/article/details/109964775?spm=1001.2014.3001.5502 4 | -------------------------------------------------------------------------------- /RSA/Copy_of_RSA.m: -------------------------------------------------------------------------------- 1 | % RSA加密和解密算法 2 | clear;clc%清除运行空间 3 | disp('RSA algorithm'); 4 | p = 3259;%大素数 最大的数是10000 5 | fprintf('\np=%d',p); 6 | q = 3821;%大素数 7 | fprintf('\nq=%d',q); 8 | n=p*q; %模数n 9 | fprintf('\nn=%d',n); 10 | phi=(p-1)*(q-1);%欧拉函数 11 | fprintf('\nphi(%d) is %d',n,phi); 12 | e = 1288367; 13 | d = 3385223; 14 | 15 | % %为了找到公钥e 16 | % while(cd~=1||val==0) 17 | % n1=randi(n,1,1);%生成随机数 18 | % e=randi([2 n1],1,1); 19 | % val=isprime(e);%确定哪些数组元素为质数 20 | % cd=gcd(e,phi);%G = gcd(A,B) 返回 A 和 B 的元素的最大公约数 21 | % end 22 | % 23 | % %vall 是否为1 d*e=1mod(phi(n)) d 为私钥 24 | % val1=0; 25 | % d=0; 26 | % while(val1~=1) 27 | % d=d+1; 28 | % val1=mod(d*e,phi); 29 | % end 30 | fprintf('\nd=%d',d); 31 | fprintf('\nPublic key is (%d,%d)',e,n); 32 | fprintf('\nPrivate key is (%d,%d)',d,n); 33 | m = [178333,38628,92873897,829809]; 34 | %m = [59806503,2349576,60074184,7488026]; 35 | m1=m; 36 | fprintf('\n'); 37 | disp('输入的明文大数M为: '); 38 | disp(m1); 39 | over=length(m1);%长度 40 | o=1; 41 | while(o<=over) 42 | m=m1(o);%文本字符串的数值 43 | diff=0; 44 | if(m>n) 45 | diff=m-n+1; 46 | end 47 | m=m-diff; 48 | 49 | qm=dec2bin(e); 50 | len=length(qm); 51 | c=1; 52 | xz=1; 53 | 54 | while(xz<=len) 55 | if(qm(xz)=='1') 56 | c=mod(mod((c^2),n)*m,n); 57 | elseif(qm(xz)=='0') 58 | c=(mod(c^2,n)); 59 | end 60 | xz=xz+1; 61 | end 62 | c1(o)=c; 63 | 64 | qm1=dec2bin(d); 65 | len1=length(qm1); 66 | nm=1; 67 | xy=1; 68 | 69 | while(xy<=len1) 70 | if(qm1(xy)=='1') 71 | nm=mod(mod((nm^2),n)*c,n); 72 | elseif(qm1(xy)=='0') 73 | nm=(mod(nm^2,n)); 74 | end 75 | xy=xy+1; 76 | end 77 | 78 | nm=nm+diff; 79 | nm1(o)=char(nm); 80 | o=o+1; 81 | end 82 | 83 | 84 | 85 | o=1; 86 | fprintf('\n密文C为:\n'); 87 | while(o<=over) 88 | fprintf('\t%d',c1(o)); 89 | o=o+1; 90 | end 91 | % o=1; 92 | % fprintf('\n明文M为: \n'); 93 | % while(o<=over) 94 | % fprintf('\t%d',nm1(o)); 95 | % o=o+1; 96 | % end 97 | 98 | %fprintf('\nThe decrypted message is: '); 99 | %disp(nm1); 100 | 101 | fprintf('\n'); 102 | 103 | Initial_value = sqrt(log(m1+c1)) -------------------------------------------------------------------------------- /RSA/RSA.m: -------------------------------------------------------------------------------- 1 | % RSA加密和解密算法 2 | clear;clc%清除运行空间 3 | disp('RSA algorithm'); 4 | p = prime_produce(10^4);%大素数 最大的数是10000 5 | fprintf('\np=%d',p); 6 | q = prime_produce(10^4);%大素数 7 | fprintf('\nq=%d',q); 8 | n=p*q; %模数n 9 | fprintf('\nn=%d',n); 10 | phi=(p-1)*(q-1);%欧拉函数 11 | fprintf('\nphi(%d) is %d',n,phi); 12 | val=0;%逻辑数组 13 | cd=0;%最大公约数,初值为0 14 | 15 | %为了找到公钥e 16 | while(cd~=1||val==0) 17 | n1=randi(n,1,1);%生成随机数 18 | e=randi([2 n1],1,1); 19 | val=isprime(e);%确定哪些数组元素为质数 20 | cd=gcd(e,phi);%G = gcd(A,B) 返回 A 和 B 的元素的最大公约数 21 | end 22 | 23 | %vall 是否为1 d*e=1mod(phi(n)) 24 | %d 为私钥 25 | val1=0; 26 | d=0; 27 | while(val1~=1) 28 | d=d+1; 29 | val1=mod(d*e,phi); 30 | end 31 | fprintf('\nd=%d',d); 32 | fprintf('\nPublic key is (%d,%d)',e,n); 33 | fprintf('\nPrivate key is (%d,%d)',d,n); 34 | m = [178334,38628,92873897,829809]; 35 | %m = [59806503,2349576,60074184,7488026]; 36 | m1=m; 37 | fprintf('\n'); 38 | disp('输入的明文大数M为: '); 39 | disp(m1); 40 | over=length(m1);%长度 41 | o=1; 42 | while(o<=over) 43 | m=m1(o);%文本字符串的数值 44 | diff=0; 45 | if(m>n) 46 | diff=m-n+1; 47 | end 48 | m=m-diff; 49 | 50 | qm=dec2bin(e); 51 | len=length(qm); 52 | c=1; 53 | xz=1; 54 | 55 | while(xz<=len) 56 | if(qm(xz)=='1') 57 | c=mod(mod((c^2),n)*m,n); 58 | elseif(qm(xz)=='0') 59 | c=(mod(c^2,n)); 60 | end 61 | xz=xz+1; 62 | end 63 | c1(o)=c; 64 | 65 | qm1=dec2bin(d); 66 | len1=length(qm1); 67 | nm=1; 68 | xy=1; 69 | 70 | while(xy<=len1) 71 | if(qm1(xy)=='1') 72 | nm=mod(mod((nm^2),n)*c,n); 73 | elseif(qm1(xy)=='0') 74 | nm=(mod(nm^2,n)); 75 | end 76 | xy=xy+1; 77 | end 78 | 79 | nm=nm+diff; 80 | nm1(o)=char(nm); 81 | o=o+1; 82 | end 83 | 84 | 85 | 86 | o=1; 87 | fprintf('\n密文C为:\n'); 88 | while(o<=over) 89 | fprintf('\t%d',c1(o)); 90 | o=o+1; 91 | end 92 | % o=1; 93 | % fprintf('\n明文M为: \n'); 94 | % while(o<=over) 95 | % fprintf('\t%d',nm1(o)); 96 | % o=o+1; 97 | % end 98 | 99 | %fprintf('\nThe decrypted message is: '); 100 | %disp(nm1); 101 | 102 | fprintf('\n'); 103 | 104 | Initial_value = sqrt(log(m1+c1)) -------------------------------------------------------------------------------- /RSA/RSA_test.m: -------------------------------------------------------------------------------- 1 | % RSA加密和解密算法 2 | clear;clc%清除运行空间 3 | disp('RSA algorithm'); 4 | p = 6899;%prime_produce(10^4);%大素数 5 | fprintf('\np=%d',p); 6 | q = 8329;%prime_produce(10^4);%大素数 7 | fprintf('\nq=%d',q); 8 | n=p*q; %模数n 9 | fprintf('\nn=%d',n); 10 | phi=(p-1)*(q-1);%欧拉函数 11 | fprintf('\nphi(%d) is %d',n,phi); 12 | val=0;%逻辑数组 13 | cd=0;%最大公约数,初值为0 14 | e = 6796771; 15 | d = 30904459; 16 | % %为了找到公钥e 17 | % while(cd~=1||val==0) 18 | % n1=randi(n,1,1);%生成随机数 19 | % e=randi([2 n1],1,1); 20 | % val=isprime(e);%确定哪些数组元素为质数 21 | % cd=gcd(e,phi);%G = gcd(A,B) 返回 A 和 B 的元素的最大公约数 22 | % end 23 | % 24 | % %vall 是否为1 d*e=1mod(phi(n)) 25 | % %d 为私钥 26 | % val1=0; 27 | % d=0; 28 | % while(val1~=1) 29 | % d=d+1; 30 | % val1=mod(d*e,phi); 31 | % end 32 | fprintf('\nd=%d',d); 33 | fprintf('\nPublic key is (%d,%d)',e,n); 34 | fprintf('\nPrivate key is (%d,%d)',d,n); 35 | %m = [2345,3456,4567,5678]; 36 | m = [45817714,24015420,36247848,32235019]; 37 | m1=m; 38 | fprintf('\n'); 39 | disp('输入的明文大数M为: '); 40 | disp(m1); 41 | over=length(m1);%长度 42 | o=1; 43 | while(o<=over) 44 | m=m1(o);%文本字符串的数值 45 | diff=0; 46 | if(m>n) 47 | diff=m-n+1; 48 | end 49 | m=m-diff; 50 | 51 | %qm=dec2bin(e); 52 | qm=dec2bin(d); 53 | len=length(qm); 54 | c=1; 55 | xz=1; 56 | 57 | while(xz<=len) 58 | if(qm(xz)=='1') 59 | c=mod(mod((c^2),n)*m,n); 60 | elseif(qm(xz)=='0') 61 | c=(mod(c^2,n)); 62 | end 63 | xz=xz+1; 64 | end 65 | c1(o)=c; 66 | 67 | %qm1=dec2bin(d); 68 | qm1=dec2bin(e); 69 | len1=length(qm1); 70 | nm=1; 71 | xy=1; 72 | 73 | while(xy<=len1) 74 | if(qm1(xy)=='1') 75 | nm=mod(mod((nm^2),n)*c,n); 76 | elseif(qm1(xy)=='0') 77 | nm=(mod(nm^2,n)); 78 | end 79 | xy=xy+1; 80 | end 81 | 82 | nm=nm+diff; 83 | nm1(o)=char(nm); 84 | o=o+1; 85 | end 86 | 87 | 88 | 89 | o=1; 90 | fprintf('\n密文C为:\n'); 91 | while(o<=over) 92 | fprintf('\t%d',c1(o)); 93 | o=o+1; 94 | end 95 | % o=1; 96 | % fprintf('\n明文M为: \n'); 97 | % while(o<=over) 98 | % fprintf('\t%d',nm1(o)); 99 | % o=o+1; 100 | % end 101 | 102 | %fprintf('\nThe decrypted message is: '); 103 | %disp(nm1); 104 | 105 | fprintf('\n'); -------------------------------------------------------------------------------- /RSA/prime_produce.m: -------------------------------------------------------------------------------- 1 | % 随机产生两个大素数 2 | function num = prime_produce(n) 3 | 4 | num = 0; 5 | val = 0; 6 | while(val == 0) 7 | prime1 = randi([1000 n],1,1); 8 | val=isprime(prime1);%确定哪些数组元素为质数 9 | end 10 | num = prime1; -------------------------------------------------------------------------------- /RSA/rsa_code.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/RSA/rsa_code.m -------------------------------------------------------------------------------- /encryption/BACIExpect.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/BACIExpect.m -------------------------------------------------------------------------------- /encryption/ENTROPYtest.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/ENTROPYtest.m -------------------------------------------------------------------------------- /encryption/GF257Table.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/GF257Table.m -------------------------------------------------------------------------------- /encryption/GF257TableEx.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/GF257TableEx.m -------------------------------------------------------------------------------- /encryption/House.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/House.tiff -------------------------------------------------------------------------------- /encryption/ImCoef.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/ImCoef.m -------------------------------------------------------------------------------- /encryption/ImCoef_test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/ImCoef_test.m -------------------------------------------------------------------------------- /encryption/Lake.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/Lake.tiff -------------------------------------------------------------------------------- /encryption/Lena.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/Lena.bmp -------------------------------------------------------------------------------- /encryption/LookUpGF257.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/LookUpGF257.m -------------------------------------------------------------------------------- /encryption/LookUpGF257Ex.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/LookUpGF257Ex.m -------------------------------------------------------------------------------- /encryption/LookUpGF257Ex2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/LookUpGF257Ex2.m -------------------------------------------------------------------------------- /encryption/Male.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/Male.tiff -------------------------------------------------------------------------------- /encryption/NPCRUACI.m: -------------------------------------------------------------------------------- 1 | function nu = NPCRUACI(P1,P2) 2 | nu = zeros(1,2); 3 | P1 = double(P1);P2 = double(P2);[M,N] = size(P1); 4 | D = (P1~=P2);nu(1) = sum(sum(D))/(M * N) * 100; 5 | fprintf('NPCR = %8.4f% %. ',nu(1)); 6 | nu(2) = sum(sum(abs(P1 - P2)))/(255 * M *N) * 100; 7 | fprintf('UACI = %8.4f% % . \n',nu(2)); 8 | end 9 | -------------------------------------------------------------------------------- /encryption/NPCRUACIBACI.m: -------------------------------------------------------------------------------- 1 | % ����4-20 �Զ��庯��NPCPUACIBACI 2 | function nu = NPCRUACIBACI(P1,P2) 3 | nu = zeros(1,3); 4 | P1 = double(P1);P2 = double(P2);[M,N] = size(P1); 5 | D = (P1 ~= P2);nu(1) = sum(sum(D))/(M * N) * 100; % fprintf('NPCR = %8.4f% %. \n',nu(1)); 6 | nu(2) = sum(sum(abs(P1 - P2)))/(255 * M * N) * 100;% fprintf('UACI = %8.4f% % . \n',nu(2)); 7 | 8 | D = abs(P1 - P2);m = 0; 9 | for i = 1:M - 1 10 | for j = 1:N - 1 11 | d = D(i:i+1,j:j+1); 12 | m = m + (abs(d(1,1)-d(1,2))+abs(d(1,1)-d(2,1))+abs(d(1,1)-d(2,2))+abs(d(1,2)-d(2,1))+abs(d(1,2)-d(2,2))+abs(d(2,1)-d(2,2)))/6/255; 13 | end 14 | end 15 | nu(3) = m/((M - 1) * (N - 1)) * 100;% fprintf('BACI = %8.4f% % . \n',nu(3)); 16 | end 17 | -------------------------------------------------------------------------------- /encryption/Peppers.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/Peppers.tiff -------------------------------------------------------------------------------- /encryption/TpDecrypt.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/TpDecrypt.m -------------------------------------------------------------------------------- /encryption/TpEncrypt.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/TpEncrypt.m -------------------------------------------------------------------------------- /encryption/Tree.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/Tree.tiff -------------------------------------------------------------------------------- /encryption/UACIExpect.m: -------------------------------------------------------------------------------- 1 | function e_uaci = UACIExpect(A) 2 | A = double(A);[M,N] = size(A);tot_n = zeros(1,256);tot_s = 0:255; 3 | for i = 1:M 4 | for j = 1:N 5 | for k = 0:255 %0-- -twice 6 | if k <= A(i,j) 7 | tot_n(k + 1) = tot_n(k + 1) + 1; 8 | end 9 | if k <= 255 - A(i,j) 10 | tot_n(k + 1) = tot_n(k + 1) + 1; 11 | end 12 | end 13 | end 14 | end 15 | tot_n(1) = tot_n(1)/2;e_uaci = sum(tot_s.*tot_n)/sum(tot_n)/255; 16 | fprintf('UACI = %10.4f% % \n',e_uaci * 100); 17 | end 18 | 19 | -------------------------------------------------------------------------------- /encryption/UACIExpect_test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/UACIExpect_test.m -------------------------------------------------------------------------------- /encryption/gray21.512.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/gray21.512.tiff -------------------------------------------------------------------------------- /encryption/hist_test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/hist_test.m -------------------------------------------------------------------------------- /encryption/img_hist.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/img_hist.m -------------------------------------------------------------------------------- /encryption/lena256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/lena256.bmp -------------------------------------------------------------------------------- /encryption/lena512.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/lena512.bmp -------------------------------------------------------------------------------- /encryption/lena512color.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/lena512color.tiff -------------------------------------------------------------------------------- /encryption/noise_attack.m: -------------------------------------------------------------------------------- 1 | % 加密和解密测试 2 | 3 | %噪声攻击测试 4 | 5 | clear;clc;close all; 6 | %K = [4.0349 3.7979 4.2980 3.9282]; %读入混沌系统的初始值 7 | K = [3.5739 3.7979 4.2980 3.9282]; 8 | img = imread('ruler.512.tiff');%读入图像 9 | %img = imread('Baboon.tiff'); 10 | %img = imread('Peppers.tiff'); 11 | %img = imread('boat.tiff'); 12 | %img = imread('Clock.tiff'); 13 | %img = imread('House.tiff'); 14 | %img = imread('Male.tiff'); 15 | %img = imread('Tree.tiff'); 16 | 17 | %P = rgb2gray(img); %彩色图像要转化为灰度图像 18 | %figure(1);imshow(P); 19 | P = img; 20 | 21 | tic;C = TpEncrypt(P,K);toc; 22 | C = uint8(C); 23 | figure(1); 24 | g = imnoise(C,'gaussian',0.01);%添加高斯噪声 25 | g = uint8(g); 26 | imshow(g);%加密计时,显示加了噪声的密文图像 27 | 28 | tic;P1 = TpDecrypt(g,K);toc;figure(2);imshow(P1);%解密计时,显示解密后的明文图像 -------------------------------------------------------------------------------- /encryption/ruler.512.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/encryption/ruler.512.tiff -------------------------------------------------------------------------------- /encryption/variances.m: -------------------------------------------------------------------------------- 1 | %直方图的方差分析 2 | 3 | %图像直方图统计分析 4 | clear;clc;close all; 5 | K = [4.0349 3.7979 4.2980 3.9282]; %读入混沌系统的初始值 6 | K1 = [29.0349 3.7979 4.2980 3.9282]; %读入混沌系统的初始值 7 | 8 | P1 = imread('Lena.bmp');%读入图像 9 | [M,N] = size(P1); 10 | %P1 = rgb2gray(P1); %彩色图像要转化为灰度图像 11 | 12 | C1 = TpEncrypt(P1,K);C2 = TpEncrypt(P1,K1); 13 | [y1,x1] = imhist(P1(:),256); 14 | var(y1(:)) 15 | [y2,x2] = imhist(C1(:),256); 16 | var(y2(:)) 17 | [y3,x3] = imhist(C2(:),256); 18 | %计算方差 19 | var_y = 0; 20 | for i = 1:256 21 | for j = 1:256 22 | var_y = var_y + (y2(i)-y3(j))^2/2; 23 | end 24 | end 25 | format long 26 | var_z = var_y/(256*256)%方差值 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /pictures/5.1.09.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.1.09.tiff -------------------------------------------------------------------------------- /pictures/5.1.10.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.1.10.tiff -------------------------------------------------------------------------------- /pictures/5.1.11.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.1.11.tiff -------------------------------------------------------------------------------- /pictures/5.1.12.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.1.12.tiff -------------------------------------------------------------------------------- /pictures/5.1.13.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.1.13.tiff -------------------------------------------------------------------------------- /pictures/5.1.14.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.1.14.tiff -------------------------------------------------------------------------------- /pictures/5.2.08.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.2.08.tiff -------------------------------------------------------------------------------- /pictures/5.2.09.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.2.09.tiff -------------------------------------------------------------------------------- /pictures/5.3.01.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.3.01.tiff -------------------------------------------------------------------------------- /pictures/5.3.02.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/5.3.02.tiff -------------------------------------------------------------------------------- /pictures/7.1.01.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.01.tiff -------------------------------------------------------------------------------- /pictures/7.1.02.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.02.tiff -------------------------------------------------------------------------------- /pictures/7.1.03.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.03.tiff -------------------------------------------------------------------------------- /pictures/7.1.04.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.04.tiff -------------------------------------------------------------------------------- /pictures/7.1.05.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.05.tiff -------------------------------------------------------------------------------- /pictures/7.1.06.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.06.tiff -------------------------------------------------------------------------------- /pictures/7.1.07.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.07.tiff -------------------------------------------------------------------------------- /pictures/7.1.08.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.08.tiff -------------------------------------------------------------------------------- /pictures/7.1.09.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.09.tiff -------------------------------------------------------------------------------- /pictures/7.1.10.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.1.10.tiff -------------------------------------------------------------------------------- /pictures/7.2.01.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/7.2.01.tiff -------------------------------------------------------------------------------- /pictures/boat.512.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/boat.512.tiff -------------------------------------------------------------------------------- /pictures/gray21.512.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/gray21.512.tiff -------------------------------------------------------------------------------- /pictures/ruler.512.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/pictures/ruler.512.tiff -------------------------------------------------------------------------------- /test_code/Copy_of_ImCoef_test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/Copy_of_ImCoef_test.m -------------------------------------------------------------------------------- /test_code/Copy_of_code4_25.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/Copy_of_code4_25.m -------------------------------------------------------------------------------- /test_code/Copy_of_crypt_test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/Copy_of_crypt_test.m -------------------------------------------------------------------------------- /test_code/code4_14.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_14.m -------------------------------------------------------------------------------- /test_code/code4_16.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_16.m -------------------------------------------------------------------------------- /test_code/code4_18.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_18.m -------------------------------------------------------------------------------- /test_code/code4_19.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_19.m -------------------------------------------------------------------------------- /test_code/code4_21.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_21.m -------------------------------------------------------------------------------- /test_code/code4_22.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_22.m -------------------------------------------------------------------------------- /test_code/code4_23.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_23.m -------------------------------------------------------------------------------- /test_code/code4_24.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_24.m -------------------------------------------------------------------------------- /test_code/code4_25.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/code4_25.m -------------------------------------------------------------------------------- /test_code/crypt_test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/crypt_test.m -------------------------------------------------------------------------------- /test_code/crypt_test_color.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linriguang/An-image-encryption-scheme-based-on-Lorenz-Hyperchaotic-System-and-RSA-algorithm/b546d489365c21d3973de7b5f96a760ab7c0a157/test_code/crypt_test_color.m --------------------------------------------------------------------------------