CN110148078A - The two width color image compression encryption methods based on two dimensional compaction perception - Google Patents

The two width color image compression encryption methods based on two dimensional compaction perception Download PDF

Info

Publication number
CN110148078A
CN110148078A CN201910406019.9A CN201910406019A CN110148078A CN 110148078 A CN110148078 A CN 110148078A CN 201910406019 A CN201910406019 A CN 201910406019A CN 110148078 A CN110148078 A CN 110148078A
Authority
CN
China
Prior art keywords
matrix
group
embedded
color
sequence
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.)
Granted
Application number
CN201910406019.9A
Other languages
Chinese (zh)
Other versions
CN110148078B (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.)
Henan University
Original Assignee
Henan University
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 Henan University filed Critical Henan University
Priority to CN201910406019.9A priority Critical patent/CN110148078B/en
Publication of CN110148078A publication Critical patent/CN110148078A/en
Application granted granted Critical
Publication of CN110148078B publication Critical patent/CN110148078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant
    • G06T1/0057Compression invariant watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant
    • G06T1/0071Robust watermarking, e.g. average attack or collusion attack resistant using multiple or alternating watermarks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0092Payload characteristic determination in a watermarking scheme, e.g. number of bits to be embedded
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0053Embedding of the watermark in the coding stream, possibly without decoding; Embedding of the watermark in the compressed domain

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention provides a kind of two width color image compression encryption methods based on two dimensional compaction perception.This method includes two stages: in the first stage, carrying out compression measurement to two width colour plaintext images using two dimensional compaction perception, then carries out scramble, quantization to measured value, obtain compressed ciphertext image.In second stage, color host image is normalized first, two components in the color three-component for the color host image that ciphertext image is embedded into after normalization again, it will be embedded into another color component of color host image to relevant key parameter in plain text simultaneously, then final to obtain visually safe ciphertext image by reconfiguring the color three-component of color host image.The present invention can be realized simultaneously the data safety and appearance safety of two width color images.

Description

