CN112001834A - Image encryption method and system based on pulse differential equation chaotic system - Google Patents

Image encryption method and system based on pulse differential equation chaotic system Download PDF

Info

Publication number
CN112001834A
CN112001834A CN202010855021.7A CN202010855021A CN112001834A CN 112001834 A CN112001834 A CN 112001834A CN 202010855021 A CN202010855021 A CN 202010855021A CN 112001834 A CN112001834 A CN 112001834A
Authority
CN
China
Prior art keywords
image pixel
pulse
pixel matrix
sum
subsequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010855021.7A
Other languages
Chinese (zh)
Inventor
严平
郭俊荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang A&F University ZAFU
Original Assignee
Zhejiang A&F University ZAFU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang A&F University ZAFU filed Critical Zhejiang A&F University ZAFU
Priority to CN202010855021.7A priority Critical patent/CN112001834A/en
Publication of CN112001834A publication Critical patent/CN112001834A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/12Simultaneous equations, e.g. systems of linear equations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/13Differential equations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/08Computing arrangements based on specific mathematical models using chaos models or non-linear system models

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Operations Research (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Nonlinear Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention relates to an image encryption method and system based on a pulse differential equation chaotic system, wherein the pulse differential equation chaotic system is constructed and solved to obtain a pulse chaotic sequence, then an M N two-dimensional random matrix and an M N image pixel matrix are constructed, the image pixel matrix is scrambled, the scrambled image pixel matrix and the two-dimensional random matrix are blocked, then two subsequences in the pulse chaotic sequence are selected to respectively determine the coding rules of the image pixel matrix block and the two-dimensional random matrix block for DNA coding, and then one subsequence in the pulse chaotic sequence is used to determine the operation rules between the coded image pixel matrix block and the coded two-dimensional random matrix block for DNA operation; then determining the decoding rule of each matrix block after DNA operation by using a subsequence in the pulse chaotic sequence to perform DNA decoding; and finally, combining the decoded matrix blocks, and then carrying out scrambling replacement on the matrix value to obtain the final encrypted image.

Description

Image encryption method and system based on pulse differential equation chaotic system
Technical Field
The invention relates to the technical field of image information encryption and information communication safety, in particular to an image encryption method and system based on a pulse differential equation chaotic system.
Background
With the development of internet technology and the commercialization of 5G networks, more and more people transmit information, especially image information, on the internet, how to encrypt the image information, and the security of protecting the image information is more and more emphasized. Although many image encryption algorithms are available, there are many problems, such as: some algorithms have high encryption speed and high stability, but the algorithms are easy to crack or have a security mechanism of a symmetric key and the like. The traditional image encryption algorithm is mostly based on improved algorithms such as Logistic mapping or fractional order chaotic system, the image encryption algorithm combining the chaotic system and DNA is one of the research hotspots which are very concerned in recent years, while the traditional algorithm utilizes DNA coding encryption, the traditional algorithm is generally static, the relevance between a coding value and the information of an image is not large, the randomness and the dynamic behavior of different chaotic systems are different, some chaotic systems have more special dynamic behavior, and the security of the encryption algorithm based on different chaotic systems is different, therefore, how to put forward the safer image encryption algorithm based on the chaotic system and the DNA coding needs to invest more researches, so the technical level of image encryption can be improved.
The invention provides a novel image encryption algorithm based on a pulse differential equation chaotic system, aiming at the problems that the chaotic functions used by the conventional image encryption algorithm are both continuous chaotic systems or discrete iterative mapping.
Disclosure of Invention
The invention aims to provide an image encryption method and system based on a pulse differential equation chaotic system, which overcome the problem of low security of the traditional image encryption algorithm, greatly improve the security of the image encryption method and improve the technical level of image encryption.
In order to achieve the purpose, the invention provides the following scheme:
an image encryption method based on a pulse differential equation chaotic system comprises a preprocessing stage and an image encryption processing stage before image encryption processing:
the preprocessing stage before the image encryption processing comprises:
s11: constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence;
s12: generating a random sequence by using Logistic mapping iteration, and constructing an M x N two-dimensional random matrix based on the random sequence;
the image encryption processing stage comprises:
s21: reading pixel information of an image to be encrypted to construct an M x N image pixel matrix, and scrambling the image pixel matrix by using a Henon algorithm to obtain a displaced image pixel matrix;
s22: partitioning the scrambled image pixel matrix and the two-dimensional random matrix according to rows to obtain an image pixel matrix partition and a two-dimensional random matrix partition respectively;
s23: selecting a first subsequence and a second subsequence of the pulse chaotic sequence to respectively determine coding schemes of the image pixel matrix block and the two-dimensional random matrix block, and performing DNA coding on pixel values in the image pixel matrix block and matrix values in the two-dimensional random matrix block to obtain a coded image pixel matrix block and a coded two-dimensional random matrix block;
s24: selecting a third subsequence of the pulse chaotic sequence to determine an operation rule between the coded image pixel matrix block and the coded two-dimensional random matrix block, and performing DNA operation to obtain a diffusion-replaced image pixel matrix block;
s25: selecting a fourth subsequence of the pulse chaotic sequence to determine a decoding scheme of the image pixel matrix block after the diffusion replacement, and performing DNA decoding on pixel values in the image pixel matrix block after the diffusion replacement to obtain a decoded image pixel matrix block;
s26: and partitioning and combining each decoded image pixel matrix to obtain a combined image pixel matrix C, and then carrying out scrambling replacement operation on the combined image pixel matrix C to obtain a final encrypted image.
Optionally, the constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence specifically include:
the constructed pulse differential equation chaotic system comprises:
Figure BDA0002646115530000031
wherein, x (t), y1(t),y2(t),z1(t),z2(t) is the state variable of the chaotic system, r, k, alpha, beta, gamma, b1,d1,d2,d3,d4,,m1Is a control parameter of the chaotic system, mu1Is the pulse variable, and T is the pulse period.
Solving a pulse chaotic sequence based on the pulse differential equation chaotic system specifically comprises the following steps:
1) inputting a pulse differential equation and all state variables and control parameters thereof, dividing f +1 pulse moments into f pulse intervals in a pulse period T, and recording the f +1 pulse moments as tau0,τ1,τ2,...,τf(ii) a At the initial pulse time tau0Assigning initial values to all state variables;
x(0)=sum(sum(bitand(I,3)))/(3*SUM);
y1(0)=sum(sum(bitand(I,12)/4))/(3*SUM);
y2(0)=sum(sum(bitand(I,48)/16))/(3*SUM);
z1(0)=sum(sum(bitand(I,192)/64))/(3*SUM);
z2(0)=sum(sum(bitand(I,768)/256))/(3*SUM);
s11=(sum(sum(I)))/(2*sum(sum(I))+(1/sum(sum(I))));
μ1=μ1(0)*10+s11;
where sum () represents a summing function; bitand () represents the result of returning two numeric values after bitwise AND operation; SUM represents a pixel value of an image to be encrypted; s11 is an auxiliary parameter; i is the image pixel matrix;
2) invoking Runge-Kutta algorithm to solve (tau)0,τ1) A numerical solution of the pulse differential function within the pulse interval; when the solving time reaches the next pulse time, assigning the pulse differential function value of the pulse time as a pulse variable value, and assigning all state variables;
3) calculating the numerical solution of the pulse differential function of all pulse intervals according to the step 2);
4) until the pulse time tau is detectedfSo far, the numerical solution of the function in all the pulse intervals is output,
x(n)=(x(1),x(2),...,x(f))
y1(n)=(y1(1),y1(2),...,y1(f))
y2(n)=(y2(1),y2(2),...,y2(f))
z1(n)=(z1(1),z1(2),...,z1(f))
z2(n)=(z2(1),z2(2),...,z2(f))
wherein x (n) is the first subsequence of the pulse differential chaotic series, y1(n) is a second subsequence of said series of differential chaos of pulses, y2(n) is a third subsequence of said series of differential chaos of pulses, z1(n) is a fourth subsequence of said series of differential chaos of pulses, z2(n) is a fifth subsequence of the pulse differential chaotic series.
Optionally, the reading of the pixel information of the image to be encrypted constructs an M × N image pixel matrix, and the scrambling of the image pixel matrix is performed by using a Henon algorithm to obtain a replaced image pixel matrix, which specifically includes:
the Henon mapping expression adopted by the scrambling operation is as follows:
Figure BDA0002646115530000041
wherein a and b are control parameters, a is 1.4, b is 0.3, xm,ymState variables mapped for Henon;
generating random sequences marked as sx and sy by utilizing the Henon mapping iteration;
arranging sx and sy from small to large, and utilizing corresponding position matrix LxyRecording the position of the sequenced sequence;
according to the position matrix LxyThe index sequence rearranges the pixel positions of the image pixel matrix to obtain the scrambled image pixel matrix.
Optionally, the selecting a first subsequence and a second subsequence of the pulse chaotic sequence to respectively determine a coding scheme of the image pixel matrix partition and the two-dimensional random matrix partition, and performing DNA coding on pixel values in the image pixel matrix partition and matrix values in the two-dimensional random matrix partition to obtain a coded image pixel matrix partition and a coded two-dimensional random matrix partition specifically include:
obtaining 8 coding schemes, namely a coding scheme 1, a coding scheme 2 and a coding scheme 8, according to a DNA coding rule table;
normalizing the sequence values of the first subsequence and the second subsequence of the pulse chaotic sequence to be 0-7 to obtain a normalized first subsequence and a normalized second subsequence; and the values 0-7 correspond to coding schemes 1-8 in sequence;
normalizing the pixel value of each image pixel matrix block and the matrix value of each two-dimensional random matrix block to 0-3 to obtain a normalized image pixel matrix block and a normalized two-dimensional random matrix block;
each sequence value of the normalized first subsequence corresponds to each normalized image pixel matrix block one by one; each sequence value of the normalized second subsequence corresponds to each normalized two-dimensional random matrix block one to one;
determining the normalized image pixel matrix block coding scheme corresponding to each sequence value of the normalized first subsequence, and then performing DNA coding according to the pixel value size in the normalized image pixel matrix block to obtain a coded image pixel matrix block;
and determining a coding scheme of the normalized two-dimensional random matrix block corresponding to each sequence value of the normalized second subsequence, and performing DNA coding according to the matrix value in the normalized two-dimensional random matrix block to obtain the coded two-dimensional random matrix block.
Optionally, the selecting the third subsequence of the pulse chaotic sequence determines an operation rule between the encoded image pixel matrix partition and the encoded two-dimensional random matrix partition, and performs DNA operation to obtain the diffusion-replaced image pixel matrix partition, which specifically includes:
1) normalizing the sequence value of the third subsequence of the pulse chaotic sequence to 0-2 to obtain a normalized third subsequence;
2) determining an operation rule between the encoded image pixel matrix block and the encoded two-dimensional random matrix block according to the sequence value of the normalized third subsequence, and performing DNA operation once to obtain an image pixel matrix block Bg
3) Determining image pixel matrix block B by using the sequence value of the normalized third subsequenceg+1And image pixel matrix block BgPerforming DNA operation again to obtain the image pixel matrix block after the diffusion replacement; wherein g is the serial number of the pixel matrix block.
Optionally, the determining, according to the sequence value of the normalized third subsequence, an operation rule between the encoded image pixel matrix partition and the encoded two-dimensional random matrix partition specifically includes:
when the sequence value of the normalized third subsequence is 0, the image pixel matrix block B is between the encoded image pixel matrix block and the encoded two-dimensional random matrix block corresponding to the encoded image pixel matrix blockg+1And said image pixel matrix block BgThe 'addition' operation in the encryption operation rule table is carried out;
when the sequence value of the normalized third subsequence is 1, the image pixel matrix block B is between the encoded image pixel matrix block and the encoded two-dimensional random matrix block corresponding to the encoded image pixel matrix blockg+1And said image pixel matrix block BgPerforming subtraction operation in the encryption operation rule table;
when the sequence value of the normalized third subsequence is 2, the image pixel matrix block B is between the encoded image pixel matrix block and the encoded two-dimensional random matrix block corresponding to the encoded image pixel matrix blockg+1And said image pixel matrix block BgThe exclusive or operation in the encryption operation rule table is performed.
Optionally, the selecting a fourth subsequence of the pulse chaotic sequence to determine a decoding scheme of the diffusion-replaced image pixel matrix block, and performing DNA decoding on pixel values in the diffusion-replaced image pixel matrix block to obtain a decoded image pixel matrix block specifically includes:
obtaining 8 decoding schemes according to the DNA decoding rule table, wherein the decoding schemes are recorded as a decoding scheme 1, a decoding scheme 2 and a decoding scheme 8;
normalizing the sequence value of the fourth subsequence of the pulse chaotic sequence to 0-7 to obtain a normalized fourth subsequence; and values 0-7 correspond to decoding schemes 1-8;
each sequence value in the normalized fourth subsequence corresponds to each diffusion-replaced image pixel matrix block one by one;
and determining a decoding scheme of the image pixel matrix block after the diffusion replacement corresponding to the value of the normalized fourth subsequence for DNA decoding.
Optionally, the blocking and merging each decoded image pixel matrix to obtain a merged image pixel matrix C, and performing scrambling replacement operation on the merged image pixel matrix C to obtain a final encrypted image, specifically including:
1) using a logistic chaotic system
xq+1=μxq(1-xq)
Where μ ∈ (0,4), x0E (0,1), and q e is an integer;
respectively carrying out chaos iteration once to obtain two state values x1And x2
2) Scanning the elements of the merged image pixel matrix C line by line, specifically including the steps of:
a1, selecting one row of elements of the combined image pixel matrix C for scanning, and enabling x to be xi0=x1
(a) If j<i, let j equal i, for x1Taking the residue to obtain k1,k2(ii) a Wherein i is a row number of a pixel in the merged image pixel matrix C, and j is a column number of the merged image pixel matrix C;
(b) if j is equal to i, then pair C (i,: and k)1Carrying out XOR operation;
(c) if j>i, then pairs C (i,: and k)1Carrying out XOR operation; to C (j, k) and k2Carrying out XOR operation; then exchanging C (i,: and C (j,: respectively);
wherein x isi0Representing x when elements of said merged image pixel matrix C are scanned line by line0(ii) a C (i): represents the ith row element of the merged image pixel matrix C; c (j,: indicates the jth row element of the merged image pixel matrix C;
a2, update xi0After updating xi0Is equal to x before updatei0Adding s ', s ' ═ sum (C (i))/1000, scanning the next row of matrix elements, repeating the operations (a) to (C) until all the row elements of the matrix are traversed, and obtaining a progressive image pixel matrix C ';
3) -scanning the elements of said image pixel matrix C column by column:
b1, selecting a row of elements of the image pixel matrix C' to scan, let xj0=x2
(d) If j<i, let j equal i, for x2Taking the residue to obtain k1′,k2′;
(e) If j ═ i, then pair C' (: j) and k1' performing an exclusive or operation;
(f) if j>i, then pair C' (: j) and k1' performing an exclusive or operation; for C' (: i) and k2' performing an exclusive or operation; then C '(: j) and C' (: i) are exchanged;
wherein x isj0Representing x when scanning the elements of said merged image pixel matrix C' column by column0(ii) a C '(: j) represents the jth column element of the image pixel matrix C'; c '(: i) denotes the ith column element of the image pixel matrix C';
b2, update xj0After updating xj0Is equal to x before updatej0Adding s ', s' ═ sum (C (i))/1000, scanning the next column of matrix elements, repeating the operations (d) to (f) until all the columns of the matrix are traversed;
4) and obtaining the encrypted image after scrambling and replacing, and obtaining the final ciphertext image.
The invention also provides an image encryption system based on the pulse differential equation chaotic system, which comprises a preprocessing module and an image encryption processing module before image encryption processing:
the preprocessing module before the image encryption processing comprises:
a pulse chaotic sequence acquisition unit: the method is used for constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence;
a two-dimensional random matrix construction unit: the method comprises the steps of iteratively generating a random sequence by using Logistic mapping, and constructing a two-dimensional random matrix of M x N based on the random sequence;
the image encryption processing module comprises:
scrambling and blocking unit: the image encryption method comprises the steps of reading pixel information of an image to be encrypted to construct an M x N image pixel matrix, and scrambling the image pixel matrix by using a Henon algorithm to obtain a displaced image pixel matrix; partitioning the scrambled image pixel matrix and the two-dimensional random matrix according to rows to obtain an image pixel matrix partition and a two-dimensional random matrix partition respectively;
DNA coding Unit: the encoding scheme is used for selecting a first subsequence and a second subsequence of the pulse chaotic sequence to respectively determine the image pixel matrix block and the two-dimensional random matrix block, and performing DNA encoding on pixel values in the image pixel matrix block and matrix values in the two-dimensional random matrix block to obtain an encoded image pixel matrix block and an encoded two-dimensional random matrix block;
a DNA arithmetic unit: the third subsequence used for selecting the pulse chaotic sequence is used for determining an operation rule between the coded image pixel matrix block and the coded two-dimensional random matrix block, and performing DNA operation to obtain a pixel matrix block after diffusion replacement;
a DNA decoding unit: selecting a fourth subsequence of the pulse chaotic sequence to determine a decoding scheme of the pixel matrix block after the diffusion replacement, and performing DNA decoding on pixel values in the pixel matrix block after the diffusion replacement to obtain a decoded pixel matrix block;
scrambling replacement unit: the encryption device is used for combining the decoded pixel matrixes in blocks to obtain a combined image pixel matrix C, and then carrying out scrambling replacement operation on the combined image pixel matrix C to obtain a final encrypted image.
Optionally, the pulse chaotic sequence obtaining unit: the method is used for constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence, and specifically comprises the following steps:
the constructed pulse differential equation chaotic system comprises:
Figure BDA0002646115530000091
wherein, x (t), y1(t),y2(t),z1(t),z2(t) is the state variable of the chaotic system, r, k, alpha, beta, gamma, b1,d1,d2,d3,d4,,m1Is a control parameter of the chaotic system, mu1Is the pulse variable, and T is the pulse period.
Solving a pulse chaotic sequence based on the pulse differential equation chaotic system specifically comprises the following steps:
1) inputting a pulse differential equation and all state variables and control parameters thereof, dividing f +1 pulse moments into f pulse intervals in a pulse period T, and recording the f +1 pulse moments as tau0,τ1,τ2,...,τf(ii) a At the initial pulse time tau0Assigning initial values to all state variables;
x(0)=sum(sum(bitand(I,3)))/(3*SUM);
y1(0)=sum(sum(bitand(I,12)/4))/(3*SUM);
y2(0)=sum(sum(bitand(I,48)/16))/(3*SUM);
z1(0)=sum(sum(bitand(I,192)/64))/(3*SUM);
z2(0)=sum(sum(bitand(I,768)/256))/(3*SUM);
s11=(sum(sum(I)))/(2*sum(sum(I))+(1/sum(sum(I))));
μ1=μ1(0)*10+s11;
where sum () represents a summing function; bitand () represents the result of returning two numeric values after bitwise AND operation; SUM represents a pixel value of an image to be encrypted; s11 is an auxiliary parameter; i is the image pixel matrix;
2) invoking Runge-Kutta algorithm to solve (tau)0,τ1) A numerical solution of the pulse differential function within the pulse interval; when the solving time reaches the next pulse time, assigning the pulse differential function value of the pulse time as a pulse variable value, and assigning all state variables;
3) calculating the numerical solution of the pulse differential function of all pulse intervals according to the step 2);
4) until the pulse time tau is detectedfSo far, the numerical solution of the function in all the pulse intervals is output,
x(n)=(x(1),x(2),...,x(f))
y1(n)=(y1(1),y1(2),...,y1(f))
y2(n)=(y2(1),y2(2),...,y2(f))
z1(n)=(z1(1),z1(2),...,z1(f))
z2(n)=(z2(1),z2(2),...,z2(f))
wherein x (n) is the first subsequence of the pulse differential chaotic series, y1(n) is a second subsequence of said series of differential chaos of pulses, y2(n) is a third subsequence of said series of differential chaos of pulses, z1(n) is a fourth subsequence of said series of differential chaos of pulses, z2(n) is a fifth subsequence of the pulse differential chaotic series.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention provides an image encryption method and system based on a pulse differential equation chaotic system, which comprises the steps of firstly constructing the pulse differential equation chaotic system and solving to obtain a pulse chaotic sequence, then constructing an M x N two-dimensional random matrix, obtaining an M x N image pixel matrix based on pixel information of an image to be encrypted, scrambling the image pixel matrix, blocking the scrambled image pixel matrix and the two-dimensional random matrix, then selecting two subsequences in the pulse chaotic sequence to respectively determine coding rules of image pixel matrix blocks and two-dimensional random matrix blocks for DNA coding, and then determining a calculation rule between the coded image pixel matrix blocks and the coded two-dimensional random matrix blocks by utilizing one subsequence in the pulse chaotic sequence to perform DNA calculation; then determining the decoding rule of each matrix block after DNA operation by using a subsequence in the pulse chaotic sequence to perform DNA decoding; and finally, combining the decoded matrix blocks, and then carrying out scrambling replacement on the matrix value to obtain the final encrypted image.
The pulse differential equation chaotic system does not belong to a continuous chaotic system or discrete iterative mapping, but has the characteristics of the continuous system and the discrete system, has the property of exceeding the range of the continuous system and the discrete system, and has complex dynamic behaviors including quasi-periodic oscillation, multiple periodic branches, half-period branches, periodic windows, chaos and the like under a special value-taking condition, so that the encryption safety can be greatly improved when the pulse differential equation chaotic system is used for image encryption. Therefore, the pulse differential equation is used for obtaining the pulse chaotic sequence, and the DNA coding rule, the DNA operation rule and the DNA decoding rule are dynamically determined based on the pulse chaotic sequence.
In addition, in the image encryption process, various chaotic systems are utilized, and the safety of image encryption is greatly improved by the combined application of the chaotic systems.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of an image encryption method in embodiment 1 of the present invention;
FIG. 2 is a flowchart of the solution of the pulse chaotic sequence in embodiment 1 of the present invention;
FIG. 3 is a bifurcation diagram of the three-dimensional pulse differential equation with respect to a parameter T in embodiment 1 of the present invention;
FIG. 4 is a graph showing the three-dimensional pulse differential equation with respect to the parameter μ in embodiment 1 of the present invention1A bifurcation diagram of (1);
FIG. 5 is a Henon-scrambled image according to example 1 of the present invention;
FIG. 6 is a plain text image in embodiment 1 of the present invention;
fig. 7 is a ciphertext image of embodiment 1 of the present invention;
fig. 8 is a configuration diagram of an image encryption system in embodiment 2 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide an image encryption method and system based on a pulse differential equation chaotic system, which overcome the problem of low security of the traditional image encryption algorithm, greatly improve the security of the image encryption method and improve the technical level of image encryption.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Example 1
As shown in fig. 1, the present embodiment provides an image encryption method based on a pulse differential equation chaotic system, which includes a preprocessing stage and an image encryption processing stage before image encryption processing:
the preprocessing stage before the image encryption processing comprises:
s11: constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence;
the constructed pulse differential equation chaotic system can comprise a five-dimensional pulse differential equation:
Figure BDA0002646115530000131
wherein, x (t), y1(t),y2(t),z1(t),z2(t) is the state variable of the chaotic system, r, k, alpha, beta, gamma, b1,d1,d2,d3,d4,,m1Is a control parameter of the chaotic system,μ1is the pulse variable, and T is the pulse period.
As shown in fig. 2, solving the pulse chaotic sequence based on the pulse differential equation chaotic system specifically includes:
1) inputting a pulse differential equation and all state variables and control parameters thereof, dividing f +1 pulse moments into f pulse intervals in a pulse period T, and recording the f +1 pulse moments as tau0,τ1,τ2,...,τf(ii) a At the initial pulse time tau0Assigning initial values to all state variables;
x(0)=sum(sum(bitand(I,3)))/(3*SUM);
y1(0)=sum(sum(bitand(I,12)/4))/(3*SUM);
y2(0)=sum(sum(bitand(I,48)/16))/(3*SUM);
z1(0)=sum(sum(bitand(I,192)/64))/(3*SUM);
z2(0)=sum(sum(bitand(I,768)/256))/(3*SUM);
s11=(sum(sum(I)))/(2*sum(sum(I))+(1/sum(sum(I))));
μ1=μ1(0)*10+s11;
where sum () represents a summing function; bitand () represents the result of returning two numeric values after bitwise AND operation; SUM represents a pixel value of an image to be encrypted; s11 is an auxiliary parameter; i is the image pixel matrix;
2) invoking Runge-Kutta algorithm to solve (tau)0,τ1) A numerical solution of the pulse differential function within the pulse interval; when the solving time reaches the next pulse time, assigning the pulse differential function value of the pulse time as a pulse variable value, and assigning all state variables;
3) calculating the numerical solution of the pulse differential function of all pulse intervals according to the step 2);
4) until the pulse time tau is detectedfSo far, the numerical solution of the function in all the pulse intervals is output,
x(n)=(x(1),x(2),...,x(f))
y1(n)=(y1(1),y1(2),...,y1(f))
y2(n)=(y2(1),y2(2),...,y2(f))
z1(n)=(z1(1),z1(2),...,z1(f))
z2(n)=(z2(1),z2(2),...,z2(f))
wherein x (n) is the first subsequence of the pulse differential chaotic series, y1(n) is a second subsequence of said series of differential chaos of pulses, y2(n) is a third subsequence of said series of differential chaos of pulses, z1(n) is a fourth subsequence of said series of differential chaos of pulses, z2(n) is a fifth subsequence of the pulse differential chaotic series.
In addition, the constructed pulse differential equation chaotic system can also be a three-dimensional pulse differential equation:
Figure BDA0002646115530000141
wherein x (t), y (t), z (t) are state variables of the chaotic system, r, K, K, alpha, beta, m2,d,m3Is a control parameter of the chaotic system, mu1Is the pulse variable, and T is the pulse period.
The pulse differential equation set is used as a generating function of the encryption key stream, and the pulse differential equation can generate a complex chaotic phenomenon in a specific value range, such as a double-period branch, a half-period branch, a period waterfall, chaos and other special dynamics phenomena. The value range generated by the chaotic sequence can be analyzed and obtained by drawing the bifurcation diagram. Initial parameter conditions for generating the chaos sequence for image encryption are determined through numerical simulation by drawing visual graphs such as a Lyapunov exponent diagram, a phase diagram, a time sequence diagram, a bifurcation diagram, a Poincare section and the like.
A bifurcation diagram of the chaotic system about T, which is obtained when the parameters of the three-dimensional pulse differential equation take the following values, is shown in fig. 3:
r=2.4;K=15;α=0.6;β=0.5;m2=0.95;d=0.6;m3=1.05;k=2.4;μ1=2.5;T∈[1,1.5];
mu of chaotic system obtained when parameters of three-dimensional pulse differential equation take the following values1The bifurcation diagram of (2) is shown in fig. 4:
r=5;K=21;α=0.6;β=0.6;m2=1.25;d=0.45;m3=1.2;k=5;μ1∈[0.1,10];
through multiple analysis, the following partial parameter values are taken as partial parameter values for generating the chaotic sequence;
r=4;K=15;α=0.12;β=0.9;m2=0.01;d=1.06;m3=1.05;k=5;μ1=2.524;
reading the pixel value information of the image to be encrypted to obtain a pixel value SUM 512,
x(0)=sum(sum(bitand(I,3)))/(3*SUM);
y(0)=sum(sum(bitand(I,12)/4))/(3*SUM);
z(0)=sum(sum(bitand(I,48)/16))/(3*SUM);
μ1(0)=sum(sum(bitand(I,192)/64))/(3*SUM);
s11=(sum(sum(I)))/(2*sum(sum(I))+(1/sum(sum(I))));
μ1=μ1(0)*10+s11;
and obtaining all parameter values and initial state variable values of the three-dimensional differential equation for generating the pulse chaotic sequence. And then solving a three-dimensional pulse differential equation by using a Runge-Kutta method to obtain a pulse chaotic sequence.
It should be noted that the five-dimensional pulse differential equation chaotic system and the three-dimensional pulse differential equation chaotic system explicitly provided in this embodiment are only for clearly explaining the scheme of this embodiment, and do not have a limiting effect on the technical scheme of the present invention. The chaos property of the solution of the pulse differential equation is analyzed through the Floquet multiplier theory, the pulse comparison theorem and other theories, if the space of the solution is chaotic, the chaos orbit of the system is complex and difficult to predict, and the method is suitable for being used as a random sequence generator of an encryption scheme. Therefore, all the pulse differential equation chaotic systems which can be used as the chaotic sequence generator are within the protection scope of the invention.
In addition, the pulse differential equation chaotic system does not belong to a continuous chaotic system or discrete iterative mapping, but has the characteristics of the continuous system and the discrete system, and the property of exceeding the range of the continuous system and the discrete system, and has complex dynamic behaviors including quasi-periodic oscillation, multiple periodic branches, half-period branches, periodic windows, chaos and the like under a special value taking condition, so that the encryption safety can be greatly improved when the pulse differential equation chaotic system is used for image encryption.
S12: generating a random sequence by using Logistic mapping iteration, and constructing an M x N two-dimensional random matrix based on the random sequence;
the method comprises the steps of utilizing Logistic mapping to iteratively generate a first random sequence h ═ (h (1), h (2),. the. h, h (l)), and then carrying out h ═ mod (ceil (h × h × 10)3) 256) to obtain a second random sequence h '═ h' (1), h '(2),. ·, h' (l)); constructing a two-dimensional random matrix T based on the second random sequence h ', wherein T is reshape (h ', N, M) '; where l ═ M × N, mod () represents a remainder function; ceil () denotes rounding up; reshape (h ', N, M) ' represents the transformation of the second random sequence h ' into a matrix of M × N;
the image encryption processing stage comprises:
s21: reading pixel information of an image to be encrypted to construct an M x N image pixel matrix, scrambling the image pixel matrix by using a Henon algorithm to obtain a displaced image pixel matrix, as shown in FIG. 5; the method specifically comprises the following steps:
the Henon mapping expression adopted by the scrambling operation is as follows:
Figure BDA0002646115530000161
wherein a and b are control parameters, a is 1.4, b is 0.3, xm,ymState variables mapped for Henon;
generating random sequences marked as sx and sy by utilizing the Henon mapping iteration;
arranging sx and sy from small to large, and utilizing corresponding position matrix LxyRecording the position of the sequenced sequence;
according to the position matrix LxyThe index sequence rearranges the pixel positions of the image pixel matrix to obtain the scrambled image pixel matrix.
S22: partitioning the scrambled image pixel matrix and the two-dimensional random matrix according to rows to obtain an image pixel matrix partition and a two-dimensional random matrix partition respectively,
the blocking operation is as follows:
partitioning the scrambled image pixel matrix and the two-dimensional random matrix according to rows, wherein the subblocks after partitioning operation are as follows:
Blockg=BI(L1×(ei-1)+1:L1×ei,L1×(vj-1)+1:L1×vj) Wherein, BlockgRepresents the g-th block;
where BI denotes a matrix to be partitioned, L1For the length of each block, g is the sequence number of each small block, eiRow i block, v, representing a matrix to be blockedjRepresenting the j column block of the matrix to be blocked;
after the block operation, the scrambled image pixel matrix is blocked to obtain each image pixel matrix block, and similarly, the two-dimensional random matrix is also changed into a plurality of two-dimensional random matrix blocks after the block operation.
S23: selecting a first subsequence S of the pulse chaotic sequenceW1And a second subsequence SW2Respectively determining coding schemes of the image pixel matrix blocks and the two-dimensional random matrix blocks, and performing DNA coding on pixel values in the image pixel matrix blocks and matrix values in the two-dimensional random matrix blocks to obtain coded image pixel matrix blocks and coded two-dimensional random matrix blocks; the method specifically comprises the following steps:
TABLE 1 DNA coding rule Table
Figure BDA0002646115530000171
The table of DNA coding rules shown in Table 1 includes 8 coding schemes, each of which has different coding rules corresponding to the values 0,1, 2, and 3.
Obtaining 8 coding schemes, namely a coding scheme 1, a coding scheme 2 and a coding scheme 8, according to the DNA coding rule table;
a first subsequence S of the pulse chaotic sequenceW1And a second subsequence SW2Is normalized to be 0 to 7 to obtain a normalized first subsequence S'W1And a normalized second subsequence S'W2(ii) a And the values 0-7 correspond to coding schemes 1-8 in sequence;
the normalization operation is as follows:
S′W1=mod(floor(SW1×104),8)+1;
S′W2=mod(floor(SW2×104),8)+1;
wherein floor () represents rounding down;
partitioning each of said image pixel matrices into blocks IgAnd each of said two-dimensional random matrix blocks FgIs normalized to 0-3 to obtain a normalized image pixel matrix block I'gAnd normalized two-dimensional random matrix partition F'g(ii) a Wherein g is a block number.
The normalization operation is as follows:
I′g=bitand(Ig,3×44-c)/44-c
F′g=bitand(Fg,3×44-c)/44-cwherein, c is 1, 2, 3, 4;
the normalized first subsequence S'W1And each normalized image pixel matrix partition block I'gOne-to-one correspondence is realized; the normalizationPost-conversion second subsequence S'W2And each normalized two-dimensional random matrix partition F'gOne-to-one correspondence is realized;
utilizing the normalized first subsequence S'W1Determines the corresponding normalized image pixel matrix block I'gCoding scheme, and partitioning into blocks I 'according to normalized image pixel matrix'gCarrying out DNA coding on the pixel value to obtain a coded image pixel matrix block;
utilizing the normalized second subsequence S'W2Determining the normalized two-dimensional random matrix block F 'corresponding to each sequence value'gAccording to the coding scheme of (1), and partitioning F 'according to the normalized two-dimensional random matrix'gThe matrix value in (3) is subjected to DNA coding to obtain a coded two-dimensional random matrix block.
S24: selecting a third subsequence S of the pulse chaotic sequenceW3Determining an operation rule between the encoded image pixel matrix block and the encoded two-dimensional random matrix block, and performing DNA operation to obtain an image pixel matrix block after diffusion replacement; the method specifically comprises the following steps:
1) a third subsequence S of the pulse chaotic sequenceW3Is normalized to be 0 to 2 to obtain a normalized third subsequence S'W3
S′W3=mod(floor(SW3×104),3);
2) According to the normalized third subsequence S'W3Determining the operation rule between the encoded image pixel matrix block and the encoded two-dimensional random matrix block by the sequence value of (A), and performing DNA operation once to obtain an image pixel matrix block Bg
3) Then the normalized third subsequence S 'is utilized'W3Determining the image pixel matrix block B by the sequence valueg+1And image pixel matrix block BgPerforming DNA operation again to obtain the image pixel matrix block after the diffusion replacement;
in addition, as shown in tables 2 to 4, three encryption operation rule tables are given in the present embodiment;
TABLE 2 addition rule Table
Num=0 A T G C
A A T G C
T T C A G
G G A C T
C C G T A
TABLE 3 Subtraction rule Table
Num=1 A T G C
A A G T C
T T A C G
G G C A T
C C T G A
TABLE 4 XOR operation rule Table
Figure BDA0002646115530000191
Figure BDA0002646115530000201
Then, according to the normalized third subsequence S'W3Determining an operation rule between the encoded image pixel matrix block and the encoded two-dimensional random matrix block by the sequence value, specifically comprising:
when the normalized third subsequence S'W3When the sequence value of (2) is 0, the image pixel matrix block B is between the encoded image pixel matrix block and the encoded two-dimensional random matrix block corresponding theretog+1And said image pixel matrix block BgThe 'addition' operation in the encryption operation rule table is carried out;
when the normalized third subsequence S'W3When the sequence value of (1), the image pixel matrix block B between the encoded image pixel matrix block and the corresponding encoded two-dimensional random matrix blockg+1And said image pixel matrix block BgPerforming subtraction operation in the encryption operation rule table;
when the normalized third subsequence S'W3When the sequence value of (2), the image pixel matrix block B between the encoded image pixel matrix block and the corresponding encoded two-dimensional random matrix blockg+1And said image pixel matrix block BgThe exclusive or operation in the encryption operation rule table is performed.
S25: selecting a fourth subsequence S of the pulse chaotic sequenceW4Determining a decoding scheme of the image pixel matrix block after the diffusion replacement, and performing DNA decoding on pixel values in the image pixel matrix block after the diffusion replacement to obtain a decoded image pixel matrix block; the method specifically comprises the following steps:
TABLE 5DNA decoding rule Table
Figure BDA0002646115530000202
Figure BDA0002646115530000211
As shown in table 5, this embodiment provides a DNA decoding rule table, which includes 8 decoding schemes, each of which has 0,1, 2, and 3 corresponding to different decoding rules.
Obtaining 8 decoding schemes according to the DNA decoding rule table, wherein the decoding schemes are recorded as a decoding scheme 1, a decoding scheme 2 and a decoding scheme 8;
a fourth subsequence S of the pulse chaotic sequenceW4Is normalized to be 0 to 7 to obtain a normalized fourth subsequence S'W4(ii) a And values 0-7 correspond to decoding schemes 1-8;
S′W4=mod(floor(SW4×104),8)+1;
the normalized fourth subsequence S'W4Each sequence value in the sequence table corresponds to each diffusion-replaced image pixel matrix block one by one;
utilizing the normalized fourth subsequence S'W4Determines the corresponding decoding scheme of the diffusion-replaced image pixel matrix block for DNA decoding.
Finally, W is1、W2、W3And W4Is a number varying from 1 to W; in addition, a fifth sub-pulse chaotic sequence can be obtained when the five-dimensional pulse chaotic system is appliedAnd at this time, the fifth subsequence of the pulse chaotic sequence can be used for replacing any one of the first subsequence to the fourth subsequence of the pulse chaotic sequence. When the three-dimensional pulse chaotic system is applied, the obtained pulse chaotic sequence only comprises three subsequences, so that any one of the three subsequences of the obtained pulse chaotic sequence can be repeatedly used by the three-dimensional pulse chaotic system in order to meet the requirements of the four subsequences of the pulse chaotic sequence applied to the steps S23-S25.
S26: and partitioning and combining each decoded image pixel matrix to obtain a combined image pixel matrix C, and then carrying out scrambling replacement operation on the combined image pixel matrix C to obtain a final encrypted image. The method specifically comprises the following steps:
1) using a logistic chaotic system
xq+1=μxq(1-xq)
Where μ ∈ (0,4), x0E (0,1), and q e is an integer;
respectively carrying out chaos iteration once to obtain two state values x1And x2
2) Scanning the elements of the merged image pixel matrix C line by line, specifically including the steps of:
a1, selecting one row of elements of the combined image pixel matrix C for scanning, and enabling x to be xi0=x1
(a) If j<i, let j equal i, for x1Taking the residue to obtain k1,k2(ii) a Wherein i is a row number of a pixel in the merged image pixel matrix C, and j is a column number of the merged image pixel matrix C;
(b) if j is equal to i, then pair C (i,: and k)1Carrying out XOR operation;
(c) if j>i, then pairs C (i,: and k)1Carrying out XOR operation; to C (j, k) and k2Carrying out XOR operation; then exchanging C (i,: and C (j,: respectively);
wherein x isi0Representing x when elements of said merged image pixel matrix C are scanned line by line0(ii) a C (i): represents the ith row element of the merged image pixel matrix C; c (j,: indicates the jth row element of the merged image pixel matrix C;
a2, update xi0After updating xi0Is equal to x before updatei0Adding s ', s ' ═ sum (C (i))/1000, scanning the next row of matrix elements, repeating the operations (a) to (C) until all the row elements of the matrix are traversed, and obtaining a progressive image pixel matrix C ';
3) -scanning the elements of said image pixel matrix C column by column:
b1, selecting a row of elements of the image pixel matrix C' to scan, let xj0=x2
(d) If j<i, let j equal i, for x2Taking the rest to obtain k'1,k′2
(e) If j ═ i, then pair C' (: j) and k1' performing an exclusive or operation;
(f) if j>i, then pair C' (: j) and k1' performing an exclusive or operation; for C' (: i) and k2' performing an exclusive or operation; then C '(: j) and C' (: i) are exchanged;
wherein x isj0Representing x when scanning the elements of said merged image pixel matrix C' column by column0(ii) a C '(: j) represents the jth column element of the image pixel matrix C'; c '(: i) denotes the ith column element of the image pixel matrix C';
b2, update xj0After updating xj0Is equal to x before updatej0Adding s ', s' ═ sum (C (i))/1000, scanning the next column of matrix elements, repeating the operations (d) to (f) until all the columns of the matrix are traversed;
4) and obtaining the encrypted image after scrambling and replacing, and obtaining the final ciphertext image.
As shown in fig. 6, a plaintext image, that is, an image to be encrypted, is obtained by applying the above-mentioned image encryption method to the plaintext image, and the ciphertext image shown in fig. 7 is obtained.
Considering that the image encryption method is completely symmetrical and reversible, the decryption process is the reverse process of the image encryption method.
In this embodiment, a pulse differential equation is used to obtain a pulse chaotic sequence, and a DNA coding rule, a DNA operation rule, and a DNA decoding rule are dynamically determined based on the pulse chaotic sequence.
Example 2
As shown in fig. 8, this embodiment provides an image encryption system based on a pulse differential equation chaotic system, which includes a preprocessing module and an image encryption processing module before image encryption processing:
wherein, the preprocessing module before the image encryption processing comprises:
a pulse chaotic sequence acquisition unit: the method is used for constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence;
a two-dimensional random matrix construction unit: the method comprises the steps of iteratively generating a random sequence by using Logistic mapping, and constructing a two-dimensional random matrix of M x N based on the random sequence;
the image encryption processing module comprises:
scrambling and blocking unit: the image encryption method comprises the steps of reading pixel information of an image to be encrypted to construct an M x N image pixel matrix, and scrambling the image pixel matrix by using a Henon algorithm to obtain a displaced image pixel matrix; partitioning the scrambled image pixel matrix and the two-dimensional random matrix according to rows to obtain an image pixel matrix partition and a two-dimensional random matrix partition respectively;
DNA coding Unit: the encoding scheme is used for selecting a first subsequence and a second subsequence of the pulse chaotic sequence to respectively determine the image pixel matrix block and the two-dimensional random matrix block, and performing DNA encoding on pixel values in the image pixel matrix block and matrix values in the two-dimensional random matrix block to obtain an encoded image pixel matrix block and an encoded two-dimensional random matrix block;
a DNA arithmetic unit: the third subsequence used for selecting the pulse chaotic sequence is used for determining an operation rule between the coded image pixel matrix block and the coded two-dimensional random matrix block, and performing DNA operation to obtain a pixel matrix block after diffusion replacement;
a DNA decoding unit: selecting a fourth subsequence of the pulse chaotic sequence to determine a decoding scheme of the pixel matrix block after the diffusion replacement, and performing DNA decoding on pixel values in the pixel matrix block after the diffusion replacement to obtain a decoded pixel matrix block;
scrambling replacement unit: the encryption device is used for combining the decoded pixel matrixes in blocks to obtain a combined image pixel matrix C, and then carrying out scrambling replacement operation on the combined image pixel matrix C to obtain a final encrypted image.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (10)

