際際滷

際際滷Share a Scribd company logo
1. Encryption algorithm
Without loss of generality, we assume the plain image is of MN pixels. The detailed
encryption process is described as follows:
Step 1: Iterate Eq. (1) for N0 times to avoid the harmful effect of transitional procedure,
where N0 is a constant. To solve the equation, fourth-order Runge-Kutta method isemployed,
as given by Eq. (2)
( ),
( ) ,
,
dx
y x
dt
dy
x z y
dt
dz
xy z
dt




 


  


 

(1)
1 1 2 3 4
1 1 2 3 4
1 1 2 3 4
( / 6)( 2 2 ),
( / 6)( 2 2 ),
( / 6)( 2 2 ),
n n
n n
n n
x x h K K K K
y y h L L L L
z z h M M M M



    

    
     
(2)
where
1 1
1 1 1
1 1 1
( )
( ) with 1
j n n
j n n n
j n n n
K y x
L x z y j
M x y z



 
  
  
  

   緒

 
1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
[( / 2) ( / 2)]
( / 2)[ ( / 2)] ( / 2) with 2,3
( / 2)( / 2) ( / 2)
j n j n j
j n j n j n j
j n j n j n j
K y hL x hK
L x hK z hM y hL j
M x hK y hL z hM



   
     
     
    

      緒

    
1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
[( ) ( )]
( )[ ( )] ( ) with 4
( )( ) ( )
j n j n j
j n j n j n j
j n j n j n j
K y hL x hK
L x hK z hM y hL j
M x hK y hL z hM



   
     
     
    

      緒

    
and the step h is chosen as 0.0005.
Step 2: The Lorenz system isiterated continuously. For each iteration, we can get three state
valuesand one is selected as quantification of diffusion keystream accordingto
1
1
1
, % 3 0
, % 3 1
, % 3 2
n n
n n n
n n
x for p
r y for p
z for p



緒

 緒
 緒
(3)
where pn-1 is the previously operated plain pixel and % denotes modulo operation. One may
set initial value p0 as a constant.
Step 3: The keystream element isquantified byusingthe following formula
14
mod[ (( ( ) ( ( ))) 10 ), ]n n nk round abs r floor abs r L   , (4)
where abs(x) returns the absolute value of x, floor(x) returns the value of x to the nearest
integers less than or equal to x, round(x) rounds x to the nearest integers, and L is the color
level (for a 256 grey-scale image, L=256). In our scheme, all the state variables are declared as
64-bit double-precision type. According to the IEEE floating-point standard, the
computational precision of the 64-bit double-precision number is about 10-15. Therefore, the
fractional part of a state variable is multiplied by 1014 so as to ensure both the randomness
and accuracyof the quantified keystream.
Step 4: Buffer keystream element kn into a vector k={k1, k2, , kMN} as the diffusion
operation is performed after permutation operation.
Step 5: Let sn and tn denote the remaining two state variables of the Lorenz system. Swap
current pixel with the pixel at position (m, n), where
14
14
mod[ ( 10 ), ],
mod[ ( 10 ), ].
n
n
m floor s M
n floor t N
  器

 器