The two width color image compression encryption methods based on two dimensional compaction perception
Technical field
The present invention relates to image encryption technology field more particularly to a kind of two width color images based on two dimensional compaction perception Compression encryption method.
Background technique
With the fast development of computer networking technology, Internet user can share multi-medium data (example by finger tip Such as file, audio, image, video) etc., exchange, the shared and storage of image information, network security problem can be seen everywhere It becomes increasingly conspicuous, image encryption is one of hot topic of field of image processing.Since color image includes information abundant, have The features such as redundancy is high, and correlation is strong between adjacent pixel and various dimensions, is widely used in the various fields such as remote sensing, medicine. And in existing resume image, it is much encrypted both for gray level image, in order to protect in transimission and storage Color image safety, there is an urgent need to design the algorithm that safe and efficient encryption is carried out to color image.
In addition, most of resume image is encrypted for single image at present, current big data when For under background, only being encrypted to single image cannot more preferable, faster serving-multimedia user.For this reason, it may be necessary to Design it is a kind of for more sub-pictures especially two images and meanwhile encryption algorithm.The appearance of compressed sensing is so that be performed simultaneously Compression and encryption are possibly realized, and are compared with one-dimensional compressed sensing (Compressive sensing, CS), and two dimensional compaction perception can In the case where acquisition original image less information, original image is reconstructed, memory space is greatly saved, improves operation effect Rate, therefore two dimensional compaction perception (2D CS) is more suitable for applying in image encryption under the background of big data.
Original image is encrypted to the meaningless ciphertext of similar noise by current most of resume images before transmission Image.It is worth noting that, meaningless ciphertext image can cause more concerns of attacker hacker in transmission channel, and to cutting The ciphertext image obtained carries out selective analysis.Therefore, it is necessary to a kind of Image Encryption Scheme for taking into account visual security be designed, with same When guarantee image data safety and visual security.In addition, most of resume image is all the information using plaintext image Such as pixel average, cryptographic Hash, comentropy etc. carry out algorithm for design, to increase the connection between algorithm and plaintext, improve algorithm Anti- plaintext attack.But require to send these parameters relevant to cleartext information to recipient in decryption, when right When large batch of image is encrypted simultaneously, need the information content of additional transmissions bigger, this will will cause serious transmission burden, In addition, these parameters are during transmission, once it is stolen by hacker, it is more likely that plaintext image is cracked out, there are certain Security risk.
Summary of the invention
Visual security larger for memory space present in conventional images Encryption Algorithm, not can guarantee image and The problems such as needing the information content of additional transmissions larger when decryption, the present invention provide a kind of two width cromograms based on two dimensional compaction perception As compression encryption method, the data safety and appearance safety of two width color images can be realized simultaneously.
The present invention provides a kind of two width color image compression encryption methods based on two dimensional compaction perception, this method comprises:
Step 1: extracting the first width colour plaintext image P respectively1With the second width colour plaintext image P2Color three-component, It is denoted as first group of color three-component and second group of color three-component, and using two-dimensional discrete wavelet conversion respectively to two groups of colors three Component carries out rarefaction;Wherein, P1And P2Size be M × N and M=N;
Step 2: calculating separately to obtain according to two groups of color three-components of two width colour plaintext images colored with two width The relevant first group information parameter of plaintext image and the second group information parameter;
Step 3: generating calculation matrix using LSS chaos system and Kronecker product, and the calculation matrix is carried out excellent Change;
Step 4: two dimensional compaction being carried out to two groups of color three-components after rarefaction respectively using the calculation matrix after optimization Perception obtains corresponding first group of compressed sensing measurement sequence and second group of compressed sensing measurement sequence;
Step 5: shuffle operations being carried out to two groups of compressed sensings measurement sequences respectively using sextuple hyperchaotic system, are obtained pair The first group of Scrambling Matrix and second group of Scrambling Matrix answered, and the member by element value in two groups of Scrambling Matrixes less than preset threshold TS Plain value is changed to 0, obtains revised two groups of Scrambling Matrixes;
Step 6: revised two groups of Scrambling Matrixes being quantified respectively, element value is transformed between 0 to 255, is obtained To corresponding first group of quantization matrix and second group of quantization matrix;
Step 7: the color three-component of the color host image F ' after extracting image normalization is denoted as third group color three and divides Amount;Wherein, the size of color host image F ' is M × N;
Step 8: generating 256 cryptographic Hash using the SHA256 function of the first width colour plaintext image, and by described 256 Every 8 one group of cryptographic Hash is converted into 32 decimal number k1, k2..., k32, 32 decimal numbers are denoted as cryptographic Hash K;
Step 9: will the first group information parameter relevant to two width colour plaintext images and the second group information parameter according to setting Fixed Parameter Switch rule is respectively converted into first group of integer set and second group of integer set, wherein first group of integer Set and second group of integer set include L integer;
Step 10: (32+2L) a pixel value before one of component in third group color three-component is replaced with into institute Cryptographic Hash K and 2L integer are stated, the first ciphertext matrix containing key parameter information is obtained;
Step 11: other two component in third group color three-component being subjected to DWT decomposition, and will be obtained after decomposition Matrix carries out piecemeal, obtains corresponding first group of carrier matrix and second group of carrier matrix;
Step 12: first group of quantization matrix and second group of quantization matrix are respectively embedded in two groups of carrier matrixs, Obtain the second ciphertext matrix and third ciphertext matrix containing ciphertext image information;
Step 13: first ciphertext matrix, the second ciphertext matrix and third ciphertext matrix being combined, obtained and two The corresponding visual security image of width colour plaintext image.
Further, this method further include: generate the initial value of sextuple hyperchaotic system and LSS chaos system;Wherein:
The initial value for generating sextuple hyperchaotic system specifically includes:
Step A1: intermediate parameters H is calculated according to formula (9) according to the cryptographic Hash K1~H6:
Wherein, (t1,t2,t3,t4,t5) ∈ (0,1) be preset-key parameter;sum(k16,k17,…,k20) indicate to seek k16, k17,…,k20Sum;max(k16,k17,…,k20) indicate to seek k16, k17,…,k20Maximum value;Indicate the exclusive or of x and y Operation;
Step A2: according to the intermediate parameters H1~H6Wherein at the beginning of three of sextuple hyperchaotic system are calculated according to formula (10) Initial value x0、y0And z0:
Wherein, mod (a, b) indicates a to the modulo operation of b, and abs (x) indicates to seek the absolute value of x, and floor (x) indicates meter Calculate the maximum integer for being not more than x;
Step A3: according to the first group information parameter and the intermediate parameters H1~H6First group is calculated according to formula (11) Intermediate key r1、g1And b1:
Wherein, QR、QGAnd QBFor the first group information parameter;
Step A4: according to the intermediate key r1、g1And b1And intermediate parameters H4~H6It is calculated according to formula (12) sextuple super The other three initial value u of chaos system0、v0And w0:
The initial value for generating LSS chaos system specifically includes:
Step B1: according to the second group information parameter, the intermediate parameters H1~H6With preset-key parameter t1~t5It presses Illuminated (13) calculates second group of intermediate key r '1、g′1With b '1:
Wherein, Q 'R、Q′GWith Q 'BFor the second group information parameter;
Step B2: according to second group of intermediate key r '1、g′1With b '1The first of LSS chaos system is calculated according to formula (14) Initial value a0With parameter r ':
Wherein, (t6,t7) ∈ (0,1) be preset-key parameter.
Further, the step 2 specifically:
The first group information parameter and the second group information parameter are calculated according to formula (8):
Wherein, a (i, j) indicates (i, j) a element in color component corresponding with information parameter Q to be calculated, that is, works as a (i, j) respectively indicates color component R1、G1、B1、R2、G2、B2In (i, j) a element when, Q respectively indicates corresponding information ginseng Number QR、QG、QB、Q′R、Q′G、Q′B;Wherein, R1、G1And B1For first group of color three-component, R2、G2And B2Divide for second group of color three Amount;QR、QGAnd QBFor the first group information parameter, Q 'R、Q′GWith Q 'BFor the second group information parameter.
Further, specifically being wrapped using LSS chaos system and Kronecker product generation calculation matrix in the step 3 It includes:
Step 3.1: by the initial value a0Iteration m in LSS chaos system is brought into parameter r '1+ Md times, cast out preceding m1It is a Value obtains the sequence A that length is 1 × Md;Wherein, d is default sampling interval, m1≥500;
Step 3.2: sequence A is converted to obtain sequence A ' according to formula (15):
A′i=1-2Ai, i=1,2 ..., Md (15)
Step 3.3: equidistant d sampling is carried out according to formula (16) to sequence A ' progress, obtains sample sequence A ":
A″k=A '1+kdK is sampling sequence number, k >=0 (16)
Step 3.4: the chaos sequence S that 4 length are 4 is randomly selected from sequence A "1、S2、S3And S4, and by chaos sequence Arrange S1~S4It is converted into the low-dimensional matrix K that 4 sizes are 2 × 21、K2、K3And K4
Step 3.5: using Kronecker product to low-dimensional matrix K1And K2、K1And K3、K2And K3And K1And K4It extends respectively log2 MHigher dimensional matrix K that is secondary, will obtaining1′、K2′、K3' and K4' it is used as calculation matrix.
Further, optimizing in the step 3 to the calculation matrix specifically includes:
Step 3.6: by calculation matrix K1' it is converted into calculation matrix φ, the φ ∈ R that size is P × QP×Q;Wherein, P=CR × M, Q=N, CR are default compression ratio;
Step 3.7: singular value decomposition, i.e. φ=U Σ V are carried out to calculation matrix φT, obtain diagonal matrix Σ;Wherein,Indicate the diagonal matrix of calculation matrix φ, Σ1=diag (δ12..., δr), δ1≥δ2≥...≥δr> 0, δ1rIndicate the singular value of calculation matrix φ, r is singular value number;
Step 3.8: all 1's matrix J that construction size is M × N;Calculate the mean value var of diagonal matrix Σ diagonal entry1, And count Σ1In >=var1Singular value number f;The preceding f of order matrix J is arranged multiplied by weighting coefficient t, obtains optimization matrix J1, In, t > 1;Matrix J will be optimized1With calculation matrix φ dot product, calculation matrix φ ' after obtaining the first suboptimization;
Step 3.9: singular value decomposition, i.e. φ '=U are carried out again to calculation matrix φ '1Σ2V1 T;Wherein,Indicate the diagonal matrix of calculation matrix φ ', Σ3=diag (δ '1,δ′2..., δ 'r),δ′1~δ 'rIndicate measurement The singular value of matrix φ ', r are singular value number;
Step 3.10: enabling δ '1=δ '2=...=δ 'r=1, obtain new diagonal matrix Σ '2, and according to diagonal matrix Σ′2Calculation matrix φ after generating final optimization pass1=U1Σ′2V1
Step 3.11: referring to step 3.6 to step 3.10, to calculation matrix K2′、K3' and K4' optimize, optimized Calculation matrix φ afterwards2、φ3And φ4
Further, the step 5 specifically includes:
Step 5.1: by the initial value x0、y0、z0、u0、v0And w0Bring iteration m in sextuple hyperchaotic system into0+M1N1It is secondary, Cast out preceding m0A value, obtaining 6 sizes is 1 × M1N1Sequence X, Y, Z, U, V and W;Wherein, m0>=500, M1=M × CR, N1= N × CR, CR are default compression ratio;
Step 5.2: six chaos sequences X, Y, Z, U, V and W being arranged according to ascending order, obtain six index vector D1~D6
Step 5.3: six chaos sequences X, Y, Z, U, V and W being modified according to formula (19), obtain revised new sequence Arrange XX, YY:
Wherein, XX(i)、YY(i)Indicate i-th of element in new chaos sequence XX and YY, Xi、Yi、Zi、Ui、ViAnd WiRespectively Indicate i-th of element of sequence X, Y, Z, U, V and W, i ∈ [1, M1N1];
Step 5.4: extracting first element value X of new sequence X X, YY respectivelyind1、Yind1, and repaired according to formula (20) Just, obtain revised sequence X 'ind1With Y 'ind1:
Step 5.5: if X 'ind1=1, index of reference vector D1、D2And D3Respectively to sequence R3、G3And B3Rearrangement;Such as Fruit X 'ind1=2, index of reference vector D1、D2And D3Respectively to sequence G3、B3And R3Rearrangement;If X 'ind1=3, index of reference to Measure D1、D2And D3To sequence B3、R3And G3Rearrangement;Wherein, R3、G3And B3Sequence is measured for first group of compressed sensing;
Step 5.6: if Y 'ind1=1, index of reference vector D4、D5And D6To sequence R '3、G′3With B '3Rearrangement;If Y′ind1=2, index of reference vector D4、D5And D6To sequence G '3、B′3With R '3Rearrangement;If Y 'ind1=3, index of reference vector D4、D5And D6To sequence B '3、R′3With G '3Rearrangement;Wherein, R '3、G′3With B '3Sequence is measured for second group of compressed sensing;
Step 5.7: first group of compressed sensing after scramble is measured into sequence R3、G3And B3And second group of compressed sensing is surveyed Measure sequence R '3、G′3With B '3Being separately converted to size is M1×N1Matrix R4、G4And B4And R '4、G′4With B '4, wherein R4、G4And B4For first group of Scrambling Matrix, R '4、G′4With B '4For second group of Scrambling Matrix.
Further, the step 6 is specially and is quantified according to formula (21):
Wherein, min and max is the minimum value and maximum value of Scrambling Matrix P respectively, and floor (x), which indicates to calculate, is not more than x Maximum integer;P(i)With P '(i)It is i-th of element of Scrambling Matrix P and quantization matrix P ' respectively, that is, works as P(i)It respectively indicates and sets Random matrix R4、G4、B4、R′4、G′4、B′4In i-th of element when, P '(i)It is quantization matrix R respectively5、G5、B5、R′5、G′5、B′5 I-th of element;1≤i≤M1N1;Wherein, R5、G5And B5For first group of quantization matrix;R′5、G′5With B '5For second group of quantization square Battle array.
Further, the step 11 specifically:
Step 11.1: DWT decomposition being carried out to other two component in third group color three-component, it is equal to respectively obtain size For the Matrix C of (M × N)/4A、CH、CV、CDWith C 'A、C′H、C′V、C′D;Wherein, other two point in third group color three-component The size of amount is M × N;
Step 11.2: setting CR=0.25 for the compression ratio CR of colored plaintext image;
Step 11.3: by Matrix CHFour pieces are divided into, 4 matrix L L that size is (M × N)/16 are obtained1、LH1、HL1With HH1
Step 11.4: referring to step 11.3, by Matrix CV、C′H、C′VBe divided into four pieces respectively, obtain size be (M × N)/ 16 other 12 matrix L L2~LL4、LH2~LH4、HL2~HL4And HH2~HH4;Wherein, LL1~LL2、LH1~LH2、HL1~ HL2、HH1~HH2For first group of carrier matrix;LL3~LL4、LH3~LH4、HL3~HL4And HH3~HH4For second group of carrier square Battle array.
Further, the step 12 specifically:
Step 12.1: two groups of quantization matrixes being converted according to formula (22) and formula (23) respectively, every group of quantization matrix Obtain transformed two matrixes d and d':
D (i, j)=Q (i, j) mod10 (22)
D ' (i, j)=floor (Q (i, j)/10) (23)
Wherein, Q (i, j) and d (i, j), d ' (i, j) are the matrix obtained after quantization matrix Q and Q to be transformed are converted respectively D, (i, j) a element in d ', i.e., when Q (i, j) is quantization matrix R respectively5、G5、B5、R′5、G′5、B′5In (i, j) it is a When element, d (i, j) is corresponding d respectively1、d2、d3、d4、d5、d6In (i, j) a element, d ' (i, j) is corresponding respectively d11、d22、d33、d44、d55、d66In (i, j) a element;1≤i≤M1, 1≤j≤N1
Step 12.2: according to formula (24) calculating matrix CAWith C 'APixel average I1And I2:
Wherein, C (i, j) is (i, j) a element in Matrix C to be calculated, and I is the pixel average of Matrix C to be calculated, I.e. when C (i, j) is C respectivelyAWith C 'AIn (i, j) a element when, I is C respectivelyAWith C 'APixel average I1And I2
Step 12.3: extracting Matrix CAWith C 'AFirst element value E1And E2
Step 12.4: being respectively compared I1And E1Size and I2And E2Size, and according to comparison result by d1~d6With d11~d66It is embedded into first group of carrier matrix and second group of carrier matrix, first group of carrier matrix after being embedded in LL′1~LL '2、LH′1~LH '2、HL′1~HL '2、HH′1~HH '2, and second group of carrier matrix LL ' after insertion3~LL ′4、LH′3~LH '4、HL′3~HL '4、HH′3~HH '4
Step 12.5: the matrix L L ' that will be obtained after insertion1、LH′1、HL′1、HH′1It is reconfigured, obtains new square Battle array CH1
Step 12.6: referring to step 12.5, the matrix L L ' that will be obtained after insertion2~LL '4、LH′2~LH '4、HL′2~ HL′4With HH '2~HH '4It is reconfigured, obtains new Matrix CV1、C′H1With C 'V1
Step 12.7: by Matrix CA、CH1、CV1、CDWith C 'A、C′H1、C′V1、C′DSecond is obtained using inverse discrete wavelet transform Ciphertext matrix and third ciphertext matrix.
Further, the step 12.4 specifically:
If E1≥I1And E2≥I2, d1It is embedded into LL1In, d11It is embedded into LH1In, d2It is embedded into HL1In, d22It is embedding Enter to HH1In, d3It is embedded into LL2In, d33It is embedded into LH2In, d4It is embedded into LL3In, d44It is embedded into LH3In, d5 It is embedded into HL3In, d55It is embedded into HH3In, d6It is embedded into HL4In, d66It is embedded into HH4In;
If E1≥I1And E2<I2, d1It is embedded into LL2In, d11It is embedded into LH2In, d2It is embedded into LL3In, d22It is embedding Enter to LH3In, d3It is embedded into HL3In, d33It is embedded into HH3In, d4It is embedded into HL4In, d44It is embedded into HH4In, d5 It is embedded into LL1In, d55It is embedded into LH1In, d6It is embedded into HL1In, d66It is embedded into HH1In;
If E1<I1And E2≥I2, d1It is embedded into LL3In, d11It is embedded into LH3In, d2It is embedded into HL3In, d22It is embedding Enter to HH3In, d3It is embedded into HL4In, d33It is embedded into HH4In, d4It is embedded into LL1In, d44It is embedded into LH1In, d5 It is embedded into HL1In, d55It is embedded into HH1In, d6It is embedded into LL2In, d66It is embedded into LH2In;
If E1<I1And E2<I2, d1It is embedded into HL4In, d11It is embedded into HH4In, d2It is embedded into LL1In, d22Insertion To LH1In, d3It is embedded into HL1In, d33It is embedded into HH1In, d4It is embedded into LL2In, d44It is embedded into LH2In, d5It is embedding Enter to LL3In, d55It is embedded into LH3In, d6It is embedded into HL3In, d66It is embedded into HH3In.
Beneficial effects of the present invention:
The two width color image compression encryption methods provided by the invention based on two dimensional compaction perception have below beneficial to effect Fruit:
(1) by the way that two width colour plaintext images are embedded into the identical color host image of an auxiliary scale cun, using two dimension Compressed sensing carries out compression encryption, scramble, quantization from color three-component of two different directions to colored plaintext image, and will Encrypted color image is embedded into color host image, finally obtains visual security of the size as plaintext image Ciphertext image realizes picture appearance safety and data safety, and the data volume of encrypted image is reduced using two dimensional compaction perception, makes Obtained ciphertext size is smaller, reduces the runing time of the algorithm, and saves transmission bandwidth and memory space.
(2) close by the way that the two group information parameters and cryptographic Hash closely related with plaintext are embedded into color host image Key parameter is transmitted directly to recipient with the ciphertext image of visual security, in this way when encrypting simultaneously to high-volume picture, keeps away Exempt to save transmission bandwidth and memory space to the additional transmissions and storage of relevant key parameter in plain text, be particularly suited for Resource constrained environment, and improve the safety of Encryption Algorithm of the present invention.
(3) by carrying out shuffle operation to the measured value of plaintext image during compressing and encrypting, adjacent member is reduced The correlation of element.The index vector as used in scramble is to be generated by chaos sequence, and the generation of chaos sequence and plaintext are tight Close correlation is that random, different plaintext image has different scrambles as a result, can effectively support this guarantees scrambling process Imperial known-plaintext and chosen -plain attact.Moreover, telescopiny is related with color host image, the letter of color host image is utilized Cease the insertion random to ciphertext.Therefore the random operation in scramble and insertion further improves the safety of algorithm.
Detailed description of the invention
Fig. 1 is the stream of the two width color image compression encryption methods provided in an embodiment of the present invention based on two dimensional compaction perception One of journey schematic diagram;
Fig. 2 is the stream of the two width color image compression encryption methods provided in an embodiment of the present invention based on two dimensional compaction perception The two of journey schematic diagram;
Fig. 3 is the process of the initial value of generation LSS chaos system provided in an embodiment of the present invention and sextuple hyperchaotic system Schematic diagram;
Fig. 4 is the two width color images based on two dimensional compaction perception that inventive embodiments provided in an embodiment of the present invention provide The three of the flow diagram of compression encryption method;
Fig. 5 is the encryption of colored plaintext image Lena and Baboon provided in an embodiment of the present invention and the signal of decrypted result Figure;
Fig. 6 is the key sensitivity tests result schematic diagram in ciphering process provided in an embodiment of the present invention;
Fig. 7 is the key sensitivity tests result schematic diagram in decrypting process provided in an embodiment of the present invention;
Fig. 8 is influence schematic diagram of the salt-pepper noise of varying strength provided in an embodiment of the present invention to decrypted result;
Fig. 9 is the decrypted image schematic diagram in the case of no shearing provided in an embodiment of the present invention;
Figure 10 is the decrypted image schematic diagram in the case of shearing 1/8th provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention Figure, technical solution in the embodiment of the present invention are explicitly described, it is clear that described embodiment is a part of the invention Embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making wound Every other embodiment obtained under the premise of the property made labour, shall fall within the protection scope of the present invention.
As shown in Figure 1, the two width color image compression encryption sides provided in an embodiment of the present invention based on two dimensional compaction perception Method, comprising the following steps:
S11: the first width colour plaintext image P is extracted respectively1With the second width colour plaintext image P2Color three-component, note For first group of color three-component and second group of color three-component, and two groups of colors three are divided respectively using two-dimensional discrete wavelet conversion Amount carries out rarefaction;Wherein, P1And P2Size be M × N and M=N;
Specifically, in the embodiment of the present invention, by the first width colour plaintext image P1Color three-component be denoted as first group of face Color three-component: R1、G1And B1;By the second width colour plaintext image P2Color three-component be denoted as second group of color three-component: R2、G2 And B2.The color three-component refers to the Red component, Green component and Blue component of color image.
S12: it calculates separately to obtain according to two groups of color three-components of two width colour plaintext images bright with the two width colour Texts and pictures are as relevant first group information parameter and the second group information parameter;
Specifically, in the embodiment of the present invention, the information parameter being calculated according to first group of color three-component is denoted as One group information parameter;The information parameter being calculated according to second group of color three-component is denoted as the second group information parameter.Due to The first group information parameter and the second group information are obtained according to the color three-component of two width color images, therefore two groups of letters It ceases parameter and plaintext image is closely related, be embedded into color host image for subsequent a part as key information.
S13: calculation matrix is generated using LSS chaos system and Kronecker product, and the calculation matrix is optimized;
Specifically, common one-dimensional chaos system has Logistic mapping (formula (1)) and Sine mapping (formula (2)):
x′n+1=FL(u,x′n)=u × xn×(1-x′n) (1)
x″n+1=FS(r,x″n)=r × sin (π × x "n)/4 (2)
Wherein, when u ∈ (3.89,4] and when (0,1) r ∈, Logistic mapping and Sine mapping have chaotic behavior.
Simple in view of above-mentioned traditional One Dimensional Chaotic Maps structure, randomness is limited, and the data distribution of output is uneven, no Few experts and scholars propose some improved, with more advantageous characteristic systems.Logistic mapping is mutually tied with Sine mapping It closes, obtain a new accountant rule: Logistic-Sine maps (LSS), as shown in formula (3):
Wherein r ' ∈ (0,4] be control parameter, be key a part.Selection uses formula (3) institute in the embodiment of the present invention The new accountant rule shown, available bigger chaos range, and the sequence exported is evenly distributed in [0,1], than tradition 1 dimensional Logistic Map or Sine mapping chaos performance it is more preferable.
Kronecker product (Kronecker Product, KP) is the operation between a kind of matrix of two arbitrary sizes, it is The special shape of tensor product, with the naming of Germany mathematics person's Leopold Kronecker.Two sizes are respectively m × n Formula (4) are defined as with the matrix A of p × q and the KP of B:
Wherein, matrixSize be mp × nq, and meet
Such as matrixThenResult are as follows:
Such asThenResult are as follows:
KP has calculating speed fast, the low feature of computation complexity.If A and B are nonsingular, and under having (on) Triangle, band-like, symmetrical, positive definite, random, Teoplitz, displacement and the properties such as orthogonal, thenAnd it is nonsingular, Under having (on) triangle, band-like, symmetrical, positive definite, random, Teoplitz, displacement and the properties such as orthogonal.By above-mentioned property, Low-dimensional is random, linear independence or orthogonal base vectors can expand to random higher-dimension, linear independence or orthogonal matrix by KP.At this In inventive embodiments, chaotic maps are applied to generate low-dimensional Seed Matrix, then utilize KP by low-dimensional matrix-expand to higher-dimension Matrix generates the calculation matrix of compressed sensing (CS), and something which increases the execution efficiencys of the algorithm.
S14: two dimensional compaction sense is carried out to two groups of color three-components after rarefaction respectively using the calculation matrix after optimization Know, obtains corresponding first group of compressed sensing measurement sequence and second group of compressed sensing measurement sequence;
Specifically, in the embodiment of the present invention, calculation matrix is denoted as the three-component compressed sensing result of first group of color First group of compressed sensing result;Calculation matrix is denoted as second group of compression sense to the three-component compressed sensing result of second group of color Know result.Then, the sequence that first group of compressed sensing result converts is denoted as first group of compressed sensing measurement sequence;By The sequence that two groups of compressed sensing results convert is denoted as second group of compressed sensing measurement sequence.
S15: shuffle operation is carried out to two groups of compressed sensing measurement sequences respectively using sextuple hyperchaotic system, is corresponded to First group of Scrambling Matrix and second group of Scrambling Matrix, and by element value in two groups of Scrambling Matrixes be less than preset threshold TS element Value is changed to 0, obtains revised two groups of Scrambling Matrixes;
Specifically, sextuple hyperchaotic system has complicated phase space and better dynamic characteristic and randomness, and gathers around There is more complicated dynamic behavior, which has the structure more more complicated than one-dimensional chaos system, so the embodiment of the present invention Sextuple hyperchaotic system is selected to can be improved the safety of encryption method.Shown in the model of sextuple hyperchaotic system such as formula (5):
Wherein, x, y, z, u, v, w represent the state variable of sextuple hyperchaotic system;A, b, c, d, e, f, g are system parameter; Work as a=10, b=4, c=20, d=-2.5, e=4, when f=5, g=20, system is in hyperchaos state.
S16: revised two groups of Scrambling Matrixes are quantified respectively, element value is transformed between 0 to 255, is obtained Corresponding first group of quantization matrix and second group of quantization matrix;
S17: the color three-component of the color host image F ' after extracting image normalization is denoted as third group color three and divides Amount;Wherein, the size of color host image F ' is M × N;
Specifically, the image normalization in the embodiment of the present invention specifically:
The pixel value of color host image F is normalized between [10,245] according to formula (6), the coloured silk after being normalized Color carrier image F ':
Wherein, parameter A=10, μ=245;Expression rounds up to the value of x;Such as:It is colored The size of carrier image F is M × N.
Carrying out image normalization to color host image in this step is in order to prevent after embedding data, and data are overflowed, and are led Cause obtained visual security image visually variant.
S18: 256 cryptographic Hash are generated using the SHA256 function of the first width colour plaintext image, and described 256 are breathed out Uncommon every 8 one group of value is converted into 32 decimal number k1, k2..., k32, 32 decimal numbers are denoted as cryptographic Hash K;
S19: will the first group information parameter relevant to two width colour plaintext images and the second group information parameter according to setting Parameter Switch rule be respectively converted into first group of integer set and second group of integer set, wherein first group of set of integers It closes and second group of integer set includes L integer;
S110: (32+2L) a pixel value before one of component in third group color three-component is replaced with described Cryptographic Hash K and 2L integer obtain the first ciphertext matrix containing key parameter information;
S111: other two component in third group color three-component is subjected to DWT decomposition, and the square that will be obtained after decomposition Battle array carries out piecemeal, obtains corresponding first group of carrier matrix and second group of carrier matrix;
Specifically, DWT refers to wavelet transform.
S112: first group of quantization matrix and second group of quantization matrix are respectively embedded in two groups of carrier matrixs, obtained To the second ciphertext matrix and third ciphertext matrix containing ciphertext image information;
S113: first ciphertext matrix, the second ciphertext matrix and third ciphertext matrix are combined, and are obtained and two width The corresponding visual security image of colored plaintext image.
It should be noted that each step in the embodiment of the present invention is in the absence of conflict, part steps can be simultaneously It executes, can also successively execute.
The two width color image compression encryption methods provided in an embodiment of the present invention based on two dimensional compaction perception, compared to existing Some image encryption methods, have the advantage that
(1) by the way that two width colour plaintext images are embedded into the identical color host image of an auxiliary scale cun, using two dimension Compressed sensing carries out compression encryption, scramble, quantization from color three-component of two different directions to colored plaintext image, and will Encrypted color image is embedded into color host image, finally obtains visual security of the size as plaintext image Ciphertext image realizes picture appearance safety and data safety, and the data volume of encrypted image is reduced using two dimensional compaction perception, makes Obtained ciphertext size is smaller, reduces the runing time of the algorithm, and saves transmission bandwidth and memory space.
(2) close by the way that the two group information parameters and cryptographic Hash closely related with plaintext are embedded into color host image Key parameter is transmitted directly to recipient with the ciphertext image of visual security, in this way when encrypting simultaneously to high-volume picture, keeps away Exempt to save transmission bandwidth and memory space to the additional transmissions and storage of relevant key parameter in plain text, be particularly suited for Resource constrained environment, and improve the safety of Encryption Algorithm of the present invention.
(3) by carrying out shuffle operation to the measured value of plaintext image during compressing and encrypting, adjacent member is reduced The correlation of element.
On the basis of the above embodiments, in conjunction with Fig. 2 to Fig. 4, the embodiment of the present invention provides another and is based on two dimensional compaction Two width color image compression encryption methods of perception, comprising the following steps:
S21: P is extracted respectively1And P2Color three-component, and using two-dimensional discrete wavelet conversion respectively to two groups of colors three Component carries out rarefaction;
Specifically, specific to two groups of color three-components progress rarefactions respectively using two-dimensional discrete wavelet conversion (2D DWT) Are as follows: according to formula (7) to R1、G1、B1And R2、G2、B2Carry out rarefaction:
Wherein, ψ is sparse basis, by R1、G1、B1Matrix after sparse is denoted as R '1、G′1、B′1;By R2、G2、B2After sparse Matrix is denoted as R '2、G′2、B′2.Wherein, R '1、G′1、B′1、R′2、G′2、B′2Size is M × N.
S22: it is calculated and the first group information parameter and the second group information parameter according to two groups of color three-components;
Specifically, the first group information parameter and the second group information parameter are calculated according to formula (8):
Wherein, a (i, j) indicates (i, j) a element in color component corresponding with information parameter Q to be calculated, that is, works as a (i, j) respectively indicates color component R1、G1、B1、R2、G2、B2In (i, j) a element when, Q respectively indicates corresponding information ginseng Number QR、QG、QB、Q′R、Q′G、Q′B;Wherein, QR、QGAnd QBFor the first group information parameter, Q 'R、Q′GWith Q 'BFor the second group information ginseng Number.
To calculate information parameter QRFor: parameter Q is calculated according to formula (8)R:
Wherein, a (i, j) indicates R1(i, j) a element.
S23: P is utilized1SHA256 function generate 256 cryptographic Hash, and will be every 8 one group of 256 cryptographic Hash turn Turn to 32 decimal number k1, k2..., k32, 32 decimal numbers are denoted as cryptographic Hash K;
S24: the initial value of sextuple hyperchaotic system and LSS chaos system is generated;
Specifically, as shown in figure 3, the initial value for generating sextuple hyperchaotic system specifically includes:
Step A1: intermediate parameters H is calculated according to formula (9) according to the cryptographic Hash K1~H6:
Wherein, (t1,t2,t3,t4,t5) ∈ (0,1) be preset-key parameter;sum(k16,k17,…,k20) indicate to seek k16, k17,…,k20Sum;max(k16,k17,…,k20) indicate to seek k16, k17,…,k20Maximum value;Indicate the exclusive or of x and y Operation;
Step A2: according to the intermediate parameters H1~H6Wherein at the beginning of three of sextuple hyperchaotic system are calculated according to formula (10) Initial value x0、y0And z0:
Wherein, mod (a, b) indicates a to the modulo operation of b, and abs (x) indicates to seek the absolute value of x, and floor (x) indicates meter Calculate the maximum integer for being not more than x;
Step A3: according to the first group information parameter and the intermediate parameters H1~H6First group is calculated according to formula (11) Intermediate key r1、g1And b1:
Step A4: according to the intermediate key r1、g1And b1And intermediate parameters H4~H6It is calculated according to formula (12) sextuple super The other three initial value u of chaos system0、v0And w0:
As shown in figure 3, the initial value for generating LSS chaos system specifically includes:
Step B1: according to the second group information parameter, the intermediate parameters H1~H6With preset-key parameter t1~t5It presses Illuminated (13) calculates second group of intermediate key r '1、g′1With b '1:
Step B2: according to second group of intermediate key r '1、g′1With b '1The first of LSS chaos system is calculated according to formula (14) Initial value a0With parameter r ':
Wherein, (t6,t7) ∈ (0,1) be preset-key parameter.
S25: calculation matrix is generated using LSS chaos system and Kronecker product, and the calculation matrix is optimized;
Specifically, calculation matrix is generated using LSS chaos system and Kronecker product to specifically include:
Step C1: by the initial value a0Iteration m in LSS chaos system is brought into parameter r '1+ Md times, cast out preceding m1It is a Value obtains the sequence A that length is 1 × Md;Wherein, d is default sampling interval, m1≥500;
Specifically, when sampling interval d is sufficiently large, the chaos sequence of generation is chaos that is approximately independent, sampling The matrix of sequence construct meets RIP (Restricted Isometry Property in very maximum probability;Limited equidistant property) Condition.LSS chaos system has been introduced in the above-described embodiments, and details are not described herein again.
Step C2: sequence A is converted to obtain sequence A ' according to formula (15):
A′i=1-2Ai, i=1,2 ..., Md (15)
Specifically, since new sequence A ' has zero-mean and zero symmetrically, this step can be such that subsequent step constructs The calculation matrix more random distribution come.
Step C3: equidistant d sampling is carried out according to formula (16) to sequence A ' progress, obtains sample sequence A ":
A″k=A '1+kdK is sampling sequence number, k >=0 (16)
Step C4: the chaos sequence S that 4 length are 4 is randomly selected from sequence A "1、S2、S3And S4, and by chaos sequence S1~S4It is converted into the low-dimensional matrix K that 4 sizes are 2 × 21、K2、K3And K4
Step C5: using Kronecker product to low-dimensional matrix K1And K2、K1And K3、K2And K3And K1And K4It extends respectively log2 MHigher dimensional matrix K that is secondary, will obtaining1′、K2′、K3' and K4' it is used as calculation matrix.
Sparse signal is projected lower dimensional space from higher dimensional space by calculation matrix, in the condition for guaranteeing signal reconstruction precision Under, it is desirable that the lower projector space dimension the better.
The nonzero coefficient of sparse signal is concentrated mainly on low-frequency band, and zero coefficient or is concentrated mainly on height close to zero coefficient Frequency band.Therefore, it by increasing the measurement coefficient of the first half of calculation matrix, can be obtained within the identical sampling time more Information, to accurately rebuild original signal.However, increasing the coefficient of calculation matrix first half will inevitably reduce The incoherence of matrix.According to the property of Singular Value Decomposition Using, maximum singular value is smaller, and the incoherence of matrix is better.It is real It tests the result shows that improved singular value calculation matrix has RIP property more better than original matrix, and rebuilds effect and obviously mention It is high.The characteristics such as singular value is with good stability, constant rate, rotational invariance, therefore calculation matrix is carried out unusual Value decomposes the purpose, it can be achieved that calculation matrix optimization.Singular Value Decomposition Using method is as follows:
Assuming that matrix A ∈ Rm×n, there are orthogonal matrix U ∈ Rm×n、V∈Rm×nMake with diagonal matrix Σ:
A=U Σ VT (17)
Wherein,And Σ1=diag (δ1, δ2..., δr), cornerwise element δ in sequence1> > δ2 > > ... δr> 0, r=rank (A) arrangement.Here it is matrix singular value decomposition theorems, wherein δ1, δ2..., δrFor matrix A Singular value, formula (17) is known as the singular value decomposition of matrix A.
In the embodiment of the present invention, the calculation matrix is optimized and is specifically included:
Step C6: by calculation matrix K1' it is converted into calculation matrix φ, the φ ∈ R that size is P × QP×Q;Wherein, P=CR × M, Q=N, CR are default compression ratio;
Step C7: singular value decomposition, i.e. φ=U Σ V are carried out to calculation matrix φT, obtain diagonal matrix Σ;Wherein,Indicate the diagonal matrix of calculation matrix φ, Σ1=diag (δ12..., δr), δ1≥δ2≥…≥δr> 0, δ1~ δrIndicate the singular value of calculation matrix φ, r is singular value number;
Step C8: all 1's matrix J that construction size is M × N;Calculate the mean value var of diagonal matrix Σ diagonal entry1, and Count Σ1In >=var1Singular value number f;The preceding f of order matrix J is arranged multiplied by weighting coefficient t (t > 1), obtains optimization matrix J1; Matrix J will be optimized1With calculation matrix φ dot product, calculation matrix φ ' ' after obtaining the first suboptimization;
Step C9: singular value decomposition, i.e. φ '=U are carried out again to calculation matrix φ '1Σ2V1 T;Wherein, Indicate the diagonal matrix of calculation matrix φ ', Σ3=diag (δ '1,δ′2..., δ 'r),δ′1~δ 'rIndicate calculation matrix φ's ' Singular value, r are singular value number;
Step C10: δ ' is enabled1=δ '2=...=δ 'r=1, obtain new diagonal matrix Σ '2, and according to diagonal matrix Σ '2 Calculation matrix φ after generating final optimization pass1=U1Σ′2V1
Step C11: referring to step C6 to step C10, to calculation matrix K2′、K3' and K4' optimize, after obtaining optimization Calculation matrix φ2、φ3And φ4
Specifically, calculation matrix φ1、φ2、φ3And φ4Size is P × Q.
S26: two dimensional compaction sense is carried out to two groups of color three-components after rarefaction respectively using the calculation matrix after optimization Know, obtains corresponding first group of compressed sensing measurement sequence and second group of compressed sensing measurement sequence;
Specifically, two dimensional compaction is carried out to two groups of color three-components after rarefaction respectively using the calculation matrix after optimization It perceives (2D CS) specifically:
To R '1、G′1、B′1With R '2, G '2, B '2Two dimensional compaction perception is carried out according to formula (18):
Wherein,WithIt is first group of compressed sensing result and second group of pressure respectively Contracting sensing results;φ1、φ2、φ3And φ4For the calculation matrix after optimization.
Then, by matrixWithIt is converted into sequence R3、G3、B3With R '3、G′3、B′3.Its In, R3、G3、B3Sequence is measured for first group of compressed sensing;R′3、G′3、B′3Sequence is measured for second group of compressed sensing.R3、G3、 B3、R′3、G′3、B′3Length be M1×N1, wherein M1=M × CR, N1=N × CR;CR is default compression ratio.
S27: shuffle operation is carried out to two groups of compressed sensing measurement sequences respectively using sextuple hyperchaotic system, and to two groups Scrambling Matrix is modified;
Specifically, sextuple hyperchaotic system has been introduced in the above-described embodiments, and details are not described herein again.This step specifically:
Step D1: by the initial value x0、y0、z0、u0、v0And w0Bring iteration m in sextuple hyperchaotic system into0+M1N1It is secondary, Cast out preceding m0A value, obtaining 6 sizes is 1 × M1N1Sequence X, Y, Z, U, V and W;Wherein, m0>=500, M1=M × CR, N1= N × CR, CR are default compression ratio;
Specifically, sequence X, Y, Z, U, V and W can be respectively indicated are as follows: With
Step D2: six chaos sequences X, Y, Z, U, V and W are arranged according to ascending order, obtain six index vector D1~D6
Step D3: six chaos sequences X, Y, Z, U, V and W are modified according to formula (19), obtain revised new sequence Arrange XX, YY:
Wherein, XX(i)、YY(i)Indicate i-th of element in new chaos sequence XX and YY, Xi、Yi、Zi、Ui、ViAnd WiRespectively Indicate i-th of element of sequence X, Y, Z, U, V and W, i ∈ [1, M1N1];
Step D4: first element value X of new sequence X X, YY is extracted respectivelyind1、Yind1, and repaired according to formula (20) Just, obtain revised sequence X 'ind1With Y 'ind1:
Step D5: if X 'ind1=1, index of reference vector D1、D2And D3Respectively to sequence R3、G3And B3Rearrangement;If X′ind1=2, index of reference vector D1、D2And D3Respectively to sequence G3、B3And R3Rearrangement;If X 'ind1=3, index of reference vector D1、D2And D3To sequence B3、R3And G3Rearrangement;Wherein, R3、G3And B3Sequence is measured for first group of compressed sensing;
Step D6: if Y 'ind1=1, index of reference vector D4、D5And D6To sequence R '3、G′3With B '3Rearrangement;If Y′ind1=2, index of reference vector D4、D5And D6To sequence G '3、B′3With R '3Rearrangement;If Y 'ind1=3, index of reference vector D4、D5And D6To sequence B '3、R′3With G '3Rearrangement;Wherein, R '3、G′3With B '3Sequence is measured for second group of compressed sensing;
Step D7: first group of compressed sensing after scramble is measured into sequence R3、G3And B3And second group of compressed sensing is surveyed Measure sequence R '3、G′3With B '3Being separately converted to size is M1×N1Matrix R4、G4And B4And R '4、G′4With B '4, wherein R4、G4And B4For first group of Scrambling Matrix, R '4、G′4With B '4For second group of Scrambling Matrix;
Specifically, first group of compressed sensing after scramble is measured into sequence R3、G3And B3Matrix after conversion is denoted as first group Scrambling Matrix R4、G4And B4;Second group of compressed sensing after scramble is measured into sequence R '3、G′3With B '3Matrix after conversion is denoted as Second group of Scrambling Matrix R '4、G′4With B '4
Step D8: the element value by element value in two groups of Scrambling Matrixes less than preset threshold TS is changed to 0, obtains revised Two groups of Scrambling Matrixes.
S28: revised two groups of Scrambling Matrixes are quantified respectively;
Specifically, quantified according to formula (21):
Wherein, min and max is the minimum value and maximum value of Scrambling Matrix P respectively, and floor (x), which indicates to calculate, is not more than x Maximum integer;P(i)With P '(i)It is i-th of element of Scrambling Matrix P and quantization matrix P ' respectively, that is, works as P(i)It respectively indicates and sets Random matrix R4、G4、B4、R′4、G′4、B′4In i-th of element when, P '(i)It is quantization matrix R respectively5、G5、B5、R′5、G′5、B′5 I-th of element;1≤i≤M1N1;Wherein, R5、G5And B5For first group of quantization matrix;R′5、G′5With B '5For second group of quantization square Battle array.
With Scrambling Matrix R4Quantified to obtain quantization matrix R5For:
Wherein, min is Scrambling Matrix R4Minimum value, max is Scrambling Matrix R4Maximum value, R4(i)And R5(i)It is respectively Scrambling Matrix R4With quantization matrix R5I-th of element.
S29: the color three-component of the color host image F ' after extracting image normalization is denoted as third group color three and divides Amount;Wherein, the size of color host image F ' is M × N;
Specifically, in the embodiment of the present invention, third group color three-component is expressed as F 'R、F′GWith F 'B
S210: the first group information parameter and the second group information parameter are respectively converted into according to the Parameter Switch rule of setting First group of integer set and second group of integer set, wherein first group of integer set and second group of integer set are equal Include L integer;
Specifically, as an embodiment, with the Q in the first group information parameterRIt is embedded into color host image F′RFor in component: for example, parameter QRIt is 0.589486987492596, then decimal system parameter QRIt is divided into 8 integers, i.e., QR=(58,94,86,98,74,92,59,6), with same method the Q being calculatedR、QG、QB、Q′R、Q′G、Q′BIt resolves into 8 integers then obtain 48 integers, use z1-z48It indicates.Then 32 decimal system cryptographic Hash K z49-z80It indicates.Finally 80 decimal integers are obtained.I.e. in present embodiment, L=24.
S211: (32+2L) a pixel value before one of component in third group color three-component is replaced with described Cryptographic Hash K and 2L integer obtain the first ciphertext matrix containing key parameter information;
Specifically, with the Q in the first group information parameterRIt is embedded into the F ' of color host imageRFor in component: extracting color Color carrier image F 'RPreceding 80 pixel values of component, with z '1-z′80It indicates.By z obtained in step S2101-z80It is substituted into coloured silk Color carrier image F 'RPreceding 80 pixel value z ' of component1-z′80In to get arrive the first ciphertext containing important parameter key information Matrix F "R, size is M × N, and key insertion terminates.
S212: other two component in third group color three-component is subjected to DWT decomposition, and the square that will be obtained after decomposition Battle array carries out piecemeal, obtains corresponding first group of carrier matrix and second group of carrier matrix;
Specifically, as an embodiment, other two component in third group color three-component is set as F 'G、 F′B, this step specifically:
Step E1: to color component F 'G、F′BDWT decomposition is carried out, the Matrix C that size is (M × N)/4 is respectively obtainedA、 CH、CV、CDWith C 'A、C′H、C′V、C′D;Wherein, F 'G、F′BSize is M × N;
Step E2: CR=0.25 is set by the compression ratio CR of colored plaintext image;
Specifically, quantization matrix R at this time5、G5、B5With R '5、G′5、B′5Size be (M × N)/16.This step institute To set CR=0.25 for compression ratio CR, in order to which the ciphertext image for obtaining compression measurement is ideally embedded into colored carriers figure As in F.
Step E3: by Matrix CHFour pieces are divided into, 4 matrix L L that size is (M × N)/16 are obtained1、LH1、HL1And HH1
Step E4: referring to step E3, by Matrix CV、C′H、C′VIt is divided into four pieces respectively, obtaining size is (M × N)/16 Other 12 matrix L L2~LL4、LH2~LH4、HL2~HL4And HH2~HH4;Wherein, LL1~LL2、LH1~LH2、HL1~HL2、 HH1~HH2For first group of carrier matrix;LL3~LL4、LH3~LH4、HL3~HL4And HH3~HH4For second group of carrier matrix.
S213: first group of quantization matrix and second group of quantization matrix are respectively embedded in two groups of carrier matrixs, obtained To the second ciphertext matrix and third ciphertext matrix containing ciphertext image information;
Specifically, this step specifically:
Step F1: two groups of quantization matrixes are converted according to formula (22) and formula (23) respectively, every group of quantization matrix is equal Obtain transformed two matrixes d and d':
D (i, j)=Q (i, j) mod10 (22)
D ' (i, j)=floor (Q (i, j)/10) (23)
Wherein, Q (i, j) and d (i, j), d ' (i, j) are the matrix obtained after quantization matrix Q and Q to be transformed are converted respectively D, (i, j) a element in d ', i.e., when Q (i, j) is quantization matrix R respectively5、G5、B5、R′5、G′5、B′5In (i, j) it is a When element, d (i, j) is corresponding d respectively1、d2、d3、d4、d5、d6In (i, j) a element, d ' (i, j) is corresponding respectively d11、d22、d33、d44、d55、d66In (i, j) a element;1≤i≤M1, 1≤j≤N1
With quantization matrix R5For: it is converted according to equation (22) and (23), obtains two matrix d1And d11
d1(i, j)=R5(i,j)mod10
d11(i, j)=floor (R5(i,j)/10)
Wherein, d1(i,j)、d11(i, j) and R5(i, j) is matrix d respectively1、d11And R5In the position (i, j) element, 1≤i ≤M1, 1≤j≤N1
Step F2: according to formula (24) calculating matrix CAWith C 'APixel average I1And I2:
Wherein, C (i, j) is (i, j) a element in Matrix C to be calculated, and I is the pixel average of Matrix C to be calculated, I.e. when C (i, j) is C respectivelyAWith C 'AIn (i, j) a element when, I is C respectivelyAWith C 'APixel average I1And I2
With Matrix CAFor: it is calculated according to formula (24):
Wherein, CA(i, j) is Matrix CA(i, j) a element;I1It is CAPixel average.
Step F3: Matrix C is extractedAWith C 'AFirst element value E1And E2
Step F4: it is respectively compared I1And E1Size and I2And E2Size, and according to comparison result by d1~d6And d11 ~d66It is embedded into first group of carrier matrix and second group of carrier matrix;
Specifically, as an embodiment, if E1≥I1And E2≥I2, d1It is embedded into LL1In, d11It is embedded into LH1In, d2It is embedded into HL1In, d22It is embedded into HH1In, d3It is embedded into LL2In, d33It is embedded into LH2In, d4Insertion To LL3In, d44It is embedded into LH3In, d5It is embedded into HL3In, d55It is embedded into HH3In, d6It is embedded into HL4In, d66It is embedding Enter to HH4In;
If E1≥I1And E2<I2, d1It is embedded into LL2In, d11It is embedded into LH2In, d2It is embedded into LL3In, d22It is embedding Enter to LH3In, d3It is embedded into HL3In, d33It is embedded into HH3In, d4It is embedded into HL4In, d44It is embedded into HH4In, d5 It is embedded into LL1In, d55It is embedded into LH1In, d6It is embedded into HL1In, d66It is embedded into HH1In;
If E1<I1And E2≥I2, d1It is embedded into LL3In, d11It is embedded into LH3In, d2It is embedded into HL3In, d22It is embedding Enter to HH3In, d3It is embedded into HL4In, d33It is embedded into HH4In, d4It is embedded into LL1In, d44It is embedded into LH1In, d5 It is embedded into HL1In, d55It is embedded into HH1In, d6It is embedded into LL2In, d66It is embedded into LH2In;
If E1<I1And E2<I2, d1It is embedded into HL4In, d11It is embedded into HH4In, d2It is embedded into LL1In, d22Insertion To LH1In, d3It is embedded into HL1In, d33It is embedded into HH1In, d4It is embedded into LL2In, d44It is embedded into LH2In, d5It is embedding Enter to LL3In, d55It is embedded into LH3In, d6It is embedded into HL3In, d66It is embedded into HH3In.
Finally, the matrix for obtaining insertion cipher-text information is denoted as: LL '1-LL′4、LH′1-LH′4、HL′1-HL′4With HH '1-HH ′4, size is (M × N)/16.Wherein, LL '1~LL '2、LH′1~LH '2、HL′1~HL '2、HH′1~HH '2After insertion First group of carrier matrix;LL′3~LL '4、LH′3~LH '4、HL′3~HL '4、HH′3~HH '4For second group of carrier square after insertion Battle array.
Step F5: the matrix L L ' that will be obtained after insertion1、LH′1、HL′1、HH′1It is reconfigured, obtains new matrix CH1
Step F6: referring to step F5, the matrix L L ' that will be obtained after insertion2~LL '4、LH′2~LH '4、HL′2~HL '4With HH′2~HH '4It is reconfigured, obtains new Matrix CV1、C′H1With C 'V1
Specifically, by matrix L L '2、LH′2、HL′2、HH′2It is reconfigured, obtains new Matrix CV1;By matrix L L ′3、LH′3、HL′3、HH′3Reconfigured, obtain new Matrix C 'H1;By matrix L L '4、LH′4、HL′4、HH′4It carries out again Combination, obtain new Matrix C 'V1.Wherein, CH1、CV1、C′H1With C 'V1Size is (M × N)/4.
Step F7: by Matrix CA、CH1、CV1、CDWith C 'A、C′H1、C′V1、C′DMatrix is obtained using inverse discrete wavelet transform F″GWith F "B;Wherein, F "GFor the second ciphertext matrix;F″BFor third ciphertext matrix.
Specifically, F "GWith F "BSize is M × N.
S214: first ciphertext matrix, the second ciphertext matrix and third ciphertext matrix are combined, and are obtained and two width The corresponding visual security image of colored plaintext image.
Specifically, by F "R、F″G、F″BThree-component is combined, and the visual security ciphertext graph containing cipher-text information is obtained As C.Ciphering process terminates.
In order to verify the effective of the two width color image compression encryption methods provided by the invention based on two dimensional compaction perception Property, the present invention provides following experiment.
Experiment porch and experiment parameter: mentioned algorithm is verified using Matlab R2016a in 2.5GHz CPU and 4GB The encryption and decryption effect on PC deposited, operating system is Microsoft Windows 10.Size is 512 × 512 Color Lena image and colour Baboon image be used as plaintext image, color host image for identical size Lake.It uses Parameter setting it is as follows: t1=0.35, t2=0.15, t3=0.25, t4=0.45, t5=0.56, t6=0.51, t7=0.45; Threshold value TS=30, sampling interval d are 20, compression ratio CR=0.25.In the DWT of color host image is decomposed, use " Haar " Wavelet function.In the reconstruction process of CS, using ONSL0Method.Wherein, encryption and decrypted result are illustrated in fig. 5 shown below.
Fig. 5 is the encryption of colored plaintext image Lena and Baboon, decrypted result.In Fig. 5, (a) and (b) is colored respectively Plaintext image Lena and Baboon, are (c) color host image Lake, are (d) colored plaintext image Lena and Baboon respectively Red, Green, Blue three-component compression measurement after ciphertext image, (e) be corresponding visual security ciphertext image, (f) It (g) is its corresponding decrypted image.
As can be seen from Figure 5: (1): (d) is the ciphertext graph after the compression measurement of colored plaintext image Lena and Baboon Picture, they are the images of similar noise, when they are when transmission over networks stores, it is easy to it is found and is attacked by hacker, it cannot Effective protection image data safety;(2): (e) is the ciphertext image of corresponding visual security, they are meaningful and from appearance On be not to be regarded as ciphertext image, effectively hide cipher-text information, protect data safety, have relatively high appearance safety level It not, is 33.35dB with the PSNR value of figure (c), visual effect is good;(3): (f) and (g) shown in decrypted image and (a) and (b) plaintext image shown in is visually almost the same, is visually difficult to find out that the difference of the two, corresponding PSNR value are respectively 33.56dB and 30.01dB, it is therefore proposed that Encryption Algorithm have it is good encryption and decryption effect, image data can be obtained Safety and appearance safety, and the visual security password image for encrypting generation is identical as original image size, does not need additional Transmission bandwidth and memory space.
One, key space is analyzed
It is well known that the size of key space reflects the difficulty and complexity of successful attack cryptographic system, therefore effectively Image Encryption Scheme need sufficiently large key space to resist brute force attack.The key of Encryption Algorithm proposed by the invention Specifically include that 256 cryptographic Hash K that (1) is obtained from 256 hash function of SHA of plaintext image;(2) given parameter t1-t7; (3) key Q relevant to plaintext image informationR、QG、QB、Q’R、Q’G、Q’B.In addition, the DWT of threshold value TS and at least 37 seed types Existing wavelet filter can also be used as key.
If the computational accuracy of computer is 10-14, then key space is about 372×(1014)7=372×1098>2294Such as Fruit adds 256 cryptographic Hash K, and whole key is considerably beyond 2100, this shows that the key space of this paper is sufficiently large, Neng Gouyou Effect resists exhaustive attack, therefore safety with higher.
Two, key sensitivity analysis
Key sensibility refers to that the ciphertext image obtained after slight change and former ciphertext image occurs when primary key Between difference, difference is bigger, illustrates that key sensibility is higher.Equally, it is obtained with the key decryption ciphertext image after slight change The decrypted image arrived and plaintext image difference are bigger, and decruption key sensibility is also better.The Encryption Algorithm of proposition should be to key Variation it is very sensitive.This experiment is used as the color Lena image that size is 512 × 512 with colour Baboon image to be schemed in plain text Picture, (a), (b) are shown in Fig. 5, and the colored Lake image that size is 512 × 512 is as carrier image, (c) institute in Fig. 5 Show, this experiment will be tested in terms of the two from encryption key sensibility and decruption key sensibility.
1) encryption key sensibility
Firstly, this experiment tests the sensibility of encryption key.The key of selection are as follows: t1, t2With 256 cryptographic Hash Key, Change a key parameter every time, other parameters are constant.In ciphering process, pass through addition 10-14To change t1, t2, after modification Key be T1=t1+10-14, T2=t2+10-14, a certain position of 256 cryptographic Hash K is then modified, a new Key is obtained1, Wherein, Key and Key1It is as follows:
Key=[d3d923762687e3694e7438d72afb166936f282c8f3881c5271d42550 588dfa 34]
Key1=[d3d923762687e3694e7438d72afb166936f282c8f3881c5271d42550 588df a39]
Encrypted image is as shown in Figure 6.Fig. 6 is the key sensitivity tests result in ciphering process: where (a) be using The visual security image obtained under correct key;(b)~(d) is using cipher key T respectively1、T2、Key1Obtained visual security figure Picture.From fig. 6, it can be seen that when key is changed, from the appearance from the point of view of, corresponding encrypted image and color host image are regarding Without apparent difference in feel, this is because color host image plays an important role in the ciphertext image of visual security, therefore The modification key pair encryption stage has little effect.
2) decruption key sensibility
Ciphertext image (Fig. 6 (a)) is decrypted in this experiment using above-mentioned modified key, to test in decrypting process Key sensibility.As a result as shown in Figure 7:
Fig. 7 is the key sensitivity tests result in decrypting process: where (a) is using the decryption figure under correct code key As Lena and Baboon;(b)~(d) is using cipher key T respectively1、T2、Key1Obtained decrypted image.As can be seen from Figure 7: (1): plaintext image can be come out with correct key recovery, visually be difficult to find out decrypted image and the in plain text difference of the two. (2): when key has atomic small variation, obtained decrypted image be it is rambling, it is visually complete with plaintext image Difference, and therefrom cannot get any information image-related with plaintext.
Three, attacked by noise
The color Lena image that size is 512 × 512 is used as plaintext image with colour Baboon image by this experiment, is such as schemed (a), (b) are shown in 5, and the colored Lake image that size is 512 × 512 is as color host image, in Fig. 5 shown in (c), phase In the visual security ciphertext image such as Fig. 5 answered shown in (e), other parameters are constant.Visual security ciphertext image is distinguished in this experiment The salt-pepper noise (SPN) for adding varying strength, is then gone to decrypt noise-containing image using correct key, be solved accordingly Close image.
As shown in Figure 8.In fig. 8, (a) is the visual security image for not adding noise;(b)~(d) adds intensity respectively For the visual security image after 0.00003%, 0.00005%, 0.00007% salt-pepper noise (SPN);(e) when being noiseless Decrypted image;(f)~(h) is after adding intensity as 0.00003%, 0.00005%, 0.00007% salt-pepper noise (SPN) Under decrypted image.
As can be seen from Figure 8: (1): after the salt-pepper noise of the ciphertext image addition varying strength of visual security, decryption figure Picture and decrypted image when not adding noise visually see difference very little;(2): with the increase of addition noise intensity, accordingly The visual quality of decrypted image also decline, but still can therefrom find out the information of plaintext image.
Four, shearing attack
The ciphertext image of visual security may partially or completely be lost in transmission storage, duplication are pasted.Therefore, have Necessity carries out shearing attack analysis to the compression of images Encryption Algorithm of proposition.In following emulation, this experiment is to (e) in Fig. 5 Shown in the visual security ciphertext image ability being sheared to examine the anti-shearing attack of the algorithm, other parameters are constant, survey Test result is as shown in Figure 9 and Figure 10.
In Fig. 9: (a) being visual security ciphertext;It (b) is decrypted image 1;It (c) is decrypted image 2.
In Figure 10: (a) being visual security ciphertext;It (b) is decrypted image 1;It (c) is decrypted image 2.
It can be seen that after ciphertext image is reduced a part from Fig. 9 and Figure 10, the image of decryption restoration still retains The important information that plaintext image is included, this illustrates that this algorithm has certain anti-shearing attacking ability.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. the two width color image compression encryption methods based on two dimensional compaction perception characterized by comprising
Step 1: extracting the first width colour plaintext image P respectively1With the second width colour plaintext image P2Color three-component, be denoted as First group of color three-component and second group of color three-component, and using two-dimensional discrete wavelet conversion respectively to two groups of color three-components Carry out rarefaction;Wherein, P1And P2Size be M × N and M=N;
Step 2: calculating separately to obtain according to two groups of color three-components of two width colour plaintext images colored in plain text with two width The relevant first group information parameter of image and the second group information parameter;
Step 3: generating calculation matrix using LSS chaos system and Kronecker product, and the calculation matrix is optimized;
Step 4: two dimensional compaction perception is carried out to two groups of color three-components after rarefaction respectively using the calculation matrix after optimization, Obtain corresponding first group of compressed sensing measurement sequence and second group of compressed sensing measurement sequence;
Step 5: shuffle operation being carried out to two groups of compressed sensing measurement sequences respectively using sextuple hyperchaotic system, is obtained corresponding First group of Scrambling Matrix and second group of Scrambling Matrix, and the element value by element value in two groups of Scrambling Matrixes less than preset threshold TS It is changed to 0, obtains revised two groups of Scrambling Matrixes;
Step 6: revised two groups of Scrambling Matrixes being quantified respectively, element value is transformed between 0 to 255, are obtained pair The first group of quantization matrix and second group of quantization matrix answered;
Step 7: the color three-component of the color host image F ' after extracting image normalization is denoted as third group color three-component; Wherein, the size of color host image F ' is M × N;
Step 8: generating 256 cryptographic Hash using the SHA256 function of the first width colour plaintext image, and by 256 Hash It is worth every 8 one group and is converted into 32 decimal number k1, k2..., k32, 32 decimal numbers are denoted as cryptographic Hash K;
Step 9: by the first group information parameter relevant to two width colour plaintext images and the second group information parameter according to setting Parameter Switch rule is respectively converted into first group of integer set and second group of integer set, wherein first group of integer set It include L integer with second group of integer set;
Step 10: (32+2L) a pixel value before one of component in third group color three-component is replaced with into the Kazakhstan Uncommon value K and 2L integer, obtain the first ciphertext matrix containing key parameter information;
Step 11: other two component in third group color three-component is subjected to DWT decomposition, and the matrix that will be obtained after decomposition Piecemeal is carried out, corresponding first group of carrier matrix and second group of carrier matrix are obtained;
Step 12: first group of quantization matrix and second group of quantization matrix being respectively embedded in two groups of carrier matrixs, obtained The second ciphertext matrix and third ciphertext matrix containing ciphertext image information;
Step 13: first ciphertext matrix, the second ciphertext matrix and third ciphertext matrix being combined, obtained and two width coloured silk The corresponding visual security image of color plaintext image.
2. the method according to claim 1, wherein further include: generate sextuple hyperchaotic system and LSS chaos system The initial value of system;Wherein:
The initial value for generating sextuple hyperchaotic system specifically includes:
Step A1: intermediate parameters H is calculated according to formula (9) according to the cryptographic Hash K1~H6:
Wherein, (t1,t2,t3,t4,t5) ∈ (0,1) be preset-key parameter;sum(k16,k17,…,k20) indicate to seek k16, k17,…,k20Sum;max(k16,k17,…,k20) indicate to seek k16, k17,…,k20Maximum value;Indicate the exclusive or of x and y Operation;
Step A2: according to the intermediate parameters H1~H6Wherein three initial values of sextuple hyperchaotic system are calculated according to formula (10) x0、y0And z0:
Wherein, mod (a, b) indicates a to the modulo operation of b, and abs (x) indicates to seek the absolute value of x, and floor (x) indicates to calculate not Maximum integer greater than x;
Step A3: according to the first group information parameter and the intermediate parameters H1~H6It is calculated among first group according to formula (11) Key r1、g1And b1:
Wherein, QR、QGAnd QBFor the first group information parameter;
Step A4: according to the intermediate key r1、g1And b1And intermediate parameters H4~H6Sextuple hyperchaos are calculated according to formula (12) The other three initial value u of system0、v0And w0:
The initial value for generating LSS chaos system specifically includes:
Step B1: according to the second group information parameter, the intermediate parameters H1~H6With preset-key parameter t1~t5According to formula (13) second group of intermediate key r ' is calculated1、g′1With b '1:
Wherein, Q 'R、Q′GWith Q 'BFor the second group information parameter;
Step B2: according to second group of intermediate key r '1、g′1With b '1The initial value of LSS chaos system is calculated according to formula (14) a0With parameter r ':
Wherein, (t6,t7) ∈ (0,1) be preset-key parameter.
3. method according to claim 1 or 2, which is characterized in that the step 2 specifically:
The first group information parameter and the second group information parameter are calculated according to formula (8):
Wherein, a (i, j) indicates (i, j) a element in corresponding with information parameter Q to be calculated color component, i.e., when a (i, J) color component R is respectively indicated1、G1、B1、R2、G2、B2In (i, j) a element when, Q respectively indicates corresponding information parameter QR、QG、QB、Q′R、Q′G、Q′B;Wherein, R1、G1And B1For first group of color three-component, R2、G2And B2Divide for second group of color three Amount;QR、QGAnd QBFor the first group information parameter, Q 'R、Q′GWith Q 'BFor the second group information parameter.
4. according to the method described in claim 2, it is characterized in that, utilizing in LSS chaos system and Crow in the step 3 Gram product generate calculation matrix specifically include:
Step 3.1: by the initial value a0Iteration m in LSS chaos system is brought into parameter r '1+ Md times, cast out preceding m1A value, obtains The sequence A for being 1 × Md to length;Wherein, d is default sampling interval, m1≥500;
Step 3.2: sequence A is converted to obtain sequence A ' according to formula (15):
A′i=1-2Ai, i=1,2 ..., Md (15)
Step 3.3: equidistant d sampling is carried out according to formula (16) to sequence A ' progress, obtains sample sequence A ":
A″k=A '1+kdK is sampling sequence number, k >=0 (16)
Step 3.4: the chaos sequence S that 4 length are 4 is randomly selected from sequence A "1、S2、S3And S4, and by chaos sequence S1~ S4It is converted into the low-dimensional matrix K that 4 sizes are 2 × 21、K2、K3And K4
Step 3.5: using Kronecker product to low-dimensional matrix K1And K2、K1And K3、K2And K3And K1And K4Log is extended respectively2 M Higher dimensional matrix K that is secondary, will obtaining1′、K2′、K3' and K4' it is used as calculation matrix.
5. according to the method described in claim 4, it is characterized in that, being optimized to the calculation matrix in the step 3 It specifically includes:
Step 3.6: by calculation matrix K1' it is converted into calculation matrix φ, the φ ∈ R that size is P × QP×Q;Wherein, P=CR × M, Q =N, CR are default compression ratio;
Step 3.7: singular value decomposition, i.e. φ=U Σ V are carried out to calculation matrix φT, obtain diagonal matrix Σ;Wherein,Indicate the diagonal matrix of calculation matrix φ, Σ1=diag (δ12..., δr), δ1≥δ2≥...≥δr> 0, δ1rIndicate the singular value of calculation matrix φ, r is singular value number;
Step 3.8: all 1's matrix J that construction size is M × N;Calculate the mean value var of diagonal matrix Σ diagonal entry1, and count Σ1In >=var1Singular value number f;The preceding f of order matrix J is arranged multiplied by weighting coefficient t, obtains optimization matrix J1, wherein t > 1; Matrix J will be optimized1With calculation matrix φ dot product, calculation matrix φ ' after obtaining the first suboptimization;
Step 3.9: singular value decomposition, i.e. φ '=U are carried out again to calculation matrix φ '1Σ2 V1 T;Wherein,Table Show the diagonal matrix of calculation matrix φ ', Σ3=diag (δ '1,δ′2..., δ 'r),δ′1~δ 'rIndicate the surprise of calculation matrix φ ' Different value, r are singular value number;
Step 3.10: enabling δ '1=δ '2=...=δ 'r=1, obtain new diagonal matrix Σ '2, and according to diagonal matrix Σ '2It is raw At the calculation matrix φ after final optimization pass1=U1Σ′2V1
Step 3.11: referring to step 3.6 to step 3.10, to calculation matrix K2′、K3' and K4' optimize, after being optimized Calculation matrix φ2、φ3And φ4
6. according to the method described in claim 2, it is characterized in that, the step 5 specifically includes:
Step 5.1: by the initial value x0、y0、z0、u0、v0And w0Bring iteration m in sextuple hyperchaotic system into0+M1N1It is secondary, cast out Preceding m0A value, obtaining 6 sizes is 1 × M1N1Sequence X, Y, Z, U, V and W;Wherein, m0>=500, M1=M × CR, N1=N × CR, CR are default compression ratio;
Step 5.2: six chaos sequences X, Y, Z, U, V and W being arranged according to ascending order, obtain six index vector D1~D6
Step 5.3: six chaos sequences X, Y, Z, U, V and W being modified according to formula (19), obtain revised new sequence XX, YY:
Wherein, XX(i)、YY(i)Indicate i-th of element in new chaos sequence XX and YY, Xi、Yi、Zi、Ui、ViAnd WiIt respectively indicates I-th of element of sequence X, Y, Z, U, V and W, i ∈ [1, M1N1];
Step 5.4: extracting first element value X of new sequence X X, YY respectivelyind1、Yind1, and be modified according to formula (20), it obtains To revised sequence X 'ind1With Y 'ind1:
Step 5.5: if X 'ind1=1, index of reference vector D1、D2And D3Respectively to sequence R3、G3And B3Rearrangement;If X′ind1=2, index of reference vector D1、D2And D3Respectively to sequence G3、B3And R3Rearrangement;If X 'ind1=3, index of reference vector D1、D2And D3To sequence B3、R3And G3Rearrangement;Wherein, R3、G3And B3Sequence is measured for first group of compressed sensing;
Step 5.6: if Y 'ind1=1, index of reference vector D4、D5And D6To sequence R '3、G′3With B '3Rearrangement;If Y 'ind1 =2, index of reference vector D4、D5And D6To sequence G '3、B′3With R '3Rearrangement;If Y 'ind1=3, index of reference vector D4、D5With D6To sequence B '3、R′3With G '3Rearrangement;Wherein, R '3、G′3With B '3Sequence is measured for second group of compressed sensing;
Step 5.7: first group of compressed sensing after scramble is measured into sequence R3、G3And B3And second group of compressed sensing measures sequence Arrange R '3、G′3With B '3Being separately converted to size is M1×N1Matrix R4、G4And B4And R '4、G′4With B '4, wherein R4、G4 And B4For first group of Scrambling Matrix, R '4、G′4With B '4For second group of Scrambling Matrix.
7. according to the method described in claim 6, it is characterized in that, the step 6 is specially to be quantified according to formula (21):
Wherein, min and max is the minimum value and maximum value of Scrambling Matrix P respectively, and floor (x) indicates to calculate no more than x most Big integer;P(i)With P '(i)It is i-th of element of Scrambling Matrix P and quantization matrix P ' respectively, that is, works as P(i)Respectively indicate scramble square Battle array R4、G4、B4、R′4、G′4、B′4In i-th of element when, P '(i)It is quantization matrix R respectively5、G5、B5、R′5、G′5、B′5I-th A element;1≤i≤M1N1;Wherein, R5、G5And B5For first group of quantization matrix;R′5、G′5With B '5For second group of quantization matrix.
8. the method according to claim 1, wherein the step 11 specifically:
Step 11.1: DWT decomposition being carried out to other two component in third group color three-component, respectively obtaining size is (M × N)/4 Matrix CA、CH、CV、CDWith C 'A、C′H、C′V、C′D;Wherein, other two component in third group color three-component Size is M × N;
Step 11.2: setting CR=0.25 for the compression ratio CR of colored plaintext image;
Step 11.3: by Matrix CHFour pieces are divided into, 4 matrix L L that size is (M × N)/16 are obtained1、LH1、HL1And HH1
Step 11.4: referring to step 11.3, by Matrix CV、C′H、C′VIt is divided into four pieces respectively, obtaining size is (M × N)/16 Other 12 matrix L L2~LL4、LH2~LH4、HL2~HL4And HH2~HH4;Wherein, LL1~LL2、LH1~LH2、HL1~HL2、 HH1~HH2For first group of carrier matrix;LL3~LL4、LH3~LH4、HL3~HL4And HH3~HH4For second group of carrier matrix.
9. according to the method described in claim 8, it is characterized in that, the step 12 specifically:
Step 12.1: two groups of quantization matrixes being converted according to formula (22) and formula (23) respectively, every group of quantization matrix obtains To transformed two matrixes d and d':
D (i, j)=Q (i, j) mod10 (22)
D ' (i, j)=floor (Q (i, j)/10) (23)
Wherein, Q (i, j) and d (i, j), d ' (i, j) are matrix d, the d ' obtained after quantization matrix Q and Q to be transformed are converted respectively In (i, j) a element, i.e., when Q (i, j) is quantization matrix R respectively5、G5、B5、R′5、G′5、B′5In (i, j) a element When, d (i, j) is corresponding d respectively1、d2、d3、d4、d5、d6In (i, j) a element, d ' (i, j) is corresponding d respectively11、 d22、d33、d44、d55、d66In (i, j) a element;1≤i≤M1, 1≤j≤N1
Step 12.2: according to formula (24) calculating matrix CAWith C 'APixel average I1And I2:
Wherein, C (i, j) is (i, j) a element in Matrix C to be calculated, and I is the pixel average of Matrix C to be calculated, that is, is worked as C (i, j) is C respectivelyAWith C 'AIn (i, j) a element when, I is C respectivelyAWith C 'APixel average I1And I2
Step 12.3: extracting Matrix CAWith C 'AFirst element value E1And E2
Step 12.4: being respectively compared I1And E1Size and I2And E2Size, and according to comparison result by d1~d6And d11~ d66It is embedded into first group of carrier matrix and second group of carrier matrix, first group of carrier matrix LL ' after being embedded in1~ LL′2、LH′1~LH '2、HL′1~HL '2、HH′1~HH '2, and second group of carrier matrix LL ' after insertion3~LL '4、LH′3 ~LH '4、HL′3~HL '4、HH′3~HH '4
Step 12.5: the matrix L L ' that will be obtained after insertion1、LH′1、HL′1、HH′1It is reconfigured, obtains new Matrix CH1
Step 12.6: referring to step 12.5, the matrix L L ' that will be obtained after insertion2~LL '4、LH′2~LH '4、HL′2~HL '4With HH′2~HH '4It is reconfigured, obtains new Matrix CV1、C′H1With C 'V1
Step 12.7: by Matrix CA、CH1、CV1、CDWith C 'A、C′H1、C′V1、C′DThe second ciphertext is obtained using inverse discrete wavelet transform Matrix and third ciphertext matrix.
10. according to the method described in claim 9, it is characterized in that, the step 12.4 specifically:
If E1≥I1And E2≥I2, d1It is embedded into LL1In, d11It is embedded into LH1In, d2It is embedded into HL1In, d22It is embedded into HH1In, d3It is embedded into LL2In, d33It is embedded into LH2In, d4It is embedded into LL3In, d44It is embedded into LH3In, d5Insertion To HL3In, d55It is embedded into HH3In, d6It is embedded into HL4In, d66It is embedded into HH4In;
If E1≥I1And E2<I2, d1It is embedded into LL2In, d11It is embedded into LH2In, d2It is embedded into LL3In, d22It is embedded into LH3In, d3It is embedded into HL3In, d33It is embedded into HH3In, d4It is embedded into HL4In, d44It is embedded into HH4In, d5Insertion To LL1In, d55It is embedded into LH1In, d6It is embedded into HL1In, d66It is embedded into HH1In;
If E1<I1And E2≥I2, d1It is embedded into LL3In, d11It is embedded into LH3In, d2It is embedded into HL3In, d22It is embedded into HH3In, d3It is embedded into HL4In, d33It is embedded into HH4In, d4It is embedded into LL1In, d44It is embedded into LH1In, d5Insertion To HL1In, d55It is embedded into HH1In, d6It is embedded into LL2In, d66It is embedded into LH2In;
If E1<I1And E2<I2, d1It is embedded into HL4In, d11It is embedded into HH4In, d2It is embedded into LL1In, d22It is embedded into LH1 In, d3It is embedded into HL1In, d33It is embedded into HH1In, d4It is embedded into LL2In, d44It is embedded into LH2In, d5It is embedded into LL3In, d55It is embedded into LH3In, d6It is embedded into HL3In, d66It is embedded into HH3In.
CN201910406019.9A 2019-05-15 2019-05-15 Two-dimensional compressed sensing-based two-color image compression and encryption method Active CN110148078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910406019.9A CN110148078B (en) 2019-05-15 2019-05-15 Two-dimensional compressed sensing-based two-color image compression and encryption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910406019.9A CN110148078B (en) 2019-05-15 2019-05-15 Two-dimensional compressed sensing-based two-color image compression and encryption method

