CN110086601B - Joseph traversal and hyperchaotic system image encryption method based on pixel value association - Google Patents
Joseph traversal and hyperchaotic system image encryption method based on pixel value association Download PDFInfo
- Publication number
- CN110086601B CN110086601B CN201910349652.9A CN201910349652A CN110086601B CN 110086601 B CN110086601 B CN 110086601B CN 201910349652 A CN201910349652 A CN 201910349652A CN 110086601 B CN110086601 B CN 110086601B
- Authority
- CN
- China
- Prior art keywords
- sequence
- image
- pixel
- block
- matrix
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 111
- 238000013507 mapping Methods 0.000 claims abstract description 37
- 238000009792 diffusion process Methods 0.000 claims abstract description 18
- 239000011159 matrix material Substances 0.000 claims description 80
- 230000000739 chaotic effect Effects 0.000 claims description 30
- 230000008707 rearrangement Effects 0.000 claims description 4
- 230000006798 recombination Effects 0.000 claims description 3
- 238000005215 recombination Methods 0.000 claims description 3
- 230000035945 sensitivity Effects 0.000 abstract description 10
- 230000008569 process Effects 0.000 description 13
- 238000004422 calculation algorithm Methods 0.000 description 10
- 230000008859 change Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000002441 reversible effect Effects 0.000 description 4
- 238000007619 statistical method Methods 0.000 description 4
- 206010010144 Completed suicide Diseases 0.000 description 3
- 241001504519 Papio ursinus Species 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 210000004556 brain Anatomy 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006378 damage Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000010587 phase diagram Methods 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000000452 restraining effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/001—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Image Processing (AREA)
Abstract
The invention proposesA Joseph traversal and hyperchaotic system image encryption method based on pixel value association comprises the following steps: inputting an original image into a hash function and calculating segmented linear mapping and an initial value of a Chen hyperchaotic system; obtaining pseudo-random sequence by piecewise linear mappingUObtaining four pseudo-random sequences through a Chen hyperchaotic system; pseudo-random sequenceUAs an index value, a ciphertext image C is obtained by scrambling an original image by a Joseph scrambling method associated with a pixel value1(ii) a Ciphertext image C with four pseudorandom sequences respectively halved1The ciphertext block is subjected to pixel replacement to obtain a ciphertext image C2(ii) a Pseudo-random sequenceUAs an index value, the ciphertext image C is scrambled by the josephson scrambling method associated with the pixel value2Carry out row-column scrambling to obtain ciphertext image C3(ii) a Ciphertext image C Using Key Pixel Pair3And performing pixel diffusion to obtain an encrypted ciphertext image. The invention has strong sensitivity to the key and the plaintext, and improves the safety of the ciphertext image and the relation between the pixels.
Description
Technical Field
The invention relates to the technical field of digital image encryption, in particular to a Joseph traversal and hyperchaotic system image encryption method based on pixel value association.
Background
With the development of economy, social progress and improvement of informatization level and the rapid development of technologies such as the internet, the internet of things and the like, people are entering the era of big data and artificial intelligence. The image information is widely applied in many fields, such as multimedia technology, digital office, mobile payment, etc., due to its characteristics of image, intuition, vividness and huge information amount. The use of image information is changing people's lifestyle and lifestyle habits. Image information is flooding every corner of human activities, but with the widespread use of image information, its security issues are gradually emerging. Digital image encryption technology is an important means for effectively protecting digital image transmission. Some conventional text encryption algorithms such as DES, AES, etc. are not suitable for encryption of image information: firstly, the encryption efficiency is low, and secondly, the encryption effect is general. For example, Silva et al note that when images having large blocks of the same gray scale region are encrypted using the DES algorithm, some regions of poor encryption quality appear in the ciphertext image. Due to the wide application of image information in military, political and economic fields, the leakage of the information can generate huge influence and destruction. Therefore, it is urgent to design a more reliable image encryption algorithm, and image encryption is becoming a popular research field.
Image encryption includes pixel scrambling and pixel replacement. Common pixel scrambling methods are: a scanning pattern scrambling method based on graphics, a pixel rearrangement method based on a pseudo-random sequence, and the like. These scrambling methods produce an encrypted effect by changing the position of the pixels in the image. Common pixel replacement methods are: an encryption method based on a Hill matrix, a cipher stream encryption method based on a chaotic system and the like. These replacement methods achieve the effect of encryption by changing the value of the pixels. Among encryption schemes proposed in recent years, chaotic cryptography is attracting attention. The chaotic system is used as a complex nonlinear power system, has the characteristics of sensitive initial parameters, unpredictable orbit and strong state ergodicity, and is usually used as a pseudorandom number generator. The chaotic system is applied to the scrambling and replacing process of image encryption, so that the safety of the encryption system can be improved, and the defects of the traditional encryption algorithm are overcome. However, with the improvement of the cryptanalysis technology, the chaotic encryption technology also reveals the problems of low sensitivity to the key and the like. In order to solve the problems, researchers propose that the method is an effective way for improving the security of the chaotic image encryption technology by being combined with other methods. The josephson problem is evolved from the problem proposed by Josephus, a well-known smithsonist in ancient roman, and the use of the josephson problem plays a role in restraining various illegal behaviors such as malicious tampering, infringement piracy and the like. Data scrambling is performed by Joseph traversal, and data security is improved.
Disclosure of Invention
Aiming at the technical problems of low sensitivity to a secret key and poor data security of the conventional image encryption method, the invention provides a Josephson traversal and hyperchaotic system image encryption method based on pixel value association, which has great secret key sensitivity and good pseudo-randomness, and the security analysis result shows that various classical attacks can be effectively resisted.
In order to achieve the purpose, the technical scheme of the invention is realized as follows: a Joseph traversal and hyperchaotic system image encryption method based on pixel value association comprises the following steps:
the method comprises the following steps: inputting an original image with Height multiplied by Width into an SHA-384 hash function to obtain a 384-bit binary sequence H; equally dividing the 384-bit binary sequence H into 48 parts and eight parts, and performing operation to obtain an initial value of piecewise linear mapping and an initial value of the Chen hyperchaotic system;
step two: substituting the initial value of the piecewise linear mapping into the piecewise linear mapping for iteration to obtain a pseudorandom sequence U with the length of Height and Width, and substituting the initial value of the Chen hyperchaotic system into the Chen hyperchaotic system for iteration to obtain four pseudorandom sequences x, y, z and w with the length of Height and Width/4;
step three: scrambling the original image by using the first Height pseudo random numbers of the pseudo random sequence U as index values and using a Josephson scrambling method associated with pixel values to obtain a ciphertext image C1;
Step four: the ciphertext image C1Equally dividing into 4 parts to obtain ciphertext blocks, respectively performing pixel replacement on pixels in the 4 ciphertext blocks by using pseudorandom sequences x, y, z and w, and recombining the replaced ciphertext blocks to obtain a ciphertext image C2;
Step five: using the last Width pseudo random numbers of the pseudo random sequence U as index values, the ciphertext image C is scrambled using the Josephson scrambling method associated with the pixel values2Performing a column scrambling operation to obtain a ciphertext image C3;
Step six: using two key pixels Pixel1And Pixel2For ciphertext image C3And performing pixel diffusion operation on the pixels in the encrypted ciphertext image C to obtain the encrypted ciphertext image C.
The method for calculating the initial values of the piecewise linear mapping and the Chen hyperchaotic system in the first step comprises the following steps: equally dividing the 384-bit binary sequence H into 48 parts to obtain 8-bit binary sequence H1,h2,…,h48The method for calculating the initial value of the Chen hyperchaotic system by using the piecewise linear mapping comprises the following steps:
wherein u is1And p is the initial value of the piecewise-linear mapping, x1、y1、z1、w1Is an initial value of a four-dimensional Chen hyperchaotic system,represents that corresponding position elements in two 8-bit binary sequences are subjected to exclusive OR operation u'1,x′1,y′1,z′1,w′1Is given an initial value.
The iterative equation of the piecewise linear mapping is as follows:
wherein, p is a parameter of the piecewise linear mapping, and the value range is (0, 0.5); u (i +1) ∈ [0,1) represents a pseudo-random number generated by the ith iteration of piecewise linear mapping, i is 1,2, … …, Height + Width-1; u (i) e [0,1) is the pseudo-random number or initial value u of the previous iteration used for the ith iteration1;
The power equation of the Chen hyperchaotic system is as follows:
wherein,andthe parameters respectively represent the reciprocal of the kinetic parameters x ', y', z ', w', a, b, c, d and k are parameters of the Chen hyperchaotic system, and when a is 36, b is 3, c is 28, d is 16 and-0.7 is less than or equal to k is less than or equal to 0.7, the Chen hyperchaotic system is in a hyperchaotic state.
The method for realizing the pseudo-random sequence U comprises the following steps: piecewise linear mapping using an initial value u1Iterating the Height + Width-1 times, and adding the initial value u1And the obtained Height + Width-1 pseudo random numbers form a chaos sequence u with the length of Height + Width; reconstructing the chaotic sequence U into a pseudo-random sequence U:
wherein u (:) is an element in the chaotic sequence u, and mod (,) represents a complementation function;
the method for obtaining the pseudorandom sequences x, y, z and w comprises the following steps: will start value x1、y1、z1、w1Bring into four dimension Chen hyperchaotic systemAnd iterating the Chen hyperchaotic system for Height multiplied by Width/4+999 times, and omitting the value of the previous 999 iterations to obtain four pseudorandom sequences x, y, z and w with the length of Height multiplied by Width/4.
The implementation method of the josephson scrambling method related to the pixel values in the step three is as follows: taking the elements of a pseudorandom sequence U (j) as initial step length InitialValue and the element of the jth line of an original image as the element of a sequence S to be brought into an expanded Joseph function, and obtaining a sequence S' which is a scrambled ciphertext image C1Row j elements of (1); wherein j is 1,2, … …, Height;
the implementation method of the Josephson scrambling method related to the pixel values in the step five is as follows: taking the element of the pseudorandom sequence U (Height + q) as the initial step InitialValue and the ciphertext image C2The q-th row of elements of (1) as elements of the sequence S are substituted into an extended Joseph function, and the obtained sequence S' is a scrambled ciphertext image C3Row j elements of (1); wherein q is 1,2, … …, Width.
The extended Josephson function is: s ═ F (S, InitialValue);
wherein, F (,) is a Joseph function, S is a sequence to be scrambled, S' is a scrambled sequence, and InitialValue is an initial step size;
the implementation method of the extended Joseph function is as follows: the step size for the initial pass is InitialValue, and the step size for the nth cycle is S'n-1+ 1; wherein N is more than or equal to 2 and less than or equal to N, and N is the number of elements in the sequence S; the specific implementation method comprises the following steps:
step 1: obtaining S 'by using Joseph ring formed by traversal sequence S with InitialValue step length'1;
Step 2: is S 'in step length'1+1 traverse the Joseph ring to obtain S'2;
And step 3: and (3) circulating the step 2: is S 'in step length'n-1+1 traverse the Joseph ring to obtain S'n;
And 4, step 4: is S 'in step length'N-1+1 traverse the Joseph ring to obtain S'N;
And 5: s'1、S′2、……、S′n、……、S′NThe composed sequence is the scrambled sequence S'.
The method for pixel replacement in the fourth step is as follows:
step S1: reconstructing the four pseudo-random sequences x, y, z and w to obtain four pseudo-random matrixes X, Y, Z, W with the value intervals of [0,255 ];
step S2: the ciphertext image C with the size of Height multiplied by Width1Equally dividing the Block into ciphertext blocks with the size of Height multiplied by Width/41、Block2、Block3、Block4Respectively connected with the ciphertext blocks by using a pseudo-random matrix X, Y, Z, W1、Block2、Block3、Block4Performing bitwise XOR operation to obtain four matrixes Block'1,Block′2,Block′3,Block′4;
Step S3: respectively calculating control word matrix ControlMatrix by using pseudo-random matrix X, Y, Z, W1And control word matrix control matrix2;
Step S4: using a control word matrix control matrix1Matrix Block'1And matrix Block'4Performing cross operation to obtain a crossed matrix Block ″)1And the matrix Block ″)4(ii) a Using ControlMatrix2As a control word matrix, the matrix Block'2And matrix Block'3Performing cross operation to obtain a crossed matrix Block ″)2And the matrix Block ″)3;
Step S5: the matrix Block after crossing ″', is1、Block″2、Block″3And Block ″)4Reconstituting ciphertext image C2。
The reconstruction method of the pseudo-random matrix comprises the following steps:
wherein, x (: y (: z) and w (:) are elements in the sequence x, y, z and w respectively,to round the symbol down, mod (·,) is a complementation function, the recombination function reshape (a1, b1, c1) represents the rearrangement of array a1 into an array of size b1 × c1 in column-first order;
the matrix Block'1=bitxor(Block1,X),Block′2=bitxor(Block2,Y),Block′3=bitxor(Block3,Z),Block′4=bitxor(Block4W), wherein, bitxor (·,) is a binary bit XOR operation; the control word matrix ControlMatrix1Control word matrix control matrix (X, Y) ═ bitxor2=bitxor(Z,W)。
The method for performing the cross operation by using the control word matrix comprises the following steps: converting elements at corresponding positions in two matrixes to be crossed into eight-bit binary numbers A and B respectively, converting elements at corresponding positions in a control word matrix into eight-bit binary numbers respectively to obtain a control word C, and exchanging binary numbers at positions corresponding to control bits in the binary numbers A and B if the value of a certain control bit in the control word C is 1; when the value of a control bit in the control word C is 0, the binary character in the binary number a and the binary number B at the position corresponding to the control bit does not perform any operation.
The method for pixel diffusion in the sixth step comprises the following steps:
the ciphertext image C3Converting into one-dimensional Pixel sequence Pixel sequence with length of Height Width, and using key Pixel Pixel1For a one-dimensional pixel sequence PixelSequence directionPost-diffusion to obtain a one-dimensional sequence of pixels PixelSequence':
pixel Using Key Pixel2Forward diffusion of the backward diffusion resulting one-dimensional pixel sequence PixelSequence' results in a one-dimensional pixel sequence PixelSequence ":
reconstructing a one-dimensional pixel sequence PixelSequence with the length of Height × Width into a two-dimensional matrix with the size of Height × Width to obtain an encrypted ciphertext image C; wherein bitxor (·, ·) is a binary bit xor operation.
The invention has the beneficial effects that: the Joseph scrambling method associated with the pixel value associates the Joseph problem, the chaotic system and the pixel value, increases the sensitivity to the plaintext by means of the sensitivity and the pseudo-randomness of chaotic mapping to the initial condition and combining the advantage of Joseph traversal scrambling, and reduces the iteration times of the chaotic system in the scrambling process; the image is partitioned, and exclusive OR and cross operations are performed among the partitions to perform replacement operation on pixels by combining a high-dimensionality chaotic system, so that the randomness of the ciphertext image is increased, and the safety of the ciphertext image is also improved; the connection between the pixels is improved by using the diffusion operation of the pixels to make all the pixels in the ciphertext image influenced by other pixels. The simulation result and the security analysis show that the method has strong sensitivity to the key, can effectively resist attack operations such as statistical analysis, exhaustive analysis and the like, and can be used for image encryption.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the present invention.
FIG. 2 is a phase diagram of the Chen chaotic system of the present invention, wherein (a) is x-y, (b) is x-z, (c) is x-w, (d) is y-z, (e) is y-w, and (f) is z-w.
Fig. 3 shows an original image and an image scrambled using the josephson problem associated with pixel values according to the present invention, wherein (a) is a Lena original image, (b) is a scrambled Lena image, (c) is a Cameraman original image, and (d) is a scrambled Cameraman image.
FIG. 4 is a schematic diagram of the operation of pixel replacement according to the present invention, wherein (a) is a schematic diagram of the interleaving operation, and (b) is a flowchart of the image segmentation, bitwise XOR operation, and interleaving operation.
Fig. 5 shows an original image and a ciphertext image of the present invention, where (a) is a 128 × 128 Cameraman original image, (b) is a 256 × 256 Lena original image, (c) is a 256 × 256 Cameraman original image, (d) is a 512 × 512 Brain original image, (e) is a 128 × 128 Cameraman ciphertext image, (f) is a 256 × 256 Lena ciphertext image, (g) is a 256 × 256 Cameraman ciphertext image, and (h) is a 512 × 512 Brain ciphertext image.
FIG. 6 shows a 256 × 256 Lena original image, a ciphertext image, and a decrypted image when a key is slightly changed, where (a) the Lena original image, (b) is the correct decrypted image, and (c) is u1 changed by 10-15The decrypted image after (d) changes 10 for p-15The decrypted image is (e) x1Change 10-15The decrypted image after (f) is y1Change 10-15The decrypted image after (g) is z1Change 10-14The later decrypted image is (h) w1Change 10-15The subsequent decrypted image.
Fig. 7 shows a histogram of an original image, and a histogram of a ciphertext image according to the present invention, where (a) is a Lena original image, (b) is a Cameraman original image, (c) is a Baboon original image, (d) is a histogram of a Lena original image, (e) is a histogram of a Cameraman original image, (f) is a histogram of a Baboon original image, (g) is a histogram of a Lena ciphertext image, (h) is a histogram of a Cameraman ciphertext image, and (i) is a histogram of a Baboon ciphertext image.
Fig. 8 shows values of adjacent pixels in each direction in the Lena original image and the ciphertext image, where (a) is in the horizontal direction in the Lena original image, (b) is in the vertical direction in the Lena original image, (c) is in the diagonal direction in the Lena original image, (d) is in the horizontal direction in the Lena ciphertext image, (e) is in the vertical direction in the Lena ciphertext image, and (f) is in the diagonal direction in the Lena ciphertext image.
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 obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, a josephson traversal and hyperchaotic system image encryption method based on pixel value association is characterized by comprising the following steps:
the method comprises the following steps: inputting an original image with Height multiplied by Width into an SHA-384 hash function to obtain a 384-bit binary sequence H; equally dividing the 384-bit binary sequence H into 48 parts, and carrying out operation on eight groups to obtain piecewise linear mapping and an initial value of the Chen hyperchaotic system.
The present invention uses the SHA-384 function to generate the key required for encryption. The SHA-384 function is one of Hash secure Hash functions, and can convert an original image, i.e., a plaintext image, of an arbitrary length into a binary sequence of 384 bits in length. The SHA-384 function is irreversible and therefore cannot deduce any plaintext information by means of the key. The chaotic systems used by the invention are two in number, namely one-dimensional piecewise linear mapping and four-dimensional Chen hyperchaotic mapping. The initial values of the chaotic systems are six in total and are respectively u1,p,x1,y1,z1,w1. Calculating piecewise linear mapping and Chen super-mixing in the first stepThe method for initial values of a chaos system comprises the following steps: equally dividing the 384-bit binary sequence H into 48 parts to obtain 8-bit binary sequence H1,h2,…,h48The method for calculating the initial value of the Chen hyperchaotic system by using the piecewise linear mapping comprises the following steps:
wherein u is1And p is the initial value of the piecewise-linear mapping, x1、y1、z1、w1Is an initial value of a four-dimensional Chen hyperchaotic system,represents that corresponding position elements in two 8-bit binary sequences are subjected to exclusive OR operation u'1,x′1,y′1,z′1,w′1Is given an initial value.
Step two: and substituting the initial value of the piecewise linear mapping into the piecewise linear mapping for iteration to obtain a pseudorandom sequence U with the length of Height and Width, and substituting the initial value of the Chen hyperchaotic system into the Chen hyperchaotic system for iteration to obtain four pseudorandom sequences x, y, z and w with the length of Height and Width/4.
The chaotic system has great application value in cryptography, and is usually used as a pseudo-random number generator due to the characteristics of sensitive initial value and strong track ergodicity of the system. The pseudo-random index value sequence used in the scrambling process of the present invention is generated by piecewise linear mapping. The iterative equation of the piecewise linear mapping is as follows:
wherein, p is a parameter of the piecewise linear mapping, and the value range is (0, 0.5); u (i +1) ∈ [0,1) represents a pseudo-random number generated by the ith iteration of piecewise linear mapping, i is 1,2, … …, Height + Width-1; u (i) e [0,1) is the pseudo-random number or initial value u of the previous iteration used for the ith iteration1. Piecewise linear mappingInitial value u of radiation utilization1Iterating the Height + Width-1 times, and adding the initial value u1And the obtained Height + Width-1 pseudo random numbers form a chaos sequence u with the length of Height + Width, and the value range of elements in the chaos sequence u is [0,1 ].
In the josephson scrambling method associated with pixel values, the index value must be an integer greater than 0, so that the pseudo-random chaotic sequence U generated by the segmented linear mapping is reconstructed, and the chaotic sequence U is reconstructed into a pseudo-random sequence U:
wherein U (: is an element in the chaotic sequence U), the positions of the elements in the pseudo-random sequence U correspond to the positions of the elements in U (: one to one, and mod (,) represents a remainder function.
The first Height value of the sequence U is used as an initial value for row scrambling in the josephson scrambling method associated with the pixel value, and the last Width value is used as an initial value for column scrambling in the josephson scrambling method associated with the pixel value. For example, when u (1) ═ 0.23046875 and p ═ 0.37890625 of the piecewise linear mapping, the original images of Lena and Cameraman were scrambled using a modified josephson traversal method, with the results shown in fig. 3. As can be seen from fig. 3, the scrambled Lena image and Cameraman image are significantly different from the original Lena image and Cameraman image.
The chaotic system used in the pixel replacement process is a Chen hyperchaotic system, and compared with a low-dimensional chaotic system, the high-dimensional chaotic system has more initial values and system parameters, more complex tracks and safer system. The power equation of the Chen hyperchaotic system is as follows:
wherein,andthe parameters respectively represent the reciprocal of the kinetic parameters x ', y', z ', w', a, b, c, d and k are parameters of the Chen hyperchaotic system, and when a is 36, b is 3, c is 28, d is 16 and-0.7 is less than or equal to k is less than or equal to 0.7, the Chen hyperchaotic system is in a hyperchaotic state. When x (1) is 0.312, y (1) is 0.3828125, z (1) is 0.4765625, w (1) is 0.45703125, and k is 0.2, the Chen hyper-chaotic system is iterated by using the Runge-Kutta method, and a phase trajectory diagram of the Chen hyper-chaotic system is shown in FIG. 2. As can be seen from fig. 2, the Chen chaotic system has a complex track and strong ergodicity, and can be used for information encryption.
The method for obtaining the pseudorandom sequences x, y, z and w comprises the following steps: will start value x1、y1、z1、w1And (3) bringing the four-dimensional Chen hyperchaotic system, iterating the Chen hyperchaotic system for Height multiplied by Width/4+999 times, and omitting the value of the previous 999 iterations to eliminate the transient effect to obtain four pseudorandom sequences x, y, z and w with the length of Height multiplied by Width/4.
Step three: scrambling the original image by using the first Height pseudo random numbers of the pseudo random sequence U as index values and using a Josephson scrambling method associated with pixel values to obtain a ciphertext image C1。
The famous kosher Josephus is said to have the following story: after Roman occupies Josephaus, 39 jews hide in a hole with Josephaus and his friends, 39 jews decide to die rather or not to be caught by enemies, so a suicide mode is decided, 41 people arrange into a circle, count is started from the 1 st person, the person must suicide from every count to the 3 rd person, and then count is repeated from the next one until all the people suicide die. Josephus and his friends do not want to follow, however. The problem is that, given the total number and step size, where to stand initially to avoid being left to do? Josephus asks his friends to pretend to follow, and he arranges the friends and himself at the 16 th and 31 th positions, and gets rid of the dead game. It can be quantified for the josephson problem as a josephson function S' ═ F (S, k) in which the S sequence represents an ordered set of elements { S1,s2,s3,…,sNAnd k represents a step size. Taking the sequence S ═ {1, 2, 3, 4, 5, 6, 7}, k ═ 3 as an example, the solution of the josephson function is {3, 6, 2, 7, 5, 1, 4}, which represents that the elements 3, 6, 2, 7, 5, 1, 4 in the sequence are selected in turn. The josephson problem is a classical computational problem, also known as the josephson ring. The later person expands the Joseph problem, increases the starting site and the direction of circulation, and greatly enriches the connotation of the Joseph problem.
In order to enable Josephson traversal to be associated with plaintext, the invention modifies the Josephson problem, provides a Josephson traversal method associated with pixel values, expands the Josephson function and applies the expanded Josephson function to the scrambling process of the pixels to obtain the Josephson scrambling method associated with the pixel values. The extended josephson function is: s ═ F (S, InitialValue); wherein F (·,) is a Joseph function, S is a sequence to be scrambled and S ═ S1,s2,s3,…,sNAnd S' is a scrambled sequence, and InitialValue is an initial step size.
The implementation method of the extended Joseph function is as follows: the step size for the initial pass is InitialValue, and the step size for the nth cycle is S'n-1+ 1; wherein N is more than or equal to 2 and less than or equal to N, and N is the number of elements in the sequence S; the specific implementation method comprises the following steps:
step 1: obtaining S 'by using Joseph ring formed by traversal sequence S with InitialValue step length'1;
Step 2: is S 'in step length'1+1 traverse the Joseph ring to obtain S'2;
And step 3: and (3) circulating the step 2: is S 'in step length'n-1+1 traverse the Joseph ring to obtain S'n;
And 4, step 4: is S 'in step length'N-1+1 traverse the Joseph ring to obtain S'N;
And 5: s'1、S′2、……、S′n、……、S′NThe composed sequence is the scrambled sequence S'.
Assuming that given the sequence S {1, 0,255, 128, 100, 80, 60}, and the initialvalvalue ═ 3, the traversal steps of the extended josephson function F (S, InitialValue) are:
step 1: traversing Joseph ring by step length of 3 to obtain S'1=255;
Step 2: is S 'in step length'1Go through Joseph ring by +1 ═ 256 to obtain S'2=60;
And step 3: is S 'in step length'2Go through Joseph ring by +1 ═ 61 to obtain S'3=1;
And 4, step 4: is S 'in step length'3Go through Joseph ring by +1 ═ 2 to obtain S'4=128;
And 5: is S 'in step length'4Go through Joseph ring at +1 ═ 129 to obtain S'5=0;
Step 6: is S 'in step length'5Go through Joseph ring by +1 ═ 1 to obtain S'6=100;
And 7: is S 'in step length'6(ii) traverse of Joseph ring by +1 ═ 101 to obtain S'7=80。
Therefore, when S ═ 1, 0,255, 128, 100, 80, 60 and InitialValue ═ 3, the solution of the function F (S, InitialValue) is the sequence S ═ 255, 60, 1, 128, 0, 100, 80. The modified Josephson function is used in the scrambling process of the pixel, wherein InitialValue is the key of the scrambling process. The scrambling process is reversible, namely the encrypted pixel sequence S' and the initial step size InitialValue are known, and the original sequence S can be restored. The reduction process of the scrambling method can be described as S ═ F-1(S′,InitialValue)。
The implementation method of the josephson scrambling method related to the pixel values in the step three is as follows: taking the elements of a pseudorandom sequence U (j) as initial step length InitialValue and the element of the jth line of an original image as the element of a sequence S to be brought into an expanded Joseph function, and obtaining a sequence S' which is a scrambled ciphertext image C3Row j elements of (1); wherein j is 1,2, … …, Height. The specific method comprises the following steps:
s1: taking elements of a pseudo-random sequence U (j) as an initial step size, taking elements of a j-th line of an original image as a sequence S to be brought into an expanded Joseph function, and traversing the Joseph ring to obtain S'j1Wherein j is 1,2, … …, Height;
s2: is prepared from S'j1+1 as step size to traverse Joseph ring to get S'j2;
S3: loop step S2: is prepared from S'j(q)+1 as step size to traverse Joseph ring to get S'j(q+1)(ii) a Wherein q is 1,2, … …, Width-1;
s4: is prepared from S'j(Width-1)+1 as step size to traverse Joseph ring to get S'j(width);
S5:S′j1、S′j2……、S′j(q+1)、S′j(width)Sequence of S'jIs the scrambled sequence of the j-th line of the original image, i.e. S'j1、S′j2……、S′j(q)、S′j(width)Is a ciphertext image C1The element of the j-th row of (1).
The josephson scrambling method using correlation with pixel values includes a row scrambling operation and a column scrambling operation. Because the length of the sequence of pseudo-random index values used for scrambling is small, the sequence of pseudo-random index values used for scrambling will result from a piece-wise linear mapping.
Step four: the ciphertext image C1Equally dividing into 4 parts to obtain ciphertext blocks, respectively performing pixel replacement on pixels in the 4 ciphertext blocks by using pseudorandom sequences x, y, z and w, and recombining the replaced ciphertext blocks to obtain a ciphertext image C2。
The pixel scrambling scrambles the positions of the images, destroys the correlation between adjacent pixels, but the pixels are not calculated, so that the cryptology attack cannot be effectively resisted, and the relationship between the plaintext images and the ciphertext images can be thoroughly confused through pixel replacement. The present invention performs a permutation operation on pixels using an exclusive-or and a cross operation. The crossover operation is a commonly used operator in genetic algorithms, and a schematic diagram of the crossover operation is shown in fig. 4 (a). I.e. assuming that there are two pixels a and B to be encrypted, in order to make the interleaving reversible, here a control word C is added and A, B and C are both converted to eight-bit binary numbers: when a bit value in control word C is 1, the binary character in the pixel A, B corresponding to the control bit is swapped; when a bit value in control word C is 0, the binary word at the position corresponding to the control bit in pixel A, B does not perform any operation.
As shown in fig. 4(b), the method for performing pixel replacement in step four is:
step S1: and reconstructing the four pseudo-random sequences x, y, z and w to obtain four pseudo-random matrixes X, Y, Z, W with the value intervals of [0,255 ].
The reconstruction method of the pseudo-random matrix comprises the following steps:
wherein, x (: y (: z) and w (:) are elements in the sequence x, y, z and w respectively,to round the notation down, mod (·,) is a complementation function, and the recombination function reshape (a1, b1, c1) represents the rearrangement of array a1 into an array of size b1 × c1 in column-first order.
Step S2: the ciphertext image C with the size of Height multiplied by Width1Equally dividing the Block into ciphertext blocks with the size of Height multiplied by Width/41、Block2、Block3、Block4Respectively connected with the ciphertext blocks by using a pseudo-random matrix X, Y, Z, W1、Block2、Block3、Block4Performing bitwise XOR operation to obtain four matrixes Block'1,Block′2,Block′3,Block′4。
The matrix Block'1=bitxor(Block1,X),Block′2=bitxor(Block2,Y),Block′3=bitxor(Block3,Z),Block′4=bitxor(Block4W), wherein, bitxor (·, ·) is binary bit XOR operation, i.e. converting the elements at the corresponding positions of the ciphertext Block and the pseudorandom matrix into 8-bit binary numbers, then performing binary bit XOR calculation on the binary numbers at the corresponding positions, and then converting the 8-bit binary numbers into decimal numbers, namely, the matrix Block'1,Block′2,Block′3,Block′4The corresponding position of (1).
Step S3: respectively calculating control word matrix ControlMatrix by using pseudo-random matrix X, Y, Z, W1And control word matrix control matrix2。
The control word matrix ControlMatrix1Control word matrix control matrix (X, Y) ═ bitxor2Bitxor (Z, W). Namely, two pseudo-random matrixes are used for carrying out binary bit XOR operation to obtain a control word matrix.
Step S4: using a control word matrix control matrix1Matrix Block'1And matrix Block'4Performing cross operation to obtain a crossed matrix Block ″)1And the matrix Block ″)4(ii) a Using ControlMatrix2As a control word matrix, the matrix Block'2And matrix Block'3Performing cross operation to obtain a crossed matrix Block ″)2And the matrix Block ″)3。
The method for performing the cross operation by using the control word matrix comprises the following steps: converting elements at corresponding positions in two matrixes to be crossed into eight-bit binary numbers A and B respectively, converting elements at corresponding positions in a control word matrix into eight-bit binary numbers respectively to obtain a control word C, and exchanging binary numbers at positions corresponding to control bits in the binary numbers A and B if the value of a certain control bit in the control word C is 1; when the value of a control bit in the control word C is 0, the binary character in the binary number a and the binary number B at the position corresponding to the control bit does not perform any operation.
Step S5: the matrix Block after crossing ″', is1、Block″2、Block″3And Block ″)4Reconstituting ciphertext image C2。
Step five: using the last Width pseudo random numbers of the pseudo random sequence U as index values, the ciphertext image C is scrambled using the Josephson scrambling method associated with the pixel values2Performing a column scrambling operation to obtain a ciphertext image C3。
The implementation method of the Josephson scrambling method related to the pixel values in the step five is as follows: taking the element of the pseudorandom sequence U (Height + q) as the initial step InitialValue and the ciphertext image C2The q-th row of elements of (1) as elements of the sequence S are substituted into an extended Joseph function, and the obtained sequence S' is a scrambled ciphertext image C1Row j elements of (1); wherein q is 1,2, … …, Width. The concrete implementation method is the same as the third step.
Step six: using two key pixels Pixel1And Pixel2For ciphertext image C3And performing pixel diffusion operation on the pixels in the encrypted ciphertext image C to obtain the encrypted ciphertext image C.
In order to make the pixels in the dense text influence each other, the pixels are further diffused. First ciphertext image C3The image matrix is converted into a one-dimensional sequence, and then two operators are used for carrying out backward diffusion and forward diffusion on the pixels in sequence so as to ensure that each pixel in the image is influenced by other pixels. The method for pixel diffusion in the sixth step comprises the following steps:
the ciphertext image C3Converting into one-dimensional Pixel sequence Pixel sequence with length of Height Width, and using key Pixel Pixel1Back-diffusing the one-dimensional pixel sequence PixelSequence to obtain a one-dimensional pixel sequence PixelSequence':
pixel Using Key Pixel2Forward diffusion of one-dimensional pixel sequence PixelSequence obtained by backward diffusionScatter to get a one-dimensional sequence of pixels PixelSequence ":
and reconstructing the one-dimensional pixel sequence PixelSequence with the length of Height and Width into a two-dimensional matrix with the size of Height and Width to obtain an encrypted ciphertext image C. The decryption process of the pixel diffusion operation is the reverse process of the encryption process and will not be described herein.
The decryption method of the present invention is the reverse process of the encryption method, and thus the present invention is not described in detail.
When the encrypted initial keys are u'1=0,x′1=0,y′1=0,z′1=0,w′1=0,Pixel1=127,Pixel1At 255 f, the original and ciphertext images encrypted using the present invention are shown in fig. 5, and the simulation experiment was completed on the MATLABR2018a platform. By observation, the ciphertext image encrypted by the present invention has lost the features expressed by the original image entirely. Because the encryption algorithm of the invention is lossless, the decrypted image of the ciphertext image obtained by using the invention is identical to the original image, and is not listed. The security of the ciphertext image encrypted using the present invention will be quantitatively analyzed to prove the security of the encryption algorithm.
The present invention uses the binary sequence and two pixels generated by the SHA-384 algorithm as the initial key, whose key space is sufficient to resist exhaustive attacks. The two chaotic systems used by the invention are very sensitive to the initial value of the system, and when the initial value of the chaotic system is slightly changed, the decrypted image can be greatly changed. In fig. 6, the Lena original image with a size of 256 × 256, the ciphertext image and the decrypted image when the key is slightly changed are listed, and it can be seen by comparison that when the key is slightly changed, the ciphertext image cannot be correctly decrypted. The invention has strong key sensitivity. Mean Square Error (MSE) and peak signal-to-noise ratio (PSNR) can be used to measure the difference between the original image and the decrypted image when the key is slightly changed, the MSE is calculated as shown in equation (11), and the PSNR is calculated as shown in equation (12):
in formulae (11) and (12), P1(i, j) represents the pixel of the ith row and jth column of the original image, P2(i, j) represents the pixel of ith row and jth column of the decrypted image when the key is slightly changed, and Height and Width are the Height and Width of the image respectively. Generally, when MSE ≧ 30, it is stated that the difference between the two images is significant. The smaller the value of PSNR, the larger the difference between the two images. Taking Lena images as an example, when the key is slightly changed, the values of MSE and PSNR between the original image and the decrypted image are shown in table 1. By comparison, the key sensitivity of the invention is very strong.
Table 1 values of MSE and PSNR between original image and decrypted image when a slight change in key occurs
The histogram may reflect statistics of the values of all pixels in an image. In fig. 7, (a) - (c) are original images, (d) - (f) are histograms of the original images, and (g) - (i) are histograms of the ciphertext images. In the histogram of the original image, the pixel value distribution is concentrated, the histogram has certain statistical characteristics, and the histogram has no resistance to exhaustive attack. The distribution of the pixels in the ciphertext image is uniform and dispersed, the distribution rule of the pixels is broken, the statistical property is not provided any more, and an attacker cannot exhaust the original information of the image by using the statistical property, so the method can well resist the statistical analysis attack.
The distribution rule of the pixel histogram can be measured by using the variance of the histogram, namely histi(i is 0,1, …,255) represents the histogram of the image, the variance of the histogram isThe calculation formula is described as formula (13):
the histogram variance represents the degree of uniformity of the pixel value distribution in the image histogram, and the smaller the variance of the histogram, the more uniform the pixel value distribution. The variance of the images listed in fig. 7 is shown in table 2. Through comparison, the method greatly changes the variance of the image and has good capability of breaking the histogram distribution of the original image.
TABLE 2 variance statistics of histograms
Information entropy is a concept proposed by shannon to quantify the amount of information, and shannon quantifies the uncertainty of information using information entropy. The information entropy is calculated according to the formula (14):
where s represents the total number of events that may occur in the source and p (i) represents the probability that each event i may occur in the source. The entropy h(s) of information can be used to measure the degree of randomness of the image. When the information entropy of the image is calculated using formula (14), histi(i ═ 0,1, …,255) represents a histogram of the image. An ideal random image has 1/256 probabilities of each value appearing in its pixels, so the information entropy of the random image is ideally 8. When the information entropy of the image is close to 8, the randomness of the image is strong. Table 3 lists the information entropies of the original image and the ciphertext image using the encryption method of the present invention, and by comparison, the ciphertext image encrypted using the present inventionThe information entropy of the image is close to 8, so that the randomness of the ciphertext image is strong.
TABLE 3 information entropy of original and ciphertext images
In fig. 8, (a) - (c) are statistics of values of adjacent pixels in the horizontal direction, the vertical direction, and the diagonal direction of the Lena original image, and (d) - (f) are statistics of values of adjacent pixels in the horizontal direction, the vertical direction, and the diagonal direction of the Lena ciphertext image. The values of the adjacent pixels in most areas in the original image are very close, and the correlation of the values of the pixels at the adjacent positions of the image is strong. The ciphertext image breaks the strong correlation among the pixels and has great significance for resisting statistical analysis attacks. The calculation method of the correlation coefficient between adjacent pixels is shown in formula (15):
wherein x isiRepresenting the value of the selected pixel, yiRepresents sum xiN denotes the total number of selected pixels, e (x) is the mean of the selected pixels, e (y) is the mean of the pixels adjacent to the selected pixels, d (x) denotes the variance of the selected pixels, d (y) denotes the variance of the pixels adjacent to the selected pixels, cov (x, y) denotes the covariance between x, y, rxyRepresenting the covariance between x and y.
10000 pairs of pixel points are randomly selected, and correlation coefficients in the horizontal direction, the vertical direction and the diagonal direction of an original image and a ciphertext image are counted. The statistical results are shown in table 4. The statistical results in table 4 show that the correlation of the randomly selected pixels in the original image is strong, and the correlation coefficient between the pixels in the ciphertext image is close to 0. The encryption method provided by the invention can better disturb the correlation among pixels, so that the statistical analysis attack can be better resisted.
TABLE 4 correlation coefficient of original image and ciphertext image in each direction
Differential attacks refer to making a small change in the plaintext and then analyzing the change in the ciphertext by comparison. The two indexes of the pixel number change rate (NPCR) and the normalized average change strength (UACI) can reflect the capacity of the algorithm for resisting differential attack, the calculation method of the NPCR is shown as a formula (16), and the calculation method of the UACI is shown as a formula (17):
in equation (12), sign () is a sign function, and its calculation method is shown in equation (18):
the ideal value of the NPCR is 100%, the ideal value of the UACI is 33.4635%, and after the plaintext is slightly changed, the closer the values of the NPCR and the UACI are to the ideal values, the stronger the differential attack resistance of the encryption algorithm is. Table 5 lists the values of NPCR and UACI of the ciphertext images when the plaintext images change by 1bit, and a comparison shows that the present invention has a good differential attack resistance.
TABLE 5 values of NPCR, UACI after 1bit change of the plaintext image
The invention improves the Joseph problem, and provides a Joseph scrambling method associated with pixel values, which associates the Joseph problem, a chaotic system and the pixel values, increases the sensitivity to a plaintext, and reduces the iteration times of the chaotic system in the scrambling process. The invention uses the high-dimensionality chaotic system to perform replacement operation on the pixels, increases the randomness of the encryption system and simultaneously improves the safety of the system. The invention enables all the pixels in the ciphertext image to be influenced by other pixels by using the diffusion operation of the pixels, thereby improving the relation between the pixels. Simulation results and security analysis show that the method is safe and can be used for image encryption.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (8)
1. A Joseph traversal and hyperchaotic system image encryption method based on pixel value association is characterized by comprising the following steps:
the method comprises the following steps: inputting an original image with Height multiplied by Width into an SHA-384 hash function to obtain a 384-bit binary sequence H; equally dividing the 384-bit binary sequence H into 48 parts, and operating eight parts to obtain an initial value of piecewise linear mapping and an initial value of the Chen hyperchaotic system;
step two: substituting the initial value of the piecewise linear mapping into the piecewise linear mapping for iteration to obtain a pseudorandom sequence U with the length of Height and Width, and substituting the initial value of the Chen hyperchaotic system into the Chen hyperchaotic system for iteration to obtain four pseudorandom sequences x, y, z and w with the length of Height and Width/4;
step three: scrambling the original image by using the first Height pseudo random numbers of the pseudo random sequence U as index values and using a Josephson scrambling method associated with pixel values to obtain a ciphertext image C1;
Step four: the ciphertext image C1Equally dividing into 4 parts to obtain ciphertext blocks, respectively performing pixel replacement on pixels in the 4 ciphertext blocks by using pseudorandom sequences x, y, z and w, and recombining the replaced ciphertext blocks to obtain a ciphertext image C2;
Step five: post Width number of dummy with pseudo-random sequence URandom numbers are used as index values, and the ciphertext image C is subjected to Joseph scrambling method associated with pixel values2Performing a column scrambling operation to obtain a ciphertext image C3;
Step six: using two key pixels Pixel1And Pixel2For ciphertext image C3Performing pixel diffusion operation on the pixels in the encrypted ciphertext image C to obtain an encrypted ciphertext image C;
the implementation method of the josephson scrambling method related to the pixel values in the step three is as follows: taking elements U (j) of a pseudorandom sequence U as initial step length InitialValue and j row elements of an original image as elements of a sequence S to be substituted into a Joseph function, and obtaining a sequence S' which is a scrambled ciphertext image C1Row j elements of (1); wherein j is 1,2, … …, Height;
the implementation method of the Josephson scrambling method related to the pixel values in the step five is as follows: taking an element U (Height + q) of a pseudorandom sequence U as an initial step InitialValue and a ciphertext image C2The q-th row of elements of (1) is taken as the element of the sequence S to be substituted into the Joseph function, and the obtained sequence S' is a scrambled ciphertext image C3The q-th column element of (1); wherein q is 1,2, … …, Width;
the Joseph function is: s ═ F (S, InitialValue);
wherein, F (,) is a Joseph function, S is a sequence to be scrambled, S' is a scrambled sequence, and InitialValue is an initial step size;
the implementation method of the Joseph function comprises the following steps: the step size for the initial pass is InitialValue, and the step size for the nth cycle is S'n-1+ 1; wherein N is more than or equal to 2 and less than or equal to N, and N is the number of elements in the sequence S; the specific implementation method comprises the following steps:
step 1: obtaining S 'by using Joseph ring formed by traversal sequence S with InitialValue step length'1;
Step 2: is S 'in step length'1+1 traverse the Joseph ring to obtain S'2;
And step 3: and (3) circulating the step 2: is S 'in step length'n-1+1 traverse the Joseph ring to obtain S'n;
And 4, step 4: is S 'in step length'N-1+1 traverse the Joseph ring to obtain S'N;
And 5: s'1、S′2、……、S′n、……、S′NThe composed sequence is the scrambled sequence S'.
2. The method for image encryption based on Joseph traversal and hyperchaotic system with associated pixel values as claimed in claim 1, wherein the method for calculating the initial values of piecewise linear mapping and Chen hyperchaotic system in the first step is: equally dividing the 384-bit binary sequence H into 48 parts to obtain 8-bit binary sequence H1,h2,…,h48The method for calculating the initial value of the Chen hyperchaotic system by using the piecewise linear mapping comprises the following steps:
wherein u is1And p is the initial value of the piecewise-linear mapping, x1、y1、z1、w1Is an initial value of a four-dimensional Chen hyperchaotic system,represents that corresponding position elements in two 8-bit binary sequences are subjected to exclusive OR operation u'1,x′1,y′1,z′1,w′1Is given an initial value.
3. The method of claim 2, wherein the piecewise linear mapping has an iterative equation of:
wherein, p is the initial value of the piecewise linear mapping, and the value range is (0, 0.5); u (i +1) ∈ [0,1) represents the ith iteration of the piecewise linear mappingA generated pseudo random number, i ═ 1,2, … …, Height + Width-1; u (i) e [0,1) is the pseudo-random number or initial value u of the previous iteration used for the ith iteration1;
The power equation of the Chen hyperchaotic system is as follows:
wherein,andrespectively representing the derivatives of the dynamic parameters x ', y', z 'and w', a, b, c, d and k are parameters of the Chen hyperchaotic system, and setting the initial value x of the Chen hyperchaotic system1、y1、z1、w1The dynamic parameters x ', y', z 'and w' of the dynamic equation brought into the Chen hyperchaotic system; when a is 36, b is 3, c is 28, d is 16 and-0.7 is less than or equal to k is less than or equal to 0.7, the Chen hyperchaotic system is in a hyperchaotic state.
4. The method for encrypting the Joseph traversal and hyperchaotic system image based on pixel value association according to claim 3, wherein the pseudo-random sequence U is implemented by: piecewise linear mapping using an initial value u1Iterating the Height + Width-1 times, and adding the initial value u1And the obtained Height + Width-1 pseudo random numbers form a chaos sequence u with the length of Height + Width; reconstructing the chaotic sequence U into a pseudo-random sequence U:
wherein u (:) is an element in the chaotic sequence u, and mod (,) represents a complementation function;
the method for obtaining the pseudorandom sequences x, y, z and w comprises the following steps: will start value x1、y1、z1、w1And (3) bringing a four-dimensional Chen hyperchaotic system power equation, iterating the Chen hyperchaotic system power equation for Height multiplied by Width/4+999 times, and omitting the value of the former 999 iterations to obtain four pseudorandom sequences x, y, z and w with the length of Height multiplied by Width/4.
5. The method for encrypting the Josephson traversal and hyperchaotic system image based on pixel value association according to claim 1, wherein the method for pixel replacement in the fourth step is:
step S1: reconstructing the four pseudo-random sequences x, y, z and w to obtain four pseudo-random matrixes X, Y, Z, W with the value intervals of [0,255 ];
step S2: the ciphertext image C with the size of Height multiplied by Width1Equally dividing the Block into ciphertext blocks with the size of Height multiplied by Width/41、Block2、Block3、Block4Respectively connected with the ciphertext blocks by using a pseudo-random matrix X, Y, Z, W1、Block2、Block3、Block4Performing bitwise XOR operation to obtain four matrixes Block'1,Block′2,Block′3,Block′4;
Step S3: respectively calculating control word matrix ControlMatrix by using pseudo-random matrix X, Y, Z, W1And control word matrix control matrix2;
Step S4: using a control word matrix control matrix1Matrix Block'1And matrix Block'4Performing cross operation to obtain a crossed matrix Block ″)1And the matrix Block ″)4(ii) a Using ControlMatrix2As a control word matrix, the matrix Block'2And matrix Block'3Performing cross operation to obtain a crossed matrix Block ″)2And the matrix Block ″)3;
Step S5: the matrix Block after crossing ″', is1、Block″2、Block″3And Block ″)4Reconstituting ciphertext image C2。
6. The method for encrypting the Josephson traversal and hyperchaotic system image based on pixel value association according to claim 5, wherein the reconstruction method of the pseudo random matrix is as follows:
wherein, x (: y (: z) and w (:) are elements in the sequence x, y, z and w respectively,to round the symbol down, mod (·,) is a complementation function, the recombination function reshape (a1, b1, c1) represents the rearrangement of array a1 into an array of size b1 × c1 in column-first order;
the matrix Block'1=bitxor(Block1,X),Block′2=bitxor(Block2,Y),Block′3=bitxor(Block3,Z),Block′4=bitxor(Block4W), wherein, bitxor (·,) is a binary bit XOR operation; the control word matrix ControlMatrix1Control word matrix control matrix (X, Y) ═ bitxor2=bitxor(Z,W)。
7. The method for encrypting the Josephson traversal and hyperchaotic system images based on pixel value association according to claim 5, wherein the method for performing the crossover operation by using the control word matrix is: converting elements at corresponding positions in two matrixes to be crossed into eight-bit binary numbers A and B respectively, converting elements at corresponding positions in a control word matrix into eight-bit binary numbers respectively to obtain a control word C, and exchanging binary numbers at positions corresponding to control bits in the binary numbers A and B if the value of a certain control bit in the control word C is 1; when the value of a control bit in the control word C is 0, the binary character in the binary number a and the binary number B at the position corresponding to the control bit does not perform any operation.
8. The method for encrypting the Josephson traversal and hyperchaotic system image based on pixel value association according to claim 1 or 5, wherein the method for pixel diffusion in the sixth step is:
the ciphertext image C3Converting into one-dimensional Pixel sequence Pixel sequence with length of Height Width, and using key Pixel Pixel1Back-diffusing the one-dimensional pixel sequence PixelSequence to obtain a one-dimensional pixel sequence PixelSequence':
pixel Using Key Pixel2Forward diffusion of the backward diffusion resulting one-dimensional pixel sequence PixelSequence' results in a one-dimensional pixel sequence PixelSequence ":
reconstructing a one-dimensional pixel sequence PixelSequence with the length of Height × Width into a two-dimensional matrix with the size of Height × Width to obtain an encrypted ciphertext image C; wherein bitxor (·, ·) is a binary bit xor operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910349652.9A CN110086601B (en) | 2019-04-28 | 2019-04-28 | Joseph traversal and hyperchaotic system image encryption method based on pixel value association |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910349652.9A CN110086601B (en) | 2019-04-28 | 2019-04-28 | Joseph traversal and hyperchaotic system image encryption method based on pixel value association |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110086601A CN110086601A (en) | 2019-08-02 |
CN110086601B true CN110086601B (en) | 2020-03-10 |
Family
ID=67417308
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910349652.9A Active CN110086601B (en) | 2019-04-28 | 2019-04-28 | Joseph traversal and hyperchaotic system image encryption method based on pixel value association |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110086601B (en) |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110838908B (en) * | 2019-11-11 | 2023-07-07 | 陕西师范大学 | Image encryption and decryption method based on GF matrix transformation and random hierarchical fusion |
CN111353166B (en) * | 2020-02-25 | 2021-10-26 | 南通大学 | Encryption method for converting picture into Chinese character |
CN111464291B (en) * | 2020-02-26 | 2021-06-29 | 北京邮电大学 | Quantum key randomness detection device |
CN111432244A (en) * | 2020-03-17 | 2020-07-17 | 中国人民解放军国防科技大学 | Lightweight image encryption and decryption method, device and system based on attributes |
CN111444522B (en) * | 2020-03-19 | 2024-02-27 | 南昌大学 | Random blocking chaotic image encryption method |
CN112636895A (en) * | 2020-09-07 | 2021-04-09 | 长沙理工大学 | Image encryption and decryption method and image encryption and decryption system |
CN112202545B (en) * | 2020-10-26 | 2021-07-23 | 郑州轻工业大学 | Image encryption method based on Y-type filling curve and variable-step Joseph traversal |
CN112543093B (en) * | 2020-11-27 | 2022-06-10 | 长沙理工大学 | Image encryption method, device and storage medium based on double-entropy source hyperchaotic system |
CN112769545B (en) * | 2020-12-22 | 2022-01-28 | 郑州轻工业大学 | Image encryption method based on adjacent pixel Joseph transformation and Mealy state machine |
CN113067696B (en) * | 2021-03-30 | 2022-07-29 | 中国科学院大学 | Multi-round symmetrical digital image encryption method and system based on bit grouping |
CN113536377B (en) * | 2021-07-20 | 2023-09-05 | 南京邮电大学 | Encryption domain cross-modal information retrieval method based on hyperchaotic pseudorandom sequence |
CN114389788B (en) * | 2021-12-17 | 2024-04-16 | 中国人民解放军海军工程大学 | Image encryption algorithm with mixed chaos and block scrambling |
CN114239037B (en) * | 2021-12-27 | 2024-06-04 | 中国矿业大学 | Multi-image encryption method based on sand road rule |
CN114928436B (en) * | 2022-07-20 | 2022-09-27 | 华东交通大学 | Wisdom campus network safety protection system |
CN115314600B (en) * | 2022-10-12 | 2023-01-24 | 山东沃尔美肥业有限公司 | Chemical fertilizer production monitoring data management method |
CN115733933B (en) * | 2022-11-29 | 2023-10-31 | 南京先维信息技术有限公司 | Network security encryption method based on artificial intelligence |
CN115719300B (en) * | 2023-01-09 | 2023-05-12 | 浙江出海云技术有限公司 | Personnel information management method for big data |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103929563A (en) * | 2014-04-11 | 2014-07-16 | 陕西师范大学 | Image encryption and decryption method based on improved Joseph traversal and generalized Henon mapping |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040202326A1 (en) * | 2003-04-10 | 2004-10-14 | Guanrong Chen | System and methods for real-time encryption of digital images based on 2D and 3D multi-parametric chaotic maps |
CN103489151B (en) * | 2013-09-11 | 2014-06-18 | 河南大学 | Color image encryption method based on chaos sequence and hyper-chaos system |
CN108718232B (en) * | 2018-08-17 | 2021-03-26 | 中国矿业大学 | Image encryption method based on AES and chaos |
-
2019
- 2019-04-28 CN CN201910349652.9A patent/CN110086601B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103929563A (en) * | 2014-04-11 | 2014-07-16 | 陕西师范大学 | Image encryption and decryption method based on improved Joseph traversal and generalized Henon mapping |
Also Published As
Publication number | Publication date |
---|---|
CN110086601A (en) | 2019-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110086601B (en) | Joseph traversal and hyperchaotic system image encryption method based on pixel value association | |
Zhu et al. | 2D logistic-modulated-sine-coupling-logistic chaotic map for image encryption | |
Wang et al. | An image encryption algorithm based on Josephus traversing and mixed chaotic map | |
CN109660696B (en) | New image encryption method | |
CN112714235B (en) | Image encryption method based on filling curve and adjacent pixel bit scrambling | |
CN107220923B (en) | Digital picture feedback encryption method based on image network | |
CN110086600B (en) | Image encryption method based on hyperchaotic system and variable step length Joseph problem | |
CN112202545B (en) | Image encryption method based on Y-type filling curve and variable-step Joseph traversal | |
CN113660079B (en) | Image encryption method based on self diffusion and DNA coding | |
CN103258312B (en) | There is the digital image encryption method of fast key stream generting machanism | |
Aslam et al. | Fourth order MCA and chaos-based image encryption scheme | |
CN107392970B (en) | Digital image encryption method based on bit plane and high-dimensional chaotic system | |
CN113129196B (en) | Image encryption method based on DNA sequence and memristor chaos | |
CN112769545B (en) | Image encryption method based on adjacent pixel Joseph transformation and Mealy state machine | |
Liu et al. | Cryptanalysis and enhancement of an image encryption scheme based on bit-plane extraction and multiple chaotic maps | |
CN109361830B (en) | Image encryption method based on plaintext | |
Cun et al. | A new chaotic image encryption algorithm based on dynamic DNA coding and RNA computing | |
CN115766962A (en) | Multi-key image encryption method based on five-dimensional conservative hyperchaotic system | |
CN113691362A (en) | Bit plane image compression encryption algorithm based on hyperchaotic system and DNA coding | |
Zhou et al. | Novel multiple-image encryption algorithm based on a two-dimensional hyperchaotic modular model | |
CN110225222B (en) | Image encryption method based on 3D orthogonal Latin square and chaotic system | |
CN115580687A (en) | Multi-image encryption method based on variable parameter hyperchaotic system and S-shaped diffusion | |
Zhao et al. | A novel image encryption algorithm by delay induced hyper-chaotic chen system | |
Xuelong et al. | A symmetric cryptography based on extended cellular automata | |
Wang et al. | An adaptive image encryption scheme based on bit-level permutation |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |