Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, an object of the present invention is to provide a kind of image encryption method based on cascaded transformation, this method energy
Enough that several color images are encrypted and transmitted simultaneously, efficiency of transmission with higher and safety can be applied to visual coloured silk
Chromatic graph is as field of encryption.
It is another object of the present invention to propose a kind of image encrypting apparatus based on cascaded transformation.
In order to achieve the above objectives, one aspect of the present invention embodiment proposes a kind of image encryption side based on cascaded transformation
Method, comprising the following steps: phase mask step S1: is generated according to chaos sequence;Step S2: it is random to generate a real INTEGER MATRICES,
And with the first width color image encoding, generate full quaternionic matrix;Step S3: according to the phase mask to the full quaternary number
Matrix is modulated, quaternary number Gyrator is converted, and obtains first amplitude and first phase;Step S4: by the first amplitude with
Second width color image encoding generates quaternionic matrix, and carries out amplitude truncation, obtains the second amplitude and second phase;Step
S5: the first phase is multiplied with the second phase, and the quaternionic matrix is adjusted according to the phase mask
System, quaternary number Gyrator transformation, obtain third amplitude and third phase;Step S6: the step S4 and the step are repeated
Rapid S5, until obtaining the N amplitude and N phase of last width color image, wherein the N is positive integer.
The image encryption method based on cascaded transformation of the embodiment of the present invention indicates color image using quaternionic matrix,
The arrangement processing of different colours component is realized, cascade quaternary number Gyrator transformation avoids iterative process, has higher
Phase after the transformation of preceding piece image and the phase multiplication before the transformation of next picture picture are had higher safety, used by efficiency
Quaternionic matrix indicates color image encoding to be an entirety, so as to which several color images are encrypted and passed simultaneously
Defeated, efficiency of transmission with higher and safety can be applied to visual color image encryption field.
In addition, the image encryption method according to the above embodiment of the present invention based on cascaded transformation can also have it is following attached
The technical characteristic added:
Further, in one embodiment of the invention, the phase mask is defined as:
Wherein, μ1For arbitrary unit pure quaternion.
Further, in one embodiment of the invention, the full quaternionic matrix are as follows:
G1=h1+if1,R+jf1,G+kf1,B,
Wherein, h1For real INTEGER MATRICES, f1,R、f1,GAnd f1,BIndicate the red, green, blue color component of the first width color image.
Further, in one embodiment of the invention, the calculation formula of amplitude and phase are as follows:
h2=PT [Q1],
p1=AT [Q1],
Wherein,The quaternary number Gyrator for indicating that rotation angle is α is converted, Q1Indicate that quaternary number Gyrator becomes
It is changing as a result, h2For ciphertext, p1For key, PT [], AT [] are respectively indicated and are taken amplitude and phase.
Further, in one embodiment of the invention, the calculation formula of quaternary number Gyrator transformation are as follows:
Wherein, (u, v) indicates frequency domain coordinates.
In order to achieve the above objectives, another aspect of the present invention embodiment proposes a kind of image encryption dress based on cascaded transformation
It sets, comprising: the first generation module, for generating phase mask according to chaos sequence;Second generation module, for generating one at random
Real INTEGER MATRICES, and with the first width color image encoding, generate full quaternionic matrix;First modulating transformation module is used for basis
The phase mask is modulated the full quaternionic matrix, quaternary number Gyrator is converted, and obtains first amplitude and the first phase
Position;Coding module for generating quaternionic matrix for the first amplitude and the second width color image encoding, and carries out amplitude
Truncation, obtains the second amplitude and second phase;Second modulating transformation module, by the first phase and the second phase phase
Multiply, and the quaternionic matrix is modulated according to the phase mask, quaternary number Gyrator transformation, obtains third amplitude
And third phase;Processing module, for repeating the coding module and the second modulating transformation module, until obtaining most
The N amplitude and N phase of latter width color image, wherein the N is positive integer.
The image encrypting apparatus based on cascaded transformation of the embodiment of the present invention indicates color image using quaternionic matrix,
The arrangement processing of different colours component is realized, cascade quaternary number Gyrator transformation avoids iterative process, has higher
Phase after the transformation of preceding piece image and the phase multiplication before the transformation of next picture picture are had higher safety, used by efficiency
Quaternionic matrix indicates color image encoding to be an entirety, so as to which several color images are encrypted and passed simultaneously
Defeated, efficiency of transmission with higher and safety can be applied to visual color image encryption field.
In addition, the image encrypting apparatus according to the above embodiment of the present invention based on cascaded transformation can also have it is following attached
The technical characteristic added:
Further, in one embodiment of the invention, the phase mask is defined as:
Wherein, μ1For arbitrary unit pure quaternion.
Further, in one embodiment of the invention, the full quaternionic matrix are as follows:
G1=h1+if1,R+jf1,G+kf1,B,
Wherein, h1For real INTEGER MATRICES, f1,R、f1,GAnd f1,BIndicate the red, green, blue color component of the first width color image.
Further, in one embodiment of the invention, the calculation formula of amplitude and phase are as follows:
h2=PT [Q1],
p1=AT [Q1],
Wherein,The quaternary number Gyrator for indicating that rotation angle is α is converted, Q1Indicate that quaternary number Gyrator becomes
It is changing as a result, h2For ciphertext, p1For key, PT [], AT [] are respectively indicated and are taken amplitude and phase.
Further, in one embodiment of the invention, the calculation formula of quaternary number Gyrator transformation are as follows:
Wherein, (u, v) indicates frequency domain coordinates.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description
Obviously, or practice through the invention is recognized.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
The image encryption method and dress based on cascaded transformation proposed according to embodiments of the present invention is described with reference to the accompanying drawings
It sets, describes the image encryption method based on cascaded transformation proposed according to embodiments of the present invention with reference to the accompanying drawings first.
Fig. 1 is the flow chart of the image encryption method based on cascaded transformation of one embodiment of the invention.
As shown in Figure 1, should image encryption method based on cascaded transformation the following steps are included:
Step S1: phase mask is generated according to chaos sequence.
It should be noted that the embodiment of the present invention is based on chaos sequence and quaternary number Gyrator is converted, propose a kind of colorful
Color image encryption method, encryption flow are as shown in Figure 2.Assuming that color image to be encrypted is respectively f1(x,y)、f2(x,
y)、……、fn(x, y), having a size of N × M, (x, y) representation space domain coordinate.Detailed process is described as follows:
Specifically, chaos sequence, which can be used, in the embodiment of the present invention generates a phase mask, chaos sequence is defined as,
sn+1=(3.57+sn/4)·sn·(1-sn)
Given initial value s0, formation sequence S={ sn| n=1,2 ..., NM }.S is adjusted to the matrix Z having a size of N × M,
CHAOTIC PHASE mask P is constructed,
Wherein μ1For arbitrary unit pure quaternion.
Step S2: it is random to generate a real INTEGER MATRICES, and with the first width color image encoding, generate full quaternionic matrix.
Specifically, generating a real INTEGER MATRICES h at random1, value is in [0,255];And with the first width color image encoding
For full quaternionic matrix, it may be assumed that
G1=h1+if1,R+jf1,G+kf1,B,
Wherein: f1,R、f1,GAnd f1,BIndicate the red, green, blue color component of the first width color image.
Step S3: full quaternionic matrix is modulated according to phase mask, quaternary number Gyrator transformation, obtains first
Amplitude and first phase.
Specifically, the embodiment of the present invention is modulated full quaternionic matrix, quaternary number Gyrator transformation (QGT), and
Obtain amplitude and phase.
h2=PT [Q1],
p1=AT [Q1]。
Wherein, quaternary number Gyrator transformation calculation formula be,
Here, symbol PT [], AT [], which are respectively indicated, takes amplitude and phase, μ be arbitrary unit pure quaternion, (u,
V) frequency domain coordinates are indicated.
Step S4: by first amplitude and the second width color image encoding, generating quaternionic matrix, and carry out amplitude truncation,
Obtain the second amplitude and second phase.
Specifically, obtained amplitude and the second width color image encoding are quaternionic matrix by the embodiment of the present invention, it may be assumed that
G2=h2+if2,R+jf2,G+kf2,B,
Wherein: f2,R、f2,GAnd f2,BIndicate the red, green, blue color component of the second width color image.To G2Amplitude is carried out to cut
Disconnected coding obtains, m1=AT [G2]。
Step S5: first phase is multiplied with second phase, and quaternionic matrix is modulated according to phase mask, four
First number Gyrator transformation, obtains third amplitude and third phase.
Specifically, the embodiment of the present invention by step S4 phase and step S3 in phase multiplication, that is,
p1n=p1m1
To the quaternionic matrix G in step S42It is modulated, quaternary number Gyrator transformation, and obtains amplitude and phase;
h3=PT [Q2],
p2=AT [Q2]。
Step S6: repeating step S4 and step S5, until obtaining the N amplitude and N of last width color image
Phase, wherein N is positive integer.
Specifically, the embodiment of the present invention repeats step S4 and step S5, until to last width color image
Reason obtains amplitude and phase.
hn+1=AT [Qn],
pn=PT [Qn],
Wherein: GnIndicate be made of the amplitude and the n-th width color image of (n-1) secondary quaternary number Gyrator transformation four
First matrix number, hn+1For ciphertext, p1n、……、pnFor key.To ciphertext image, using correct key, by above-mentioned encryption
Process carries out inverse operation, can recover original plaintext image.
Furthermore, in order to verify the embodiment of the present invention method validity and feasibility, select three width cromograms
It is tested as (such as Fig. 3), image size is 128 × 128, α=0.1958, unit pure quaternion,Root
According to above-mentioned encryption method, obtained ciphertext image is therefrom seen not as shown in figure 4, it can be seen that ciphertext image information is confusing
Any useful information of original three width plaintext image out, using correct code key decrypted result as shown in figure 5, its Y-PSNR
Respectively 297.8004dB, 300.8237dB and 303.7650dB, it can thus be seen that decrypted image is consistent with original image.
To sum up, it is converted based on chaos sequence and quaternary number Gyrator, the present invention proposes a kind of more image encryption methods.Tool
Body process includes: that (1) uses chaos sequence one phase mask of generation;(2) random to generate a real INTEGER MATRICES and color with the first width
Chromatic graph picture is encoded to full quaternionic matrix;(3) full quaternionic matrix is modulated, quaternary number Gyrator transformation, and obtains width
Value and phase;(4) it is quaternionic matrix by obtained amplitude and the second width color image encoding, and carries out amplitude truncation;(5) will
The phase multiplication in phase and step (3) in step (4), and the quaternionic matrix in step (4) is modulated, quaternary number
Gyrator transformation, and obtain amplitude and phase;(6) step (4) and step (5) are repeated, up to last width color image into
Row processing obtains amplitude and phase.
The image encryption method based on cascaded transformation proposed according to embodiments of the present invention indicates color using quaternionic matrix
Chromatic graph picture, realizes the arrangement processing of different colours component, and cascade quaternary number Gyrator transformation avoids iterative process, has
There is higher efficiency, by phase after the transformation of preceding piece image and the phase multiplication before the transformation of next picture picture, there is higher peace
Quan Xing, use quaternionic matrix indicate by color image encoding for an entirety, so as to by several color images and meanwhile into
Row encryption and transmission, efficiency of transmission with higher and safety, can be applied to visual color image encryption field.
The image encrypting apparatus based on cascaded transformation proposed according to embodiments of the present invention is described referring next to attached drawing.
Fig. 6 is the structural schematic diagram of the image encrypting apparatus based on cascaded transformation of one embodiment of the invention.
As shown in fig. 6, being somebody's turn to do the image encrypting apparatus 10 based on cascaded transformation includes: that the first generation module 100, second generates
Module 200, the first modulating transformation module 300, coding module 400, the second modulating transformation module 500 and processing module 600.
Wherein, the first generation module 100 is used to generate phase mask according to chaos sequence.Second generation module 200 is used for
It is random to generate a real INTEGER MATRICES, and with the first width color image encoding, generate full quaternionic matrix.First modulating transformation module
300 for being modulated according to phase mask to full quaternionic matrix, quaternary number Gyrator transformation, obtain first amplitude and the
One phase.Coding module 400 is used to first amplitude and the second width color image encoding generating quaternionic matrix, and carry out width
Value truncation, obtains the second amplitude and second phase.First phase is multiplied by the second modulating transformation module 500 with second phase, and
Quaternionic matrix is modulated according to phase mask, quaternary number Gyrator transformation, obtains third amplitude and third phase.Place
Reason module 600 is for repeating coding module and the second modulating transformation module, until obtaining the N of last width color image
Amplitude and N phase, wherein N is positive integer.The device 10 of the embodiment of the present invention is indicated using quaternionic matrix by color image
It is encoded to an entirety, can several color images be encrypted and be transmitted simultaneously, efficiency of transmission and safety with higher
Property, it can be applied to visual color image encryption field.
Further, in one embodiment of the invention, phase mask is defined as:
Wherein, μ1For arbitrary unit pure quaternion.
Further, in one embodiment of the invention, full quaternionic matrix are as follows:
G1=h1+if1,R+jf1,G+kf1,B,
Wherein, h1For real INTEGER MATRICES, f1,R、f1,GAnd f1,BIndicate the red, green, blue color component of the first width color image.
Further, in one embodiment of the invention, the calculation formula of amplitude and phase are as follows:
h2=PT [Q1],
p1=AT [Q1],
Wherein,The quaternary number Gyrator for indicating that rotation angle is α is converted, Q1Indicate quaternary number Gyrator transformation
As a result, h2For ciphertext, p1For key, PT [], AT [] are respectively indicated and are taken amplitude and phase.
Further, in one embodiment of the invention, the calculation formula of quaternary number Gyrator transformation are as follows:
Wherein, (u, v) indicates frequency domain coordinates.
It should be noted that the aforementioned explanation to the image encryption method embodiment based on cascaded transformation is also applied for
The image encrypting apparatus based on cascaded transformation of the embodiment, details are not described herein again.
The image encrypting apparatus based on cascaded transformation proposed according to embodiments of the present invention indicates color using quaternionic matrix
Chromatic graph picture, realizes the arrangement processing of different colours component, and cascade quaternary number Gyrator transformation avoids iterative process, has
There is higher efficiency, by phase after the transformation of preceding piece image and the phase multiplication before the transformation of next picture picture, there is higher peace
Quan Xing, use quaternionic matrix indicate by color image encoding for an entirety, so as to by several color images and meanwhile into
Row encryption and transmission, efficiency of transmission with higher and safety, can be applied to visual color image encryption field.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example
Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned
Embodiment is changed, modifies, replacement and variant.