Research Article
A Chaos Robustness Criterion for 2D Piecewise Smooth Map with Applications in Pseudorandom Number Generator and Image Encryption with Avalanche Effect
N=20000; | K=randi([0 254],1,255); | S=[0:255-1];j=0; | for i=1:255 | j=mod(j+S(i)+K(i),255); | Sk=S(j+1); | S(j+1)=S(i); | S(i)=Sk; | end | C=zeros(1,N); j=0;i=0; k=1; | for l=1:N/8 | i=mod(i+1,255); | j=mod(j+S(i+1),255); | Sk=S(j+1); | S(j+1)=S(i+1); | S(i+1)=Sk; | C(l)=S(mod(S(j+1)+S(i+1),255)+1); | end | C=(dec2bin(C))’; | C=C(:); | C=bin2dec(C); |
|