1. An image encryption method based on a pulse differential equation chaotic system is characterized by comprising a preprocessing stage and an image encryption processing stage before image encryption processing:
the preprocessing stage before the image encryption processing comprises:
s11: constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence;
s12: generating a random sequence by using Logistic mapping iteration, and constructing an M x N two-dimensional random matrix based on the random sequence;
the image encryption processing stage comprises:
s21: reading pixel information of an image to be encrypted to construct an M x N image pixel matrix, and scrambling the image pixel matrix by using a Henon algorithm to obtain a displaced image pixel matrix;
s22: partitioning the scrambled image pixel matrix and the two-dimensional random matrix according to rows to obtain an image pixel matrix partition and a two-dimensional random matrix partition respectively,
s23: selecting a first subsequence and a second subsequence of the pulse chaotic sequence to respectively determine coding schemes of the image pixel matrix block and the two-dimensional random matrix block, and performing DNA coding on pixel values in the image pixel matrix block and matrix values in the two-dimensional random matrix block to obtain a coded image pixel matrix block and a coded two-dimensional random matrix block;
s24: selecting a third subsequence of the pulse chaotic sequence to determine an operation rule between the coded image pixel matrix block and the coded two-dimensional random matrix block, and performing DNA operation to obtain a diffusion-replaced image pixel matrix block;
s25: selecting a fourth subsequence of the pulse chaotic sequence to determine a decoding scheme of the image pixel matrix block after the diffusion replacement, and performing DNA decoding on pixel values in the image pixel matrix block after the diffusion replacement to obtain a decoded image pixel matrix block;
s26: and partitioning and combining each decoded image pixel matrix to obtain a combined image pixel matrix C, and then carrying out scrambling replacement operation on the combined image pixel matrix C to obtain a final encrypted image.
2. The method according to claim 1, wherein the constructing of the pulse differential equation chaotic system and the solving of the pulse chaotic sequence specifically comprise:
the constructed pulse differential equation chaotic system comprises:
Figure FDA0002646115520000021
wherein, x (t), y1(t),y2(t),z1(t),z2(t) is the state variable of the chaotic system, r, k, alpha, beta, gamma, b1,d1,d2,d3,d4,,m1Is a control parameter of the chaotic system, mu1Is the pulse variable, and T is the pulse period.
Solving a pulse chaotic sequence based on the pulse differential equation chaotic system specifically comprises the following steps:
1) inputting a pulse differential equation and all state variables and control parameters thereof, dividing f +1 pulse moments into f pulse intervals in a pulse period T, and recording the f +1 pulse moments as tau0,τ1,τ2,...,τf(ii) a At the initial pulse time tau0Assigning initial values to all state variables;
x(0)=sum(sum(bitand(I,3)))/(3*SUM);
y1(0)=sum(sum(bitand(I,12)/4))/(3*SUM);
y2(0)=sum(sum(bitand(I,48)/16))/(3*SUM);
z1(0)=sum(sum(bitand(I,192)/64))/(3*SUM);
z2(0)=sum(sum(bitand(I,768)/256))/(3*SUM);
s11=(sum(sum(I)))/(2*sum(sum(I))+(1/sum(sum(I))));
μ1=μ1(0)*10+s11;
where sum () represents a summing function; bitand () represents the result of returning two numeric values after bitwise AND operation; SUM represents a pixel value of an image to be encrypted; s11 is an auxiliary parameter; i is the image pixel matrix;
2) invoking rune-Kutta algorithm, solving for (τ)0,τ1) A numerical solution of the pulse differential function within the pulse interval; when the solving time reaches the next pulse time, assigning the pulse differential function value of the pulse time as a pulse variable value, and assigning all state variables;
3) calculating the numerical solution of the pulse differential function of all pulse intervals according to the step 2);
4) until the pulse time tau is detectedfSo far, the numerical solution of the function in all the pulse intervals is output,
x(n)=(x(1),x(2),...,x(f))
y1(n)=(y1(1),y1(2),...,y1(f))
y2(n)=(y2(1),y2(2),...,y2(f))
z1(n)=(z1(1),z1(2),...,z1(f))
z2(n)=(z2(1),z2(2),...,z2(f))
wherein x (n) is the first subsequence of the pulse differential chaotic series, y1(n) is a second subsequence of said series of differential chaos of pulses, y2(n) is a third subsequence of said series of differential chaos of pulses, z1(n) is a fourth subsequence of said series of differential chaos of pulses, z2(n) is a fifth subsequence of the pulse differential chaotic series.
3. The method according to claim 1, wherein the reading of pixel information of the image to be encrypted constructs an M × N image pixel matrix, and the scrambling of the image pixel matrix is performed by using a Henon algorithm to obtain a permuted image pixel matrix, specifically comprising:
the Henon mapping expression adopted by the scrambling operation is as follows:
Figure FDA0002646115520000031
wherein the content of the first and second substances,a and b are control parameters, a is 1.4, b is 0.3, xm,ymState variables mapped for Henon;
generating random sequences marked as sx and sy by utilizing the Henon mapping iteration;
arranging sx and sy from small to large, and utilizing corresponding position matrix LxyRecording the position of the sequenced sequence;
according to the position matrix LxyThe index sequence rearranges the pixel positions of the image pixel matrix to obtain the scrambled image pixel matrix.
4. The method according to claim 1 or 2, wherein the selecting the first subsequence and the second subsequence of the pulse chaotic sequence respectively determines a coding scheme of the image pixel matrix partition and the two-dimensional random matrix partition, and performs DNA coding on a pixel value in the image pixel matrix partition and a matrix value in the two-dimensional random matrix partition to obtain a coded image pixel matrix partition and a coded two-dimensional random matrix partition, specifically comprising:
obtaining 8 coding schemes, namely a coding scheme 1, a coding scheme 2 and a coding scheme 8, according to a DNA coding rule table;
normalizing the sequence values of the first subsequence and the second subsequence of the pulse chaotic sequence to be 0-7 to obtain a normalized first subsequence and a normalized second subsequence; and the values 0-7 correspond to coding schemes 1-8 in sequence;
normalizing the pixel value of each image pixel matrix block and the matrix value of each two-dimensional random matrix block to 0-3 to obtain a normalized image pixel matrix block and a normalized two-dimensional random matrix block;
each sequence value of the normalized first subsequence corresponds to each normalized image pixel matrix block one by one; each sequence value of the normalized second subsequence corresponds to each normalized two-dimensional random matrix block one to one;
determining the normalized image pixel matrix block coding scheme corresponding to each sequence value of the normalized first subsequence, and then performing DNA coding according to the pixel value size in the normalized image pixel matrix block to obtain a coded image pixel matrix block;
and determining a coding scheme of the normalized two-dimensional random matrix block corresponding to each sequence value of the normalized second subsequence, and performing DNA coding according to the matrix value in the normalized two-dimensional random matrix block to obtain the coded two-dimensional random matrix block.
5. The method according to claim 1, wherein the selecting of the third subsequence of the pulse chaotic sequence determines an operation rule between the encoded image pixel matrix partition and the encoded two-dimensional random matrix partition, and performs DNA operation to obtain the diffusion-replaced image pixel matrix partition, specifically comprising:
1) normalizing the sequence value of the third subsequence of the pulse chaotic sequence to 0-2 to obtain a normalized third subsequence;
2) determining an operation rule between the encoded image pixel matrix block and the encoded two-dimensional random matrix block according to the sequence value of the normalized third subsequence, and performing DNA operation once to obtain an image pixel matrix block Bg
3) Determining image pixel matrix block B by using the sequence value of the normalized third subsequenceg+1And image pixel matrix block BgPerforming DNA operation again to obtain the image pixel matrix block after the diffusion replacement; wherein g is the serial number of the pixel matrix block.
6. The method according to claim 5, wherein the determining an operation rule between the encoded image pixel matrix block and the encoded two-dimensional random matrix block according to the sequence value of the normalized third subsequence specifically comprises:
Bg+1when said normalizedWhen the sequence value of the third subsequence is 0, the image pixel matrix block B is arranged between the coded image pixel matrix block and the coded two-dimensional random matrix block corresponding to the coded image pixel matrix blockg+1And said image pixel matrix block BgThe 'addition' operation in the encryption operation rule table is carried out;
when the sequence value of the normalized third subsequence is 1, the image pixel matrix block B is between the encoded image pixel matrix block and the encoded two-dimensional random matrix block corresponding to the encoded image pixel matrix blockg+1And said image pixel matrix block BgPerforming subtraction operation in the encryption operation rule table;
when the sequence value of the normalized third subsequence is 2, the image pixel matrix block B is between the encoded image pixel matrix block and the encoded two-dimensional random matrix block corresponding to the encoded image pixel matrix blockg+1And said image pixel matrix block BgThe exclusive or operation in the encryption operation rule table is performed.
7. The method according to claim 1, wherein the selecting the fourth subsequence of the pulse chaotic sequence to determine a decoding scheme of the diffusion-replaced image pixel matrix block, and performing DNA decoding on pixel values in the diffusion-replaced image pixel matrix block to obtain the decoded image pixel matrix block specifically comprises:
obtaining 8 decoding schemes according to the DNA decoding rule table, wherein the decoding schemes are recorded as a decoding scheme 1, a decoding scheme 2 and a decoding scheme 8;
normalizing the sequence value of the fourth subsequence of the pulse chaotic sequence to 0-7 to obtain a normalized fourth subsequence; and values 0-7 correspond to decoding schemes 1-8;
each sequence value in the normalized fourth subsequence corresponds to each diffusion-replaced image pixel matrix block one by one;
and determining a decoding scheme of the image pixel matrix block after the diffusion replacement corresponding to the value of the normalized fourth subsequence for DNA decoding.
8. The method according to claim 1, wherein the step of combining the decoded image pixel matrices into blocks to obtain a combined image pixel matrix C, and performing scrambling replacement operation on the combined image pixel matrix C to obtain a final encrypted image specifically comprises:
1) using a logistic chaotic system
xq+1=μxq(1-xq)
Where μ ∈ (0,4), x0E (0,1), and q e is an integer;
respectively carrying out chaos iteration once to obtain two state values x1And x2
2) Scanning the elements of the merged image pixel matrix C line by line, specifically including the steps of:
a1, selecting one row of elements of the combined image pixel matrix C for scanning, and enabling x to be xi0=x1
(a) If j<i, let j equal i, for x1Taking the residue to obtain k1,k2(ii) a Wherein i is a row number of a pixel in the merged image pixel matrix C, and j is a column number of the merged image pixel matrix C;
(b) if j is equal to i, then pair C (i,: and k)1Carrying out XOR operation;
(c) if j>i, then pairs C (i,: and k)1Carrying out XOR operation; to C (j, k) and k2Carrying out XOR operation; then exchanging C (i,: and C (j,: respectively);
wherein x isi0Representing x when elements of said merged image pixel matrix C are scanned line by line0(ii) a C (i): represents the ith row element of the merged image pixel matrix C; c (j,: indicates the jth row element of the merged image pixel matrix C;
a2, update xi0After updating xi0Is equal to x before updatei0Adding s', s ═ sum (C (i))/1000, and proceeding to the next row of matrix elementsPerforming line scanning, repeating the operations (a) to (C) until elements of all lines of the matrix are traversed, and obtaining an image pixel matrix C' after line scanning;
3) -scanning the elements of said image pixel matrix C column by column:
b1, selecting a row of elements of the image pixel matrix C' to scan, let xj0=x2
(d) If j<i, let j equal i, for x2Taking the residue to obtain k1′,k2′;
(e) If j ═ i, then pair C' (: j) and k1' performing an exclusive or operation;
(f) if j>i, then pair C' (: j) and k1' performing an exclusive or operation; for C' (: i) and k2' performing an exclusive or operation; then C '(: j) and C' (: i) are exchanged;
wherein x isj0Representing x when scanning the elements of said merged image pixel matrix C' column by column0(ii) a C '(: j) represents the jth column element of the image pixel matrix C'; c '(: i) denotes the ith column element of the image pixel matrix C';
b2, update xj0After updating xj0Is equal to x before updatej0Adding s ', s' ═ sum (C (i))/1000, scanning the next column of matrix elements, repeating the operations (d) to (f) until all the columns of the matrix are traversed;
4) and obtaining the encrypted image after scrambling and replacing, and obtaining the final ciphertext image.
9. An image encryption system based on a pulse differential equation chaotic system is characterized by comprising a preprocessing module and an image encryption processing module before image encryption processing:
the preprocessing module before the image encryption processing comprises:
a pulse chaotic sequence acquisition unit: the method is used for constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence;
a two-dimensional random matrix construction unit: the method comprises the steps of iteratively generating a random sequence by using Logistic mapping, and constructing a two-dimensional random matrix of M x N based on the random sequence;
the image encryption processing module comprises:
scrambling and blocking unit: the image encryption method comprises the steps of reading pixel information of an image to be encrypted to construct an M x N image pixel matrix, and scrambling the image pixel matrix by using a Henon algorithm to obtain a displaced image pixel matrix; partitioning the scrambled image pixel matrix and the two-dimensional random matrix according to rows to obtain an image pixel matrix partition and a two-dimensional random matrix partition respectively;
DNA coding Unit: the encoding scheme is used for selecting a first subsequence and a second subsequence of the pulse chaotic sequence to respectively determine the image pixel matrix block and the two-dimensional random matrix block, and performing DNA encoding on pixel values in the image pixel matrix block and matrix values in the two-dimensional random matrix block to obtain an encoded image pixel matrix block and an encoded two-dimensional random matrix block;
a DNA arithmetic unit: the third subsequence used for selecting the pulse chaotic sequence is used for determining an operation rule between the coded image pixel matrix block and the coded two-dimensional random matrix block, and performing DNA operation to obtain a pixel matrix block after diffusion replacement;
a DNA decoding unit: selecting a fourth subsequence of the pulse chaotic sequence to determine a decoding scheme of the pixel matrix block after the diffusion replacement, and performing DNA decoding on pixel values in the pixel matrix block after the diffusion replacement to obtain a decoded pixel matrix block;
scrambling replacement unit: the encryption device is used for combining the decoded pixel matrixes in blocks to obtain a combined image pixel matrix C, and then carrying out scrambling replacement operation on the combined image pixel matrix C to obtain a final encrypted image.
10. The system of claim 9, wherein the pulse chaotic sequence acquisition unit: the method is used for constructing a pulse differential equation chaotic system and solving a pulse chaotic sequence, and specifically comprises the following steps:
the constructed pulse differential equation chaotic system comprises:
Figure FDA0002646115520000091
wherein, x (t), y1(t),y2(t),z1(t),z2(t) is the state variable of the chaotic system, r, k, alpha, beta, gamma, b1,d1,d2,d3,d4,,m1Is a control parameter of the chaotic system, mu1Is the pulse variable, and T is the pulse period.
Solving a pulse chaotic sequence based on the pulse differential equation chaotic system specifically comprises the following steps:
1) inputting a pulse differential equation and all state variables and control parameters thereof, dividing f +1 pulse moments into f pulse intervals in a pulse period T, and recording the f +1 pulse moments as tau0,τ1,τ2,...,τf(ii) a At the initial pulse time tau0Assigning initial values to all state variables;
x(0)=sum(sum(bitand(I,3)))/(3*SUM);
y1(0)=sum(sum(bitand(I,12)/4))/(3*SUM);
y2(0)=sum(sum(bitand(I,48)/16))/(3*SUM);
z1(0)=sum(sum(bitand(I,192)/64))/(3*SUM);
z2(0)=sum(sum(bitand(I,768)/256))/(3*SUM);
s11=(sum(sum(I)))/(2*sum(sum(I))+(1/sum(sum(I))));
μ1=μ1(0)*10+s11;
where sum () represents a summing function; bitand () represents the result of returning two numeric values after bitwise AND operation; SUM represents a pixel value of an image to be encrypted; s11 is an auxiliary parameter; i is the image pixel matrix;
2) invoking Runge-Kutta algorithm to solve (tau)0,τ1) A numerical solution of the pulse differential function within the pulse interval; when the solving time reaches the next pulse time, assigning the pulse differential function value of the pulse time as a pulse variable value and assigning values to all state variables;
3) calculating the numerical solution of the pulse differential function of all pulse intervals according to the step 2);
4) until the pulse time tau is detectedfSo far, the numerical solution of the function in all the pulse intervals is output,
x(n)=(x(1),x(2),...,x(f))
y1(n)=(y1(1),y1(2),...,y1(f))
y2(n)=(y2(1),y2(2),...,y2(f))
z1(n)=(z1(1),z1(2),...,z1(f))
z2(n)=(z2(1),z2(2),...,z2(f))
wherein x (n) is the first subsequence of the pulse differential chaotic series, y1(n) is a second subsequence of said series of differential chaos of pulses, y2(n) is a third subsequence of said series of differential chaos of pulses, z1(n) is a fourth subsequence of said series of differential chaos of pulses, z2(n) is a fifth subsequence of the pulse differential chaotic series.
CN202010855021.7A 2020-08-24 2020-08-24 Image encryption method and system based on pulse differential equation chaotic system Pending CN112001834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010855021.7A CN112001834A (en) 2020-08-24 2020-08-24 Image encryption method and system based on pulse differential equation chaotic system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010855021.7A CN112001834A (en) 2020-08-24 2020-08-24 Image encryption method and system based on pulse differential equation chaotic system