Publications (2)

Publication Number Publication Date
CN110148078A true CN110148078A (en) 2019-08-20
CN110148078B CN110148078B (en) 2022-09-13

Family

ID=67595669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910406019.9A Active CN110148078B (en) 2019-05-15 2019-05-15 Two-dimensional compressed sensing-based two-color image compression and encryption method

Country Status (1)

Country Link
CN (1) CN110148078B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008383A (en) * 2019-11-08 2020-04-14 天津大学 Image encryption method based on multidirectional diffusion and DNA coding
CN111522973A (en) * 2020-04-16 2020-08-11 重庆邮电大学 Privacy protection image retrieval method fusing compressed sensing
CN112330567A (en) * 2020-11-23 2021-02-05 建信金融科技有限责任公司 Image processing method and device
CN113076551A (en) * 2021-05-22 2021-07-06 河南大学 Color image encryption method based on lifting scheme and cross-component scrambling
CN117896476A (en) * 2024-03-15 2024-04-16 成都甄识科技有限公司 Multi-image encryption method based on variable parameter hyperchaotic system and compressed sensing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6064738A (en) * 1996-12-10 2000-05-16 The Research Foundation Of State University Of New York Method for encrypting and decrypting data using chaotic maps
CN106600518A (en) * 2016-11-23 2017-04-26 河南大学 Image encryption method and image decryption method with visual security and data security based on compressed sensing
CN108898025A (en) * 2018-06-25 2018-11-27 河南大学 New chaotic image encryption method based on dual scramble and DNA encoding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6064738A (en) * 1996-12-10 2000-05-16 The Research Foundation Of State University Of New York Method for encrypting and decrypting data using chaotic maps
CN106600518A (en) * 2016-11-23 2017-04-26 河南大学 Image encryption method and image decryption method with visual security and data security based on compressed sensing
CN108898025A (en) * 2018-06-25 2018-11-27 河南大学 New chaotic image encryption method based on dual scramble and DNA encoding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
文小爽等: "基于置乱与扩散的彩色图像加密算法", 《软件导刊》 *
李阳等: "一种基于新的混沌系统的彩色图像加密算法", 《福建电脑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008383A (en) * 2019-11-08 2020-04-14 天津大学 Image encryption method based on multidirectional diffusion and DNA coding
CN111522973A (en) * 2020-04-16 2020-08-11 重庆邮电大学 Privacy protection image retrieval method fusing compressed sensing
CN111522973B (en) * 2020-04-16 2023-03-31 重庆邮电大学 Privacy protection image retrieval method fusing compressed sensing
CN112330567A (en) * 2020-11-23 2021-02-05 建信金融科技有限责任公司 Image processing method and device
CN112330567B (en) * 2020-11-23 2023-07-21 中国建设银行股份有限公司 Image processing method and device
CN113076551A (en) * 2021-05-22 2021-07-06 河南大学 Color image encryption method based on lifting scheme and cross-component scrambling
CN113076551B (en) * 2021-05-22 2022-10-18 河南大学 Color image encryption method based on lifting scheme and cross-component scrambling
CN117896476A (en) * 2024-03-15 2024-04-16 成都甄识科技有限公司 Multi-image encryption method based on variable parameter hyperchaotic system and compressed sensing
CN117896476B (en) * 2024-03-15 2024-05-14 成都甄识科技有限公司 Multi-image encryption method based on variable parameter hyperchaotic system and compressed sensing