(5)
Step 6: Return toStep 1 until all the pixelsin the plain image are swapped from left to right,
top to bottom.
Step 7: Modify the pixel values sequentially from left to right, top to bottom, during which
the influence of each individual pixel is spread out over all itssubsequent pixelsin the image.
This is done by usingEq. (6).
1{[ ] mod } ,n n n n nc k p k L c     (6)
where pn, cn and cn-1 are the currently operated pixel, output cipher pixel and previous
ciphered pixel, respectively, and  performsbit-wise exclusiveOR operation. The initial value
c0 may also be set as a constant.
In general, 3-4 rounds of such permutation-diffusion operations are needed to achieve a
satisfactorylevel of security. To accelerate the diffusion process, the shuffled image is diffused
in order from bottom to top, right to left in every other round. With such a mechanism, the
proposed scheme requires only two encryption rounds to achieve a satisfactory level of
security.
2 Decryption algorithm
In general, the decryption procedure is similar to that of the encryption process except that
some steps are followed in a reversed order. However, there are still some slight differences
between the two processes as the permutation table and the diffusion keystream are
generated from Lorenz system simultaneously. Moreover, as the proposed cryptosystem is a
symmetric key cipher, the same secret key (x0, y0, z0) and initial conditions (p0, c0) should be
used for decryption. The detailed decryption process is described as follows:
Steps 1 to 3 are the same as those of the encryption algorithm, except pn-1 denotes the
previouslydeciphered pixel.
Step 4: Buffer (sn , tn) into a M-by-N-by-2 permutation matrix Mp as the decryption is done
in reverse order of encryption.
Step5: Remove the effect of diffusion from the cipher image toobtain an intermediate image,
i.e., the shuffled image. The detailed operations are the same as those described in Step 7 in
encryption, except that the inverse of Eq. (6) is applied, as given by
LkLcckp nnnnn mod][ 1  
. (7)
Step6: Remove the effect of permutation from the shuffled image torecover the plain image.
This isdone byswappingthe pixelsof the shuffled image accordingto the permutation matrix
Mp in reverse order of Step 6 in encryption, i.e., from, bottom to top, right to left. Obviously,
matrix Mp should also be used reversely.
Asboth decipher and encipher procedureshave similar structures, they have essentiallythe
same algorithmiccomplexityand time consumption.
3. Conclusions
This paper has suggested a chaos-based image cipher with improved confusion-diffusion
strategies. To address the security and efficiency problems encountered by many existing
image ciphers, the new scheme utilizes a single chaotic system, Lorenz system, for both
permutation and diffusion. In the permutation stage, we introduce a novel shuffling
mechanism, which shuffles each pixel in the plain image by swapping it with another pixel
chosen bytwoof the three state variablesof Lorenzsystem. The remainingvariable isused for
quantification of pseudorandom keystream for image diffusion. Results of permutation
performance analysis have indicated that the proposed permutation method outperforms
existing methods with respect to either effectiveness or efficiency. Moreover, the selection of
state variablesis controlled byplain pixel. As a result, the quantified keystream is related not
onlyto the keybut also tothe plain image, which enhancesthe securityagainst known/chosen
plaintext attack.

More Related Content

What's hot (20)

Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)
Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)
Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)
Kyuseok Hwang(allosha)
Convolution linear and circular using z transform day 5
Convolution   linear and circular using z transform day 5Convolution   linear and circular using z transform day 5
Convolution linear and circular using z transform day 5
vijayanand Kandaswamy
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
chitra raju
Newton-Raphson Iteration marths 4 ntsm
Newton-Raphson Iteration marths 4 ntsmNewton-Raphson Iteration marths 4 ntsm
Newton-Raphson Iteration marths 4 ntsm
Nemish Bhojani
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Florent Renucci
Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...
Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...
Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...
Hector Zenil
Fractal dimension versus Computational Complexity
Fractal dimension versus Computational ComplexityFractal dimension versus Computational Complexity
Fractal dimension versus Computational Complexity
Hector Zenil
2012 mdsp pr04 monte carlo
2012 mdsp pr04 monte carlo2012 mdsp pr04 monte carlo
2012 mdsp pr04 monte carlo
nozomuhamada
Sys prop
Sys propSys prop
Sys prop
Hoopeer Hoopeer
Hash Function
Hash FunctionHash Function
Hash Function
chauhankapil
Geophysical prospecting
Geophysical prospectingGeophysical prospecting
Geophysical prospecting
Asep Aufha Abah
Viterbi algorithm
Viterbi algorithmViterbi algorithm
Viterbi algorithm
Supongkiba Kichu
Transformasi z
Transformasi zTransformasi z
Transformasi z
schlamhaff
The reversible residual network
The reversible residual networkThe reversible residual network
The reversible residual network
ThyrixYang1
2012mdsp pr08 nonparametric approach
2012mdsp pr08 nonparametric approach2012mdsp pr08 nonparametric approach
2012mdsp pr08 nonparametric approach
nozomuhamada
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Hector Zenil
inverse z-transform ppt
inverse z-transform pptinverse z-transform ppt
inverse z-transform ppt
mihir jain
Inverse z tranform day 3
Inverse z tranform day 3Inverse z tranform day 3
Inverse z tranform day 3
vijayanand Kandaswamy
Cdc18 dg lee
Cdc18 dg leeCdc18 dg lee
Cdc18 dg lee
whatthehellisit
Towards a stable definition of Algorithmic Randomness
Towards a stable definition of Algorithmic RandomnessTowards a stable definition of Algorithmic Randomness
Towards a stable definition of Algorithmic Randomness
Hector Zenil
Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)
Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)
Shaderx5 2.6normalmappingwithoutprecomputedtangents 130318 (1)
Kyuseok Hwang(allosha)
Convolution linear and circular using z transform day 5
Convolution   linear and circular using z transform day 5Convolution   linear and circular using z transform day 5
Convolution linear and circular using z transform day 5
vijayanand Kandaswamy
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
chitra raju
Newton-Raphson Iteration marths 4 ntsm
Newton-Raphson Iteration marths 4 ntsmNewton-Raphson Iteration marths 4 ntsm
Newton-Raphson Iteration marths 4 ntsm
Nemish Bhojani
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Florent Renucci
Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...
Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...
Fractal Dimension of Space-time Diagrams and the Runtime Complexity of Small ...
Hector Zenil
Fractal dimension versus Computational Complexity
Fractal dimension versus Computational ComplexityFractal dimension versus Computational Complexity
Fractal dimension versus Computational Complexity
Hector Zenil
2012 mdsp pr04 monte carlo
2012 mdsp pr04 monte carlo2012 mdsp pr04 monte carlo
2012 mdsp pr04 monte carlo
nozomuhamada
Geophysical prospecting
Geophysical prospectingGeophysical prospecting
Geophysical prospecting
Asep Aufha Abah
Transformasi z
Transformasi zTransformasi z
Transformasi z
schlamhaff
The reversible residual network
The reversible residual networkThe reversible residual network
The reversible residual network
ThyrixYang1
2012mdsp pr08 nonparametric approach
2012mdsp pr08 nonparametric approach2012mdsp pr08 nonparametric approach
2012mdsp pr08 nonparametric approach
nozomuhamada
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...Graph Spectra through Network Complexity Measures: Information Content of Eig...
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Hector Zenil
inverse z-transform ppt
inverse z-transform pptinverse z-transform ppt
inverse z-transform ppt
mihir jain
Towards a stable definition of Algorithmic Randomness
Towards a stable definition of Algorithmic RandomnessTowards a stable definition of Algorithmic Randomness
Towards a stable definition of Algorithmic Randomness
Hector Zenil

Viewers also liked (10)

Umbrella
UmbrellaUmbrella
Umbrella
GlobalSuperElite GlobalSuperElite
Jason Haller Bio (B)
Jason Haller Bio (B)Jason Haller Bio (B)
Jason Haller Bio (B)
Jason Haller
Moe Thu Aung's Resume
Moe Thu Aung's ResumeMoe Thu Aung's Resume
Moe Thu Aung's Resume
Moe Thu Aung
carta de recomendaci坦ncarta de recomendaci坦n
carta de recomendaci坦n
Alexandre Morcillo Lenoble
ucsf news
ucsf newsucsf news
ucsf news
Shaida Zarrinnia
Life line
Life lineLife line
Life line
GlobalSuperElite GlobalSuperElite
Po Po Ygn Resume 2016
Po Po Ygn Resume 2016Po Po Ygn Resume 2016
Po Po Ygn Resume 2016
Po Aung
Resume Kim Shade November 2015 Linked In
Resume Kim Shade  November 2015 Linked InResume Kim Shade  November 2015 Linked In
Resume Kim Shade November 2015 Linked In
Kim Shade
Inflight catering ppt final
Inflight catering ppt finalInflight catering ppt final
Inflight catering ppt final
yusuflokhandwala

Similar to con-dif2 (20)

COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
Lossless image compression via by lifting scheme
Lossless image compression via by lifting schemeLossless image compression via by lifting scheme
Lossless image compression via by lifting scheme
Subhashini Subramanian
Histogram processing
Histogram processingHistogram processing
Histogram processing
Visvesvaraya National Institute of Technology, Nagpur, Maharashtra, India
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
v39i11.pdf
v39i11.pdfv39i11.pdf
v39i11.pdf
Gangula Abhimanyu
Intelligent soft computing based
Intelligent soft computing basedIntelligent soft computing based
Intelligent soft computing based
ijasa
New Chaotic Substation and Permutation Method for Image Encryption
New Chaotic Substation and Permutation Method for Image EncryptionNew Chaotic Substation and Permutation Method for Image Encryption
New Chaotic Substation and Permutation Method for Image Encryption
tayseer Karam alshekly
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALSBLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
IJNSA Journal
A New Key Stream Generator Based on 3D Henon map and 3D Cat map
A New Key Stream Generator Based on 3D Henon map and 3D Cat mapA New Key Stream Generator Based on 3D Henon map and 3D Cat map
A New Key Stream Generator Based on 3D Henon map and 3D Cat map
tayseer Karam alshekly
Image encryption using chaotic sequence and its cryptanalysis
Image encryption using chaotic sequence and its cryptanalysisImage encryption using chaotic sequence and its cryptanalysis
Image encryption using chaotic sequence and its cryptanalysis
IOSR Journals
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
Chaos Image Encryption using Pixel shuffling
Chaos Image Encryption using Pixel shuffling Chaos Image Encryption using Pixel shuffling
Chaos Image Encryption using Pixel shuffling
cscpconf
Journal_IJABME
Journal_IJABMEJournal_IJABME
Journal_IJABME
Sarun Maksuanpan
Decimation and Interpolation
Decimation and InterpolationDecimation and Interpolation
Decimation and Interpolation
Fernando Ojeda
ch-2.2 histogram image processing .pptx
ch-2.2 histogram  image processing .pptxch-2.2 histogram  image processing .pptx
ch-2.2 histogram image processing .pptx
satyanarayana242612
Lecture 4: Classification of system
Lecture 4: Classification of system Lecture 4: Classification of system
Lecture 4: Classification of system
Jawaher Abdulwahab Fadhil
Experimental realisation of Shor's quantum factoring algorithm using qubit r...
 Experimental realisation of Shor's quantum factoring algorithm using qubit r... Experimental realisation of Shor's quantum factoring algorithm using qubit r...