Publications (1)

Publication Number Publication Date
CN112001834A true CN112001834A (en) 2020-11-27

Family

ID=73470208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010855021.7A Pending CN112001834A (en) 2020-08-24 2020-08-24 Image encryption method and system based on pulse differential equation chaotic system

Country Status (1)

Country Link
CN (1) CN112001834A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898025A (en) * 2018-06-25 2018-11-27 河南大学 New chaotic image encryption method based on dual scramble and DNA encoding
CN110879895A (en) * 2019-11-12 2020-03-13 安徽理工大学 Color image block encryption algorithm based on hyperchaotic system and DNA sequence
CN111294481A (en) * 2020-01-14 2020-06-16 河南大学 Image encryption method based on self-updating transformation, double random three-dimensional matrix scrambling and DNA calculation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898025A (en) * 2018-06-25 2018-11-27 河南大学 New chaotic image encryption method based on dual scramble and DNA encoding
CN110879895A (en) * 2019-11-12 2020-03-13 安徽理工大学 Color image block encryption algorithm based on hyperchaotic system and DNA sequence
CN111294481A (en) * 2020-01-14 2020-06-16 河南大学 Image encryption method based on self-updating transformation, double random three-dimensional matrix scrambling and DNA calculation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
景党伟;吴成茂;: "基于祖冲之算法和DNA编码的图像分组加密方法", 计算机应用研究, no. 06, 31 December 2015 (2015-12-31) *
郭俊荣: "脉冲治理害虫Gompertz模型中的混沌及其在图像加密中的应用", 《中国硕士论文全文数据库》, 15 March 2023 (2023-03-15) *

Similar Documents

Publication Publication Date Title
Xian et al. Double parameters fractal sorting matrix and its application in image encryption
Wang et al. A novel chaotic algorithm for image encryption utilizing one-time pad based on pixel level and DNA level
CN112084517B (en) Image encryption method based on chaotic mapping and bit-level permutation
Wang et al. A novel color image encryption scheme using DNA permutation based on the Lorenz system
Ye et al. An efficient symmetric image encryption algorithm based on an intertwining logistic map
EP2701337B1 (en) Secret sharing method and system
Zhang et al. A novel couple images encryption algorithm based on DNA subsequence operation and chaotic system
ur Rehman et al. Selective encryption for gray images based on chaos and DNA complementary rules
Zhang et al. A novel image fusion encryption algorithm based on DNA sequence operation and hyper-chaotic system
CN108199828B (en) Method and device for encrypting color picture
Telem et al. A simple and robust gray image encryption scheme using chaotic logistic map and artificial neural network
CN111294481B (en) Image encryption method based on self-updating transformation, double random three-dimensional matrix scrambling and DNA calculation
CN111857649B (en) Fixed point number coding and operation system for privacy protection machine learning
CN112769542B (en) Multiplication triple generation method, device, equipment and medium based on elliptic curve
CN113691362B (en) Bit plane image compression encryption method based on hyperchaotic system and DNA coding
Feng et al. Image encryption algorithm based on discrete logarithm and memristive chaotic system
JP7031682B2 (en) Secret calculator, system, method, program
CN104573557A (en) Cloud data storage method and device and cloud data recovery method
Song et al. Multi-image reorganization encryption based on SLF cascade chaos and bit scrambling
Zheng et al. An ACP-based approach to color image encryption using DNA sequence operation and hyper-chaotic system
CN112887509A (en) Fusion encryption method based on multiple chaotic systems
CN108804933B (en) Method for carrying out scale conversion on big data in information hiding technology
CN112272082B (en) Image encryption/decryption method and device, electronic equipment and storage medium
Tahbaz et al. Evolutionary-based image encryption using Magic Square Chaotic algorithm and RNA codons truth table
Niyat et al. Chaos-based image encryption using a hybrid cellular automata and a DNA sequence

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination