CN110958458B - Digital image encryption method and image decryption method based on modular inverse operation - Google Patents

Digital image encryption method and image decryption method based on modular inverse operation Download PDF

Info

Publication number
CN110958458B
CN110958458B CN201911166050.6A CN201911166050A CN110958458B CN 110958458 B CN110958458 B CN 110958458B CN 201911166050 A CN201911166050 A CN 201911166050A CN 110958458 B CN110958458 B CN 110958458B
Authority
CN
China
Prior art keywords
image
value
pixel points
pixel
type
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.)
Expired - Fee Related
Application number
CN201911166050.6A
Other languages
Chinese (zh)
Other versions
CN110958458A (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.)
Li Xiaoping
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201911166050.6A priority Critical patent/CN110958458B/en
Publication of CN110958458A publication Critical patent/CN110958458A/en
Application granted granted Critical
Publication of CN110958458B publication Critical patent/CN110958458B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/65Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using error resilience
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/467Embedding additional information in the video signal during the compression process characterised by the embedded information being invisible, e.g. watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

The invention discloses a digital image encryption method based on modular inverse operation, which comprises the following steps: giving an original image A; the pixel point in the ith row and the jth column in A is represented as pi,jAll the pixel points with the value of i + j being an odd number are classified into a first class, and all the pixel points with the value of i + j being an even number are classified into a second class; performing modular inverse operation on all pixel points of the first type or the second type, and replacing the original pixel value with the obtained modular inverse value to obtain an encrypted image A'; performing modular inversion on the pixel points obtained by performing modular inversion on the pixel points of the first type or the second type in the A' according to claim 1; and replacing the original pixel value with the obtained modulus inverse value to restore the original image A. The method for classifying the pixel points of the image is simple and easy to implement, the encryption operation of the pixel points is simple, no additional information is needed in the whole encryption and recovery process, the image information transmission efficiency is high, and the error of the individual pixel points can not cause the error diffusion phenomenon.

Description

Digital image encryption method and image decryption method based on modular inverse operation
Technical Field
The invention relates to the technical field of encryption and recovery in image processing, in particular to an image encryption method and an image decryption method.
Background
The rapid development of the information technology brings great convenience to the life of people on one hand, and on the other hand, the information safety is threatened to a certain extent by the problems caused by information leakage or tampering in the transmission process. Digital images, one of the main carriers for information transmission, are inevitably attacked by illegal attacks. How to transmit digital images efficiently and prevent information from being leaked is one of important research contents in the field of information security.
Unlike the encryption of text, voice and other media, the encryption of digital images has its unique features: first, the digital image itself contains a large amount of data, and thus, encrypting it requires a large storage space. Secondly, digital images place high demands on the real-time performance of data recovery, because independent partial image data has no meaning, and only when most of the data is recovered, the information of the image can be recognized. The existing image encryption technology almost surrounds the characteristics of the two aspects: such as scrambling-based encryption techniques and computer graphics-based image encryption techniques. The two aspects of the good encryption effect and the small storage space can not be obtained at the same time, for example, the image encryption technology based on scrambling has a good encryption effect, but the storage space is generally larger as required; computer graphics-based encryption techniques require less memory space, but the encryption effect needs to be further improved.
Disclosure of Invention
The invention aims to provide an image encryption method and an image decryption method for solving the contradiction that smaller storage space and good encryption effect cannot be obtained at the same time.
In order to achieve the above object, the present disclosure provides a digital image encryption method based on modular inverse operation, including the following steps:
s1: giving an original image A;
s2: the pixel point in the ith row and the jth column in A is represented as pi,jAll the pixel points with the value of i + j being an odd number are classified into a first class, and all the pixel points with the value of i + j being an even number are classified into a second class;
s3: and performing modular inverse operation on all the pixel points of the first type or the second type, and replacing the original pixel value with the obtained modular inverse value to obtain an encrypted image A'.
The image decryption method is used for decrypting the image A' encrypted by the digital image encryption method, and comprises the following steps:
a1: performing modulo inversion operation on the pixels of the first type or the second type in A' according to claim 1 to obtain a modulo inversion value of the pixel;
a2: and replacing the original pixel value with the obtained modulus inverse value to restore the original image A.
The invention has the beneficial effects that:
1. in the invention, the classification of the pixel points of the image is determined according to the parity of the row mark and the column mark, so the classification method is simple and easy to implement;
2. the encryption of the pixel point is obtained by solving the modulo inversion of the pixel value of the point, and the operation is simple because other operations are not involved;
3. according to the digital image encryption method and the image decryption method based on the modular inverse operation, the system does not need extra information in the whole encryption and recovery process, so that the image information transmission efficiency is high;
4. when the encrypted image provided by the invention is recovered, the modulo inversion of the pixel value at the encrypted position is only required to be solved, and the value can be obtained by looking up a table. Therefore, the method for recovering the encrypted image is simple and efficient, and requires a small amount of computation.
5. In the process of encrypting and decrypting the image, each pixel point is independent, so that the error of the individual pixel point can not cause the diffusion phenomenon of the error.
On the basis of the technical scheme, the invention can be further improved as follows:
preferably, the pixel point p is selected in S3i,jInverse of its modulus
Figure BDA0002287482080000031
The method comprises the following steps:
Figure BDA0002287482080000032
drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow chart of an image encryption method based on modular inverse operation according to the present invention;
FIG. 2 is a flow chart of the image decryption method based on modular inverse operation according to the present invention;
fig. 3 shows an original image a and an encrypted image a' based on the modulo inversion operation according to the present invention.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
As shown in fig. 1, the digital image encryption method based on modular inverse operation includes the following steps:
(1) giving an original image A;
(2) the pixel point in the ith row and the jth column in A is represented as pi,jAll the pixel points with the value of i + j being an odd number are classified into a first class, and all the pixel points with the value of i + j being an even number are classified into a second class;
(3) and performing modular inverse operation on all the pixel points of the first type or the second type, and replacing the original pixel value with the obtained modular inverse value to obtain an encrypted image A'.
At S3, pixel point p is pointed outi,jInverse of its modulus
Figure BDA0002287482080000033
The method comprises the following steps:
Figure BDA0002287482080000034
specifically, note S1Is the set of all the pixel points with the value of i + j being odd number:
S1={p1,2,p1,4,...,pi,j,., where i + j ≡ 1(mod 2)
Note S2Set of all pixels whose value i + j is even:
S2={p1,1,p1,3,...,pi,j,., where i + j ≡ 0(mod 2)
When the modulo inversion operation is performed on the first type of pixel points,
Figure BDA0002287482080000041
the image A is encrypted to obtain an image A ', and pixel points p ' of the image A 'i,jComprises the following steps:
Figure BDA0002287482080000042
the image decryption method is used for decrypting the image A' encrypted by the digital image encryption method, and comprises the following steps:
(1) performing modular inverse operation on the first type of pixel points in A';
(2) and replacing the original pixel value with the obtained modulus inverse value to restore the original image A.
Specifically, the first type pixel point p ' in A ' is subjected to 'i,jThe calculation method of the modular inversion operation comprises the following steps:
Figure BDA0002287482080000043
wherein, p'i,j∈S1
Due to the fact that
Figure BDA0002287482080000044
Thus, the original image A can be obtained.
In the invention, the classification of the pixel points of the image is determined according to the parity of the row mark and the column mark, so the classification method is simple and easy to implement;
the encryption of the pixel point is obtained by solving the modulo inverse operation of the pixel value of the point, and the method is simple and easy to implement because other operations are not involved;
according to the image encryption and recovery method based on modular inverse operation, the system does not need extra information in the whole encryption and decryption process, so that the image information transmission efficiency is high;
when the encrypted image provided by the invention is recovered, the modulo inversion of the pixel value at the encrypted position is only required to be solved, and the value can be obtained by inquiring the following table. Therefore, the recovery method of the encrypted image is simple and efficient, and the required computation amount is small.
The following table sets the modulo inversions of all possible pixel values, the values in the table being modulo inverses from 1 to 255 with respect to 257, respectively.
1 129 86 193 103 43 147 225 200 180 187 150 178 202 120 241
121 100 230 90 49 222 190 75 72 89 238 101 195 60 199 249
148 189 235 50 132 115 145 45 163 153 6 111 40 95 175 166
21 36 126 173 97 119 243 179 248 226 61 30 59 228 102 253
87 74 234 223 149 246 181 25 169 66 24 186 247 201 244 151
165 210 96 205 127 3 65 184 26 20 209 176 152 216 46 83
53 139 135 18 28 63 5 215 164 177 245 188 224 250 44 218
116 124 38 113 134 159 54 15 17 158 140 114 220 51 85 255
2 172 206 37 143 117 99 240 242 203 98 123 144 219 133 141
39 213 7 33 69 12 80 93 42 252 194 229 239 122 118 204
174 211 41 105 81 48 237 231 73 192 254 130 52 161 47 92
106 13 56 10 71 233 191 88 232 76 11 108 34 23 183 170
4 155 29 198 227 196 31 9 78 14 138 160 84 131 221 236
91 82 162 217 146 251 104 94 212 112 142 125 207 22 68 109
8 58 197 62 156 19 168 185 182 67 35 208 167 27 157 136
16 137 55 79 107 70 77 57 32 110 214 154 64 171 128
According to the image encryption and recovery method based on modular inverse operation, the pixel points are independent, so that error diffusion cannot be caused by errors of individual pixel points.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (2)

1. The digital image encryption method based on modular inverse operation is characterized by comprising the following steps of:
s1: giving an original image A;
s2: the pixel point in the ith row and the jth column in A is represented as pi,jAll the pixel points with the value of i + j being an odd number are classified into a first class, and all the pixel points with the value of i + j being an even number are classified into a second class;
s3: performing modular inverse operation on all pixel points of the first type or the second type, and replacing the pixel value of the original position with the obtained modular inverse value to obtain an encrypted image A', which specifically comprises the following steps: for pixel point pi,jInverse of its modulus
Figure FDA0003282881160000011
Is composed of
Figure FDA0003282881160000012
Specifically, note S1Is the set of all the pixel points with the value of i + j being odd number: s1={p1,2,p1,4,...,pi,j,., wherein i + j ≡ 1(mod 2); note S2Set of all pixels whose value i + j is even: s2={p1,1,p1,3,...,pi,j,., wherein i + j ≡ 0(mod 2); when the modulo inversion operation is performed on the first type of pixel points,
Figure FDA0003282881160000013
wherein p isi,j∈S1(ii) a The image A is encrypted to obtain an image A ', and pixel points p ' of the image A 'i,jComprises the following steps:
Figure FDA0003282881160000014
2. an image decryption method for decrypting an image a' encrypted by the digital image encryption method of claim 1, comprising the steps of:
a1: performing modulo inversion operation on the pixels of the first type or the second type in A' according to claim 1 to obtain a modulo inversion value of the pixel;
a2: and replacing the pixel value of the original position with the obtained modulus inverse value to restore the original image A.
CN201911166050.6A 2019-11-25 2019-11-25 Digital image encryption method and image decryption method based on modular inverse operation Expired - Fee Related CN110958458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911166050.6A CN110958458B (en) 2019-11-25 2019-11-25 Digital image encryption method and image decryption method based on modular inverse operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911166050.6A CN110958458B (en) 2019-11-25 2019-11-25 Digital image encryption method and image decryption method based on modular inverse operation

Publications (2)

Publication Number Publication Date
CN110958458A CN110958458A (en) 2020-04-03
CN110958458B true CN110958458B (en) 2022-03-08

Family

ID=69978450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911166050.6A Expired - Fee Related CN110958458B (en) 2019-11-25 2019-11-25 Digital image encryption method and image decryption method based on modular inverse operation

Country Status (1)

Country Link
CN (1) CN110958458B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009232333A (en) * 2008-03-25 2009-10-08 Fujitsu Ltd Image encrypting apparatus, and image decoding apparatus
CN102196320A (en) * 2011-04-15 2011-09-21 江苏省现代企业信息化应用支撑软件工程技术研发中心 Image encrypting and decrypting system
CN105513002A (en) * 2015-11-30 2016-04-20 广东海洋大学 Novel image encryption method based on correlation between chaos and plaintext
CN105577362A (en) * 2015-12-28 2016-05-11 中山大学花都产业科技研究院 Byte substitution method applied to AES algorithm and system thereof
CN106228077A (en) * 2016-07-27 2016-12-14 北京小米移动软件有限公司 Process image and the display method of image, device and terminal
CN109800585A (en) * 2018-12-04 2019-05-24 王继军 A kind of image interpolation space completely reversibility separates ciphertext domain Information Hiding Algorithms
CN110430036A (en) * 2019-07-05 2019-11-08 云南大学 A kind of RGB color image encryption method based on poor chaotic maps
CN110493201A (en) * 2019-07-29 2019-11-22 北京多思安全芯片科技有限公司 A kind of processing method of data, device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6609141B1 (en) * 2000-10-13 2003-08-19 Motorola, Inc. Method of performing modular inversion
CN107809644B (en) * 2017-10-26 2019-08-20 宁波工程学院 A kind of encryption area image reversible data concealing method of double-encryption
CN109803142B (en) * 2019-01-08 2021-04-13 宁波工程学院 Encrypted domain image reversible data hiding method based on neighborhood prediction

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009232333A (en) * 2008-03-25 2009-10-08 Fujitsu Ltd Image encrypting apparatus, and image decoding apparatus
CN102196320A (en) * 2011-04-15 2011-09-21 江苏省现代企业信息化应用支撑软件工程技术研发中心 Image encrypting and decrypting system
CN105513002A (en) * 2015-11-30 2016-04-20 广东海洋大学 Novel image encryption method based on correlation between chaos and plaintext
CN105577362A (en) * 2015-12-28 2016-05-11 中山大学花都产业科技研究院 Byte substitution method applied to AES algorithm and system thereof
CN106228077A (en) * 2016-07-27 2016-12-14 北京小米移动软件有限公司 Process image and the display method of image, device and terminal
CN109800585A (en) * 2018-12-04 2019-05-24 王继军 A kind of image interpolation space completely reversibility separates ciphertext domain Information Hiding Algorithms
CN110430036A (en) * 2019-07-05 2019-11-08 云南大学 A kind of RGB color image encryption method based on poor chaotic maps
CN110493201A (en) * 2019-07-29 2019-11-22 北京多思安全芯片科技有限公司 A kind of processing method of data, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
模逆算法在密码学教学中的地位和应用;陈逢林;《安庆师范学院学报(自然科学版)》;20110228;第17卷(第1期);第93-94页 *

Also Published As

Publication number Publication date
CN110958458A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
Chen et al. An efficient image encryption scheme using lookup table-based confusion and diffusion
US10749675B2 (en) Homomorphic white box system and method for using same
Pan et al. A secure data hiding scheme for two-color images
Tseng et al. Data hiding in 2-color images
US8091139B2 (en) System and method for masking arbitrary Boolean functions
Mandal et al. Symmetric key image encryption using chaotic Rossler system
Chen et al. Reusing the permutation matrix dynamically for efficient image cryptographic algorithm
Chen et al. A secure data hiding scheme for two-color images
Deshmukh et al. Efficient and secure multi secret sharing schemes based on boolean XOR and arithmetic modulo
Sardar et al. A new lossless secret color image sharing scheme with small shadow size
Zheng et al. A novel image encryption scheme based on Hénon map and compound spatiotemporal chaos
US11728965B2 (en) Strong fully homomorphic white-box and method for using same
US20200097256A1 (en) A calculation device for encoded addition
Prasetyo et al. Improved multiple secret sharing using generalized chaotic image scrambling
Sardar et al. Essential secret image sharing scheme with small and equal sized shadows
Courtois et al. Ciphertext-only attacks and weak long-term keys in T-310
Luo et al. Secret image sharing scheme with lossless recovery and high efficiency
CN109618073A (en) A kind of more figure encryption methods based on Hyperchaotic Chen System
Kumar et al. A novel algorithm for image encryption by integrated pixel scrambling plus diffusion [IISPD] utilizing duo chaos mapping applicability in wireless systems
CN111712816B (en) Using cryptographic masking for efficient use of Montgomery multiplications
CN112260815B (en) Image encryption method and device based on index matrix, terminal and storage medium
CN110958458B (en) Digital image encryption method and image decryption method based on modular inverse operation
CN115883744B (en) Watermarking method and device based on fractional order chaotic mapping and storage medium
Guo et al. A novel proactive secret image sharing scheme based on LISS
Loidreau Analysis of a public-key encryption scheme based on distorted Gabidulin codes

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

Effective date of registration: 20210512

Address after: No.1-202012007, No.3 / F, building 1, No.366, north section of Hupan Road, Tianfu New District, Chengdu, Sichuan 610000

Applicant after: Chengdu lantu Technology Co.,Ltd.

Address before: 610000, No. two, section 4, Jianshe North Road, Chengdu, Sichuan, Chenghua District

Applicant before: Li Xiaoping

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220127

Address after: 610000, No. two, section 4, Jianshe North Road, Chengdu, Sichuan, Chenghua District

Applicant after: Li Xiaoping

Address before: No.1-202012007, No.3 / F, building 1, No.366, north section of Hupan Road, Tianfu New District, Chengdu, Sichuan 610000

Applicant before: Chengdu lantu Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220308