Experimental realisation of Shor's quantum factoring algorithm using qubit r...
XequeMateShannon
Text encryption
Text encryptionText encryption
Text encryption
tayseer Karam alshekly
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
Lossless image compression via by lifting scheme
Lossless image compression via by lifting schemeLossless image compression via by lifting scheme
Lossless image compression via by lifting scheme
Subhashini Subramanian
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMSCOLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
COLOR IMAGE ENCRYPTION BASED ON MULTIPLE CHAOTIC SYSTEMS
IJNSA Journal
Intelligent soft computing based
Intelligent soft computing basedIntelligent soft computing based
Intelligent soft computing based
ijasa
New Chaotic Substation and Permutation Method for Image Encryption
New Chaotic Substation and Permutation Method for Image EncryptionNew Chaotic Substation and Permutation Method for Image Encryption
New Chaotic Substation and Permutation Method for Image Encryption
tayseer Karam alshekly
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALSBLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
IJNSA Journal
A New Key Stream Generator Based on 3D Henon map and 3D Cat map
A New Key Stream Generator Based on 3D Henon map and 3D Cat mapA New Key Stream Generator Based on 3D Henon map and 3D Cat map
A New Key Stream Generator Based on 3D Henon map and 3D Cat map
tayseer Karam alshekly
Image encryption using chaotic sequence and its cryptanalysis
Image encryption using chaotic sequence and its cryptanalysisImage encryption using chaotic sequence and its cryptanalysis
Image encryption using chaotic sequence and its cryptanalysis
IOSR Journals
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
Chaos Image Encryption using Pixel shuffling
Chaos Image Encryption using Pixel shuffling Chaos Image Encryption using Pixel shuffling
Chaos Image Encryption using Pixel shuffling
cscpconf
Decimation and Interpolation
Decimation and InterpolationDecimation and Interpolation
Decimation and Interpolation
Fernando Ojeda
ch-2.2 histogram image processing .pptx
ch-2.2 histogram  image processing .pptxch-2.2 histogram  image processing .pptx
ch-2.2 histogram image processing .pptx
satyanarayana242612
Experimental realisation of Shor's quantum factoring algorithm using qubit r...
 Experimental realisation of Shor's quantum factoring algorithm using qubit r... Experimental realisation of Shor's quantum factoring algorithm using qubit r...
Experimental realisation of Shor's quantum factoring algorithm using qubit r...
XequeMateShannon

con-dif2

  • 1. 1. Encryption algorithm Without loss of generality, we assume the plain image is of MN pixels. The detailed encryption process is described as follows: Step 1: Iterate Eq. (1) for N0 times to avoid the harmful effect of transitional procedure, where N0 is a constant. To solve the equation, fourth-order Runge-Kutta method isemployed, as given by Eq. (2) ( ), ( ) , , dx y x dt dy x z y dt dz xy z dt (1) 1 1 2 3 4 1 1 2 3 4 1 1 2 3 4 ( / 6)( 2 2 ), ( / 6)( 2 2 ), ( / 6)( 2 2 ), n n n n n n x x h K K K K y y h L L L L z z h M M M M (2) where 1 1 1 1 1 1 1 1 ( ) ( ) with 1 j n n j n n n j n n n K y x L x z y j M x y z 緒 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [( / 2) ( / 2)] ( / 2)[ ( / 2)] ( / 2) with 2,3 ( / 2)( / 2) ( / 2) j n j n j j n j n j n j j n j n j n j K y hL x hK L x hK z hM y hL j M x hK y hL z hM 緒 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [( ) ( )] ( )[ ( )] ( ) with 4 ( )( ) ( ) j n j n j j n j n j n j j n j n j n j K y hL x hK L x hK z hM y hL j M x hK y hL z hM 緒 and the step h is chosen as 0.0005. Step 2: The Lorenz system isiterated continuously. For each iteration, we can get three state valuesand one is selected as quantification of diffusion keystream accordingto 1 1 1 , % 3 0 , % 3 1 , % 3 2 n n n n n n n x for p r y for p z for p 緒 緒 緒 (3) where pn-1 is the previously operated plain pixel and % denotes modulo operation. One may set initial value p0 as a constant. Step 3: The keystream element isquantified byusingthe following formula 14 mod[ (( ( ) ( ( ))) 10 ), ]n n nk round abs r floor abs r L , (4)
  • 2. where abs(x) returns the absolute value of x, floor(x) returns the value of x to the nearest integers less than or equal to x, round(x) rounds x to the nearest integers, and L is the color level (for a 256 grey-scale image, L=256). In our scheme, all the state variables are declared as 64-bit double-precision type. According to the IEEE floating-point standard, the computational precision of the 64-bit double-precision number is about 10-15. Therefore, the fractional part of a state variable is multiplied by 1014 so as to ensure both the randomness and accuracyof the quantified keystream. Step 4: Buffer keystream element kn into a vector k={k1, k2, , kMN} as the diffusion operation is performed after permutation operation. Step 5: Let sn and tn denote the remaining two state variables of the Lorenz system. Swap current pixel with the pixel at position (m, n), where 14 14 mod[ ( 10 ), ], mod[ ( 10 ), ]. n n m floor s M n floor t N 器 器 (5) Step 6: Return toStep 1 until all the pixelsin the plain image are swapped from left to right, top to bottom. Step 7: Modify the pixel values sequentially from left to right, top to bottom, during which the influence of each individual pixel is spread out over all itssubsequent pixelsin the image. This is done by usingEq. (6). 1{[ ] mod } ,n n n n nc k p k L c (6) where pn, cn and cn-1 are the currently operated pixel, output cipher pixel and previous ciphered pixel, respectively, and performsbit-wise exclusiveOR operation. The initial value c0 may also be set as a constant. In general, 3-4 rounds of such permutation-diffusion operations are needed to achieve a satisfactorylevel of security. To accelerate the diffusion process, the shuffled image is diffused in order from bottom to top, right to left in every other round. With such a mechanism, the proposed scheme requires only two encryption rounds to achieve a satisfactory level of security. 2 Decryption algorithm In general, the decryption procedure is similar to that of the encryption process except that some steps are followed in a reversed order. However, there are still some slight differences between the two processes as the permutation table and the diffusion keystream are generated from Lorenz system simultaneously. Moreover, as the proposed cryptosystem is a symmetric key cipher, the same secret key (x0, y0, z0) and initial conditions (p0, c0) should be used for decryption. The detailed decryption process is described as follows: Steps 1 to 3 are the same as those of the encryption algorithm, except pn-1 denotes the previouslydeciphered pixel. Step 4: Buffer (sn , tn) into a M-by-N-by-2 permutation matrix Mp as the decryption is done in reverse order of encryption.
  • 3. Step5: Remove the effect of diffusion from the cipher image toobtain an intermediate image, i.e., the shuffled image. The detailed operations are the same as those described in Step 7 in encryption, except that the inverse of Eq. (6) is applied, as given by LkLcckp nnnnn mod][ 1 . (7) Step6: Remove the effect of permutation from the shuffled image torecover the plain image. This isdone byswappingthe pixelsof the shuffled image accordingto the permutation matrix Mp in reverse order of Step 6 in encryption, i.e., from, bottom to top, right to left. Obviously, matrix Mp should also be used reversely. Asboth decipher and encipher procedureshave similar structures, they have essentiallythe same algorithmiccomplexityand time consumption. 3. Conclusions This paper has suggested a chaos-based image cipher with improved confusion-diffusion strategies. To address the security and efficiency problems encountered by many existing image ciphers, the new scheme utilizes a single chaotic system, Lorenz system, for both permutation and diffusion. In the permutation stage, we introduce a novel shuffling mechanism, which shuffles each pixel in the plain image by swapping it with another pixel chosen bytwoof the three state variablesof Lorenzsystem. The remainingvariable isused for quantification of pseudorandom keystream for image diffusion. Results of permutation performance analysis have indicated that the proposed permutation method outperforms existing methods with respect to either effectiveness or efficiency. Moreover, the selection of state variablesis controlled byplain pixel. As a result, the quantified keystream is related not onlyto the keybut also tothe plain image, which enhancesthe securityagainst known/chosen plaintext attack.