CN110232285A - A kind of method and device of image encryption - Google Patents

A kind of method and device of image encryption Download PDF

Info

Publication number
CN110232285A
CN110232285A CN201910532941.2A CN201910532941A CN110232285A CN 110232285 A CN110232285 A CN 110232285A CN 201910532941 A CN201910532941 A CN 201910532941A CN 110232285 A CN110232285 A CN 110232285A
Authority
CN
China
Prior art keywords
matrix
image
complex
encrypted
complex matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910532941.2A
Other languages
Chinese (zh)
Other versions
CN110232285B (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.)
China Southern Power Grid Internet Service Co ltd
Dongguan Pengbo Information Technology Co ltd
Original Assignee
Capital Normal 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 Capital Normal University filed Critical Capital Normal University
Priority to CN201910532941.2A priority Critical patent/CN110232285B/en
Publication of CN110232285A publication Critical patent/CN110232285A/en
Application granted granted Critical
Publication of CN110232285B publication Critical patent/CN110232285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

The application provides a kind of method and device of image encryption, by the ternary matrix number for obtaining image to be encrypted, discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtain the first real number matrix of frequency spectrum, and first complex matrix, after being decomposed to moulds such as first complex matrixs, according to above-mentioned first real number matrix, and the complex matrix after waiting moulds to decompose, determine the first matrix, after carrying out gyrator variation to first matrix, determine the corresponding ciphertext image of image to be encrypted, while reducing memory space, the problem of effectively improving encryption efficiency.

Description

A kind of method and device of image encryption
Technical field
This application involves image encryption processing technology fields, more particularly, to a kind of method and device of image encryption.
Background technique
With the development of the communication technology, user can carry out the publication of information by network at any time, anywhere, Although a large amount of shared information is provided convenience for user, the safety problem of information transmission gradually shows, and information occurs and lets out The phenomenon that dew, malice change information, it is therefore desirable to encryption mode be used to message transmitting procedure, avoid message transmitting procedure In malicious intercepted phenomenon.
For transmitting color image information, the encryption method during colo r image transmission has to be compiled based on double random phase The single channel multicolor image encryption algorithm of code, the video single channel optical Encryption Algorithm based on chaotic key etc., but pass through list Channel is encrypted respectively, needs constantly to iterate to calculate, and complexity is higher, in addition, for dividing the different colours of color image The method that amount is encoded to quaternionic matrix encryption is still quaternary number after encryption, there are problems that occupying memory space, so providing A kind of method of image encryption, while guaranteeing to reduce memory space, the problem of effectively improving encryption efficiency.
Summary of the invention
In view of this, a kind of method and device for being designed to provide image encryption of the application, reduces memory space Meanwhile the problem of effectively improving encryption efficiency.
In a first aspect, the embodiment of the present application provides a kind of method of image encryption, wherein include:
Obtain image to be encrypted;
For the image to be encrypted, the corresponding ternary matrix number of the image to be encrypted is determined;
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the ternary The transformed frequency spectrum of matrix number;
For the frequency spectrum, the first real number matrix and the first complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to first complex matrix, based on first real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix;
Gyrator transformation is carried out to first matrix, based on transformed as a result, determining that the image to be encrypted is corresponding Ciphertext image.
In the embodiment of the application, the reference colours of the image to be encrypted include: the first color, the second color and Three colors, it is described to be directed to the image to be encrypted, determine the corresponding ternary matrix number of the image to be encrypted, comprising:
The first color value for successively extracting each pixel in the image to be encrypted obtains the first color value Component Matrices;
The second color value for successively extracting each pixel in the image to be encrypted obtains the second color value Component Matrices;
The third color value for successively extracting each pixel in the image to be encrypted obtains third color value Component Matrices;Its In, the first color value Component Matrices are the real component matrix of the ternary matrix number, the second color value component square Battle array and the third color value Component Matrices are the imaginary matrix of the ternary matrix number.
In the embodiment of the application, first parameter preset that is based on is to the discrete Three-ary Number of ternary matrix number progress Fourier transformation, the frequency spectrum after obtaining the Three-ary Number matrixing, comprising:
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the ternary The transformed frequency spectrum of matrix number, wherein
In formula, F1(u, v) is the frequency spectrum after the Three-ary Number matrixing;ft(x, y) is the ternary matrix number, (x, y) For the space coordinate of pixel in the image to be encrypted;μ1For pure Three-ary Number, and μ1=icos θ1+jsinθ1;θ1It is described first Parameter preset;M is the pixel columns that the image to be encrypted includes;N is the number of lines of pixels that the image to be encrypted includes;ft (x, y)=f1(x,y)+if2(x,y)+jf3(x, y), wherein f1(x, y) is the first color value Component Matrices;f2(x, y) is The second color value Component Matrices;f3(x, y) is the third color value Component Matrices;I, j is imaginary, and is met Condition: i2=j, ij=ji=-1, j2=-i.
It is described to be directed to the frequency spectrum in the embodiment of the application, determine the first real number matrix, the Yi Ji of the frequency spectrum One complex matrix, comprising:
To the frequency spectrum F1The expression formula of (u, v) is converted, and determines the first real number matrix and first of the frequency spectrum Complex matrix, transformation for mula are as follows:
Enable D (u, v)=B (u, v)+iC (u, v);In formula, A (u, v) is first real number matrix;D (u, v) is described the One complex matrix;B (u, v) is the real-part matrix of first complex matrix;C (u, v) is the imaginary part of first complex matrix Matrix.
It is described that equal moulds decomposition is carried out to first complex matrix in the embodiment of the application, comprising:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, P (u, v) is Second complex matrix, Q (u, v) are the third complex matrix, | D (u, v) | for the first complex matrix D (u, v) Amplitude,For the phasing matrix of the first complex matrix D (u, v), θ is default matrix;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
The third complex matrix Q (u, v) based on the first real number matrix A (u, v) and after waiting moulds to decompose, really Fixed first matrix, wherein K (u, v) is first matrix, and
It is described that equal moulds decomposition is carried out to first complex matrix in the embodiment of the application, comprising:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, D (u, v) is First complex matrix, P (u, v) are second complex matrix, and Q (u, v) is the third complex matrix, | D (u, v) | be The amplitude of the first complex matrix D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default square Battle array;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
The third complex matrix based on first real number matrix and after waiting moulds to decompose, determines the second Three-ary Number Matrix;
Discrete Three-ary Number Fourier transformation is carried out to the second ternary matrix number based on the second parameter preset, is obtained described Frequency spectrum after second Three-ary Number matrixing;
For the frequency spectrum, the second real number matrix and the 4th complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to the 4th complex matrix, based on second real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix.
In the embodiment of the application, it is described based on transformed as a result, determining the corresponding ciphertext of the image to be encrypted Image, comprising:
The amplitude of transformed result is remained unchanged, phase truncation operation is carried out, it is corresponding to obtain the image to be encrypted Ciphertext image.
In the embodiment of the application, the method also includes:
Gyrator inverse transformation is carried out to the ciphertext image, first matrix is determined, and be based on first matrix, obtains To first real number matrix and the third complex matrix;
Based on the third complex matrix, second complex matrix is calculated;
Based on first real number matrix, second complex matrix and the third complex matrix, institute is calculated State frequency spectrum;
Based on first parameter preset, discrete Three-ary Number inverse Fourier transform is carried out to the frequency spectrum, obtains described three First matrix number;
According to the ternary matrix number, the image to be encrypted is obtained.
Second aspect, the embodiment of the present application also provides a kind of device of image encryption, described device includes:
Module is obtained, for obtaining image to be encrypted;
First determining module determines the corresponding Three-ary Number square of the image to be encrypted for being directed to the image to be encrypted Battle array;
Processing module becomes for carrying out discrete Three-ary Number Fourier to the ternary matrix number based on the first parameter preset It changes, the frequency spectrum after obtaining the Three-ary Number matrixing;
Second determining module determines the first real number matrix and the first plural number of the frequency spectrum for being directed to the frequency spectrum Matrix;
Third determining module is based on the first real number square after carrying out equal moulds decomposition to first complex matrix Battle array and wait moulds decompose after complex matrix, determine the first matrix;
4th determining module, for carrying out gyrator transformation to first matrix, based on transformed as a result, determining institute State the corresponding ciphertext image of image to be encrypted.
In the embodiment of the application, the reference colours of the image to be encrypted include: the first color, the second color and Three colors, first determining module, are specifically used for:
The first color value for successively extracting each pixel in the image to be encrypted obtains the first color value Component Matrices;
The second color value for successively extracting each pixel in the image to be encrypted obtains the second color value Component Matrices;
The third color value for successively extracting each pixel in the image to be encrypted obtains third color value Component Matrices;Its In, the first color value Component Matrices are the real component matrix of the ternary matrix number, the second color value component square Battle array and the third color value Component Matrices are the imaginary matrix of the ternary matrix number.
In the embodiment of the application, the processing module is specifically used for:
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the ternary The transformed frequency spectrum of matrix number, wherein
In formula, F1(u, v) is the frequency spectrum after the Three-ary Number matrixing;ft(x, y) is the ternary matrix number, (x, y) For the space coordinate of pixel in the image to be encrypted;μ1For pure Three-ary Number, and μ1=icos θ1+jsinθ1;θ1It is described first Parameter preset;M is the pixel columns that the image to be encrypted includes;N is the number of lines of pixels that the image to be encrypted includes;ft (x, y)=f1(x,y)+if2(x,y)+jf3(x, y), wherein f1(x, y) is the first color value Component Matrices;f2(x, y) is The second color value Component Matrices;f3(x, y) is the third color value Component Matrices;I, j is imaginary, and is met Condition: i2=j, ij=ji=-1, j2=-i.
In the embodiment of the application, second determining module is specifically used for:
To the frequency spectrum F1The expression formula of (u, v) is converted, and determines the first real number matrix and first of the frequency spectrum Complex matrix, transformation for mula are as follows:
Enable D (u, v)=B (u, v)+iC (u, v);In formula, A (u, v) is first real number matrix;D (u, v) is described the One complex matrix;B (u, v) is the real-part matrix of first complex matrix;C (u, v) is the imaginary part of first complex matrix Matrix.
In the embodiment of the application, in the third determining module, equal moulds is carried out to first complex matrix and are decomposed, It is specifically used for:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, P (u, v) is Second complex matrix, Q (u, v) are the third complex matrix, | D (u, v) | for the first complex matrix D (u, v) Amplitude,For the phasing matrix of the first complex matrix D (u, v), θ is default matrix;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, specific to use In:
The third complex matrix Q (u, v) based on the first real number matrix A (u, v) and after waiting moulds to decompose, really Fixed first matrix, wherein K (u, v) is first matrix, and
It is described that equal moulds are carried out to first complex matrix in the third determining module in the embodiment of the application It decomposes, is specifically used for:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, D (u, v) is First complex matrix, P (u, v) are second complex matrix, and Q (u, v) is the third complex matrix, | D (u, v) | be The amplitude of the first complex matrix D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default square Battle array;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, specific to use In:
The third complex matrix based on first real number matrix and after waiting moulds to decompose, determines the second Three-ary Number Matrix;
Discrete Three-ary Number Fourier transformation is carried out to the second ternary matrix number based on the second parameter preset, is obtained described Frequency spectrum after second Three-ary Number matrixing;
For the frequency spectrum, the second real number matrix and the 4th complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to the 4th complex matrix, based on second real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix.
In the embodiment of the application, in the 4th determining module, based on transformed as a result, determination is described to be encrypted The corresponding ciphertext image of image, is specifically used for:
The amplitude of transformed result is remained unchanged, phase truncation operation is carried out, it is corresponding to obtain the image to be encrypted Ciphertext image.
In the embodiment of the application, described device is also used to:
Gyrator inverse transformation is carried out to the ciphertext image, first matrix is determined, and be based on first matrix, obtains To first real number matrix and the third complex matrix;
Based on the third complex matrix, second complex matrix is calculated;
Based on first real number matrix, second complex matrix and the third complex matrix, institute is calculated State frequency spectrum;
Based on first parameter preset, discrete Three-ary Number inverse Fourier transform is carried out to the frequency spectrum, obtains described three First matrix number;
According to the ternary matrix number, the image to be encrypted is obtained.
The third aspect, the embodiment of the present application also provide a kind of electronic equipment, comprising: processor, memory and bus, it is described Memory is stored with the executable machine readable instructions of the processor, when electronic equipment operation, the processor with it is described By bus communication between memory, the machine readable instructions executed when being executed by the processor it is above-mentioned in a first aspect, or Step in any possible embodiment of first aspect.
Fourth aspect, the embodiment of the present application also provide a kind of computer readable storage medium, the computer-readable storage medium Computer program is stored in matter, which executes above-mentioned in a first aspect, or first aspect when being run by processor Step in any possible embodiment.
A kind of method of image encryption provided by the embodiments of the present application, by obtaining the ternary matrix number of image to be encrypted, Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the first real number square of frequency spectrum Battle array and the first complex matrix according to above-mentioned first real number matrix and wait moulds after decomposing to moulds such as first complex matrixs Complex matrix after decomposition determines the first matrix, after carrying out gyrator variation to first matrix, determines that image to be encrypted is corresponding Ciphertext image.
By the above method, may be implemented based on ternary matrix number is obtained after the encryption of ternary matrix number, relative to will be colored The different colours component coding of image is quaternionic matrix encryption, is still the method for quaternary number after encryption, reduces memory space, And the ternary matrix number by treating encrypted image carries out discrete Three-ary Number Fourier transformation, and to transformed complex matrix Equal moulds decompose, to convert to the first matrix gyrator being calculated, improve the efficiency of encryption.
Other feature and advantage of the application will illustrate in the following description, also, partly become from specification It obtains it is clear that being understood and implementing the application.The purpose of the application and other advantages are in specification, claims And specifically noted structure is achieved and obtained in attached drawing.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the application specific embodiment or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the application, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 shows a kind of flow diagram of the method for image encryption provided by the embodiments of the present application;
Fig. 2 shows the flow diagrams of a kind of method of image decryption provided by the embodiment of the present application;
Fig. 3 shows a kind of structural schematic diagram of the device of image encryption provided by the embodiment of the present application;
Fig. 4 shows the structural schematic diagram of a kind of electronic equipment 400 provided by the embodiment of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with attached drawing to the application Technical solution be clearly and completely described, it is clear that described embodiment is some embodiments of the present application, rather than Whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall in the protection scope of this application.
Firstly, making introduction to the application application scenarios applicatory.The application be applicable to image is encrypted, Under the scene of decrypted transport.
For the method convenient for understanding the present embodiment, first to a kind of image encryption disclosed in the embodiment of the present application It describes in detail.
Embodiment one
It is shown in Figure 1, it is a kind of flow diagram of the method for image encryption provided by the embodiment of the present application, the party Method the following steps are included:
Step 101 obtains image to be encrypted.
Specifically, image to be encrypted can be color image, it is also possible to gray level image.
Step 102 is directed to image to be encrypted, determines the corresponding ternary matrix number of image to be encrypted.
When image to be encrypted be color image, and the reference colours of image to be encrypted include: the first color, the second color and When third color, for image to be encrypted, the corresponding ternary matrix number of image to be encrypted is determined, comprising:
The first color value for successively extracting each pixel in image to be encrypted obtains the first color value Component Matrices;
The second color value for successively extracting each pixel in image to be encrypted obtains the second color value Component Matrices;
The third color value for successively extracting each pixel in image to be encrypted obtains third color value Component Matrices;
Wherein, the first color value Component Matrices are the real component matrix of ternary matrix number, the second color value Component Matrices It is the imaginary matrix of ternary matrix number with third color value Component Matrices.
Illustratively, it is assumed that first color is red in the reference colours of image to be encrypted, and the second color is green, third face Color is blue, then successively extracting the first color value of each pixel in image to be encrypted, the second color value, third color value, is obtained To the first color value Component Matrices fR(x, y), the second color value Component Matrices fG(x, y), third color value Component Matrices fB(x, And ternary matrix number f y),t(x, y)=fR(x,y)+ifG(x,y)+jfB(x, y), (x, y) are the sky of pixel in image to be encrypted Between coordinate, i, j are imaginary, and eligible: i2=j, ij=ji=-1, j2=-i.
Step 103 carries out discrete Three-ary Number Fourier transformation to ternary matrix number based on the first parameter preset, obtains ternary The transformed frequency spectrum of matrix number.
Illustratively, the spectrum expression formula after discrete Three-ary Number Fourier transformation is as follows:
In formula, F1(u, v) is the frequency spectrum after Three-ary Number matrixing;ft(x, y) is ternary matrix number, and (x, y) is to be encrypted The space coordinate of pixel in image;μ1For pure Three-ary Number, and μ1=icos θ1+jsinθ1;θ1For the first parameter preset;M is to be added The pixel columns that close image includes;N is the number of lines of pixels that image to be encrypted includes;ft(x, y)=f1(x,y)+if2(x,y)+jf3 (x, y), wherein f1(x, y) is the first color value Component Matrices;f2(x, y) is the second color value Component Matrices;f3(x, y) is the Three color value Component Matrices;I, j is imaginary, and eligible: i2=j, ij=ji=-1, j2=-i.
Step 104 is directed to frequency spectrum, determines the first real number matrix and the first complex matrix of frequency spectrum.
Here, to frequency spectrum F1The expression formula of (u, v) is converted, and the first real number matrix and first for determining frequency spectrum are answered Matrix number, transformation for mula are as follows:
Enable D (u, v)=B (u, v)+iC (u, v);In formula, A (u, v) is the first real number matrix;D (u, v) is the first plural square Battle array;B (u, v) is the real-part matrix of the first complex matrix;C (u, v) is the imaginary-part matrix of the first complex matrix.
Optionally, by F1(u, v)=A (u, v)+iB (u, v)+jC (u, v) and i2=j, obtains F1(u, v)=A (u, v)+ I [B (u, v)+iC (u, v)], and then determine the first real number matrix and the first complex matrix.
Step 105 first complex matrix such as carries out after moulds decompose, based on the first real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix.
In a kind of possible embodiments, equal moulds are carried out to the first complex matrix and are decomposed, comprising:
Equal moulds are carried out to the first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein wait moulds point Solve formula are as follows:
In formula, P (u, v) is the second complex matrix, and Q (u, v) is third complex matrix, | D (u, v) | it is the first complex matrix The amplitude of D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default matrix.
Complex matrix based on the first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
Third complex matrix Q (u, v) based on the first real number matrix A (u, v) and after waiting moulds to decompose, determines the first square Battle array, wherein K (u, v) is the first matrix, and
In the possible another embodiments of one kind, equal moulds are carried out to the first complex matrix and are decomposed, comprising:
Equal moulds are carried out to the first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein wait moulds point Solve formula are as follows:
In formula, D (u, v) is the first complex matrix, and P (u, v) is the second complex matrix, and Q (u, v) is third complex matrix, | D (u, v) | it is the amplitude of the first complex matrix D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default square Battle array.
Complex matrix based on the first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
Third complex matrix Q (u, v) based on the first real number matrix A (u, v) and after waiting moulds to decompose, determines the two or three First matrix number gt(x, y), and gt(x, y)=A (x, y)+iRe { Q (x, y) }+jIm { Q (x, y) }.
In formula, A (x, y) is the corresponding space coordinate matrix of the first real number matrix A (u, v), and Q (x, y) is third plural number square The corresponding space coordinate matrix of battle array Q (u, v), operator Re (), Im () respectively indicate the real component of Q (x, y) matrix, imaginary part Component.
Based on the second parameter preset θ2Discrete Three-ary Number Fourier transformation is carried out to the second ternary matrix number gt (x, y), is obtained Frequency spectrum to after the second Three-ary Number matrixing;For frequency spectrum, the second real number matrix and the 4th plural square of frequency spectrum are determined Battle array;After carrying out equal moulds decomposition to the 4th complex matrix, based on the second real number matrix and the complex matrix after moulds decomposition is waited, really Fixed first matrix.
Here, frequency spectrum is determined to the discrete Three-ary Number Fourier transformation of the second ternary matrix number and by frequency spectrum after transformation Real number matrix, complex matrix, to complex matrix etc. the process decomposed of moulds and above-mentioned discrete ternary is carried out to ternary matrix number Number Fourier transformations and by frequency spectrum after transformation determine the real number matrix of frequency spectrum, complex matrix, to complex matrix etc. moulds point The process of solution is identical, and details are not described herein.
Illustratively, after carrying out equal moulds decomposition to the 4th complex matrix, the 5th complex matrix and the 6th complex matrix are obtained, Based on the second real number matrix A1(u, v) and wait the 6th complex matrix Q after moulds decomposition1(u, v) determines the first matrix, wherein K1(u, v) is the first matrix, and
The number for carrying out discrete Three-ary Number Fourier transformation to ternary matrix number is not limited in the application, is not limited pair yet The number that the moulds such as complex matrix of frequency spectrum decompose after discrete Three-ary Number Fourier transformation.
Step 106 carries out gyrator transformation to the first matrix, based on transformed as a result, determining that image to be encrypted is corresponding Ciphertext image.
Illustratively, it is assumed that the first matrix is h, then after carrying out gyrator transformation to the first matrix h, obtained expression formula It is as follows:
In formula, (u, v) indicates that frequency domain coordinates, (x, y) representation space domain coordinate, β are rotation angle.
The amplitude of transformed result is remained unchanged, phase truncation operation is carried out, it is corresponding close to obtain image to be encrypted Texts and pictures picture.
It is shown in Figure 2, it is a kind of flow diagram of the method for image decryption provided by the embodiment of the present application, method The following steps are included:
Step 201 carries out gyrator inverse transformation to ciphertext image, determines the first matrix, and be based on the first matrix, obtains the One real number matrix and third complex matrix.
Illustratively, gyrator inverse transformation is carried out according to ciphertext image, obtains the first matrix K (u, v), andSo that it is determined that the first real number matrix is A (u, v) and third complex matrix is Q (u, v).
Step 202 is based on third complex matrix, and the second complex matrix is calculated.
According to third complex matrixThe second complex matrix is calculated
In formula, | D (u, v) | it is the amplitude of the first complex matrix D (u, v),For the phase of the first complex matrix D (u, v) Matrix, θ are default matrix.
Step 203 is based on the first real number matrix, the second complex matrix and third complex matrix, and frequency spectrum is calculated.
According to the second complex matrix, third complex matrix, the first complex matrix D (u, v) is calculated, and then according to first Complex matrix D (u, v), the first real number matrix A (u, v), obtaining frequency spectrum formula is F1(u, v)=A (u, v)+iD (u, v).
Step 204 is based on the first parameter preset, carries out discrete Three-ary Number inverse Fourier transform to frequency spectrum, obtains Three-ary Number Matrix.
According to the first parameter preset θ1, to frequency spectrum F1(u, v) carries out discrete Three-ary Number inverse Fourier transform, obtains Three-ary Number Matrix ft(x,y)。
Step 205, according to ternary matrix number, obtain image to be encrypted.
Here, the decrypting process of image to be encrypted is the inverse process of the ciphering process of correspondence image.
Illustratively, image to be encrypted, image size are 256 × 256, process discrete Three-ary Number Fourier transformation twice, It is 0.3091 that wherein the first parameter preset, which is the 0.0859, second parameter preset, and rotation angle when carrying out gyrator transformation is 0.0596, ciphertext image is obtained after being encrypted, the information of ciphertext image is confusing, can not visually find out original to be added Any useful information of close image is 0.0596 in the rotation angle Jing Guo gyrator inverse transformation, and the second parameter preset is 0.3091, after the decryption that the first parameter preset is 0.0859, decrypted image is obtained, by the calculating to decrypted image, peak value Signal-to-noise ratio is 257.2369dB, and structural similarity SSIM is 1.00, and it is consistent with original image to be encrypted to obtain decrypted image.
A kind of method of image encryption provided in this embodiment is based on by obtaining the ternary matrix number of image to be encrypted First parameter preset carries out discrete Three-ary Number Fourier transformation to the ternary matrix number, obtain frequency spectrum the first real number matrix, with And first complex matrix, after being decomposed to moulds such as first complex matrixs, according to above-mentioned first real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix, to first matrix carry out gyrator variation after, determine the corresponding ciphertext of image to be encrypted Image.
By the above method, may be implemented based on ternary matrix number is obtained after the encryption of ternary matrix number, relative to will be colored The different colours component coding of image is quaternionic matrix encryption, is still the method for quaternary number after encryption, reduces memory space, And the ternary matrix number by treating encrypted image carries out discrete Three-ary Number Fourier transformation, and to transformed complex matrix Equal moulds decompose, to convert to the first matrix gyrator being calculated, improve the efficiency of encryption.
Embodiment two
It is shown in Figure 3, it is a kind of structural schematic diagram of the device of image encryption provided by the embodiment of the present application, packet It includes: obtaining module 301, the first determining module 302, processing module 303, the second determining module 304, third determining module 305, the Four determining modules 306, specifically include:
Module 301 is obtained, for obtaining image to be encrypted;
First determining module 302 determines the corresponding Three-ary Number of the image to be encrypted for being directed to the image to be encrypted Matrix;
Processing module 303, for carrying out discrete Three-ary Number Fourier to the ternary matrix number based on the first parameter preset Transformation, the frequency spectrum after obtaining the Three-ary Number matrixing;
Second determining module 304 determines the first real number matrix and first of the frequency spectrum for being directed to the frequency spectrum Complex matrix;
Third determining module 305 is based on first real number after carrying out equal moulds decomposition to first complex matrix Matrix and wait moulds decompose after complex matrix, determine the first matrix;
4th determining module 306, for carrying out gyrator transformation to first matrix, based on transformed as a result, really Determine the corresponding ciphertext image of the image to be encrypted.
In the embodiment of the application, the reference colours of the image to be encrypted include: the first color, the second color and Three colors, first determining module 302, are specifically used for:
The first color value for successively extracting each pixel in the image to be encrypted obtains the first color value Component Matrices;
The second color value for successively extracting each pixel in the image to be encrypted obtains the second color value Component Matrices;
The third color value for successively extracting each pixel in the image to be encrypted obtains third color value Component Matrices;Its In, the first color value Component Matrices are the real component matrix of the ternary matrix number, the second color value component square Battle array and the third color value Component Matrices are the imaginary matrix of the ternary matrix number.
In the embodiment of the application, the processing module 303 is specifically used for:
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the ternary The transformed frequency spectrum of matrix number, wherein
In formula, F1(u, v) is the frequency spectrum after the Three-ary Number matrixing;ft(x, y) is the ternary matrix number, (x, y) For the space coordinate of pixel in the image to be encrypted;μ1For pure Three-ary Number, and μ1=icos θ1+jsinθ1;θ1It is described first Parameter preset;M is the pixel columns that the image to be encrypted includes;N is the number of lines of pixels that the image to be encrypted includes;ft (x, y)=f1(x,y)+if2(x,y)+jf3(x, y), wherein f1(x, y) is the first color value Component Matrices;f2(x, y) is The second color value Component Matrices;f3(x, y) is the third color value Component Matrices;I, j is imaginary, and is met Condition: i2=j, ij=ji=-1, j2=-i.
In the embodiment of the application, second determining module 304 is specifically used for:
To the frequency spectrum F1The expression formula of (u, v) is converted, and determines the first real number matrix and first of the frequency spectrum Complex matrix, transformation for mula are as follows:
Enable D (u, v)=B (u, v)+iC (u, v);In formula, A (u, v) is first real number matrix;D (u, v) is described the One complex matrix;B (u, v) is the real-part matrix of first complex matrix;C (u, v) is the imaginary part of first complex matrix Matrix.
In the embodiment of the application, in the third determining module 305, equal moulds point are carried out to first complex matrix Solution, is specifically used for:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, P (u, v) is Second complex matrix, Q (u, v) are the third complex matrix, | D (u, v) | for the first complex matrix D (u, v) Amplitude,For the phasing matrix of the first complex matrix D (u, v), θ is default matrix;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, specific to use In:
The third complex matrix Q (u, v) based on the first real number matrix A (u, v) and after waiting moulds to decompose, really Fixed first matrix, wherein K (u, v) is first matrix, and
It is described first complex matrix to be carried out etc. in the third determining module 305 in the embodiment of the application Mould decomposes, and is specifically used for:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, D (u, v) is First complex matrix, P (u, v) are second complex matrix, and Q (u, v) is the third complex matrix, | D (u, v) | be The amplitude of the first complex matrix D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default square Battle array;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, specific to use In:
The third complex matrix based on first real number matrix and after waiting moulds to decompose, determines the second Three-ary Number Matrix;
Discrete Three-ary Number Fourier transformation is carried out to the second ternary matrix number based on the second parameter preset, is obtained described Frequency spectrum after second Three-ary Number matrixing;
For the frequency spectrum, the second real number matrix and the 4th complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to the 4th complex matrix, based on second real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix.
In the embodiment of the application, in the 4th determining module 306, based on it is transformed as a result, determine it is described to The corresponding ciphertext image of encrypted image, is specifically used for:
The amplitude of transformed result is remained unchanged, phase truncation operation is carried out, it is corresponding to obtain the image to be encrypted Ciphertext image.
In the embodiment of the application, described device is also used to:
Gyrator inverse transformation is carried out to the ciphertext image, first matrix is determined, and be based on first matrix, obtains To first real number matrix and the third complex matrix;
Based on the third complex matrix, second complex matrix is calculated;
Based on first real number matrix, second complex matrix and the third complex matrix, institute is calculated State frequency spectrum;
Based on first parameter preset, discrete Three-ary Number inverse Fourier transform is carried out to the frequency spectrum, obtains described three First matrix number;
According to the ternary matrix number, the image to be encrypted is obtained.
Embodiment three
Based on same technical concept, the embodiment of the present application also provides a kind of electronic equipment.It is this Shen referring to shown in Fig. 4 Please the structural schematic diagram of electronic equipment 400 that provides of embodiment, including processor 401, memory 402 and bus 403.Wherein, Memory 402 is executed instruction for storing, including memory 4021 and external memory 4022;Here memory 4021 is also referred to as memory Reservoir, for temporarily storing the operational data in processor 401, and the data exchanged with external memories 4022 such as hard disks, Processor 401 carries out data exchange by memory 4021 and external memory 4022, when electronic equipment 400 is run, processor It is communicated between 401 and memory 402 by bus 403, so that processor 401 is being executed to give an order:
Obtain image to be encrypted;
For the image to be encrypted, the corresponding ternary matrix number of the image to be encrypted is determined;
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the ternary The transformed frequency spectrum of matrix number;
For the frequency spectrum, the first real number matrix and the first complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to first complex matrix, based on first real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix;
Gyrator transformation is carried out to first matrix, based on transformed as a result, determining that the image to be encrypted is corresponding Ciphertext image.
In a kind of possible design, in the processing that processor 401 executes, the reference colours of the image to be encrypted include: the One color, the second color and third color, it is described to be directed to the image to be encrypted, determine the image to be encrypted corresponding three First matrix number, comprising:
The first color value for successively extracting each pixel in the image to be encrypted obtains the first color value Component Matrices;
The second color value for successively extracting each pixel in the image to be encrypted obtains the second color value Component Matrices;
The third color value for successively extracting each pixel in the image to be encrypted obtains third color value Component Matrices;Its In, the first color value Component Matrices are the real component matrix of the ternary matrix number, the second color value component square Battle array and the third color value Component Matrices are the imaginary matrix of the ternary matrix number.
In a kind of possible design, in the processing that processor 401 executes, first parameter preset that is based on is to the ternary Matrix number carries out discrete Three-ary Number Fourier transformation, the frequency spectrum after obtaining the Three-ary Number matrixing, comprising:
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the ternary The transformed frequency spectrum of matrix number, wherein
In formula, F1(u, v) is the frequency spectrum after the Three-ary Number matrixing;ft(x, y) is the ternary matrix number, (x, y) For the space coordinate of pixel in the image to be encrypted;μ1For pure Three-ary Number, and μ1=icos θ1+jsinθ1;θ1It is described first Parameter preset;M is the pixel columns that the image to be encrypted includes;N is the number of lines of pixels that the image to be encrypted includes;ft (x, y)=f1(x,y)+if2(x,y)+jf3(x, y), wherein f1(x, y) is the first color value Component Matrices;f2(x, y) is The second color value Component Matrices;f3(x, y) is the third color value Component Matrices;I, j is imaginary, and is met Condition: i2=j, ij=ji=-1, j2=-i.
It is described to be directed to the frequency spectrum in the processing that processor 401 executes in a kind of possible design, determine the frequency spectrum The first real number matrix and the first complex matrix, comprising:
To the frequency spectrum F1The expression formula of (u, v) is converted, and determines the first real number matrix and first of the frequency spectrum Complex matrix, transformation for mula are as follows:
Enable D (u, v)=B (u, v)+iC (u, v);In formula, A (u, v) is first real number matrix;D (u, v) is described the One complex matrix;B (u, v) is the real-part matrix of first complex matrix;C (u, v) is the imaginary part of first complex matrix Matrix.
It is described that equal moulds are carried out to first complex matrix in the processing that processor 401 executes in a kind of possible design It decomposes, comprising:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, P (u, v) is Second complex matrix, Q (u, v) are the third complex matrix, | D (u, v) | for the first complex matrix D (u, v) Amplitude,For the phasing matrix of the first complex matrix D (u, v), θ is default matrix;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
The third complex matrix Q (u, v) based on the first real number matrix A (u, v) and after waiting moulds to decompose, really Fixed first matrix, wherein K (u, v) is first matrix, and
It is described that equal moulds are carried out to first complex matrix in the processing that processor 401 executes in a kind of possible design It decomposes, comprising:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein etc. Mould decomposition formula are as follows:
In formula, D (u, v) is First complex matrix, P (u, v) are second complex matrix, and Q (u, v) is the third complex matrix, | D (u, v) | be The amplitude of the first complex matrix D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default square Battle array;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
The third complex matrix based on first real number matrix and after waiting moulds to decompose, determines the second Three-ary Number Matrix;
Discrete Three-ary Number Fourier transformation is carried out to the second ternary matrix number based on the second parameter preset, is obtained described Frequency spectrum after second Three-ary Number matrixing;
For the frequency spectrum, the second real number matrix and the 4th complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to the 4th complex matrix, based on second real number matrix and after waiting moulds to decompose Complex matrix, determine the first matrix.
In a kind of possible design, in the processing that processor 401 executes, it is described based on transformed as a result, described in determination The corresponding ciphertext image of image to be encrypted, comprising:
The amplitude of transformed result is remained unchanged, phase truncation operation is carried out, it is corresponding to obtain the image to be encrypted Ciphertext image.
In a kind of possible design, in the processing that processor 401 executes, the method also includes:
Gyrator inverse transformation is carried out to the ciphertext image, first matrix is determined, and be based on first matrix, obtains To first real number matrix and the third complex matrix;
Based on the third complex matrix, second complex matrix is calculated;
Based on first real number matrix, second complex matrix and the third complex matrix, institute is calculated State frequency spectrum;
Based on first parameter preset, discrete Three-ary Number inverse Fourier transform is carried out to the frequency spectrum, obtains described three First matrix number;
According to the ternary matrix number, the image to be encrypted is obtained.
Example IV
The embodiment of the present application also provides a kind of computer readable storage medium, stored on the computer readable storage medium There is computer program, which executes the method for above-mentioned image encryption when being run by processor the step of.
Specifically, which can be general storage medium, such as mobile disk, hard disk, on the storage medium Computer program when being run, the step of being able to carry out the method for above-mentioned image encryption, thus while reducing memory space, The problem of effectively improving encryption efficiency.
The computer program product of the method for image encryption provided by the embodiment of the present application, including store program code Computer readable storage medium, the instruction that program code includes can be used for executing the method in previous methods embodiment, specifically It realizes and can be found in embodiment of the method, details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method, it can be by others side Formula is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only one kind are patrolled Function division is collected, there may be another division manner in actual implementation, in another example, multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some communication interfaces, device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in embodiment provided by the present application can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing, in addition, term " the One ", " second ", " third " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Finally, it should be noted that embodiment described above, the only specific embodiment of the application, to illustrate the application Technical solution, rather than its limitations, the protection scope of the application is not limited thereto, although with reference to the foregoing embodiments to this Shen It please be described in detail, those skilled in the art should understand that: anyone skilled in the art Within the technical scope of the present application, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of the embodiment of the present application technical solution.The protection in the application should all be covered Within the scope of.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.

Claims (11)

1. a kind of method of image encryption, which is characterized in that the described method includes:
Obtain image to be encrypted;
For the image to be encrypted, the corresponding ternary matrix number of the image to be encrypted is determined;
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the Three-ary Number square The transformed frequency spectrum of battle array;
For the frequency spectrum, the first real number matrix and the first complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to first complex matrix, answering based on first real number matrix and after waiting moulds to decompose Matrix number determines the first matrix;
Gyrator transformation is carried out to first matrix, based on transformed as a result, determining that the image to be encrypted is corresponding close Texts and pictures picture.
2. the method according to claim 1, wherein the reference colours of the image to be encrypted include: the first color, Second color and third color, it is described to be directed to the image to be encrypted, determine the corresponding Three-ary Number square of the image to be encrypted Battle array, comprising:
The first color value for successively extracting each pixel in the image to be encrypted obtains the first color value Component Matrices;
The second color value for successively extracting each pixel in the image to be encrypted obtains the second color value Component Matrices;
The third color value for successively extracting each pixel in the image to be encrypted obtains third color value Component Matrices;Wherein, institute State the real component matrix that the first color value Component Matrices are the ternary matrix number, the second color value Component Matrices and institute State the imaginary matrix that third color value Component Matrices are the ternary matrix number.
3. according to the method described in claim 2, it is characterized in that, first parameter preset that is based on is to the ternary matrix number Discrete Three-ary Number Fourier transformation is carried out, the frequency spectrum after obtaining the Three-ary Number matrixing, comprising:
Discrete Three-ary Number Fourier transformation is carried out to the ternary matrix number based on the first parameter preset, obtains the Three-ary Number square The transformed frequency spectrum of battle array, wherein
In formula, F1(u, v) is the frequency spectrum after the Three-ary Number matrixing;ft(x, y) is the ternary matrix number, and (x, y) is institute State the space coordinate of pixel in image to be encrypted;μ1For pure Three-ary Number, and μ1=i cos θ1+j sinθ1;θ1It is pre- for described first Setting parameter;M is the pixel columns that the image to be encrypted includes;N is the number of lines of pixels that the image to be encrypted includes;ft(x, Y)=f1(x,y)+if2(x,y)+jf3(x, y), wherein f1(x, y) is the first color value Component Matrices;f2(x, y) is institute State the second color value Component Matrices;f3(x, y) is the third color value Component Matrices;I, j is imaginary, and meets item Part: i2=j, ij=ji=-1, j2=-i.
4. according to the method described in claim 3, it is characterized in that, it is described be directed to the frequency spectrum, determine the first of the frequency spectrum Real number matrix and the first complex matrix, comprising:
To the frequency spectrum F1The expression formula of (u, v) is converted, and determines the first real number matrix and the first plural number of the frequency spectrum Matrix, transformation for mula are as follows:
Enable D (u, v)=B (u, v)+iC (u, v);In formula, A (u, v) is first real number matrix;D (u, v) is described first multiple Matrix number;B (u, v) is the real-part matrix of first complex matrix;C (u, v) is the imaginary-part matrix of first complex matrix.
5. according to the method described in claim 4, it is characterized in that, described carry out equal moulds to first complex matrix and decompose, Include:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein wait moulds point Solve formula are as follows:
In formula, P (u, v) is described Second complex matrix, Q (u, v) are the third complex matrix, | D (u, v) | it is the amplitude of the first complex matrix D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default matrix;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
The third complex matrix Q (u, v) based on the first real number matrix A (u, v) and after waiting moulds to decompose, determines the One matrix, wherein K (u, v) is first matrix, and
6. according to the method described in claim 4, it is characterized in that, described carry out equal moulds to first complex matrix and decompose, Include:
Equal moulds are carried out to first complex matrix to decompose, and obtain the second complex matrix and third complex matrix, wherein wait moulds point Solve formula are as follows:
In formula, D (u, v) is described First complex matrix, P (u, v) are second complex matrix, and Q (u, v) is the third complex matrix, | D (u, v) | it is described The amplitude of first complex matrix D (u, v),For the phasing matrix of the first complex matrix D (u, v), θ is default matrix;
The complex matrix based on first real number matrix and after waiting moulds to decompose, determines the first matrix, comprising:
The third complex matrix based on first real number matrix and after waiting moulds to decompose, determines the second ternary matrix number;
Discrete Three-ary Number Fourier transformation is carried out to the second ternary matrix number based on the second parameter preset, obtains described second Frequency spectrum after Three-ary Number matrixing;
For the frequency spectrum, the second real number matrix and the 4th complex matrix of the frequency spectrum are determined;
After carrying out equal moulds decomposition to the 4th complex matrix, answering based on second real number matrix and after waiting moulds to decompose Matrix number determines the first matrix.
7. the method according to claim 1, wherein it is described based on it is transformed as a result, determination it is described to be encrypted The corresponding ciphertext image of image, comprising:
The amplitude of transformed result is remained unchanged, phase truncation operation is carried out, it is corresponding close to obtain the image to be encrypted Texts and pictures picture.
8. according to the method described in claim 5, it is characterized in that, the method also includes:
Gyrator inverse transformation is carried out to the ciphertext image, first matrix is determined, and be based on first matrix, obtains institute State the first real number matrix and the third complex matrix;
Based on the third complex matrix, second complex matrix is calculated;
Based on first real number matrix, second complex matrix and the third complex matrix, the frequency is calculated Spectrum;
Based on first parameter preset, discrete Three-ary Number inverse Fourier transform is carried out to the frequency spectrum, obtains the Three-ary Number Matrix;
According to the ternary matrix number, the image to be encrypted is obtained.
9. a kind of device of image encryption, which is characterized in that described device includes:
Module is obtained, for obtaining image to be encrypted;
First determining module determines the corresponding ternary matrix number of the image to be encrypted for being directed to the image to be encrypted;
Processing module is obtained for carrying out discrete Three-ary Number Fourier transformation to the ternary matrix number based on the first parameter preset Frequency spectrum to after the Three-ary Number matrixing;
Second determining module determines the first real number matrix and the first plural square of the frequency spectrum for being directed to the frequency spectrum Battle array;
Third determining module, for being carried out after equal moulds decompose to first complex matrix, based on first real number matrix, with And the complex matrix after waiting moulds to decompose, determine the first matrix;
4th determining module, for first matrix carry out gyrator transformation, based on it is transformed as a result, determine described in The corresponding ciphertext image of encrypted image.
10. a kind of electronic equipment characterized by comprising processor, memory and bus, the memory are stored with described The executable machine readable instructions of processor, when electronic equipment operation, by total between the processor and the memory Line communication, the machine readable instructions execute image encryption as described in any of the claims 1 to 8 when being executed by the processor Method the step of.
11. a kind of computer readable storage medium, which is characterized in that be stored with computer journey on the computer readable storage medium Sequence, the computer program execute the step of the method for image encryption as described in any of the claims 1 to 8 when being run by processor Suddenly.
CN201910532941.2A 2019-06-19 2019-06-19 Image encryption method and device Active CN110232285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910532941.2A CN110232285B (en) 2019-06-19 2019-06-19 Image encryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910532941.2A CN110232285B (en) 2019-06-19 2019-06-19 Image encryption method and device

Publications (2)

Publication Number Publication Date
CN110232285A true CN110232285A (en) 2019-09-13
CN110232285B CN110232285B (en) 2021-02-26

Family

ID=67856844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910532941.2A Active CN110232285B (en) 2019-06-19 2019-06-19 Image encryption method and device

Country Status (1)

Country Link
CN (1) CN110232285B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110228973A1 (en) * 2006-04-26 2011-09-22 Agaian Sos S Methods and systems for digital image security
CN105913368A (en) * 2016-03-31 2016-08-31 首都师范大学 Multi-image encryption and authentication method based on sparse constraint and system
CN106485201A (en) * 2016-09-09 2017-03-08 首都师范大学 The color face recognition method of supercomplex encrypted domain
CN109544435A (en) * 2018-10-22 2019-03-29 天津大学 Gyrator converts chaos random phase encoding digital image encryption method
CN109657484A (en) * 2018-12-12 2019-04-19 苏州科技大学 The multichannel image decoding method spliced based on gamma function and ciphertext
CN109726577A (en) * 2019-01-10 2019-05-07 首都师范大学 Image encryption method and device
CN109902261A (en) * 2019-03-06 2019-06-18 首都师范大学 A kind of image encryption method and device
CN109905563A (en) * 2019-03-06 2019-06-18 首都师范大学 A kind of stereo-picture encryption method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110228973A1 (en) * 2006-04-26 2011-09-22 Agaian Sos S Methods and systems for digital image security
CN105913368A (en) * 2016-03-31 2016-08-31 首都师范大学 Multi-image encryption and authentication method based on sparse constraint and system
CN106485201A (en) * 2016-09-09 2017-03-08 首都师范大学 The color face recognition method of supercomplex encrypted domain
CN109544435A (en) * 2018-10-22 2019-03-29 天津大学 Gyrator converts chaos random phase encoding digital image encryption method
CN109657484A (en) * 2018-12-12 2019-04-19 苏州科技大学 The multichannel image decoding method spliced based on gamma function and ciphertext
CN109726577A (en) * 2019-01-10 2019-05-07 首都师范大学 Image encryption method and device
CN109902261A (en) * 2019-03-06 2019-06-18 首都师范大学 A kind of image encryption method and device
CN109905563A (en) * 2019-03-06 2019-06-18 首都师范大学 A kind of stereo-picture encryption method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHUHONG SHAO等: ""Quaternion gyrator transform and its application to color image encryption"", 《2013 IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING》 *
邵珠宏: ""基于四元数变换的彩色图像处理算法研究"", 《中国优秀博士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN110232285B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
US4897799A (en) Format independent visual communications
CN112182649A (en) Data privacy protection system based on safe two-party calculation linear regression algorithm
CN109858264B (en) A kind of color image encipher-decipher method of the moulds resolutions of vectors such as score stochastic transformation domain
CN109104544A (en) A kind of New chaotic image encryption method synchronous based on complex network
CN110135177B (en) Asymmetric image encryption and authentication method and device
Abdulla New visual cryptography algorithm for colored image
CN109379507A (en) A kind of guard method of image, storage medium
CN115643001B (en) Image encryption method and system based on bit plane and readable storage medium
CN108961140A (en) Image guard method and device, image restoring method and device
CN115994559A (en) Efficient method for converting unintentional neural network
CN110232284B (en) Image encryption method and device
CN112035847B (en) Image encryption and decryption methods and devices, electronic equipment and storage medium
CN110505465A (en) Data transmission method, three-dimensional image display method, device and electronic equipment
CN104135669B (en) A kind of video secret communication method of multi-dimension Chaos mapping
CN110232285A (en) A kind of method and device of image encryption
Taghaddos et al. Visual cryptography for gray-scale images using bit-level
Qaid et al. Encryption and decryption of digital image using color signal
CN109918927A (en) A kind of image encryption method and device
Chang et al. Hiding a secret colour image in two colour images
CN110516461A (en) Multichannel image encryption method, device, storage medium and electronic equipment
CN104200421B (en) Color image encrypting method and decryption method based on quaternary number orthogonal transformation
CN110532793A (en) Image encryption method, image encrypting apparatus, electronic equipment and readable storage medium storing program for executing
Shi et al. A (t, n) secret sharing scheme for image encryption
CN113132080A (en) Image processing method and device, electronic equipment and storage medium
CN110414247B (en) Image encryption method and device based on cascade equimodular decomposition

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
TR01 Transfer of patent right

Effective date of registration: 20231123

Address after: Room 606-609, Compound Office Complex Building, No. 757, Dongfeng East Road, Yuexiu District, Guangzhou, Guangdong Province, 510699

Patentee after: China Southern Power Grid Internet Service Co.,Ltd.

Address before: Room 1109, No. 31, Nancheng Section, Guantai Road, Nancheng Street, Dongguan City, Guangdong Province, 523000

Patentee before: Dongguan Pengbo Information Technology Co.,Ltd.

Effective date of registration: 20231123

Address after: Room 1109, No. 31, Nancheng Section, Guantai Road, Nancheng Street, Dongguan City, Guangdong Province, 523000

Patentee after: Dongguan Pengbo Information Technology Co.,Ltd.

Address before: 105 West Third Ring Road North, Haidian District, Beijing

Patentee before: Capital Normal University

TR01 Transfer of patent right