TW201424364A - Methods for encoding and decoding to digital image - Google Patents

Methods for encoding and decoding to digital image Download PDF

Info

Publication number
TW201424364A
TW201424364A TW101146795A TW101146795A TW201424364A TW 201424364 A TW201424364 A TW 201424364A TW 101146795 A TW101146795 A TW 101146795A TW 101146795 A TW101146795 A TW 101146795A TW 201424364 A TW201424364 A TW 201424364A
Authority
TW
Taiwan
Prior art keywords
digital image
images
image
encryption
mathematical expression
Prior art date
Application number
TW101146795A
Other languages
Chinese (zh)
Inventor
Kuang-Shyr Wu
Chien-Ping Chang
Original Assignee
Univ Chien Hsin Sci & Tech
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 Univ Chien Hsin Sci & Tech filed Critical Univ Chien Hsin Sci & Tech
Priority to TW101146795A priority Critical patent/TW201424364A/en
Publication of TW201424364A publication Critical patent/TW201424364A/en

Links

Landscapes

  • Facsimile Transmission Control (AREA)

Abstract

The present invention relates to a method for encoding and decoding to a digital image. In the present invention, one image would be divided into K encoded shared images. When one obtains n encoded shared images, the image can be decoded by a random grid algorithm. In addition, a simplified function is adapted to increase the efficiency of decoding. In the embodiment, it depicts the present invention can decode a substantial lossless image as the original image. Also the efficiency is better than the conventional method.

Description

數位影像加密與解密方法 Digital image encryption and decryption method

本發明係關於一種數位影像處理技術,更進一步來說,本發明係關於一種應用隨機參數多項式,針對數位影像進行加密與其解密之方法。 The present invention relates to a digital image processing technique, and more particularly to a method for applying a random parameter polynomial to encrypt and decrypt a digital image.

隨著數位科技進步改變了人們的生活,人們廣泛地使用數位產品將資訊記錄下來,這些被記錄下來的資訊,如影像、聲音或文字,時常會透過網際網路來做公開的訊息交換。我們可以透過網際網路的使用,容易的取得想要的數位資訊,但對於具有版權及機密性的資訊經由網路傳送時,有心人士會以特定工具來取得不法內容,這些受保護的資訊面臨了相當程度的威脅。為了有效保護重要資料不受干擾,保護不同類型的安全措施因應而生,發展出了影像分享的技術。 As digital technology advances people's lives, digital products are widely used to record information. These recorded information, such as images, sounds or words, are often exchanged openly via the Internet. We can easily obtain the desired digital information through the use of the Internet. However, when copyrighted and confidential information is transmitted via the Internet, people who are interested will use certain tools to obtain illegal content. These protected information faces A considerable degree of threat. In order to effectively protect important data from interference and protect different types of security measures, video sharing technology has been developed.

影像分享是將一張秘密影像分享為k張分享影像的方法,每一張分享影像都放置於不同的地方交予不同的參與者來保管,以確保秘密影像的安全。圖1繪示為先前技術的影像分享的示意圖。若要還原秘密影像時,必須取得門檻值以上的分享影像才能辨識出秘密訊息,或是取得n張分享影像亦可完整還原出秘密影像資訊。 Image sharing is a method of sharing a secret image into k shared images. Each shared image is placed in a different place and handed to different participants for security to ensure the security of the secret image. FIG. 1 is a schematic diagram of image sharing in the prior art. To restore a secret image, you must obtain a shared image above the threshold to identify the secret message, or obtain n shared images to completely restore the secret image information.

1995年,Naor與Shamir[1]提出了一種基於視覺密碼(Visual Cryptography,VC)技術來保護秘密影像的方法, 它是一種利用人類視覺來解密的一項技術,視覺密碼在編解碼的過程當中有別於傳統密碼學的複雜運算,並不會消耗太多系統資源。Naor與Shamir所提之視覺密碼技術,其概念主要是將影像大小為h×w的黑白原始影像R,利用圖2所示編碼簿(codebook),依每個對應之像素將其重新編碼,原始影像經編碼後即分為k張分享影像(shares),再將分享影像交付予各參與者(participants)分別存放,來確保原始影像的安全。當要取得原始影像秘密資訊時,集合n個參與者擁有的分享影像,疊合後即可以視覺判斷即可辨識出秘密訊息。 In 1995, Naor and Shamir [1] proposed a method based on Visual Cryptography (VC) to protect secret images. It is a technology that uses human vision to decrypt. Visual cryptography is different from traditional cryptography in the process of encoding and decoding, and does not consume too much system resources. The concept of visual cryptography proposed by Naor and Shamir is mainly to use a black and white original image R of image size h×w, which is recoded according to the corresponding code pixel using the codebook shown in Fig. 2. After the image is encoded, it is divided into k shared images (shares), and then the shared images are delivered to each participant (participants) to ensure the security of the original images. When the original image secret information is to be obtained, the shared images owned by the n participants are collected, and the superimposed images can be visually recognized to identify the secret information.

圖3繪示了利用上述先前技術的編碼簿所構成的分享影像與重疊後的解碼影像。由圖3可以看出,兩個編碼影像會被放大4倍,造成像素擴展(Pixel Expansion)的問題,且合成的影像雖然可以辨識,但是對比度下降很多。 FIG. 3 illustrates a shared image and an overlapped decoded image formed by using the above-described prior art codebook. As can be seen from Fig. 3, the two coded images are magnified by 4 times, causing a problem of Pixel Expansion, and the synthesized image is recognizable, but the contrast is much reduced.

本發明的一目的在於提供一種數位影像加密與解密方法,用以解決像素擴展(Pixel Expansion)以及增加解碼後影像的對比度。 It is an object of the present invention to provide a digital image encryption and decryption method for solving Pixel Expansion and increasing the contrast of a decoded image.

本發明的數位影像加密與解密方法論述了一個基於(k,n)門檻資料分享理論利用隨機網格的快速機密分享方法,並以簡化後的方程式來增加解碼時的效率,實驗結果顯示本研究不僅能趨近於無失真取回原始影像,執行效率也較先前演算法佳,亦能節省系統資源,發揮行動裝置 最大工作效益。 The digital image encryption and decryption method of the present invention discusses a fast confidential sharing method based on the (k,n) threshold data sharing theory using a random grid, and increases the efficiency in decoding by the simplified equation. The experimental results show that the study Not only can it be close to the original image without distortion, the execution efficiency is better than the previous algorithm, and it can save system resources and play the mobile device. Maximum work efficiency.

為讓本發明之上述和其他目的、特徵和優點能更明顯易懂,下文特舉較佳實施例,並配合所附圖式,作詳細說明如下。 The above and other objects, features and advantages of the present invention will become more <RTIgt;

在說明書及後續的申請專利範圍當中使用了某些詞彙來指稱特定的元件。所屬領域中具有通常知識者應可理解,硬體製造商可能會用不同的名詞來稱呼同一個元件。本說明書及後續的申請專利範圍並不以名稱的差異來作為區分元件的方式,而是以元件在功能上的差異來作為區分的準則。在通篇說明書及後續的請求項當中所提及的「包含」係為一開放式的用語,故應解釋成「包含但不限定於」。以外,「耦接」一詞在此係包含任何直接及間接的電氣連接手段。因此,若文中描述一第一裝置耦接於一第二裝置,則代表該第一裝置可直接電氣連接於該第二裝置,或透過其他裝置或連接手段間接地電氣連接至該第二裝置。 Certain terms are used throughout the description and following claims to refer to particular elements. Those of ordinary skill in the art should understand that a hardware manufacturer may refer to the same component by a different noun. The scope of this specification and the subsequent patent application do not use the difference of the names as the means for distinguishing the elements, but the difference in function of the elements as the criterion for distinguishing. The term "including" as used throughout the specification and subsequent claims is an open term and should be interpreted as "including but not limited to". In addition, the term "coupled" is used herein to include any direct and indirect electrical connection. Therefore, if a first device is coupled to a second device, it means that the first device can be directly electrically connected to the second device or indirectly electrically connected to the second device through other devices or connection means.

圖4繪示為本發明實施例的數位影像加密方法的流程圖。請參考圖4,此數位影像加密方法包括下列步驟:步驟S401:提供一加密運算數學式,如下:s(x)=(M+S 1 X+S 2 X+..+S n-1 X n-1) 4 is a flow chart of a digital image encryption method according to an embodiment of the present invention. Referring to FIG. 4, the digital image encryption method comprises the following steps: Step S401: providing an encryption operation mathematical expression as follows: s ( x )=( M + S 1 X + S 2 X +..+ S n -1 X n -1 )

其中,S1、S2...Sn-1為隨機產生數,n為門檻值,表示拿到幾個分享影像才可以解碼出原始影像。為了讓所屬技術領域具有通常知識者容易瞭解此技術,在此假設門檻值n等於2(也就表示只要取得兩張加密後的機密影像就可以透過本實施例的特定解碼方式解碼出原始影像),則上述運算式則改變如下:S(X)=(M+S 1 X) Among them, S 1 , S 2 ... S n-1 are randomly generated numbers, and n is a threshold value, which means that several original images can be decoded to decode the original image. In order to make it easy for a person skilled in the art to understand the technology, it is assumed that the threshold n is equal to 2 (that is, the original image can be decoded by the specific decoding method of the embodiment as long as two encrypted confidential images are obtained). , then the above expression changes as follows: S ( X ) = ( M + S 1 X )

步驟S402:產生K組不同的隨機數字Q1~QK,其中K是所想要產生的加密影像數目。在此假設是4(Q1~Q4)。 Step S402: Generate K groups of different random numbers Q1~QK, where K is the number of encrypted images that are desired to be generated. The assumption here is 4 (Q1~Q4).

步驟S403:將數位影像的每一個像素值代入上述加密運算數學式的M,並且將上述不同的隨機數字Q1~Q4代入該加密運算數學式的X,並且將得到的結果S(Q1)、S(Q2)、S(Q3)以及S(Q4)分別當作第一、第二、第三、第四加密影像的像素,藉此,產生4個加密影像。 Step S403: Substituting each pixel value of the digital image into M of the above-mentioned encryption operation mathematical expression, and substituting the different random numbers Q1 to Q4 into the X of the encryption operation mathematical expression, and obtaining the obtained result S(Q1), S (Q2), S(Q3), and S(Q4) are respectively used as pixels of the first, second, third, and fourth encrypted images, thereby generating four encrypted images.

D1=(P[i,j]+S1×Q1) D1=(P[i,j]+S 1 ×Q1)

D2=(P[i,j]+S1×Q2) D2=(P[i,j]+S 1 ×Q2)

D3=(P[i,j]+S1×Q3) D3=(P[i,j]+S 1 ×Q3)

D4=(P[i,j]+S1×Q4) D4=(P[i,j]+S 1 ×Q4)

其中P[i,j]表示座標第(i,j)的像素,D1~D4表示第 一、第二、第三、第四加密影像。 Where P[i,j] represents the pixel of the (i,j)th coordinate, and D1~D4 represents the first First, second, third, and fourth encrypted images.

步驟S404:產生一亂數影像K0,其中,上述亂數影像與上述數位影像的大小相同,且上述亂數影像的像素值為隨機產生。 Step S404: generating a random number image K0, wherein the random number image is the same size as the digital image, and the pixel value of the random number image is randomly generated.

步驟S405:將上述4個加密影像一一與上述亂數影像K0進行具有一邏輯還原反運算的一邏輯運算,以產生K個機密影像。 Step S405: Perform one logical operation of the above four encrypted images one by one with the random number image K0 to perform a logical reduction inverse operation to generate K confidential images.

R1=D1♁K0 R1=D1♁K0

R2=D2♁K0 R2=D2♁K0

R3=D3♁K0 R3=D3♁K0

R4=D4♁K0 R4=D4♁K0

上述R1~R4表示第一、第二、第三、第四機密影像,♁表示互斥或運算。 The above R1 to R4 represent the first, second, third, and fourth confidential images, and ♁ denotes a mutually exclusive or arithmetic operation.

在此例中,邏輯運算例如是互斥或XOR,互斥或XOR的特點就是再用一次互斥或便可以還原資料。同樣的道理,反互斥或XNOR也可以使用,本發明不以此為限。 In this case, the logical operation is, for example, mutual exclusion or XOR. Mutual exclusion or XOR is characterized by reusing the mutual exclusion or retrieving the data. By the same token, anti-mutation or XNOR can also be used, and the invention is not limited thereto.

至於上述例子中,為何要對加密影像再次與隨機影像使用互斥或運算,原因在於,加密後的影像的運算規則可能會導致於辨識率過高,因此,保險起見,需要額外將上述加密後的影像再次打亂。 As for the above example, why should the encrypted image be re-excluded with the random image again? The reason is that the algorithm of the encrypted image may cause the recognition rate to be too high. Therefore, for the sake of insurance, the above encryption is required. The afterimage was disrupted again.

圖5示為本發明實施例的數位影像解密方法的流程圖。請參考圖5,此數位影像解密方法包括下列步驟: FIG. 5 is a flowchart of a digital image decryption method according to an embodiment of the present invention. Referring to FIG. 5, the digital image decryption method includes the following steps:

步驟S501:從K個機密影像取得n個機密影像。延續上述實施例,K等於4,且門檻n等於2。 Step S501: Acquire n confidential images from K confidential images. Continuing with the above embodiment, K is equal to 4 and the threshold n is equal to 2.

步驟S502:將加密端的所產生的一亂數影像中的每一個像素,與上述n個機密影像的每一個像素一一對應的進行一邏輯還原反運算,以獲得n個加密影像,其中,該亂數影像的大小與上述n個機密影像的大小相同。 Step S502: Perform a logical reduction inverse operation on each pixel of the random image generated by the encryption end in a one-to-one correspondence with each pixel of the n confidential images to obtain n encrypted images, where The size of the random number image is the same as the size of the above n confidential images.

D1=R1♁K0 D1=R1♁K0

D2=R2♁K0 D2=R2♁K0

D3=R3♁K0 D3=R3♁K0

D4=R4♁K0 D4=R4♁K0

步驟S503:從上述4個機密影像取出4個Q1~Q4。 Step S503: Four Q1~Q4 are taken out from the above four confidential images.

步驟S504:將上述2個加密影像的每一個像素代入S(X),將上述2個加密影像對應的特定數字Q1~Q4代入X,獲得每一個像素所對應的2個聯立方程式。舉例來說,接收端取得第1與第3機密影像,則可以藉由解以下聯立方程式:PD1[i,j]=M+S1×Q1 Step S504: Substituting each of the two encrypted images into S(X), and substituting the specific numbers Q1 to Q4 corresponding to the two encrypted images into X, and obtaining two simultaneous equations corresponding to each pixel. For example, if the receiving end obtains the first and third confidential images, the following equation can be solved: PD1[i,j]=M+S1×Q1

PD3[i,j]=M+S1×Q3 PD3[i,j]=M+S1×Q3

解出M就可以獲得原始影像的像素P[i,j]。其中,PD1[i,j]表示第一加密影像D1的第[i,j]座標的像素值, PD3[i,j]表示第三加密影像D3的第[i,j]座標的像素值。 The M pixel P[i,j] of the original image can be obtained by solving M. Wherein, PD1[i,j] represents a pixel value of the [i,j]th coordinate of the first encrypted image D1, PD3[i,j] represents the pixel value of the [i,j]th coordinate of the third encrypted image D3.

又,假設門檻值提高,加密影像數目太多,本發明的實施例可以藉由使用Largrange內差法解出M的根,以加速解碼速度。另外,為了讓資料處理更加簡化,上述數學式可以修改如下:S(X)=(M+S 1 X+S 2 X 2+..+S n-1 X n-1)mod p Further, assuming that the threshold value is increased and the number of encrypted images is too large, the embodiment of the present invention can solve the decoding speed by solving the root of M by using the Largrange internal difference method. In addition, in order to make the data processing more simplified, the above mathematical formula can be modified as follows: S ( X )=( M + S 1 X + S 2 X 2 +..+ S n -1 X n -1 ) mod p

其中,mod是取餘數運算。上述p必須是質數。本發明將p值設定成257,除餘後得到256時亦存成255,在解碼時再利用像素鄰居相似(correlation)的原理對這兩種解分別計算,與鄰居像素較相似的選取為還原值,這在影像分享是個創舉。 Among them, mod is the remainder operation. The above p must be a prime number. The present invention sets the p value to 257, and saves 255 when it is 256. In the decoding, the two solutions are separately calculated by the principle of pixel neighbor correlation, and the similar selection with the neighbor pixel is restored. Value, this is a pioneering work in image sharing.

以下,申請人對本發明進行以下實驗,申請人利用灰階影像作實驗。 Hereinafter, the applicant conducted the following experiment on the present invention, and the applicant used the gray scale image as an experiment.

〔實驗結果〕 [Experimental results]

我們使用一張大小為512×512的BMP格式灰階影像Lena作為秘密影像,見圖7(a)所示。在影像分享階段,我們使用的是(2,4)的門檻機制,依序輸入p值23,137,191,251來產生分享影像。 We use a BMP format grayscale image Lena of size 512×512 as a secret image, as shown in Figure 7(a). In the image sharing phase, we use the threshold mechanism of (2, 4) to sequentially input p values of 23, 137, 191, 251 to generate shared images.

當p值為23的情況下,產生的4張分享影像如圖6,我們以任意兩張分享影像所建構出來的秘密影像601。由秘密影像6(f)可以發現,當輸入p值為23時所建構出來的 還原影像幾乎是呈現全黑的狀態,要辨識出秘密影像內的圖形訊息十分困難。換句話說,p值過小,聯立方程式的解的可能性過多,造成解碼錯誤。 When the p value is 23, the resulting four shared images are as shown in Fig. 6. We use the secret image 601 constructed by any two shared images. It can be found from the secret image 6(f) that it is constructed when the input p value is 23. The restored image is almost completely black, and it is very difficult to recognize the graphic information in the secret image. In other words, the p-value is too small, and the probability of the solution of the simultaneous equation is too much, causing a decoding error.

當p值為137時,產生的4張分享影像如圖7(b)~(e),我們以任意兩張分享影像所建構出來的秘密影像如圖7(f)。由圖7(f)可以發現,當輸入p值為137時所建構出來的還原影像雖然可以透過視覺來辨識出秘密影像訊息,但可以發現所建構出的還原影像品質有惡化的情況。 When the p value is 137, the resulting four shared images are shown in Fig. 7(b)~(e), and the secret image constructed by any two shared images is shown in Fig. 7(f). It can be seen from Fig. 7(f) that although the restored image constructed by inputting the p value of 137 can visually recognize the secret image information, it can be found that the quality of the reconstructed image constructed is deteriorated.

當p值為191時,產生的4張分享影像如圖8(b)~(e),我們以任意兩張分享影像所建構出來的秘密影像如圖8(f)。由圖8(f)可以發現,當輸入p值為191時所建構出來的還原影像近乎與秘密影像相同,只有圖中某些細節略為失真。由此可知,p值增加,已經減少了聯立方程式的解的可能性,解碼錯誤也變少。 When the p value is 191, the resulting four shared images are shown in Fig. 8(b)~(e). The secret image constructed by any two shared images is shown in Fig. 8(f). It can be seen from Fig. 8(f) that the reconstructed image constructed when the input p value is 191 is almost the same as the secret image, and only some details in the figure are slightly distorted. It can be seen that the increase in the p value has reduced the possibility of the solution of the simultaneous equation, and the decoding error is also reduced.

當p值為251時,產生的4張分享影像如圖9(b)~(e),我們以任意兩張分享影像所建構出來的秘密影像如圖9(f)。由圖9(f)可以發現,當輸入p值為251時所建構出來的還原影像可清楚地透過視覺辨識影像內秘密訊息,透過數位偵測方式擷取圖9(a)和圖9(f)進行像素比對,我們設計的編解碼方法當p值為251的情況下為無失真的建構出秘密影像。由此實驗結果,p值在251的情況下,聯立方程式可獲得唯一解,但在某些影像則需用257才能解出。 When the p value is 251, the resulting four shared images are shown in Fig. 9(b)~(e). The secret image constructed by any two shared images is shown in Fig. 9(f). It can be seen from Fig. 9(f) that the reconstructed image constructed when the input p value is 251 can clearly visually identify the secret information in the image, and captures the image by means of digital detection. Figure 9(a) and Fig. 9(f) For pixel comparison, we designed the codec method to construct a secret image without distortion when the p value is 251. From this experimental result, in the case of a p value of 251, the simultaneous equation can obtain a unique solution, but in some images, 257 can be solved.

表1為本發明實施例與先前技術之執行效能比較,在相同的輸入條件下,由先前技術中所提之方法執行編解碼 總需時為3639ms,本文所提之編解碼方法總需時為2319.09ms,總需時約節省了36.27%。經由實驗結果顯示,運算量獲得明顯的改善。 Table 1 compares the performance of the embodiment of the present invention with the performance of the prior art, and performs codec by the method proposed in the prior art under the same input conditions. The total time required is 3639ms. The total codec method mentioned in this paper is 2319.09ms, and the total time is about 36.27%. The experimental results show that the amount of calculation is significantly improved.

綜上所述,資通安全技術是項炙手可熱的研究議題,該如何有效保護機密資料成了現在各領域爭相研究的目標。近年來,伴隨著網路技術的成長,筆記型電腦、智慧型手機或平板電腦皆大量以網路當媒介讓使用者之間能夠方便的來分享資訊。然而這些方便人們使用的電子產品中須注意到的是資訊安全的問題,該如何有效的保護機密資料受攔截時不被讀取或修改,許多學者都致力於這領域中研究進一步的保護措施。本文設計了一種快速分享影像機制,利用公式 s(x)=(M+S 1 X+S 2 X+..+S n-1 X n-1) In summary, the safety technology of Zitong is a hot topic of research. How to effectively protect confidential information has become the goal of research in various fields. In recent years, along with the growth of network technology, notebook computers, smart phones, or tablets have been widely used by the Internet as a medium to allow users to share information conveniently. However, these electronic products that are convenient for people should pay attention to the problem of information security. How to effectively protect confidential information from being intercepted or modified when intercepted, many scholars are committed to researching further protection measures in this field. This paper designs a fast sharing image mechanism using the formula s ( x )=( M + S 1 X + S 2 X +..+ S n -1 X n -1 )

導出快速解,使得解碼能快速有效。這個方法並經亂數打散原始影像再將機密訊息分散存放,不但保有機密資料安全性,更能有效的避免資料被攔截時的干擾,並且以較佳的編解碼速度來節省系統的資源,使得行動裝置能夠發揮更大的工作效益。 Export fast solutions to make decoding fast and efficient. This method also scattered the original image and scattered the confidential information, which not only preserves the security of the confidential data, but also effectively avoids interference when the data is intercepted, and saves system resources with better encoding and decoding speed. Enable mobile devices to achieve greater work efficiency.

在較佳實施例之詳細說明中所提出之具體實施例僅用以方便說明本發明之技術內容,而非將本發明狹義地限制於上述實施例,在不超出本發明之精神及以下申請專利範圍之情況,所做之種種變化實施,皆屬於本發明之範圍。因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 The specific embodiments of the present invention are intended to be illustrative only and not to limit the invention to the above embodiments, without departing from the spirit of the invention and the following claims. The scope of the invention and the various changes made are within the scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

S401~S405‧‧‧本發明實施例的數位影像加密方法的流程步驟 S401~S405‧‧‧ Flow steps of the digital image encryption method in the embodiment of the present invention

S401~S405‧‧‧本發明實施例的數位影像解密方法的流程步驟 S401~S405‧‧‧ Flow steps of the digital image decryption method in the embodiment of the present invention

圖1繪示為先前技術的影像分享的示意圖。 FIG. 1 is a schematic diagram of image sharing in the prior art.

圖2繪示了先前技術的編碼簿的示意圖。 2 is a schematic diagram of a prior art codebook.

圖3繪示了利用圖2先前技術的編碼簿所構成的分享影像與重疊後的解碼影像。 FIG. 3 illustrates a shared image and an overlapped decoded image formed by using the codebook of the prior art of FIG. 2.

圖4繪示為本發明實施例的數位影像加密方法的流程圖。 4 is a flow chart of a digital image encryption method according to an embodiment of the present invention.

圖5繪示為本發明實施例的數位影像解密方法的流程圖。 FIG. 5 is a flowchart of a method for decrypting a digital image according to an embodiment of the present invention.

圖6繪示為本發明實施例,當p值為23的情況下,的實驗結果。 FIG. 6 is a diagram showing experimental results when the p value is 23 according to an embodiment of the present invention.

圖7繪示為本發明實施例,當p值為137的情況下,的實驗結果。 FIG. 7 is a diagram showing experimental results when the p value is 137 according to an embodiment of the present invention.

圖8繪示為本發明實施例,當p值為191的情況下,的實驗結果。 FIG. 8 is a diagram showing experimental results when the p value is 191 according to an embodiment of the present invention.

圖9繪示為本發明實施例,當p值為251的情況下,的實驗結果。 FIG. 9 is a diagram showing experimental results when the p value is 251 according to an embodiment of the present invention.

S401~S405‧‧‧本發明實施例的本發明實施例的數位影像加密方法的步驟 S401~S405‧‧‧ steps of the digital image encryption method of the embodiment of the present invention

Claims (9)

一種數位影像加密方法,用以將一數位影像分割為K個機密影像,其中,當取得其中至少n個加密影像後,可藉由一數位影像解密方法還原該數位影像,此數位影像加密方法包括:提供一加密運算數學式,其中,該加密運算數學式如下,S(X)=(M+S 1 X+S 2 X 2+..+S n-1 X n-1)其中,S1、S2...Sn-1為隨機產生數,其中,當n等於2時,該加密運算數學式為,S(X)=(M+S 1 X)當n等於3時,該加密運算數學式為,S(X)=(M+S 1 X+S 2 X 2);產生K組特定數字Q1~QK,將該數位影像的每一個像素值代入該加密運算數學式的M,並且將上述特定數字Q1~QK代入該加密運算數學式的X,以產生K個加密影像;產生一亂數影像,其中,該亂數影像與該數位影像的 大小相同,且該亂數影像的像素值為隨機產生;以及將上述K個加密影像一一與該亂數影像進行具有一邏輯還原反運算的一邏輯運算,以產生K個機密影像。 A digital image encryption method for dividing a digital image into K confidential images, wherein after obtaining at least n encrypted images, the digital image can be restored by a digital image decryption method, and the digital image encryption method includes Providing an encryption operation mathematical expression, wherein the encryption operation mathematical expression is as follows, S ( X )=( M + S 1 X + S 2 X 2 +..+ S n -1 X n -1 ) wherein, S 1 , S 2 ... S n-1 are randomly generated numbers, wherein when n is equal to 2, the encryption operation mathematical expression is, S ( X )=( M + S 1 X ), when n is equal to 3, the encryption The mathematical expression is: S ( X )=( M + S 1 X + S 2 X 2 ); generating K sets of specific numbers Q1~QK, and substituting each pixel value of the digital image into the M of the encryption operation mathematical expression, And substituting the specific numbers Q1~QK into the X of the encryption operation mathematical expression to generate K encrypted images; generating a random number image, wherein the random number image is the same size as the digital image, and the random number image is a pixel value is randomly generated; and one of the K encrypted images and the random number image are subjected to a logical reduction inverse operation Logical operations to generate K confidential images. 如申請專利範圍第1項所記載之數位影像加密方法,其中,該邏輯運算包括:一互斥或運算。 The digital image encryption method as claimed in claim 1, wherein the logical operation comprises: a mutually exclusive OR operation. 如申請專利範圍第2項所記載之數位影像加密方法,其中,該邏輯還原反運算包括:一互斥或運算。 The digital image encryption method as described in claim 2, wherein the logical reduction inverse operation comprises: a mutual exclusion or operation. 如申請專利範圍第1項所記載之數位影像加密方法,更包括:將特定數字Q1~QK分別存入K個機密影像的空白欄位。 For example, the digital image encryption method described in the first aspect of the patent application includes: storing the specific numbers Q1~QK into the blank fields of the K confidential images. 如申請專利範圍第1項所記載之數位影像加密方法,其中,該加密運算數學式更包括:S(X)=(M+S 1 X+S 2 X 2+..+S n-1 X n-1)mod p其中,p為一特定質數,mod為餘數運算,且該數位影像加密方法更包括: 將特定數字Q1~QK以及該特定質數p分別存入K個機密影像的空白欄位。 The digital image encryption method as claimed in claim 1, wherein the encryption operation mathematical expression further comprises: S ( X )=( M + S 1 X + S 2 X 2 +..+ S n -1 X n -1 ) mod p, where p is a specific prime number and mod is a remainder operation, and the digital image encryption method further comprises: storing the specific number Q1~QK and the specific prime number p into the blank fields of the K confidential images respectively . 一種數位影像解密方法,用以獲得一還原數位影像,此數位影像解密方法包括:從K個機密影像取得n個機密影像;將加密端的所產生的一亂數影像中的每一個像素,與上述n個機密影像的每一個像素一一對應的進行一邏輯還原反運算,以獲得n個加密影像,其中,該亂數影像的大小與上述n個機密影像的大小相同;從上述n個機密影像取出N個Q1~QN;提供一加密運算數學式,其中,該加密運算數學式如下,S(X)=(M+S 1 X+S 2 X 2+..+S n-1 X n-1)將上述n個加密影像的每一個像素代入S(X),將上述n個加密影像對應的特定數字Q1~QN代入X,獲得每一個像素所對應的N個聯立方程式;以及進行解聯立方程式的變數M以獲得該還原數位影像的每個像素。 A digital image decryption method for obtaining a restored digital image, the digital image decryption method comprising: obtaining n confidential images from K confidential images; and each pixel in a random image generated by the encrypted end, Each of the n confidential images is subjected to a logical reduction inverse operation in a one-to-one correspondence to obtain n encrypted images, wherein the size of the random number image is the same as the size of the n confidential images; and the n confidential images are Extracting N Q1~QNs; providing an encryption operation mathematical expression, wherein the encryption operation mathematical expression is as follows, S ( X )=( M + S 1 X + S 2 X 2 +..+ S n -1 X n - 1 ) Substituting each of the n encrypted images into S(X), substituting the specific numbers Q1~QN corresponding to the n encrypted images into X, obtaining N simultaneous equations corresponding to each pixel; The variable M of the equation obtains each pixel of the reduced digital image. 如申請專利範圍第6項所記載之數位影像解密方法,其中,該邏輯還原反運算包括: 一互斥或運算。 The digital image decryption method as described in claim 6 , wherein the logical reduction inverse operation comprises: A mutually exclusive or arithmetic operation. 如申請專利範圍第6項所記載之數位影像解密方法,更包括:將Q1到QK分別存入K個機密影像的空白欄位。 The digital image decryption method described in claim 6 of the patent application further includes: storing Q1 to QK into blank fields of K confidential images. 如申請專利範圍第6項所記載之數位影像解密方法,其中,該加密運算數學式更包括:S(X)=(M+S 1 X+S 2 X 2+..+S n-1 X n-1)mod p其中,p為一特定質數,mod為餘數運算,且該數位影像解密方法更包括:從上述n個機密影像取出N個Q1~QN以及該特定質數p。 The digital image decryption method according to claim 6, wherein the encryption operation mathematical expression further comprises: S ( X )=( M + S 1 X + S 2 X 2 +..+ S n -1 X n -1 ) mod p, where p is a specific prime number and mod is a remainder operation, and the digital image decryption method further comprises: extracting N Q1~QN and the specific prime number p from the n confidential images.
TW101146795A 2012-12-12 2012-12-12 Methods for encoding and decoding to digital image TW201424364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101146795A TW201424364A (en) 2012-12-12 2012-12-12 Methods for encoding and decoding to digital image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101146795A TW201424364A (en) 2012-12-12 2012-12-12 Methods for encoding and decoding to digital image

Publications (1)

Publication Number Publication Date
TW201424364A true TW201424364A (en) 2014-06-16

Family

ID=51394242

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101146795A TW201424364A (en) 2012-12-12 2012-12-12 Methods for encoding and decoding to digital image

Country Status (1)

Country Link
TW (1) TW201424364A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339975A (en) * 2016-10-10 2017-01-18 中科院成都信息技术股份有限公司 Digital image secret sharing method, restoration method and devices

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339975A (en) * 2016-10-10 2017-01-18 中科院成都信息技术股份有限公司 Digital image secret sharing method, restoration method and devices

Similar Documents

Publication Publication Date Title
Aljazaery et al. Encryption of Color Image Based on DNA Strand and Exponential Factor.
Gao et al. EFR-CSTP: Encryption for face recognition based on the chaos and semi-tensor product theory
Juneja et al. An improved LSB based Steganography with enhanced Security and Embedding/Extraction
Ping et al. An image scrambling algorithm using discrete Henon map
Chen Image sharing method for gray-level images
CN103440613A (en) Color-image encryption method for hyperchaotic Rossler system
CN109547663B (en) Improved LSB image steganography method combined with cryptography
Farschi et al. A novel chaotic approach for information hiding in image
Soleymani et al. A survey on principal aspects of secure image transmission
CN114157772B (en) Digital image encryption method based on space-time chaotic system and half tensor product compressed sensing
Rehman et al. Securing medical information transmission between IoT devices: An innovative hybrid encryption scheme based on quantum walk, DNA encoding, and chaos
Wang et al. Image encryption method based on chaotic map
Nair et al. An Improvement to 2DLSCM Encryption Scheme
Gao et al. Design, hardware implementation, and application in video encryption of the 2D memristive cubic map
Mehmood et al. Advances and Vulnerabilities in Modern Cryptographic Techniques: A Comprehensive Survey on Cybersecurity in the Domain of Machine/Deep Learning and Quantum Techniques
Al-Kadei Robust video data security using hybrid cryptography-steganography technique
Kataria et al. Exploring Advanced Encryption and Steganography Techniques for Image Security
TW201424364A (en) Methods for encoding and decoding to digital image
Abhinav et al. An improved reversible data hiding on encrypted images by selective pixel flipping technique
Kaur et al. XOR-EDGE based video steganography and testing against chi-square steganalysis
CN111400731B (en) Quantum image encryption method based on DNACNot
Gunasekaran et al. Encrypting and decrypting image using computer visualization techniques
Saini et al. BEMSS-Blockwise Encryption based Multi Secret Sharing scheme for Securing Visual Content
TW201506662A (en) Methods for encoding and decoding to digital image
TWM463886U (en) Devices for encoding and decoding to digital image