CN116389652B - Color image parallel encryption method based on vectorization technology - Google Patents

Color image parallel encryption method based on vectorization technology Download PDF

Info

Publication number
CN116389652B
CN116389652B CN202310378435.9A CN202310378435A CN116389652B CN 116389652 B CN116389652 B CN 116389652B CN 202310378435 A CN202310378435 A CN 202310378435A CN 116389652 B CN116389652 B CN 116389652B
Authority
CN
China
Prior art keywords
diffusion
scrambling
image
key
chaotic
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
Application number
CN202310378435.9A
Other languages
Chinese (zh)
Other versions
CN116389652A (en
Inventor
葛滨
沈志华
廖忠智
王海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong Vocational College
Original Assignee
Nantong Vocational College
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nantong Vocational College filed Critical Nantong Vocational College
Priority to CN202310378435.9A priority Critical patent/CN116389652B/en
Publication of CN116389652A publication Critical patent/CN116389652A/en
Application granted granted Critical
Publication of CN116389652B publication Critical patent/CN116389652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems
    • H04N1/448Rendering the image unintelligible, e.g. scrambling
    • H04N1/4486Rendering the image unintelligible, e.g. scrambling using digital data encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/001Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Facsimile Transmission Control (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a color image parallel encryption method based on vectorization technology, which comprises the following steps: separating the color image into three components, and horizontally splicing the three components to obtain a pixel matrix; extracting an initial state and the number of pre-iterations by using the hash value of the color image and an external key; generating a diffusion key matrix according to the initial state and the pre-iteration times; obtaining a scrambling key according to the initial state and the pre-iteration times; obtaining an initial vector key according to the initial state and the pre-iteration times; four-wheel synchronous scrambling and diffusion are respectively carried out on the pixel matrix by using three groups of keys; and (5) dividing and combining the scrambled and diffused ciphertext images to obtain a color ciphertext image. According to the invention, by splicing the three color components in the horizontal and vertical directions, the full scrambling and diffusion between the color components and in the color components are realized, the encryption strength and the encryption efficiency are balanced, and the method is obviously superior to the existing scheme.

Description

Color image parallel encryption method based on vectorization technology
Technical Field
The invention relates to the technical field of image encryption, in particular to a color image parallel encryption method based on vectorization technology.
Background
Digital images play an important role in information interaction, and thus protection of image information is increasingly important. Digital images differ from text information in that there is a high correlation between adjacent pixels, so conventional data encryption algorithms for encrypting text are not suitable for encrypting images. The chaotic system has the characteristics of high sensitivity, ergodic property, unpredictability and the like to the initial secret key, and has been widely applied to the field of image encryption. At present, besides optimizing and improving the chaotic system per se so as to generate the chaotic system with better randomness and stronger degradation resistance, the construction of a more robust and reliable encryption method by using the chaotic sequence is also a focus of researchers.
Scrambling and diffusion are structures commonly adopted by image encryption algorithms based on chaotic systems, and the scrambling and diffusion have proved to be capable of better solving the problem of over-high internal correlation of images, and a series of improved optimization schemes can well realize high-intensity encryption of the images. In the scrambling stage, the positions of the pixel points are randomly scrambled by a pseudo-random sequence generated by a chaotic system, so that the strong correlation between adjacent pixels of an original plaintext image is effectively destroyed and reduced. The object to be scrambled can be classified into pixel level scrambling and bit level scrambling, and the method to be scrambled can be classified into magic square transformation, random rearrangement, zigzag scanning, and the like. In the diffusion stage, the pseudo-random sequence generated by the chaotic system is further used for calculating the pixel values, so that the original statistical characteristics of the plaintext image are fully hidden, and the association between the plaintext image and the ciphertext image is complicated as much as possible. In terms of the diffusion step, two to more than three encryption processes based on the ciphertext block link mode are generally required to obtain a better diffusion effect, and in terms of the diffusion method, the better encryption effect can be achieved by combining technologies such as compressed sensing, time-frequency conversion, gene coding and the like.
The application potential of the chaotic system in the field of image encryption is undoubted, however, a plurality of problems exist in the actual use process, and the most prominent problem is low operation efficiency. On the one hand, in order to pursue better pseudo-random characteristics, a high-dimensional chaotic system or a hyperchaotic system is adopted, the systems are usually continuous chaotic systems, and the equation solving of the system can keep better chaotic characteristics on a digital system by relying on high-precision algorithms such as a Dragon-Greek tower, so that the time consumption is obviously increased. On the other hand, the reason is that the traditional diffusion process needs to convert the two-dimensional pixel matrix of the image into a one-dimensional pixel sequence, and then the backward diffusion process based on ciphertext block link is carried out pixel by pixel and repeated for more than two times, thereby greatly reducing the operation efficiency. This situation is particularly prominent in the field of color image encryption, and currently there is a scheme of decomposing a color image into three components of red, green and blue, and then synchronously acting on the three components by using a gray image encryption algorithm, thereby reducing the running time of the color image. The essence of the methods has a fatal disadvantage that three components are regarded as three independent gray images, extremely strong correlation among the three components is ignored, and the three components are encrypted by adopting the same encryption method and parameters, so that the method has potential safety hazards for attack of cryptanalyzers.
Disclosure of Invention
The invention aims to provide a color image parallel encryption method based on a vectorization technology, and aims to design a color image encryption algorithm by adopting the vectorization technology, wherein the color image encryption method mainly aims to reset three color components of a color image into a whole for scrambling and diffusion, and realizes parallel encryption of pixel values of the whole row or the whole column of the image by utilizing the vectorization technology, so that the safety defect that the three color components are respectively encrypted by the existing color image encryption method can be overcome, and the encryption speed is higher.
In order to solve the technical problems, an embodiment of the present invention provides a color image parallel encryption method based on vectorization technology, including the following steps:
s1, separating the color image P into three components P R 、P G 、P B And the three components are horizontally spliced to obtain a pixel matrix M 1 =[P R ,P G ,P B ];
S2, respectively extracting initial states x of the diffusion chaotic system by utilizing hash values HV of color images and one-time session keys SK 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And a pre-iteration number pre 2 Scrambling an initial state x of a chaotic system 3 (1) And a pre-iteration number pre 3 Initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4
S3, utilizing an initial state x of the diffusion chaotic system 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And a pre-iteration number pre 2 Obtaining a diffusion chaotic sequence S 1 、S 2 、S 3 、S 4 And generates a diffusion key matrix DK after quantization, filling and transposition processes R 、DK G 、DK B
S4, utilizing initial state x of scrambling chaotic system 3 (1) And a pre-iteration number pre 3 Obtaining a scrambling chaotic sequence S 5 And four empty sequences are filled to obtain a scrambling key SK 1 、SK 2 、SK 3 、SK 4
S5, utilizing initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4 Obtaining an initial vector chaotic sequence S 6 Filling the empty sequence to obtain an initial vector key IV;
s6, utilizing the initial vector key IV, and according to three diffusion key matrixes DK R 、DK G 、DK B Scrambling key SK 1 For the pixel matrix M obtained in step S1 1 Scrambling in the horizontal direction and diffusion in the vertical direction are performed synchronously to generate an intermediate ciphertext image TC 1
S7, utilizing three diffusion key matrixes DK R 、DK G 、DK B Scrambling key SK 2 For intermediate ciphertext image TC 1 Scrambling in the vertical direction and diffusion in the horizontal direction are performed simultaneously to generate an intermediate ciphertext image TC 2
S8, combining the intermediate ciphertext image TC 2 Dividing and splicing the pixel matrix M in the vertical direction 2 =[TC 2 (:,1:W);TC 2 (:,W+1:2W);TC 2 (:,2W+1:3W)]Wherein W is the width of the color image; using three diffusion key matrices DK R 、DK G 、DK B Scrambling key SK 3 For pixel matrix M 2 Scrambling in the vertical direction and diffusion in the horizontal direction are performed simultaneously to generate an intermediate ciphertext image TC 3
S9, utilizing three diffusion key matrixes DK R 、DK G 、DK B Scrambling key SK 4 For intermediate ciphertext image TC 3 Scrambling in the horizontal direction and diffusion in the vertical direction are performed synchronously to generate an intermediate ciphertext image TC 4
S10, TC 4 After divisionAnd combining to obtain a color ciphertext image C.
In step 2, the first diffusion chaotic system and the second diffusion chaotic system are combined to generate a pseudo-random sequence for a diffusion process, and the formula is as follows:
the scrambling chaotic system adopts a one-dimensional chaotic system of a pseudo random sequence for a scrambling process, and the formula is as follows:
x 3 (i+1)=sin(8*tan(3*x 3 (i) 2 -1.5)) (3),
the initial vector chaotic system adopts a one-dimensional chaotic system for starting an encrypted initial vector, and the formula is as follows:
further, step S2 includes the steps of:
step S2 comprises the steps of:
s2.1, calling a secure hash function SHA-256 to the pixel matrix M obtained in the step S1 1 Calculating to obtain a corresponding 256-bit hash value HV;
s2.2, obtaining a random pseudorandom sequence K with 256 bits of length through an external interface e And performing bit-level exclusive OR operation on the hash value HV and the hash value HV to obtain a disposable session key SK, wherein the formula is as follows:
SK=bitxor(K e ,HV) (5);
s2.3, respectively extracting initial states x of the diffusion chaotic system from the disposable session key SK by using a formula (6) 1 (1)、y 1 (1) And a pre-iteration number pre 1 Diffusion mixingInitial state x of chaotic system two 2 (1)、y 2 (1) And a pre-iteration number pre 2 Scrambling an initial state x of a chaotic system 3 (1) And a pre-iteration number pre 3 Initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4
Wherein bin2dec is a binary-to-decimal operation.
Further, step S3 includes the steps of:
s3.1, initializing four null sequences, and initializing the initial state x 1 (1)、y 1 (1) And x 2 (1)、y 2 (1) Respectively inputting the first and second diffusion chaotic systems into the first and second diffusion chaotic systems, respectively pre-iterating 1 And pre 2 After that, for the color image with width W and height H, the four empty sequences are filled according to the operation W.times.H of the formula (7) to obtain a diffusion chaotic sequence S 1 、S 2 、S 3 、S 4
S3.2, initializing three null sequences, and according to a formula (8), performing the diffusion chaotic sequence S 1 、S 2 、S 3 、S 4 Quantization and filling are carried out to obtain a diffusion key matrix DK R ,DK G ,DK B
S3.3, spreading Key matrix DK R ,DK G ,DK B The transposed size is w×h.
Further, step S4 includes the steps of:
s4.1, initializing a null sequence, and converting x 3 (1) Conveying deviceThe embedded chaotic system is pre-iterated 3 Continuing after the time, 4W+4H times are operated according to a formula (9) to fill the empty sequence, and a scrambling chaotic sequence S is obtained 5
S 5 ={S 5 ,x 3 (i)} (9)
Wherein i=1, 2, …,4w+4h-1,4w+4h;
s4.2, initializing four empty sequences and opposite chaotic sequences S according to a formula (10) 5 Filling to obtain a scrambling key SK 1 、SK 2 、SK 3 、SK 4
Further, step S5 includes the steps of:
s5.1, initializing a null sequence, and converting x 4 (1) The input initial vector chaotic system is pre-iterated 4 After the operation is continued for 3W times, and the empty sequence is filled according to the formula (11) to obtain an initial vector sequence S 6
S 6 ={S 6 ,x 3 (i)} (11),
Wherein i=1, 2, …,3W-1,3W;
s5.2, initializing a null sequence, and filling according to a formula (12) to obtain an initial vector key IV:
further, step S6 includes the steps of:
initializing a space matrix TC with width of 3W and height of H 1 Let TC 1 (0:) =iv and K 1 =[DK R ,DK G ,DK B ]And for three color components P of the image according to equation (13) R 、P G 、P B Scrambling in the horizontal direction is performed between them, and three color components P are performed R 、P G 、P B Diffusion in the internal vertical direction generates an intermediate ciphertext image TC 1
Further, step S7 includes the steps of:
initializing a null matrix with width of 3W and height of H to enable TC to 2 (:,0)=TC 1 (: 3W), three color components P of the image according to equation (14) R 、P G 、P B Inside scrambling in the vertical direction and three color components P are performed R 、P G 、P B Diffusion in horizontal direction between them to generate intermediate ciphertext image TC 2
Further, step S8 includes the steps of:
s8.1, initializing a null matrix and combining the intermediate ciphertext image TC 2 Dividing into three equal parts, splicing in the vertical direction, and filling into M 2 Obtaining a pixel matrix M 2
M 2 =[TC 2 (1:W,:);TC 2 (W+1:2W,:);TC 2 (2W+1:3W,:)];
S8.2, initializing a space matrix with width W and height 3H to enable TC 3 (:,0)=M 2 (: W) and K 2 =[DK R ,DK G ,DK B ]For three color components P of an image according to equation (15) R 、P G 、P B Scrambling in the vertical direction and performing three color components P R 、P G 、P B Diffusion in the internal horizontal direction, generating intermediate ciphertext image TC 3
Further, step S9 includes the steps of:
initializing a space matrix with width W and height 3H to enable TC to 4 (0,:)=TC 3 (3H:) for three color components P of the image according to equation (16) R 、P G 、P B Scrambling in the horizontal direction is performed internally, and three color components P are performed R 、P G 、P B Diffusion in the vertical direction between them, generates an intermediate ciphertext image TC4:
further, step S10 includes the steps of:
initializing an empty color image C with width W, height H, and depth 3, let C (; 1) =tc 4 (1:H,:),C(;,;,2)=TC 3 (H+1:2H,:),C(;,;,3)=TC 4 (2H+1:3H,:), a final color ciphertext image C is generated.
The technical scheme of the invention has the following beneficial effects:
the invention encrypts three color components of a color image as a whole, realizes full scrambling and diffusion among the color components and inside the color components after the three color components are spliced in the horizontal and vertical directions, can resist common cryptography analysis technologies such as differential attack, statistical attack and violent attack, simultaneously encrypts the three components as a whole, can fully exert the parallel effect of vectorization technology, can complete scrambling and diffusion with extremely high efficiency so as to fully and thoroughly encrypt the image with high strength, and well balances encryption strength and encryption efficiency, and is obviously superior to the existing scheme.
Drawings
Fig. 1 is a schematic flow chart of a color image parallel encryption method based on vectorization technology according to an embodiment of the present invention;
fig. 2 is a second schematic flow chart of a color image parallel encryption method based on vectorization technology according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a plaintext color image, a ciphertext image and a decrypted image obtained by a color image parallel encryption method based on vectorization technology according to an embodiment of the present invention;
FIG. 4 is a histogram of RGB components of a plaintext color image and a ciphertext image obtained by a color image parallel encryption method based on a vectorization technique according to an embodiment of the present invention;
FIG. 5 is a graph of correlation between adjacent pixels in horizontal, vertical, and diagonal directions of a plaintext color image and a ciphertext image obtained by a color image parallel encryption method based on vectorization technique, respectively, according to an embodiment of the present invention;
fig. 6 is a key sensitivity test chart obtained by a color image parallel encryption method based on vectorization technology according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the following detailed description will be given with reference to the accompanying drawings and specific embodiments.
As shown in fig. 1 and 2, an embodiment of the present invention provides a color image parallel encryption method based on vectorization technology, which includes the following steps:
s1, separating a color image P with the width W, the height H and the depth 3 into three color components P with the sizes W and H R 、P G 、P B I.e. red component P R =p (; 1), green component P G =p (; 2), blue component P B P (; 3) and performing horizontal stitching on the three components to obtain a pixel matrix M 1 =[P R ,P G ,P B ];
S2, respectively extracting initial states x of the diffusion chaotic system by utilizing hash values HV of color images and one-time session keys SK 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And a pre-iteration number pre 2 Scrambling an initial state x of a chaotic system 3 (1) And number of pre-iterationspre 3 Initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4 Comprising the following substeps:
s2.1, the diffusion chaotic system I and the diffusion chaotic system II are combined by adopting two-dimensional hyperchaotic systems to generate a pseudo-random sequence for a diffusion process, and the formula is as follows:
the scrambling chaotic system adopts a one-dimensional chaotic system of a pseudo random sequence for a scrambling process, and the formula is as follows:
x 3 (i+1)=sin(8*tan(3*x 3 (i) 2 -1.5))(3),
the initial vector chaotic system adopts a one-dimensional chaotic system for starting an encrypted initial vector, and the formula is as follows:
s2.2, calling a secure hash function SHA-256 to the pixel matrix M obtained in the step 1 1 Calculating to obtain a corresponding 256-bit hash value HV;
s2.3, obtaining a random pseudorandom sequence K with 256 bits of length through an external interface e And performing bit-level exclusive OR operation on the hash value H and the hash value H to obtain a disposable session key SK, wherein the formula is as follows:
SK=bitxor(K e ,HV)(5);
s2.4, respectively extracting initial states x of the diffusion chaotic system from the disposable session key SK by using a formula (6) 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And pre-heatingNumber of iterations pre 2 Scrambling an initial state x of a chaotic system 3 (1) And a pre-iteration number pre 3 Initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4
Wherein bin2dec is a binary-to-decimal operation;
s3, utilizing an initial state x of the diffusion chaotic system 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And a pre-iteration number pre 2 Obtaining a diffusion chaotic sequence S 1 、S 2 、S 3 、S 4 And generates a diffusion key matrix DK after quantization, filling and transposition processes R 、DK G 、DK B Comprising the following substeps:
s3.1, initializing four null sequences, and initializing the initial state x 1 (1)、y 1 (1) And x 2 (1)、y 2 (1) Respectively inputting the first and second diffusion chaotic systems into the first and second diffusion chaotic systems, respectively pre-iterating 1 And pre 2 After that, for the color image with width W and height H, the four empty sequences are filled according to the operation W.times.H of the formula (7) to obtain a diffusion chaotic sequence S 1 、S 2 、S 3 、S 4
S3.2, initializing three null sequences, and according to a formula (8), performing the diffusion chaotic sequence S 1 、S 2 、S 3 、S 4 Quantization and filling are carried out to obtain a diffusion key matrix DK R ,DK G ,DK B
S3.3, spreading Key matrix DK R ,DK G ,DK B Transposed size w×h;
s4, utilizing initial state x of scrambling chaotic system 3 (1) And a pre-iteration number pre 3 Obtaining a scrambling chaotic sequence S 5 And four empty sequences are filled to obtain a scrambling key SK 1 、SK 2 、SK 3 、SK 4 Comprising the following substeps:
s4.1, initializing a null sequence, and converting x 3 (1) The input scrambling chaotic system is pre-iterated 3 Continuing after the time, 4W+4H times are operated according to a formula (9) to fill the empty sequence, and a scrambling chaotic sequence S is obtained 5
S 5 ={S 5 ,x 3 (i)}(9)
Wherein i=1, 2, …,4w+4h-1,4w+4h;
s4.2, initializing four empty sequences and opposite chaotic sequences S according to a formula (10) 5 Filling to obtain a scrambling key SK 1 、SK 2 、SK 3 、SK 4
S5, utilizing initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4 Obtaining an initial vector chaotic sequence S 6 And fills the empty sequence to obtain an initial vector key IV, comprising the sub-steps of:
s5.1, initializing a null sequence, and converting x 4 (1) The input initial vector chaotic system is pre-iterated 4 After the operation is continued for 3W times, and the empty sequence is filled according to the formula (11) to obtain an initial vector sequence S 6
S 6 ={S 6 ,x 3 (i)} (11),
Wherein i=1, 2, …,3W-1,3W;
s5.2, initializing a null sequence, and filling according to a formula (12) to obtain an initial vector key IV:
s6, utilizing the initial vector key IV, and according to three diffusion key matrixes DK R ,DK G ,DK B Scrambling key SK 1 Scrambling in the horizontal direction and diffusing in the vertical direction are carried out on three components of the image to generate an intermediate ciphertext image TC 1 The method comprises the following specific steps of:
initializing a null matrix with width of 3W and height of H to enable TC to 1 (0:) =iv and K 1 =[DK R ,DK G ,DK B ]And for three color components P of the image according to equation (13) R 、P G 、P B Scrambling in the horizontal direction is performed between them, and three color components P are performed R 、P G 、P B Diffusion in the internal vertical direction generates an intermediate ciphertext image TC 1
S7, utilizing intermediate ciphertext image TC 1 According to three diffusion key matrices DK R ,DK G ,DK B Scrambling key SK 2 Scrambling in the vertical direction and diffusing in the horizontal direction are performed on three components of the image to generate an intermediate ciphertext image TC 2 The method comprises the following specific steps of:
initializing a null matrix with width of 3W and height of H to enable TC to 2 (:,0)=TC 1 (: 3W), three color components P of the image according to equation (14) R 、P G 、P B Inside scrambling in the vertical direction and three color components P are performed R 、P G 、P B Diffusion in horizontal direction between them to generate intermediate ciphertext image TC 2
S8, combining the intermediate ciphertext image TC 2 Splitting is performed and based on three diffusion key matrices DK R ,DK G ,DK B Scrambling key SK 3 Scrambling in the vertical direction and diffusing in the horizontal direction are performed on three components of the image to generate an intermediate ciphertext image TC 3 The method comprises the following specific steps of:
s8.1, initializing a null matrix and combining the intermediate ciphertext image TC 2 Dividing into three equal parts, splicing in the vertical direction, and filling into M 2 Obtaining a pixel matrix M 2
M 2 =[TC 2 (1:W,:);TC 2 (W+1:2W,:);TC 2 (2W+1:3W,:)];
S8.2, initializing a space matrix with width W and height 3H to enable TC 3 (:,0)=M 2 (: W) and K 2 =[DK R ,DK G ,DK B ]For three color components P of an image according to equation (15) R 、P G 、P B Scrambling in the vertical direction and performing three color components P R 、P G 、P B Diffusion in the internal horizontal direction, generating intermediate ciphertext image TC 3
S9, utilizing intermediate ciphertext image TC 3 According to three diffusion key matrices DK R ,DK G ,DK B Scrambling key SK 4 Scrambling in the horizontal direction and diffusing in the vertical direction are carried out on three components of the image to generate an intermediate ciphertext image TC 4 The method comprises the following specific steps of:
initializing a space matrix with width W and height 3H to enable TC to 4 (0,:)=TC 3 (3H:) for three color components P of the image according to equation (16) R 、P G 、P B Scrambling in the horizontal direction is performed internally, and three color components P are performed R 、P G 、P B Diffusion in the vertical direction between them, generates an intermediate ciphertext image TC4:
s10, TC 4 The color ciphertext image C is obtained by conversion and combination, and the specific steps are as follows: initializing an empty color image C with width W, height H, and depth 3, let C (; 1) =tc 4 (1:H,:),C(;,;,2)=TC 3 (H+1:2H,:),C(;,;,3)=TC 4 (2H+1:3H,:), a final color ciphertext image C is generated.
According to the embodiment of the invention, three color components of a color image are used as a whole for encryption, and through splicing the three color components in the horizontal and vertical directions, the full scrambling and diffusion among the color components and inside the color components are realized, so that common cryptography analysis technologies such as differential attack, statistical attack and violent attack can be resisted, and meanwhile, the parallel effect of vectorization technology can be fully exerted by encrypting the three components as a whole, scrambling and diffusion can be completed with extremely high efficiency, so that the image is fully and thoroughly encrypted in high strength.
The following simulation experiment is provided for verifying the safety and effectiveness of the color image parallel encryption method based on the vectorization technology.
Experiment simulation platform:
CPU:Intel(R)Core(TM)i5-4590H,3.30GHZ;
Memory:4096MB;
Operating system:Windows10;Coding tool:Matlab2018a。
in the experiment, a 512×512 color image Lena is selected as a plaintext image, and the image is operated by using the encryption method provided by the invention, so that the obtained encryption and decryption effects are shown in fig. 3. In fig. 3: (a) is a Lena plaintext image; (b) is a ciphertext image; (c) is the corresponding decrypted image.
(1) Histogram analysis
Fig. 4 shows histograms of a plaintext image and a corresponding ciphertext image (cr=0.5) of the color image Lena, fig. 4: (b) And (d) are histograms of RGB components of the plain text image and the ciphertext image (c) of the color image Lena (a), respectively. It is clear that the histogram of the ciphertext image is very uniform and significantly different from the histogram of the plaintext image, which makes it very difficult for an attacker to analyze the ciphertext image by statistical attack.
(2) Adjacent pixel correlation
The adjacent pixel correlation test results are shown in fig. 5 below. In fig. 5: (a), (b), and (c) are adjacent pixel correlation maps of the color image Lena in the horizontal, vertical, and diagonal directions, respectively, and (d), (e), and (f) are adjacent pixel correlation maps of the ciphertext image in the horizontal, vertical, and diagonal directions, respectively. As can be seen from fig. 5, the pixels of the plaintext image are concentrated in multiple distributions in the horizontal, vertical and diagonal directions, and the pixels of the ciphertext image are uniformly distributed, which illustrates that the encryption algorithm can destroy the strong correlation between the adjacent pixels of the plaintext image.
(3) Key sensitivity analysis
In fig. 6: (a) is an encrypted image, (b) is a decrypted image of a correct key, (c) is a decrypted image of a key most significant bit error, and (d) is a decrypted image of a key least significant bit error. As can be seen from fig. 6, after the key is modified, the plaintext image information cannot be obtained through the decryption operation, so that the encryption method provided by the present invention has good key sensitivity.
(4) Information entropy analysis
Information entropy is a main index for measuring information randomness. When the information is encrypted, the theoretical expected value of the information entropy is 8. The ciphertext image is said to be approximately randomly distributed, provided that the entropy of the encrypted image is very close to 8. Table 1 shows the image information entropy test results.
TABLE 1 Shannon information entropy comparison Table before and after encryption
As can be seen from table 1, the entropy of the ciphertext image is above 7.997, which indicates the effectiveness of the color image parallel encryption method in which the ciphertext information is based on vectorization technology.
(5) Plaintext sensitivity analysis
The plaintext sensitivity test results are shown in table 2, wherein NPCR (number of pixels change rate) is the pixel change rate, UACI (unified average changing intensity) is the uniform average change intensity:
TABLE 2 clear text sensitivity test results Table
(6) Encryption time analysis
The encryption time test is shown in table 3:
TABLE 3 encryption time test results Table
As can be seen from table 3, the present invention is capable of achieving scrambling and diffusion with extremely high efficiency so as to sufficiently and thoroughly encrypt the image with high strength, which is significantly superior to the existing scheme.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (10)

1. The color image parallel encryption method based on vectorization technology is characterized by comprising the following steps:
s1, separating a color image P with width W and height H into three components P R 、P G 、P B And the three components are horizontally spliced to obtain a pixel matrix M 1 =[P R ,P G ,P B ];
S2, respectively extracting initial states x of the diffusion chaotic system by utilizing hash values HV of color images and one-time session keys SK 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And a pre-iteration number pre 2 Scrambling an initial state x of a chaotic system 3 (1) And a pre-iteration number pre 3 Initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4
S3, utilizing an initial state x of the diffusion chaotic system 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And a pre-iteration number pre 2 Obtaining a diffusion chaotic sequence S 1 、S 2 、S 3 、S 4 And generates a diffusion key matrix DK after quantization, filling and transposition processes R 、DK G 、DK B
S4, utilizing initial state x of scrambling chaotic system 3 (1) And a pre-iteration number pre 3 Obtaining a scrambling chaotic sequence S 5 And four empty sequences are filled to obtain a scrambling key SK 1 、SK 2 、SK 3 、SK 4
S5, utilizing initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4 Obtaining an initial vector chaotic sequence S 6 Filling the empty sequence to obtain an initial vector key IV;
s6, utilizing the initial vector key IV, and according to three diffusion key matrixes DK R 、DK G 、DK B Scrambling key SK 1 For the pixel matrix M obtained in step S1 1 Scrambling in the horizontal direction and diffusion in the vertical direction are performed synchronously to generate an intermediate ciphertext image TC 1
S7, utilizing three diffusion key matrixes DK R 、DK G 、DK B Scrambling key SK 2 For intermediate ciphertext image TC 1 Scrambling in the vertical direction and diffusion in the horizontal direction are performed simultaneously to generate an intermediate ciphertext image TC 2
S8, combining the intermediate ciphertext image TC 2 Dividing and splicing the pixel matrix M in the vertical direction 2 =[TC 2 (:,1:W);TC 2 (:,W+1:2W);TC 2 (:,2W+1:3W)]The method comprises the steps of carrying out a first treatment on the surface of the Using three diffusion key matrices DK R 、DK G 、DK B Scrambling key SK 3 For pixel matrix M 2 Scrambling in the vertical direction and diffusion in the horizontal direction are performed simultaneously to generate an intermediate ciphertext image TC 3
S9, utilizing three diffusion key matrixes DK R 、DK G 、DK B Scrambling key SK 4 For intermediate ciphertext image TC 3 Scrambling in the horizontal direction and diffusion in the vertical direction are performed synchronously to generate an intermediate ciphertext image TC 4
S10, TC 4 And after segmentation, combining to obtain a color ciphertext image C.
2. The color image parallel encryption method based on vectorization technology of claim 1, wherein in step 2, the two-dimensional hyperchaotic systems are combined to generate a pseudo-random sequence for diffusion process by the first and second diffusion chaotic systems, and the formula is as follows:
the scrambling chaotic system adopts a one-dimensional chaotic system of a pseudo random sequence for a scrambling process, and the formula is as follows:
x 3 (i+1)=sin(8*tan(3*x 3 (i) 2 -1.5)) (3),
the initial vector chaotic system adopts a one-dimensional chaotic system for starting an encrypted initial vector, and the formula is as follows:
3. the color image parallel encryption method based on vectorization technology according to any one of claims 1 and 2, characterized in that step S2 comprises the steps of:
s2.1, calling a secure hash function SHA-256 to the pixel matrix M obtained in the step S1 1 Calculating to obtain a corresponding 256-bit hash value HV;
s2.2, obtaining a random pseudorandom sequence K with 256 bits of length through an external interface e And performing bit-level exclusive OR operation on the hash value HV and the hash value HV to obtain a disposable session key SK, wherein the formula is as follows:
SK=bitxor(K e ,HV) (5);
s2.3, respectively extracting initial states x of the diffusion chaotic system from the disposable session key SK by using a formula (6) 1 (1)、y 1 (1) And a pre-iteration number pre 1 Initial state x of diffusion chaotic system II 2 (1)、y 2 (1) And a pre-iteration number pre 2 Scrambling an initial state x of a chaotic system 3 (1) And a pre-iteration number pre 3 Initial state x of initial vector chaotic system 4 (1) And a pre-iteration number pre 4
Wherein bin2dec is a binary-to-decimal operation.
4. The color image parallel encryption method based on vectorization technology according to claim 1, wherein the step S3 comprises the steps of:
s3.1, initializing four null sequences, and initializing the initial state x 1 (1)、y 1 (1) And x 2 (1)、y 2 (1) Respectively inputting the first and second diffusion chaotic systems into the first and second diffusion chaotic systems, respectively pre-iterating 1 And pre 2 After that, for the color image with width W and height H, the four empty sequences are filled according to the operation W.times.H of the formula (7) to obtain a diffusion chaotic sequence S 1 、S 2 、S 3 、S 4
S3.2, initializing three null sequences, and according to a formula (8), performing the diffusion chaotic sequence S 1 、S 2 、S 3 、S 4 Quantization and filling are carried out to obtain a diffusion key matrix DK R ,DK G ,DK B
S3.3 diffusion key matrix DK R ,DK G ,DK B The transposed size is w×h.
5. The color image parallel encryption method based on vectorization technology according to claim 1, wherein the step S4 comprises the steps of:
s4.1, initializing a null sequence, and converting x 3 (1) The input scrambling chaotic system is pre-iterated 3 Continuing after the time, 4W+4H times are operated according to a formula (9) to fill the empty sequence, and a scrambling chaotic sequence S is obtained 5
S 5 ={S 5 ,x 3 (i)}(9)
Wherein i=1, 2, …,4w+4h-1,4w+4h;
s4.2, initializing four empty sequences and opposite chaotic sequences S according to a formula (10) 5 Filling to obtain a scrambling key SK 1 、SK 2 、SK 3 、SK 4
6. The color image parallel encryption method based on vectorization technology according to claim 1, wherein the step S5 comprises the steps of:
s5.1, initializing a null sequence, and converting x 4 (1) The input initial vector chaotic system is pre-iterated 4 After the operation is continued for 3W times, and the empty sequence is filled according to the formula (11) to obtain an initial vector sequence S 6
S 6 ={S 6 ,x 3 (i)}(11),
Wherein i=1, 2, …,3W-1,3W;
s5.2, initializing a null sequence, and filling according to a formula (12) to obtain an initial vector key IV:
7. the color image parallel encryption method based on vectorization technology according to claim 1, wherein the step S6 comprises the steps of:
initializing a null matrix with width of 3W and height of H to enable TC to 1 (0,:) =iv and three diffusion key matrices DK R ,DK G ,DK B Horizontally splicing to obtain K 1 =[DK R ,DK G ,DK B ]And for three color components P of the image according to equation (13) R 、P G 、P B Scrambling in the horizontal direction is performed between them, and three color components P are performed R 、P G 、P B Diffusion in the internal vertical direction generates an intermediate ciphertext image TC 1
8. The color image parallel encryption method based on vectorization technology according to claim 7, wherein the step S7 comprises the steps of:
initializing a null matrix with width of 3W and height of H to enable TC to 2 (:,0)=TC 1 (: 3W), three color components P of the image according to equation (14) R 、P G 、P B Inside scrambling in the vertical direction and three color components P are performed R 、P G 、P B Diffusion in horizontal direction between them to generate intermediate ciphertext image TC 2
9. The color image parallel encryption method based on vectorization technology according to claim 1, wherein the step S8 comprises the steps of:
s8.1, initializing a null matrix and combining the intermediate ciphertext image TC 2 Dividing into three equal parts, splicing in the vertical direction, and filling into M 2 Obtaining a pixel matrix M 2
M 2 =[TC 2 (1:W,:);TC 2 (W+1:2W,:);TC 2 (2W+1:3W,:)];
S8.2, initializing a space matrix with width W and height 3H to enable TC 3 (:,0)=M 2 (: W) and K 2 =[DK R ,DK G ,DK B ]For three color components P of an image according to equation (15) R 、P G 、P B Scrambling in the vertical direction and performing three color components P R 、P G 、P B Diffusion in the internal horizontal direction, generating intermediate ciphertext image TC 3
10. The color image parallel encryption method based on vectorization technology according to claim 1, wherein the step S9 comprises the steps of:
initializing a space matrix with width W and height 3H to enable TC to 4 (0,:)=TC 3 (3H:) for three color components P of the image according to equation (16) R 、P G 、P B Scrambling in the horizontal direction is performed internally, and three color components P are performed R 、P G 、P B Diffusion in the vertical direction between them, generates an intermediate ciphertext image TC4:
CN202310378435.9A 2023-04-11 2023-04-11 Color image parallel encryption method based on vectorization technology Active CN116389652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310378435.9A CN116389652B (en) 2023-04-11 2023-04-11 Color image parallel encryption method based on vectorization technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310378435.9A CN116389652B (en) 2023-04-11 2023-04-11 Color image parallel encryption method based on vectorization technology

Publications (2)

Publication Number Publication Date
CN116389652A CN116389652A (en) 2023-07-04
CN116389652B true CN116389652B (en) 2023-10-20

Family

ID=86976590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310378435.9A Active CN116389652B (en) 2023-04-11 2023-04-11 Color image parallel encryption method based on vectorization technology

Country Status (1)

Country Link
CN (1) CN116389652B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417539A (en) * 2019-08-02 2019-11-05 齐齐哈尔大学 A kind of color image encrypting method of dynamic chaos and matrix convolution operation
CN111597574A (en) * 2020-04-16 2020-08-28 南通职业大学 Parallel image encryption system and method based on spatial diffusion structure
CN113076551A (en) * 2021-05-22 2021-07-06 河南大学 Color image encryption method based on lifting scheme and cross-component scrambling

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010046104A2 (en) * 2008-10-23 2010-04-29 University Of Ulster An encryption method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417539A (en) * 2019-08-02 2019-11-05 齐齐哈尔大学 A kind of color image encrypting method of dynamic chaos and matrix convolution operation
CN111597574A (en) * 2020-04-16 2020-08-28 南通职业大学 Parallel image encryption system and method based on spatial diffusion structure
CN113076551A (en) * 2021-05-22 2021-07-06 河南大学 Color image encryption method based on lifting scheme and cross-component scrambling

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘强等.提取明文信息耦合多混沌像素混乱的彩图RGB分量同步无损加密算法.计算机应用研究.2014,(第05期),全文. *

Also Published As

Publication number Publication date
CN116389652A (en) 2023-07-04

Similar Documents

Publication Publication Date Title
Liao et al. An efficient mixed inter-intra pixels substitution at 2bits-level for image encryption technique using DNA and chaos
Zhu et al. 2D logistic-modulated-sine-coupling-logistic chaotic map for image encryption
Wang et al. Chaotic color image encryption based on 4D chaotic maps and DNA sequence
Patro et al. An efficient colour image encryption scheme based on 1-D chaotic maps
Ur Rehman et al. A color image encryption technique using exclusive-OR with DNA complementary rules based on chaos theory and SHA-2
CN110086601B (en) Joseph traversal and hyperchaotic system image encryption method based on pixel value association
Xingyuan et al. An image encryption algorithm based on ZigZag transform and LL compound chaotic system
Ravichandran et al. DNA chaos blend to secure medical privacy
CN108366181B (en) A kind of image encryption method based on hyperchaotic system and multistage scramble
Samiullah et al. An image encryption scheme based on DNA computing and multiple chaotic systems
Zhu et al. A chaos-based symmetric image encryption scheme using a bit-level permutation
CN104751403B (en) A kind of plaintext associated picture encryption method based on multi-chaos system
CN108898025A (en) New chaotic image encryption method based on dual scramble and DNA encoding
CN109660696B (en) New image encryption method
CN109889686B (en) Image encryption method based on H fractal structure and dynamic self-reversible matrix
CN110149200B (en) Color image encryption method based on dynamic DNA and 4D chaos
CN107292184B (en) Image encryption method, device and key stream generating method and key stream generator
CN111597574B (en) Parallel image encryption system and method based on spatial diffusion structure
CN107220923B (en) Digital picture feedback encryption method based on image network
CN113129196B (en) Image encryption method based on DNA sequence and memristor chaos
Hambouz et al. Achieving data integrity and confidentiality using image steganography and hashing techniques
CN111783116A (en) Lightweight hyperchaotic rapid image encryption algorithm
CN115311118A (en) Remote sensing image encryption method based on two-dimensional discrete memristor hyperchaotic mapping
CN115766962A (en) Multi-key image encryption method based on five-dimensional conservative hyperchaotic system
CN109376793B (en) Image encryption method based on four-dimensional Chen hyper-chaotic system and K-means clustering

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