CN110086600B - Image encryption method based on hyperchaotic system and variable step length Joseph problem - Google Patents
Image encryption method based on hyperchaotic system and variable step length Joseph problem Download PDFInfo
- Publication number
- CN110086600B CN110086600B CN201910349398.2A CN201910349398A CN110086600B CN 110086600 B CN110086600 B CN 110086600B CN 201910349398 A CN201910349398 A CN 201910349398A CN 110086600 B CN110086600 B CN 110086600B
- Authority
- CN
- China
- Prior art keywords
- sequence
- image
- matrix
- joseph
- bit binary
- 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 87
- 239000011159 matrix material Substances 0.000 claims description 50
- 230000008569 process Effects 0.000 claims description 12
- 101150060512 SPATA6 gene Proteins 0.000 claims description 8
- 230000008707 rearrangement Effects 0.000 claims description 3
- 230000006798 recombination Effects 0.000 claims description 3
- 238000005215 recombination Methods 0.000 claims description 3
- 230000035945 sensitivity Effects 0.000 abstract description 6
- 230000000739 chaotic effect Effects 0.000 description 20
- 238000004422 calculation algorithm Methods 0.000 description 13
- 210000004556 brain Anatomy 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 238000007619 statistical method Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000005336 cracking Methods 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000002441 reversible effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification 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
- 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
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32101—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
- H04N1/32144—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
- H04N1/32149—Methods relating to embedding, encoding, decoding, detection or retrieval operations
- H04N1/32267—Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
- H04N1/32272—Encryption or ciphering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Image Processing (AREA)
Abstract
The invention provides an image encryption method based on a hyperchaotic system and a variable step size Joseph problem, which comprises the following steps: inputting an original image into a key generation function to generate a binary sequence, and calculating an initial value of the hyper-chaotic system; utilizing a hyperchaotic system to carry out iteration and generating four pseudo-random sequencesX、Y、Z、W(ii) a Using sequencesXScrambling each line in the original image by using variable step length Joseph function as key input to obtain imageI 1(ii) a Will be sequencedYAs a key pair imageI 1Pixel position scrambling based on Joseph ring to obtain imageI 2(ii) a Will be sequencedZScrambling image with variable step size Joseph function as key inputI 2Get the image for each column ofI 3(ii) a Will be sequencedWElement pair image ofI 3And performing two-bit binary addition/subtraction to obtain a ciphertext image. The invention associates the plaintext with the key, has plaintext sensitivity and can resist attack of selecting the plaintext; has strong key space and sharp key sensitivity.
Description
Technical Field
The invention relates to the technical field of image safety transmission, in particular to an image encryption method based on a hyper-chaotic system and a variable step length Joseph problem.
Background
In recent years, the SHA-1 cryptographic algorithm and the MD5 cryptographic algorithm, which have been commonly used, have been successively broken. Once the SHA-1 and MD5 cryptographic algorithms are highly secure, they take almost a hundred years to crack even with the most advanced computers. However, the introduction of the modular differential bit analysis method increases the probability of cracking the 5 international universal hash function algorithms including SHA-1 and MD5 cryptographic algorithms, so that these algorithms can be cracked in a short time. In the face of powerful cracking attack by hackers, the traditional cipher system based on mathematical computation cannot completely meet the requirement of information encryption due to insufficient security and other reasons. Due to the huge demand for protecting information security, in recent years, a great number of new encryption algorithms are proposed by scientific researchers to protect the information security. The image information has large data volume, strong correlation among data and huge encryption difficulty, so that finding a suitable image encryption method is always a target pursued by the majority of scientific researchers.
The chaotic system is one of nonlinear power systems, has complex pseudo-randomness, is neither periodic nor convergent, is very sensitive to an initial value of the system, and small changes of the initial value of the system can influence the evolution of the whole system. 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 encryption algorithm of the chaotic system has extremely high safety, and can make up for the defects of insufficient randomness and weak relevance with a plaintext of the traditional encryption algorithm. In 1997, Fridrich J proposed an encryption algorithm based on chaotic mapping, which was applied to image encryption for the first time. Subsequently, a plurality of image encryption algorithms based on the chaotic system are proposed successively, and the chaotic system is gradually developed from a low-dimensional chaotic system to a hyper-chaotic system, a multi-stage chaotic system, a mixed chaotic system and the like. These new chaotic systems enrich the cryptographic connotation.
Disclosure of Invention
Aiming at the technical problems that the existing encryption method is insufficient in safety and cannot completely meet the information encryption requirement, the invention provides an image encryption method based on a hyperchaotic system and a variable step length Joseph problem, which has the advantages of extremely large key space, good pseudo-randomness, sensitivity to plaintext, resistance to various typical attacks and capability of being used in the field of image encryption.
In order to achieve the purpose, the technical scheme of the invention is realized as follows: an image encryption method based on a hyperchaotic system and a variable step size Joseph problem comprises the following steps:
the method comprises the following steps: inputting the original image with height width into a key generation function to generate a binary sequence, and calculating an initial value of the hyper-chaotic system through the binary sequence;
step two: bringing the initial value calculated in the step one into a hyper-chaotic system for iteration to generate four pseudorandom sequences X, Y, Z and W with the length (height) width);
step three: converting the sequence X into a matrix X of height width1Using matrix X1Taking each line sequence as a secret key, inputting the secret key into a variable step length Joseph function to obtain an index sequence, scrambling each line in the original image by using the index sequence to obtain an encrypted image I1;
Step four: converting the sequence Y into a sequence in which all elements are in the interval [1,30 ]]Inner height width matrix Y1For image I1Using a matrix Y for each pixel in1The element corresponding to the position of the key is used as a key to carry out pixel position disordering operation based on the Joseph ring to obtain an encrypted image I2;
Step five: converting the sequence Z into a matrix Z of height width1Using a matrix Z1Using each sequence as key to input variable step length Joseph function to obtain index sequence, scrambling image I with index sequence2Obtaining an encrypted image I for each column of the image3;
Step six: converting the sequence W into a sequence where all elements are in the interval [0,255]]Inner height width matrix W1Using the image I3Each pixel in (1) and matrix W1And performing two-bit binary addition or subtraction operation on the elements at the corresponding positions to replace the pixels to obtain an encrypted ciphertext image C.
The key generation function is a SHA-256 function that converts the original image into a 256-bit binary Hash sequence H.
The method for calculating the initial value of the hyper-chaotic system through the binary sequence comprises the following steps: equally dividing a 256-bit binary Hash sequence H into 32 8-bit binary sequences H with equal length1,h2,h3…h32Calculating the initial value x of the hyper-chaotic system1、y1、z1And w1:
Wherein,is exclusive OR operation, x'1、y′1、z′1And w'1Indicating the initial value of a given parameter.
The hyperchaotic system comprises:
wherein,z、the reciprocal of the state variables x, y, z and w, a, b, c, d, e, f and g are parameters of the hyper-chaotic system; when a is 1.55, b is 1.24, c is 0.25, d is 0.05, e is 2.6, f is 0.21 and g is 0.48, the hyperchaotic system is in a hyperchaotic state.
The pseudo-random sequence X, the pseudo-random sequence Y, the pseudo-random sequence Z and the pseudo-random sequence W are respectively initial values X of the hyper-chaotic system1、y1、z1And w1And performing iteration 1000 times, and then selecting iteration values of the state variables x, y, z and w.
The matrix X for converting the sequence X into height width1The method comprises the following steps:
converting the sequence Y into a sequence in which all elements are in the interval [1,30 ]]Inner height width matrix Y1The method comprises the following steps:
converting the sequence Z into a matrix Z of height width1The method comprises the following steps:
converting the sequence W into a sequence where all elements are in the interval [0,255]]Inner height width matrix W1The method comprises the following steps:
wherein,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.
The variable step length josephson function in the third step and the fifth step is f (M, N, D, L), wherein the parameter D is the circulation direction, when D is 1, the clockwise circulation is represented, and when D is-1, the counterclockwise circulation is represented; the parameter L is a cycle step length; the parameter N is a pseudo-random sequence N ' (N ') containing M elements '1,N′2,N′3…N′M) And the ith circulation parameter N is equal to N '(i), wherein M is the number of elements of the pseudo-random sequence N'.
The method for scrambling the image by using the index sequence in the third step and the fifth step is the scrambling of pixel positions, namely, the matrix X1Each line sequence or moment inArray Z1Using each sequence as pseudo-random sequence N 'to input variable step length Joseph function to obtain index sequence s', and using the row or image I of original image2Is represented by s {1,2,3,4 … M } → s '{ s'1,s′2,s′3,s′4…s′MThe rule of.
The method for the Joseph ring-based pixel position scrambling operation in the fourth step is as follows: will matrix Y1The value with the median position of (h1, g1) is used as a key input to the joseph function to obtain an index sequence s' ═ f (8, Y1(h1, g1), L); image I1The pixel with the middle position of (h1, g1) is converted into an 8-bit binary number; bits of the pixel are expressed as s {1,2,3,4 … 8} → s '{ s'1,s′2,s′3,s′4…s′8The rule of the method is scrambled; wherein h1 is more than or equal to 1 and less than or equal to height, g1 is more than or equal to 1 and less than or equal to width, and L is the circulating step length.
The method for performing pixel replacement by using two-bit binary addition or subtraction operation in the sixth step comprises the following steps: image I3The pixel of the middle position (h1, g1) is converted to an 8-bit binary digit, then this 8-bit binary digit is split into 4 two-bit binary digits, then the 4 two-bit binary digits and the matrix W1The value of the position (h1, g1) is also split into 4 keys of two-bit binary digits for two-bit binary addition or subtraction, wherein h1 is equal to or greater than 1 and equal to or less than height, and g1 is equal to or greater than 1 and equal to or less than width; the two-bit binary addition or subtraction does not consider the carry and borrow conditions in the addition or subtraction process, only the last two-bit binary digit in the operation result is reserved, and 32 conditions are totally adopted:
+ | 00 | 01 | 10 | 11 | - | 00 | 01 | 10 | 11 |
00 | 00 | 01 | 10 | 11 | 00 | 00 | 11 | 10 | 01 |
01 | 01 | 10 | 11 | 00 | 01 | 01 | 00 | 11 | 10 |
10 | 10 | 11 | 00 | 01 | 10 | 10 | 01 | 00 | 11 |
11 | 11 | 00 | 01 | 10 | 11 | 11 | 10 | 01 | 00 |
the invention has the beneficial effects that: the method is applied to the image encryption process, combines the pseudo-random chaotic sequence generated by the hyper-chaotic system with the Joseph problem, increases the rule of traversing the Joseph ring, and increases the method of pixel position scrambling. The invention associates the plaintext with the key, has plaintext sensitivity and can resist attack of selecting the plaintext; meanwhile, the method has strong key space and sharp key sensitivity. When the classic attack test is carried out, the method has good safety performance, and can resist various classic attacks such as statistical attack, differential attack, cutting attack and the like, so that the method can effectively protect the image safety and can be widely applied to encryption and transmission of image information.
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 schematic structural diagram of the present invention.
FIG. 2 is a phase trajectory diagram of the hyper-chaotic system of the present invention.
Fig. 3 is a flow chart of a pixel scrambling method based on a pseudo-random sequence.
Fig. 4 shows an original image and a ciphertext image of the present invention, where (a) is 128 × 128 Camera original image, (b) is 256 × 256 Camera original image, (c) is 256 × 256 Brain original image, (d) is 256 × 256 White original image, (e) is the ciphertext image of (a), (f) is the ciphertext image of (b), (g) is the ciphertext image of (c), and (h) is the ciphertext image of (d).
Fig. 5 is histograms of an original image and a ciphertext image, in which (a) is a Cameraman original image, (b) is a Cameraman ciphertext image, (c) is a Brain original image, and (d) is a Brain ciphertext image.
Fig. 6 shows a clipped ciphertext image and a decrypted image, where (a) shows an 1/64-clipped ciphertext image, (b) shows a 1/16-clipped ciphertext image, (c) shows a 1/4-clipped ciphertext image, (d) shows a decrypted image of (a), (e) shows a decrypted image of (b), and (f) shows a decrypted image of (c).
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, an image encryption method based on hyperchaotic system and variable step size josephson problem includes the following steps:
the method comprises the following steps: and inputting the original image with height width into a key generation function to generate a binary sequence, and calculating an initial value of the hyper-chaotic system through the binary sequence.
The key generation function is a SHA-256 function that converts the original image into a 256-bit binary Hash sequence H.
The method for calculating the initial value of the hyper-chaotic system through the binary sequence comprises the following steps: equally dividing a 256-bit binary Hash sequence H into 32 8-bit binary sequences H with equal length1,h2,h3…h32Calculating the initial value x of the hyper-chaotic system1、y1、z1And w1:
Wherein,the xor operation is performed, that is, the xor operation is performed on corresponding positions in the two 8-bit binary sequences. x'1、y′1、z′1And w'1Indicating the initial value of a given parameter.
Step two: and (4) bringing the initial value calculated in the step one into a hyper-chaotic system for iteration to generate four pseudorandom sequences X, Y, Z and W with the length (height) width).
The phenomenon of chaos is a phenomenon of pseudo random irregular motion occurring in a deterministic system. The motion process is neither periodic nor convergent, and is very sensitive to system parameters, and small changes in system parameters can cause great differences in motion trajectories. The characteristics of the chaotic system are highly coincident with the requirements of cryptography on keys and key streams, and the chaotic system is widely applied to cryptography. The low-dimensional chaotic system has few initial values and system parameters, and the orbit of the chaotic system can be predicted in a short term. Compared with a low-dimensional chaotic system, the high-dimensional chaotic system has more initial values and system parameters and more complex tracks, so that the chaotic system is developing towards higher dimensions in recent decades.
The invention uses a new hyperchaotic system proposed by Zhang Na and the like to realize the scrambling and replacement operation of the pixels of the plaintext image. The hyper-chaotic system is defined as shown in formula (2):
wherein,z、the reciprocal of the state variables x, y, z and w, a, b, c, d, e, f and g are parameters of the hyper-chaotic system; when a is 1.55, b is 1.24, c is 0.25, d is 0.05, e is 2.6, f is 0.21 and g is 0.48, the hyperchaotic system is in a hyperchaotic state. The hyperchaotic system has a positive number Lyapunov coefficient, meets the requirement of NIST test, and has extremely high safety. And (3) taking the step length of 0.002, and iterating the hyperchaotic system by using a Runge-Kutta method, wherein a phase trajectory diagram of the hyperchaotic system is shown in figure 2. As shown in FIG. 2, the hyper-chaotic system has more complex orbit and is safer.
The pseudo-random sequence X, the pseudo-random sequence Y, the pseudo-random sequence Z and the pseudo-random sequence W are respectively initial values X of the hyper-chaotic system1、y1、z1And w1And performing iteration 1000 times, and then selecting iteration values of the state variables x, y, z and w. After the initial value is obtained, iteration is carried out on the hyper-chaotic system, and the value of the previous 1000 iterations is abandoned, so that the transient effect of the hyper-chaotic system can be removed. Four pseudo-random sequences X, Y, Z and W may be used to perform the scrambling and permuting operations on the pixels.
Step three: converting the sequence X into a matrix X of height width1Using matrix X1Using each line sequence as a key to input into a variable step length Joseph function to obtain an index sequence, and scrambling each line in the original image by using the index sequenceObtaining an encrypted image I1。
The matrix X for converting the sequence X into height width1The method comprises the following steps:
wherein X (is) is an element in the sequence X,to round the symbol down, mod (·,) is a complementation function. reshape (,) represents 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 josephson problem is a circular traversal problem whose source is the story experienced by the famous kosher Josephus. The josephson problem can be described as: enclosing the M elements into a circle, circularly traversing the circle in sequence, deleting the Nth element, and continuing to perform the operation from the (N + 1) th element until the last element is selected from the circle. Josephson's problem is expressed as a function, i.e., f (M, N). For example, the solution of the function f (8,25) is to enclose the elements 1,2,3,4,5,6,7,8 into a circle, and then cycle through and delete the 25 th element in order, where the sequentially deleted elements in the joseph ring are: 1,5,6,4,7,8,2,3. For this yet another solution, still taking f (8,25) as an example, i.e. element 1,2,3,4,5,6,7,8 is formed into a one-dimensional sequence, and mod (25,8) is first calculated to be 1, i.e. the 1 st element, i.e. element 1, is selected and deleted for the first time. The new sequence 2,3,4,5,6,7,8 is composed of the remaining elements and mod (25,7) is calculated to be 4, i.e., the second selected and deleted element is the 4 th element in the new sequence, element 5. The new sequence 6,7,8,2,3,4 is composed of the remaining elements and mod (25,6) is then calculated to be 1, i.e., the element selected and deleted for the third time is the 1 st element in the new sequence, i.e., element 6. By analogy, the Joseph problem can be solved quickly.
In order to expand the Joseph problem and increase the content and form of the Joseph problem, a new rule is introduced into the Joseph problem by Desheng et al, namely, a starting point S is added on the basis of the original rule, and the Joseph function is expanded to f (M, N, S). On the basis of expanding Joseph 'S problem to Desheng et al, Guo et al further add a cycle direction and a count interval to the Joseph' S problem and expand the Joseph function to f (M, N, S, D, L), where the parameter D is the cycle direction, and represents clockwise cycle when D is 1 and counterclockwise cycle when D is-1; the parameter L is the count interval. This approach greatly increases the diversity of josephson traversals.
The invention is continuously improved on the basis of the expanding method aiming at the Joseph problem, and provides a step-length-variable cyclic traversal method. Combines the Joseph problem with the chaotic system image, expands the parameter N in the Joseph problem into a pseudo-random sequence N '(N'1,N′2,N′3…N′M) The parameter N-N 'is used at the ith cycle during the traversal of the Joseph ring'iThe cycle is performed as a step size. Due to the sequence N '(N'1,N′2,N′3…N′M) The number in the method is a pseudo-random number, and can be infinitely expanded, so that the Joseph cycle traversal method is greatly increased. For example, when N' ═ 1,2,3,4,5,6,7,8, the solution function f (8, (1,2,3,4,5,6,7,8),1,1,0) results in 1,3,6,4,5,2,7, 8. Meanwhile, the method can also be used for expanding the count interval L, which is not described herein again.
The variable step josephson function is f (M, N, D, L), wherein the parameter D is the direction of circulation, indicating clockwise circulation when D is 1 and counterclockwise circulation when D is-1; the parameter L is a cycle step length; the parameter N is a pseudo-random sequence N ' (N ') containing M elements '1,N′2,N′3…N′M) And the ith circulation parameter N is equal to N '(i), wherein M is the number of elements of the pseudo-random sequence N'.
Scrambling is a common method of changing the location, which can be scrambled by a specific rule to effect encryptionAnd (5) effect. The scrambling method used by the invention is to correspond the positions of the elements in the sequence to be scrambled to the positions of the elements in the sequence s with equal length, and then to make the sequence s { s }1,s2,s3,s4,snIs scrambled into the sequence s '{ s'1,s′2,s′3,s′4,s′nAnd scrambling the original sequence into a new sequence according to the rule to obtain a scrambled sequence. The flow chart of the scrambling method is shown in fig. 3, and the decryption process of the pixel scrambling method is the reverse process of the encryption process, and thus is not described again.
Using matrix X1The method for scrambling the original image by each row sequence in the image coding method is to perform scrambling operation on the positions of pixels, and the method for scrambling the image by using the index sequence is to scramble the positions of the pixels, namely, the matrix X is1As a pseudo random sequence N ', a variable step length joseph function is input to obtain an index sequence s', and a pixel sequence consisting of lines of the original image is represented by s {1,2,3,4 … M } → s '{ s'1,s′2,s′3,s′4…s′MAnd (4) scrambling the rule of (1), wherein the value of M is height.
Step four: converting the sequence Y into a sequence in which all elements are in the interval [1,30 ]]Inner height width matrix Y1For image I1Using a matrix Y for each pixel in1The element corresponding to the position of the key is used as a key to carry out pixel position disordering operation based on the Joseph ring to obtain an encrypted image I2。
Converting the sequence Y into a sequence in which all elements are in the interval [1,30 ]]Inner height width matrix Y1The method comprises the following steps:
all elements of matrix Y1 lie in the interval [1,30 ]]. The method for the Joseph ring-based pixel position scrambling operation in the fourth step is as follows: will matrix Y1The value with the median position of (h1, g1) is used as a key input to the joseph function to obtain an index sequence s' ═ f (8, Y1(h1,g1),L); image I1The pixel with the middle position of (h1, g1) is converted into an 8-bit binary number; bits of the pixel are expressed as s {1,2,3,4 … 8} → s '{ s'1,s′2,s′3,s′4…s′8The rule of the method is scrambled; wherein h1 is more than or equal to 1 and less than or equal to height, g1 is more than or equal to 1 and less than or equal to width, and L is the circulating step length.
Step five: converting the sequence Z into a matrix Z of height width1Using a matrix Z1Using each sequence as key to input variable step length Joseph function to obtain index sequence, scrambling image I with index sequence2Obtaining an encrypted image I for each column of the image3。
Converting the sequence Z into a matrix Z of height width1The method comprises the following steps:
the method of scrambling the image using the index sequence is pixel position scrambling, i.e. matrix Z1Using each sequence as pseudo-random sequence N 'and inputting variable step length Joseph function to obtain index sequence s', and making image I2Is represented by s {1,2,3,4 … M } → s '{ s'1,s′2,s′3,s′4…s′MAnd (4) scrambling the M, wherein the value of M is width.
Step six: converting the sequence W into a sequence where all elements are in the interval [0,255]]Inner height width matrix W1Using the image I3Each pixel in (1) and matrix W1And performing two-bit binary addition or subtraction operation on the elements at the corresponding positions to replace the pixels to obtain an encrypted ciphertext image C.
Converting the sequence W into a sequence where all elements are in the interval [0,255]]Inner height width matrix W1The method comprises the following steps:
all elements of the matrix W1 lie in the interval [0,255 ].
The invention uses two-bit binary digit addition and subtraction to replace the pixel. In a binary digit of two bits, there is a special rule of addition and subtraction. The two-bit binary addition or subtraction does not consider the carry and borrow conditions in the addition or subtraction process, and only the last two-bit binary digit in the operation result is reserved. For example, '10' + '11' ═ 01 ',' 01 '-' 10 '═ 11'. When such an addition-subtraction rule is used, there are 32 possible cases, and these 32 cases are shown in table 1.
TABLE 1 32 cases of two-bit binary digit addition and subtraction
+ | 00 | 01 | 10 | 11 | - | 00 | 01 | 10 | 11 |
00 | 00 | 01 | 10 | 11 | 00 | 00 | 11 | 10 | 01 |
01 | 01 | 10 | 11 | 00 | 01 | 01 | 00 | 11 | 10 |
10 | 10 | 11 | 00 | 01 | 10 | 10 | 01 | 00 | 11 |
11 | 11 | 00 | 01 | 10 | 11 | 11 | 10 | 01 | 00 |
The method for performing pixel replacement by using two-bit binary addition or subtraction operation in the sixth step comprises the following steps: image I3The pixel of the middle position (h1, g1) is converted to an 8-bit binary digit, then this 8-bit binary digit is split into 4 two-bit binary digits, then the 4 two-bit binary digits and the matrix W1The value of the position (h1, g1) is also split into 4 keys of two-bit binary digits for two-bit binary addition or subtraction, where 1 ≦ h1 ≦ height, and 1 ≦ g1 ≦ width. For example, using 225 and 108 for two-bit binary digit addition and subtraction, 225 and 101 should be first converted to 8-bit binary digits '11100001' and '01101100', respectively, and then the two digits are split into two-bit binary digits for addition, resulting in '00001101'. This number is converted to a decimal number, resulting in 13. The two-bit binary addition and subtraction operation is a reciprocal process.
The decryption process of the encryption method of the present invention is the reverse process of the encryption process, and thus is not described in detail.
The present invention can be used to encrypt digital images of any size, the original and ciphertext images encrypted using the present invention are shown in fig. 4, where the Hash sequence used as the initial key is generated from the original image, and the additional partial keys are a 1.55, b 1.24, c 0.25, D0.05, e 2.6, f 0.21, g 0.48, S1, D1, L0, x'1=0,y′1=0,z′1=0,w′10. As can be seen from fig. 4(e) - (h), the listed examples of the ciphertext image have completely lost the features of the original image, and the encryption method of the present invention works well. Moreover, the encryption method is lossless, and the decrypted image is completely consistent with the original image.
The histogram is an index for counting the value of each pixel, and reflects the number of each pixel in the image. Histograms of the original image and the ciphertext image are listed in fig. 5. Compared with the pixel histograms of the original image and the ciphertext image, the pixel value distribution of the original image is concentrated, the statistical characteristic is certain, and the resistance to exhaustive attack is not realized. The pixels of the ciphertext image are distributed uniformly and dispersedly, the distribution rule of the pixels is broken, the statistical property is not available, and an attacker cannot recover the original information of the image by using the statistical property, so that the statistical analysis attack can be well resisted.
For the original image, the correlation of the values of the pixels between adjacent positions of the image is strong because the values of the adjacent pixels are very close in most regions. And strong correlation among pixels is broken, and the method has great significance for resisting statistical analysis attacks. The calculation method of the correlation coefficient between adjacent pixels is shown in formula (7):
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.
5000 pairs of pixel points are randomly selected, correlation coefficients in the horizontal direction, the vertical direction and the diagonal direction of the original image and the ciphertext image are counted, and the statistical result is shown in table 2.
TABLE 2 correlation coefficient of original image and cipher text image in each direction
The statistical results in table 2 show that in the original image, the correlation of the randomly selected pixels is strong, while in the ciphertext image, the correlation coefficient between the pixels is close to 0. The invention can better disturb the correlation among the pixels, thereby better resisting the attack of statistical analysis.
The differential attack analysis refers to the steps of slightly changing an original image, encrypting the original image, analyzing a ciphertext image and analyzing the sensitivity of the ciphertext image to a plaintext. The indexes for measuring the capability of resisting the differential attack are NPCR (pixel change rate) and UACI (pixel mean change strength), which are calculated as shown in formula (8).
Wherein, P1(i, j) and P2(i, j) indicates the pixel values at position (i, j) of the correctly decrypted image and the encrypted image when a slight change in the plaintext occurs, and height, width, indicates the height and width of the image, respectively.
The theoretical expectation for NPCR and UACI is 100% and 33.4635%, respectively. The values of NPCR and UACI between the ciphertext image and the original ciphertext image when the original image is changed by 1bit are listed in the table 3, and the data in the table 3 are close to theoretical values, so that the ciphertext image encrypted by the method has strong relevance with the original image, and the ciphertext image can be completely changed even if the original image is slightly changed by 1 bit.
TABLE 3 values of NPCR and UACI at small changes in the original image
Image of a person | NPCR | UACI |
Camera 128*128 | 99.6216 | 33.2842 |
|
99.6109 | 33.3735 |
Camera 512*512 | 99.5941 | 33.4795 |
Brain 128*128 | 99.5544 | 33.3126 |
|
99.5789 | 33.3460 |
Brain 512*512 | 99.6094 | 33.4677 |
White 128*128 | 99.6033 | 33.7762 |
|
99.6506 | 33.4553 |
White 512*512 | 99.6109 | 33.5130 |
Information entropy is a concept used to quantify and measure information, which can be used to measure the degree of randomness and uniformity of the distribution of pixels in an image. If the pixel distribution of the image is very uniform and random, the image will have good entropy. On the contrary, if the pixel distribution in the image is regular, the information entropy is poor. For a gray scale image, each pixel may appear to have 256 states, and thus each state of a pixel may have a probability of 1/256. For a completely randomly distributed image, the ideal information entropy should be 8. And if the gray values of all pixels in a gray image are equal, the information entropy is 0. The calculation method of the information entropy h(s) is shown in equation (9). Wherein, p (m) represents the probability of each pixel m, the value range of m is [0,255], and n is the number of times of the pixel m.
Table 4 lists some information entropies of images encrypted by the present invention, and it can be known through comparison that the obtained ciphertext image has good information entropy, which is closer to an ideal value of 8, and the ciphertext image has good randomness.
TABLE 4 information entropy of original and ciphertext images
The data loss attack refers to an attack mode of intercepting the ciphertext image and deleting partial data. A certain amount of data loss occurs after the ciphertext image is attacked, and if the recovery capability effect of the decryption algorithm is limited, the decrypted image of the ciphertext image with the information loss cannot provide enough effective information. The data loss attack test analysis refers to deleting partial pixels of the ciphertext image, performing a corresponding decryption algorithm, comparing and analyzing the obtained decrypted image and the original image, and counting the recovery degree of the decrypted image and the original image. Fig. 6 shows a ciphertext image and a corresponding decrypted image after a data loss attack.
In order to analyze the capability of the invention for resisting data loss, on the basis of analyzing indexes such as correlation between a decrypted image and an original image after being attacked, NPCR, UACI and the like, two indexes of MSE (mean square error) and PSNR (peak signal-to-noise ratio) are also used for measuring the similarity degree of the two images. MSE and PSNR are calculated as shown in equation (10) and equation (11). Generally, when MSE ≦ 30dB, there is no significant difference between the two images, and when MSE >30, the closer the value of MSE is to 30, the smaller the difference between the two images. The PSNR reflects the magnitude of the image distortion, and the larger the PSNR, the smaller the image distortion.
Table 5 lists various indexes of the decrypted image after the Cameraman image is subjected to the data loss attack. The comparison shows that the method has certain recovery capability when suffering data loss attack and certain resistance capability to the data loss attack.
TABLE 5 indexes of decrypted image after Cameraman image suffers data loss attack
The invention provides an image encryption method based on a hyper-chaotic system and a variable step length Joseph ring by analyzing and improving the Joseph problem, combines a pseudo-random chaotic sequence generated by the hyper-chaotic system with the Joseph problem, increases the rule of traversing the Joseph ring, and increases the method of pixel position scrambling. Experimental results show that the method has a larger key space to resist exhaustive attacks, can resist various classical attacks such as statistical attacks, differential attacks and cutting attacks, and can be widely applied to encryption and transmission of image information.
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. An image encryption method based on a hyperchaotic system and a variable step length Joseph problem is characterized by comprising the following steps of:
the method comprises the following steps: inputting the original image with height width into a key generation function to generate a binary sequence, and calculating an initial value of the hyper-chaotic system through the binary sequence;
step two: bringing the initial value calculated in the step one into a hyper-chaotic system for iteration to generate four pseudorandom sequences X, Y, Z and W with the length of height width;
step three: converting the sequence X into a matrix X of height width1Using matrix X1Taking each line sequence as a secret key, inputting the secret key into a variable step length Joseph function to obtain an index sequence, scrambling each line in the original image by using the index sequence to obtain an encrypted image I1;
Step four: converting the sequence Y into a sequence in which all elements are in the interval [1,30 ]]Inner height width matrix Y1For image I1Using a matrix Y for each pixel in1The element corresponding to the position of the key is used as a key to carry out pixel position disordering operation based on the Joseph ring to obtain an encrypted image I2;
Step five: converting the sequence Z into a matrix Z of height width1Using a matrix Z1Using each sequence as key to input variable step length Joseph function to obtain index sequence, scrambling image I with index sequence2Obtaining an encrypted image I for each column of the image3;
Step six: converting the sequence W into a sequence where all elements are in the interval [0,255]]Inner height width matrix W1Using the image I3Each pixel in (1) and matrix W1Performing two-bit binary addition or subtraction operation on elements at corresponding positions to replace pixels to obtain an encrypted ciphertext image C;
the variable step length Josephson function in the third step and the fifth step is f (M, N, D, L), wherein the parameter D is the circulation direction, and when D is 1, the parameter D represents thatClockwise circulation, when D ═ 1, representing counter-clockwise circulation; the parameter L is a cycle step length; the parameter N is a pseudo-random sequence N ' (N ') containing M elements '1,N′2,N′3…N′M) When the sequence passes through the ith cycle, the parameter N is equal to N '(i), wherein M is the number of elements of the pseudorandom sequence N';
the method for scrambling the image by using the index sequence in the third step and the fifth step is the scrambling of pixel positions, namely, the matrix X1Each row sequence or matrix Z in1Using each sequence as pseudo-random sequence N 'to input variable step length Joseph function to obtain index sequence s', and using the row or image I of original image2Is represented by the sequence s {1,2,3,4 … M } → s '{ s'1,s′2,s′3,s′4…s′MThe rule of.
2. The image encryption method based on hyperchaotic system and variable step size josephson problem as claimed in claim 1, characterized in that the key generation function is SHA-256 function, which converts the original image into 256-bit binary Hash sequence H.
3. The image encryption method based on hyperchaotic system and variable step size josephson problem according to claim 2, characterized in that the method of calculating the initial value of hyperchaotic system by binary sequence is: equally dividing a 256-bit binary Hash sequence H into 32 8-bit binary sequences H with equal length1,h2,h3…h32Calculating the initial value x of the hyper-chaotic system1、y1、z1And w1:
4. The image encryption method based on hyperchaotic system and variable step size josephson problem according to claim 1 or 3, characterized in that the hyperchaotic system is:
5. The image encryption method based on hyperchaotic system and variable step size Joseph problem according to claim 4, characterized in that the pseudo-random sequence X, sequence Y, sequence Z and sequence W are respectively the hyperchaotic system to initial value X1、y1、z1And w1And performing iteration 1000 times, and then selecting iteration values of the state variables x, y, z and w.
6. The image encryption method based on hyperchaotic system and variable step size Josephson problem as claimed in claim 1, characterized in that the sequence X is converted into a matrix X of height width1The method comprises the following steps:
converting the sequence Y into a sequence in which all elements are in the interval [1,30 ]]Inner height width matrix Y1The method comprises the following steps:
converting the sequence Z into a matrix Z of height width1The method comprises the following steps:
converting the sequence W into a sequence where all elements are in the interval [0,255]]Inner height width matrix W1The method comprises the following steps:
7. The image encryption method based on hyperchaotic system and variable step size josephson problem according to claim 1, characterized in that the method of josephson ring based pixel position scrambling operation in step four is: will matrix Y1The variable step length joseph function with the value with the middle position of (h1, g1) as the key input obtains an index sequence s' ═ f (8, Y)1(h1, g1),1, L); image I1The pixel with the middle position of (h1, g1) is converted into an 8-bit binary number; the bits of a pixel are ordered by the sequence s {1,2,3,4 … 8} → s '{ s'1,s′2,s′3,s′4…s′8The rule of the method is scrambled; wherein h1 is more than or equal to 1 and less than or equal to height, g1 is more than or equal to 1 and less than or equal to width, and L is the circulating step length.
8. The image encryption method based on hyperchaotic system and variable step size Josephson problem as claimed in claim 6, wherein the method of pixel replacement by two-bit binary addition or subtraction in the sixth step is: image I3Neutral positionThe pixels of position (h1, g1) are converted to an 8-bit binary number, then this 8-bit binary number is split into 4 two-bit binary numbers, then the 4 two-bit binary numbers and the matrix W1The value of the position (h1, g1) is also split into 4 keys of two-bit binary digits for two-bit binary addition or subtraction, wherein h1 is equal to or greater than 1 and equal to or less than height, and g1 is equal to or greater than 1 and equal to or less than width; the two-bit binary addition or subtraction does not consider the carry and borrow conditions in the addition or subtraction process, only the last two-bit binary digit in the operation result is reserved, and 32 conditions are totally adopted:
。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910349398.2A CN110086600B (en) | 2019-04-28 | 2019-04-28 | Image encryption method based on hyperchaotic system and variable step length Joseph problem |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910349398.2A CN110086600B (en) | 2019-04-28 | 2019-04-28 | Image encryption method based on hyperchaotic system and variable step length Joseph problem |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110086600A CN110086600A (en) | 2019-08-02 |
CN110086600B true CN110086600B (en) | 2020-11-06 |
Family
ID=67417272
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910349398.2A Active CN110086600B (en) | 2019-04-28 | 2019-04-28 | Image encryption method based on hyperchaotic system and variable step length Joseph problem |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110086600B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111105339B (en) * | 2019-12-23 | 2020-11-03 | 郑州轻工业大学 | Image encryption method based on multidimensional chaotic system and Joseph scrambling |
CN112422266B (en) * | 2020-10-28 | 2022-07-15 | 郑州轻工业大学 | Hyperchaotic encryption method based on Joseph traversal and bit plane reconstruction |
CN112543093B (en) * | 2020-11-27 | 2022-06-10 | 长沙理工大学 | Image encryption method, device and storage medium based on double-entropy source hyperchaotic system |
CN114389787B (en) * | 2021-12-06 | 2024-05-07 | 中南大学 | Carrier-free information hiding method and system based on chaotic system and computer storage medium |
CN115719300B (en) * | 2023-01-09 | 2023-05-12 | 浙江出海云技术有限公司 | Personnel information management method for big data |
Citations (4)
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 |
CN107659751A (en) * | 2017-09-19 | 2018-02-02 | 中国矿业大学 | More image encryption methods based on DNA encoding and chaos |
CN108650434A (en) * | 2018-05-08 | 2018-10-12 | 吉林大学 | A kind of method of image encryption |
AU2018102042A4 (en) * | 2018-12-10 | 2019-01-17 | Li, Lili MISS | A color image encryption based on optical chaos and secure sharing in cloud |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108366181B (en) * | 2018-01-23 | 2019-10-01 | 西南财经大学 | A kind of image encryption method based on hyperchaotic system and multistage scramble |
-
2019
- 2019-04-28 CN CN201910349398.2A patent/CN110086600B/en active Active
Patent Citations (4)
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 |
CN107659751A (en) * | 2017-09-19 | 2018-02-02 | 中国矿业大学 | More image encryption methods based on DNA encoding and chaos |
CN108650434A (en) * | 2018-05-08 | 2018-10-12 | 吉林大学 | A kind of method of image encryption |
AU2018102042A4 (en) * | 2018-12-10 | 2019-01-17 | Li, Lili MISS | A color image encryption based on optical chaos and secure sharing in cloud |
Non-Patent Citations (1)
Title |
---|
基于约瑟夫和Henon映射的比特位图像加密算法;郭毅,邵利平,杨 璐;《计 算 机 应 用 研 究》;20141029;第32卷(第4期);第1131-1137页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110086600A (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 | |
CN110086600B (en) | Image encryption method based on hyperchaotic system and variable step length Joseph problem | |
Lu et al. | An efficient image encryption scheme based on the LSS chaotic map and single S-box | |
Sahari et al. | A pseudo-random numbers generator based on a novel 3D chaotic map with an application to color image encryption | |
CN109918923B (en) | Multi-channel color image chaotic encryption method based on DNA coding | |
CN106778304B (en) | Rapid chaotic image encryption method with plaintext related scrambling mechanism | |
CN107220923B (en) | Digital picture feedback encryption method based on image network | |
Shahna et al. | Novel hyper chaotic color image encryption based on pixel and bit level scrambling with diffusion | |
CN112422266B (en) | Hyperchaotic encryption method based on Joseph traversal and bit plane reconstruction | |
Liu et al. | Cryptanalysis and improvement in a plaintext-related image encryption scheme based on hyper chaos | |
CN107590842B (en) | Image encryption method and device based on pixel and DNA cross dynamic chaotic password | |
CN109756322B (en) | Digital image encryption method based on DES structure and DNA coding | |
CN107633175B (en) | Chaos-based rapid color image encryption method | |
CN112769545B (en) | Image encryption method based on adjacent pixel Joseph transformation and Mealy state machine | |
CN108737685B (en) | Image encryption method based on chaotic self-adaptive mechanism | |
CN112202545B (en) | Image encryption method based on Y-type filling curve and variable-step Joseph traversal | |
CN104851071A (en) | Digital image encryption method based on three-dimensional chaotic system | |
CN110837651A (en) | Color image encryption method based on fractional order discrete neural network and DNA operation | |
CN113691362A (en) | Bit plane image compression encryption algorithm based on hyperchaotic system and DNA coding | |
Murugan et al. | A hybrid image encryption algorithm using chaos and Conway's game‐of‐life cellular automata | |
CN115955298A (en) | Plaintext-based hyper-chaotic image unified key encryption method | |
CN117499005A (en) | Image encryption method based on 4D chaotic system | |
CN111756518A (en) | Color image encryption method based on memristor hyperchaotic system | |
CN109376793B (en) | Image encryption method based on four-dimensional Chen hyper-chaotic system and K-means clustering | |
Ahmed et al. | An effective color image encryption scheme based on double piecewise linear chaotic map method and rc4 algorithm |
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 |