Also Published As

Publication number Publication date
CN110148078B (en) 2022-09-13

Similar Documents

Publication Publication Date Title
CN110148078A (en) The two width color image compression encryption methods based on two dimensional compaction perception
Chai et al. A visually secure image encryption scheme based on compressive sensing
Chai et al. An efficient approach for encrypting double color images into a visually meaningful cipher image using 2D compressive sensing
Wang et al. A visually secure image encryption scheme based on parallel compressive sensing
CN106600518B (en) Compressed sensing based visual security and the image encryption of data safety, decryption method
Kanso et al. An algorithm for encryption of secret images into meaningful images
Krikor et al. Image encryption using DCT and stream cipher
Yuen et al. A chaos-based joint image compression and encryption scheme using DCT and SHA-1
CN104144343A (en) Digital image compressing, encrypting and encoding combined method
Gan et al. Exploiting 2D compressed sensing and information entropy for secure color image compression and encryption
CN110113506B (en) Image encryption method based on compressed sensing and information hiding
CN109858264B (en) A kind of color image encipher-decipher method of the moulds resolutions of vectors such as score stochastic transformation domain
CN114157772B (en) Digital image encryption method based on space-time chaotic system and half tensor product compressed sensing
Abboud et al. Balancing compression and encryption of satellite imagery
CN103581677B (en) Image encrypted compression and decompression decryption method and device
Ganwani et al. Lsb based audio steganography using rsa and chacha20 encryption
Hilles et al. Image compression and encryption technique
Nie et al. Image compression and encryption algorithm based on advanced encryption standard and hyper-chaotic system
Setyaningsih et al. New compression–encryption algorithm using chaos-based dynamic session key
Ghadi et al. Enhancing digital image integrity by exploiting JPEG bitstream attributes
CN115208549A (en) JPEG image reversible information hiding method and system based on Paillier homomorphic encryption
Parameshwaran et al. Encryption algorithms for color images: a brief review of recent trends
Sasidharan et al. Selective image encryption using DCT with stream cipher
Laskar et al. Combining JPEG steganography and substitution encryption for secure data communication
Debnath et al. An Approach Towards Data Security Based on DCT and Chaotic Map

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