TWI448133B - Method of cryptographic communications by using sand-texture images - Google Patents

Method of cryptographic communications by using sand-texture images Download PDF

Info

Publication number
TWI448133B
TWI448133B TW100129904A TW100129904A TWI448133B TW I448133 B TWI448133 B TW I448133B TW 100129904 A TW100129904 A TW 100129904A TW 100129904 A TW100129904 A TW 100129904A TW I448133 B TWI448133 B TW I448133B
Authority
TW
Taiwan
Prior art keywords
image
sand
periodic table
value
shift
Prior art date
Application number
TW100129904A
Other languages
Chinese (zh)
Other versions
TW201310956A (en
Inventor
Chiou Haun Lee
Original Assignee
Chiou Haun Lee
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 Chiou Haun Lee filed Critical Chiou Haun Lee
Priority to TW100129904A priority Critical patent/TWI448133B/en
Publication of TW201310956A publication Critical patent/TW201310956A/en
Application granted granted Critical
Publication of TWI448133B publication Critical patent/TWI448133B/en

Links

Description

使用沙紋圖像通訊之加解密方法Sandy image communication encryption and decryption method

本發明屬於一種使用沙紋圖像通訊之加解密方法。更具體地說,本發明選取一背景圖像,以一週期表與一移位表對應出兩個沙紋圖像,使得一沙紋圖像輸入一明文圖像,即能形成一密文圖像,並在另一沙紋圖像輸入該密文圖像,即可顯示該明文圖像與該背景圖像。The invention belongs to a method for encrypting and decrypting using sand image communication. More specifically, the present invention selects a background image, and a two-grain image is associated with a shift table by a periodic table, so that a sand image is input into a plain image, that is, a ciphertext map can be formed. For example, and inputting the ciphertext image in another sand image, the plain image and the background image can be displayed.

申請人現在所申請的專利案是參考先前的發明申請:“多層擴散串流加解密方法與配置”,申請案號99112624(以下簡稱參考案),民國99年4月22日提交,該參考案以一複數個擴散函數A F(p 1 ,p 2 ,...p k )形成一最大限度的循環週期,其對應的複數個位置 分別為p 1 ,p 2 ,...p k The patent application filed by the applicant is referred to the previous invention application: "Multilayer diffusion stream encryption and decryption method and configuration", application No. 99112624 (hereinafter referred to as the reference case), submitted on April 22, 1999, the reference case A maximum number of cycles is formed by a plurality of diffusion functions A F( p 1 , p 2 , ... p k ), and the corresponding plurality of positions are p 1 , p 2 , ... p k , respectively .

本發明以參考案的擴散函數產生週期表與移位表,並以週期表的數值分布與移位表的移位值產生沙紋圖像;相對地,早期沙紋圖像應用於視覺密碼,強調利用視覺效果,以半色調方式,將一圖片拆解成兩個沙紋圖片,其以視覺效果的技術導向,實有別於本發明案。The invention generates a periodic table and a shift table by using the diffusion function of the reference case, and generates a sand image by using the numerical distribution of the periodic table and the shift value of the shift table; in contrast, the early sand image is applied to the visual password, Emphasis on the use of visual effects, in a halftone way, the image is disassembled into two sand-grained pictures, which are guided by the visual effect technology, which is different from the present invention.

本發明應用於沙紋圖像的通訊,其以最大限度的循環週期,產生n 位元所有數值(排除0)的週期表,並產生適用於任何週期表的移位表,以該移位表的至少一移位值,使得一背景圖像能對應出兩個沙紋圖像;在一沙紋圖像輸入一明文圖像,即能形成一密文圖像,在另一沙紋圖像輸入該密文圖像,即能顯示該明文圖像與該背景圖像,其加解密的步驟如下:The invention is applied to the communication of sand image, which generates a periodic table of all values (excluding 0) of n bits in a maximum cycle period, and generates a shift table suitable for any periodic table, with the shift table At least one shift value, such that a background image can correspond to two sand image; when a plain image is input to a sand image, a ciphertext image can be formed, and another sand image is formed. Entering the ciphertext image, the plaintext image and the background image can be displayed, and the steps of encrypting and decrypting are as follows:

(A)產生沙紋圖像im 1與im 2:(A) Produce a sand image im 1 and im 2:

(a)選擇一背景圖像im ,一週期表Tp ,一移位表Ts(a) selecting a background image im , a periodic table Tp , a shift table Ts ;

(b)取Ts 的至少一移位值Ts (i * ),在Tp 找到對應imim 1與im 2;(b) taking at least a shift value Ts Ts (i *), found in the corresponding Tp im im to im. 1 and 2;

(B)取得一密文圖像ime(B) Obtain a ciphertext image ime :

(a)輸入一明文,該明文轉換為一圖像imx(a) input a plain text, the plaintext is converted into an image imx ;

(b)執行位元XOR的加密運算,ime =imxim 1;(b) Perform the encryption operation of the bit XOR, ime = imxim 1;

(C)顯示該明文與背景圖像imd(C) displaying the plaintext and the background image imd ;

(a)輸入該密文ime(a) input the ciphertext ime ;

(b)執行位元XOR的解密運算,imd =imeim 2。(b) Perform the decryption operation of the bit XOR, imd = imeim 2.

第一圖顯示本發明的流程示意圖,其包括步驟如下:啟動一傳送端10a 與一接收端10b 的通訊;該傳送端產生一沙紋圖像20a ,該接收端產生一配對沙紋圖像20b ;該傳送端輸入一明文圖像30a ,該明文圖像與該沙紋圖像執行位元XOR產生一密文圖像40a ;該接收端接收該傳送端的該密文圖像30b ,並且,該密文圖像與該配對沙紋圖像執行位元XOR顯示該明文圖像40bThe first figure shows a schematic flow diagram of the present invention, which includes the steps of: initiating communication between a transmitting end 10a and a receiving end 10b ; the transmitting end generates a sand image 20a , and the receiving end generates a paired sand image 20b The transmitting end inputs a plaintext image 30a , and the plaintext image and the sandographic image performing bit XOR generate a ciphertext image 40a ; the receiving end receives the ciphertext image 30b of the transmitting end, and the The ciphertext image and the paired shading image execution bit XOR display the plaintext image 40b .

再者,從第一圖40b 所顯示明文的背景圖像,其經由選擇一週期表與移位表的至少一移位值,找出該背景圖像的對應數值,亦即分解成傳送端的沙紋圖像密碼20a ,與接收端的沙紋圖像配對密碼20b ;因此,雙方圖像密碼的產生,可經由第三方製作,再分別送至雙方,或者,由雙方約定其背景圖像、週期表、移位值,再各自產生。Furthermore, from the background image of the plain text displayed in the first FIG. 40b , the corresponding value of the background image is found by selecting at least one shift value of the periodic table and the shift table, that is, the sand is decomposed into the transmitting end. The image password 20a is paired with the sand image of the receiving end with the password 20b ; therefore, the generation of the image passwords of both parties can be produced by the third party and then sent to both parties respectively, or the background image and periodic table are agreed by both parties. The shift values are generated separately.

符號與定義:Symbols and definitions: 依據參考案第5頁所述:According to page 5 of the reference:

● A :一擴散區域,該A 包含一初始值A 0 ,並且,為一d 1 ×d 2 ×…×d m m 維度位元矩陣,其位置標示由1至n ,其位元值由a 1a n A : a diffusion region, the A contains an initial value A 0 , and is an m- dimensional bit matrix of d 1 × d 2 ×...× d m whose position is indicated by 1 to n , and its bit value is a 1 to a n .

● A F(p 1 ,p 2 ,…,p k ):該A 執行一複數個擴散函數F(p 1 ,p 2 ,…,p k ),其指定的位置分別依序為p 1 ,p 2 ,…,p k A F( p 1 , p 2 ,..., p k ): This A performs a complex number of diffusion functions F( p 1 , p 2 ,..., p k ) whose specified positions are respectively p 1 , p 2 ,..., p k .

● :該A執行一擴散機制,即的縮寫,表示重複執行t 1 次的F(p 1 ,p 2 ,…,p k )。 : The A performs a diffusion mechanism , which is Abbreviation, which means that F( p 1 , p 2 ,..., p k ) is repeatedly executed t 1 times.

本案另增如下:The case is added as follows:

● Tp :一週期表(period table),該Tp =[A ,A F1 ,A F2 ,A F3 ,…,]。Tp : a period table, the Tp = [ A , A F 1 , A F 2 , A F 3 ,..., ].

● Tp (i ):Tpi 個位置的值,如Tp (3)=A F2 Tp (i): Tp value of the i th position, such as Tp (3) = A F 2 .

● Tp i Tp 移動i 位的週期表,如Tp 1 =[,A ,A F1 ,A F2 ,…,]。Tp i : Tp moves the periodic table of i bits, such as Tp 1 =[ , A , A F 1 , A F 2 ,..., ].

● Tp < k >Tp < k > =TpTp k ;兩週期表內,同位置的數值執行位元XOR。Tp < k > : Tp < k > = TpTp k ; In the two periodic tables, the value of the same position performs the bit XOR.

● Ts :一移位表(shift table),該Ts =[<1>,<2>,<3>,…,<2 n -2>]。Ts : a shift table, which is Ts = [<1>, <2>, <3>, ..., <2 n -2>].

● Ts (i ):Tsi 個位置的值,如Ts (3)=<3>。 Ts (i): Ts value of the i-th position as Ts (3) = <3> .

週期表製作:Periodic table production:

本案的週期表會包含所有數值(排除0),即2 n -1個數值;假設A 為1x5位元矩陣,執行F(1,3,4,2,5),當A 值為15(即[01111]),再以參考案第5頁下方作法,A F1 輸出值為4(即[00100]),演算如下:The periodic table of this case will contain all the values (excluding 0), that is, 2 n -1 values; assuming A is a 1x5-bit matrix, F(1,3,4,2,5) is executed, and when the A value is 15 (ie [01111]), and then on the fifth page of the reference case, the output value of A F 1 is 4 (ie [00100]), and the calculation is as follows:

A 0 F(p )=A 0A 0 y p S ;(assume S =0) A 0 F( p )= A 0A 0 y p S ; ( assume S =0)

A 0 F(1)=[01111]⊕[00111]=[01000]; A 0 F(1)=[01111]⊕[00111]=[01000];

A 0 F(1,3)=[01000]⊕[10000]=[11000]; A 0 F(1,3)=[01000]⊕[10000]=[11000];

A 0 F(1,3,4)=[11000⊕[10000]=[01000]; A 0 F(1,3,4)=[11000⊕[10000]=[01000];

A 0 F(1,3,4,2)=[01000]⊕[10100]=[11100]; A 0 F(1,3,4,2)=[01000]⊕[10100]=[11100];

A 0 F(1,3,2,4,5)=[11100]]⊕[11000]=[00100]; A 0 F(1,3,2,4,5)=[11100]]⊕[11000]=[00100];

依上述演算,令A 初值為1,再以F(1,3,4,2,5)機制的週期表,其所有數值排列為[1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7,22];同樣地,以F(5,3,2,4,1)機制的週期表,其所有數值排列為[1,5,22,2,9,3,12,21,14,28,13,16,24,30,4,19,20,11,10,15,25,27,18,17,29,8,6,26,23,7,31]。再者,以F(1,5,3,2,4),F(5,1,3,4,2),F(2,4,1,5,3),F(4,2,5,1,3),F(2,5,1,3,4),F(4,1,5,3,2),F(3,2,4,1,5),F(4,1,5,3,2),均可得到所有數值的週期表。According to the above calculation, let the initial value of A be 1, and then the periodic table of F(1,3,4,2,5) mechanism, all the values are arranged as [1,3,15,4,25,5,26, 10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7,22]; same Ground, with the periodic table of F(5,3,2,4,1) mechanism, all the values are arranged as [1,5,22,2,9,3,12,21,14,28,13,16, 24,30,4,19,20,11,10,15,25,27,18,17,29,8,6,26,23,7,31]. Furthermore, with F(1,5,3,2,4), F(5,1,3,4,2), F(2,4,1,5,3), F(4,2,5 ,1,3),F(2,5,1,3,4), F(4,1,5,3,2), F(3,2,4,1,5),F(4,1 , 5, 3, 2), can get a periodic table of all values.

一週期表Tp 製作的流程,如第三圖所示,其包括以下步驟:The process of making a periodic table Tp , as shown in the third figure, includes the following steps:

1. 選擇一擴散區域A ,一擴散機制;1. Select a diffusion region A , a diffusion mechanism ;

2. 設定A 的初始值A 0 ;2. A A sets the initial value of 0;

3. 設定一變數t 2 =1;3. Set a variable t 2 =1;

4. 執行,取得A 的新值;4. Execution Achieved A new value ;

5. 依序儲存A 值至該週期表;5. Store the A value in order to the periodic table;

6. t 2 =t 2 +1,若t 2 <2 n ,回至第4步驟。6. t 2 = t 2 +1, if t 2 < 2 n , go back to step 4.

移位表製作:Shift table production:

本案的移位表適用於任一週期表(Tp ),其會將週期表內任一數值對應成兩個數值,即背景圖像分解成兩個沙紋圖像;在移位表的製作,可選擇一週期表,假設A 為1x5位元矩陣,F(1,3,4,2,5)的週期表,導出如下:The shift table of this case is applicable to any periodic table ( Tp ), which will correspond any value in the periodic table to two values, that is, the background image is decomposed into two sand images; in the production of the shift table, A periodic table can be selected. Assuming that A is a 1x5-bit matrix, the periodic table of F(1,3,4,2,5) is derived as follows:

Tp =[1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7,22] Tp = [1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8 ,18,24,6,21,14,7,22]

Tp 1 =[22,1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7] Tp 1 = [22,1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20, 13,8,18,24,6,21,14,7]

Tp <1> =TpTp 1 Tp <1> = TpTp 1

=[23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7,22,1,3,15,4,25,5,26,10,30,19,27,9,17]=[23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7,22,1,3,15,4,25,5, 26,10,30,19,27,9,17]

由以上的推導結果,可得知Tp <1> =TpTp 1 =Tp 18 ,即該週期表移動18個位置,因此,導出該移位表Ts (1)=<1>=18;以此類推,From the above derivation results, it can be known that Tp <1> = TpTp 1 = Tp 18 , that is, the periodic table moves 18 positions, therefore, the shift table Ts (1)=<1>=18 is derived; Such a push,

Tp =[1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7,22] Tp = [1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8 ,18,24,6,21,14,7,22]

Tp 2 =[7,22,1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14] Tp 2 =[7,22,1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16, 20,13,8,18,24,6,21,14]

Tp <1> =TpTp 1 Tp <1> = TpTp 1

=[6,21,14,7,22,1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24]=[6,21,14,7,22,1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28, 31,16,20,13,8,18,24]

該週期表移動5個位置,得出Tp <2> =TpTp 2 =Tp 5Ts (2)=<2>=5;最後,導出Ts =[18,5,29,10,2,27,22,20,16,4,19,23,14,13,24,9,30,1,11,8,25,7,12,15,21,28,6,26,3,17]。The periodic table moves 5 positions, and it is found that Tp <2> = TpTp 2 = Tp 5 , Ts (2) = <2> = 5; finally, derive Ts = [18, 5, 29, 10, 2, 27,22,20,16,4,19,23,14,13,24,9,30,1,11,8,25,7,12,15,21,28,6,26,3,17] .

一移位表Ts 製作的流程,如第四圖所示,其包括以下步驟:The flow of a shift table Ts , as shown in the fourth figure, includes the following steps:

1. 選擇一週期表Tp1. Select a periodic table Tp ;

2. 設定一變數k =1;2. Set a variable k =1;

3. 找到Tp <k> =TpTp k ,取得<k >值;3. Find Tp <k> = TpTp k and get the < k >value;

4. 依序儲存<k >值至該移位表;4. Store the < k > value in sequence to the shift table;

5. k =k +1,若k <2 n -1,回至第3步驟。5. k = k +1, if k < 2 n -1, go back to step 3.

沙紋圖象製作:Sand grain image production:

應用一背景圖像(im )、一週期表(Tp )及移位表(Ts ),可簡易地分解成兩個沙紋圖像,其中,一沙紋圖像(im 1)採用Ts (i ),則一配對沙紋圖像(im 2)須用Ts (2 n -1-i );假設以n =5位元的處理方式,舉例如下:Applying a background image ( im ), a periodic table ( Tp ), and a shift table ( Ts ), it can be easily decomposed into two sand images, where a sand image ( im 1 ) uses Ts ( i ) ), a paired sand image ( im 2) must use Ts (2 n -1- i ); assuming n = 5 bits processing, for example:

im =[6,6,7,25,25,25,10,11] Im =[6,6,7,25,25,25,10,11]

Ts =[18,5,29,10,2,27,22,20,16,4,19,23,14,13,24,9,30,1,11,8,25,7,12,15,21,28,6,26,3,17] Ts = [18,5,29,10,2,27,22,20,16,4,19,23,14,13,24,9,30,1,11,8,25,7,12,15 ,21,28,6,26,3,17]

Tp =[1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8,18,24,6,21,14,7,22] Tp = [1,3,15,4,25,5,26,10,30,19,27,9,17,23,2,12,11,29,28,31,16,20,13,8 ,18,24,6,21,14,7,22]

開始取出im (1)=im (2)=6,找到Tp (27)=6,取出27,設im 1採用Ts (3)=29,則im 2須用Ts (28)=26;在im 1的部分:(27+29) mod 31=25,Tp (25)=18,即im 1(1)=im 1(2)=18,在im 2的部分:(27+26) mod 31=22,Tp (22)=20,即im 2(1)=im 2(2)=20,其中,31表示2 n -1。Start to take im (1) = im (2) = 6, find Tp (27) = 6, remove 27, set im 1 with Ts (3) = 29, then im 2 must use Ts (28) = 26; in im Part of 1: (27+29) mod 31=25, Tp (25)=18, ie im 1(1)= im 1(2)=18, in the part of im 2: (27+26) mod 31= 22, Tp (22) = 20, that is, im 2 (1) = im 2 (2) = 20, where 31 represents 2 n -1.

依序地,取出im (3)=7,找到Tp (30)=7,取出30,在im 1的部分:(30+29) mod 31=28,Tp (28)=21,即im 1(3)=21,在im 2的部分:(30+26) mod 31=25,Tp (25)=18,即im 2(3)=18,最後,im 1=[18,18,21,15,15,15,5,2],im 2=[20,20,18,22,22,22,15,9],完成該背景圖像的拆解。In order, take im (3)=7, find Tp (30)=7, take out 30, in the part of im 1: (30+29) mod 31=28, Tp (28)=21, ie im 1( 3) = 21, in the part of im 2: (30 + 26) mod 31 = 25, Tp (25) = 18, ie im 2 (3) = 18, and finally, im 1 = [18, 18, 21, 15 , 15, 15, 5, 2], im 2 = [20, 20, 18, 22, 22, 22, 15, 9], complete the disassembly of the background image.

在安全性的考量上,更以至少一個Ts (i * )依序採用,設i * 從3至10,那麼,im 1依序採用的Ts (i * )為[29,10,2,27,22,20,16,4],而im 2依序採用的Ts (2 n -1-i * )為[26,6,28,21,15,12,7,25],當取出im (1)=6,im 1用Ts (3)=29,im 2用Ts (28)=26,如同上述,im 1(1)=18,im 2(1)=20;當取出im (2)=6,找到Tp (27)=6,取出27,im 1用Ts (4)=10,im 2用Ts (27)=6,在im 1的部分:(27+10) mod 31=6,Tp (6)=5,即im 1(2)=5,在im 2的部分:(27+6) mod 31=2,Tp (2)=3,即im 2(2)=3;依序取出im (i ),依序採用Ts (i ),得出im 1=[18,5,1,1,6,18,8,16],im 2=[20,3,6,24,31,11,2,27]。In terms of security considerations, the order of at least one Ts ( i * ) is adopted, and i * is from 3 to 10. Then, the im T 1 ( i * ) is [29, 10, 2, 27). , 22, 20, 16, 4], and the im T 2 (2 n -1- i * ) is [26,6,28,21,15,12,7,25], when the im ( 1) = 6, im 1 with Ts (3) = 29, im 2 with Ts (28) = 26, as above, im 1 (1) = 18, im 2 (1) = 20; when extracting im (2) =6, find Tp (27)=6, take 27, im 1 with Ts (4)=10, im 2 with Ts (27)=6, in im 1 part: (27+10) mod 31=6, Tp (6)=5, ie im 1(2)=5, in the part of im 2: (27+6) mod 31=2, Tp (2)=3, ie im 2(2)=3; Take im ( i ) and use Ts ( i ) in order to get im 1=[18,5,1,1,6,18,8,16], im 2=[20,3,6,24,31 , 11, 2, 27].

本案沙紋圖像製作的流程,如第二圖所示,其包括以下步驟:The flow of sand pattern production in this case, as shown in the second figure, includes the following steps:

1. 選擇一背景圖像im ,一週期表Tp ,一移位表Ts ;1. Select a background image im , a periodic table Tp , a shift table Ts ;

2. 設定至少一個Ts (i * ),其採用位置依序為i 1 ,i 2 ,…,i k 2. Set at least one Ts ( i * ), which is in the order of i 1 , i 2 ,..., i k ;

3. 設定一變數i =1;3. Set a variable i =1;

4. 找到Tp (p i )=im (i ),取得位置p i 4. Find Tp ( p i )= im ( i ) and get the position p i ;

5. 一沙紋圖像:im 1(i )=Tp (((p i +Ts (i * )) mod(2 n -1));5. A sand pattern image: im 1( i )= Tp ((( p i + Ts ( i * )) mod(2 n -1));

一配對沙紋圖像:im 2(i )=Tp (((p i +Ts (2 n -1-i * )) mod(2 n -1));A paired sand image: im 2( i )= Tp ((( p i + Ts (2 n -1- i * )) mod(2 n -1));

6. i =i +1,回至第4步驟,直到讀完im6. i = i +1, go back to step 4 until you finish reading im .

較佳實施例A:Preferred Embodiment A:

在電腦的圖像處理,無論是灰階或彩色的格式,均以位元組(byte)即8位元(bit)為基本單位,因此,該較佳實施例提出以8位元為處理單位,並且,列出第五圖至第七*圖的具體數值(由左而右,由上而下,依序排列),以提供習於該技藝者作為實際應用的參考。In the image processing of a computer, whether it is a grayscale or a color format, a byte is used as a basic unit. Therefore, the preferred embodiment proposes an 8-bit processing unit. And, the specific values of the fifth to seventh charts are listed (from left to right, top to bottom, in order) to provide a reference for the skilled person as a practical application.

首先,須製作一週期表Tp ,如第三圖所示,F1 =F(7,8,6,5,4,3,2,1)211A 0 =1212 ,再配合該流程圖及參閱週期表製作 的範例,即可得到該週期表Tp (第五圖);再者,製作一移位表Ts ,如第四圖所示,選擇一週期表(設第五圖)221 ,再配合該流程圖及參閱移位表製作 的範例,即可得到該移位表Ts (第六圖)。First, a periodic table Tp must be created. As shown in the third figure, F 1 =F(7,8,6,5,4,3,2,1) 211 , A 0 =1 212 , and then cooperate with the flow chart. And refer to the example of the periodic table production to obtain the periodic table Tp (fifth figure); further, create a shift table Ts , as shown in the fourth figure, select a periodic table (set the fifth figure) 221 , The shift table Ts (sixth figure) can be obtained by cooperating with the flowchart and the example of the shift table creation .

依據第二圖所示,選擇一週期表Tp 210 ,一移位表Ts 220 後,開始製作沙紋圖像;設輸入一47x149大小的背景圖像im 201 ,在第七A圖顯示im 在第11列,第1-128欄的8位元數值,接下來,設定Ts (i * )的i * 值從60至80,即Ts (i * )依序為[47,28,18,…,7,197]202According to the second figure, a periodic table Tp 210 is selected , and after a shift table Ts 220 , a sand grain image is started; a background image im 201 of 47×149 size is input, and im is displayed in the seventh figure A. 11 columns, the 8-bit value in column 1-128, next, set the i * value of Ts ( i * ) from 60 to 80, that is, Ts ( i * ) is sequentially [47, 28, 18, ..., 7,197] 202 .

當讀取第七A圖第1個位置,表示i =1491207im (11,1)=251,找到Tp (195)=251,p i =195204 ,在im 1(11,1)部分,推知Ts (i * )已循環使用至第71次的第21個位置Ts (80)=197,(195+197) mod 255=137,im 1(11,1)=Tp (137)=179205 ,其結果對應於第七B圖第1個位置;在im 2(11,1)部分,Ts (255-i * )依序為[242,222,211,…,183,117],取第21個位置Ts (175)=117,(195+117) mod 255=57,im 2(11,1)=Tp (57)=72206 ,其結果對應於第七C圖第1個位置。When reading the first position of the seventh A picture, it indicates that i = 1491 207 , im (11, 1) = 251, find Tp (195) = 251, p i = 195 204 , in the im 1 (11, 1) part , It is inferred that Ts ( i * ) has been recycled to the 21st position of the 71st time Ts (80) = 197, (195 + 197) mod 255 = 137, im 1 (11, 1) = Tp (137) = 179 205 , the result corresponds to the first position of the seventh B map; in the im 2 (11,1) part, Ts (255- i * ) is sequentially [242, 222, 211, ..., 183, 117], taking the 21st position Ts ( 175)=117, (195+117) mod 255=57, im 2(11,1)= Tp (57)=72 206 , and the result corresponds to the first position of the seventh C-picture.

最後,依據第一圖所示,傳送端產生一沙紋圖像im 120a ,接收端產生一配對沙紋圖像im 220b ;加密時,一明文圖像與im 1執行位元XOR,產生一密文圖像ime 40a ,在第七D圖顯示ime 在第11列,第1-128欄的8位元數值;解密時,im 2與ime 執行位元XOR,就可顯示該明文與該背景圖像40b。Finally, according to the first figure, the transmitting end generates a sand image im 1 20a , and the receiving end generates a paired sand image im 2 20b ; when encrypting, a plaintext image and an im 1 performing bit XOR are generated. a ciphertext image ime 40a , in the seventh D image shows the ime in the 11th column, the 8-bit value in the 1-128 column; when decrypted, im 2 and ime perform the bit XOR, the plaintext and the Background image 40b.

較佳實施例B:Preferred Embodiment B:

本發明案可以擴充至複數個傳送端,複數個接收端的通訊;依據第九圖所示,該較佳實施例以兩個傳送端,兩個接收端提供一簡單的說明;由於接收端顯示傳送端的訊息,接收端共用一沙紋圖像,而傳送端在安全的考量,則分別使用不同的沙紋圖像,因此,本例需產生3個沙紋圖像。The invention can be extended to a plurality of transmitting ends, and a plurality of receiving ends communicate; according to the ninth figure, the preferred embodiment provides a simple description by two transmitting ends, and the two receiving ends provide a simple description; At the end of the message, the receiving end shares a sand image, and the transmission end uses different sand images for security reasons. Therefore, in this example, three sand images are generated.

從上例中,已產生沙紋圖像im 1與im 2,此時,可將im 1或im 2當成一背景圖像,並同上例的TpTs (i * )設定,執行第二圖205 ,206 ,即可產生兩種組合(im 1,im 3,im 4)或(im 2,im 3,im 4)。From the above example, the sand image im 1 and im 2 have been generated. In this case, im 1 or im 2 can be regarded as a background image, and Tp and Ts ( i * ) are set as in the above example, and the second image is executed. 205 , 206 , you can produce two combinations ( im 1, im 3, im 4) or ( im 2, im 3, im 4).

本例應用im 2當成一背景圖像,並選擇另一週期表Tp ,如第八圖所示,其F1 =F(3,4,5,6,7,8,2,1),再改變Ts (i * )的i * 值從40至50,而2 n -1-i * 則為215反向至205,Ts (i * )=[226,178,…,218,251],Ts (2 n -1-i * )=[186,137,…,169,201],執行第二圖205 ,206 ,該im 2分解成im 3與im 4。In this example, im 2 is used as a background image, and another periodic table Tp is selected. As shown in the eighth figure, F 1 =F(3,4,5,6,7,8,2,1), and then Change the i * value of Ts ( i * ) from 40 to 50, and 2 n -1- i * to 215 to 205, Ts ( i * )=[226,178,...,218,251], Ts (2 n - 1- i *) = [186,137, ..., 169,201], which performs second 205, 206, broken down into the im 2 im 3 and im 4.

最後,依據第九圖所示,S1 輸入一明文圖像,並與im 1位元XOR,產生一密文圖像ime 1,S2 輸入一明文圖像,並與im 3位元XOR,產生一密文圖像ime 2;而在R1R2 ,輸入ime 1,ime 2,並ime 1⊕ime 2⊕im 4,其結果就會顯示原來的背景圖像與兩傳送端發送的訊息。Finally, according to the ninth figure, S1 inputs a plaintext image, and XOR with im 1 bit, generates a ciphertext image ime 1, S2 inputs a plaintext image, and XOR with im 3 bits, generates one The ciphertext image ime 2; and in R1 and R2 , input ime 1, ime 2, and ime 1⊕ ime 2⊕ im 4, the result will display the original background image and the message sent by the two transmitting ends.

雖然本案是以數個最佳實施例做說明,但精於此技藝者能在不脫離本案精神與範疇下做各種不同形式的改變。以上所舉實施例僅用以說明本案而已,非用以限制本案之範圍。舉凡不違本案精神所從事的種種修改或變化,俱屬本案申請專利範圍。Although the present case is illustrated by several preferred embodiments, those skilled in the art can make various forms of changes without departing from the spirit and scope of the case. The above embodiments are only used to illustrate the present case and are not intended to limit the scope of the present invention. All kinds of modifications or changes that are not in violation of the spirit of the case are the scope of patent application in this case.

第一圖係本發明使用沙紋圖像通訊之加解密方法的流程示意圖;The first figure is a schematic flow chart of an encryption and decryption method using sand image communication according to the present invention;

第二圖係本發明產生沙紋圖像的流程示意圖;The second figure is a schematic flow chart of the sand image generated by the present invention;

第三圖係本發明週期表製作的流程示意圖;The third figure is a schematic diagram of the process of making the periodic table of the present invention;

第四圖係本發明移位表製作的流程示意圖;The fourth figure is a schematic flow chart of the production of the shift table of the present invention;

第五圖係本發明八位元週期表以F1 =F(7,8,6,5,4,3,2,1)所有數值分布的圖式;The fifth figure is a diagram of all numerical distributions of the octet table of the present invention with F 1 =F(7,8,6,5,4,3,2,1);

第六圖係本發明八位元移位表其所有移位值分布的圖式;Figure 6 is a diagram showing the distribution of all shift values of the octet shift table of the present invention;

第七A圖係本發明較佳實施例A背景圖像im (11,1~128)的數值圖式;Figure 7A is a numerical diagram of a background image im (11, 1~128) of a preferred embodiment A of the present invention;

第七B圖係本發明較佳實施例A沙紋圖像im 1(11,1~128)的數值圖式;Figure 7B is a numerical diagram of the sand image im 1 (11, 1~128) of the preferred embodiment A of the present invention;

第七C圖係本發明較佳實施例A沙紋圖像im 2(11,1~128)的數值圖式;Figure 7 is a numerical diagram of a sand image im 2 (11, 1~128) of a preferred embodiment A of the present invention;

第七D圖係本發明較佳實施例A密文圖像ime (11,1~128)的數值圖式;7D is a numerical diagram of a ciphertext image ime (11, 1~128) of a preferred embodiment A of the present invention;

第八圖係本發明八位元週期表以F1 =F(3,4,5,6,7,8,,,1)所有數值分布的圖式;The eighth figure is a diagram of all numerical distributions of the octet table of the present invention with F 1 =F(3,4,5,6,7,8,,,1);

第九圖係本發明較佳實施例B多人使用沙紋圖像通訊的架構示意圖。The ninth figure is a schematic diagram of a structure of a plurality of people using sand pattern communication according to a preferred embodiment of the present invention.

Claims (10)

一種使用沙紋圖像通訊之加解密方法,該方法以n 位元為一運算單位,其包含以下步驟:(A)產生沙紋圖像im 1與im 2:(a)選擇一背景圖像im ,一週期表Tp ,一移位表Ts ;(b)取Ts 的至少一移位值Ts (i * ),在Tp 找到對應imim 1與im 2;(B)取得一密文圖像ime :(a)輸入一明文,該明文轉換為一圖像imx ;(b)執行位元XOR的加密運算,ime =imxim 1;(C)顯示該明文與背景圖像imd :(a)輸入該密文圖像ime ;(b)執行位元XOR的解密運算,imd =imeim 2。An encryption and decryption method using sand image communication, the method uses n bits as an operation unit, and includes the following steps: (A) generating a sand image im 1 and im 2: (a) selecting a background image im, a Tp of the periodic table, a shift table Ts; (B) to take at least a shift value Ts Ts (i *), to find the Tp corresponding to im im. 1 and im 2; (B) obtaining a ciphertext FIG. Like ime : (a) enter a plaintext, the plaintext is converted to an image imx ; (b) perform a bitwise XOR encryption operation, ime = imxim 1; (C) display the plaintext and the background image imd :( a) input the ciphertext image ime ; (b) perform the decryption operation of the bit XOR, imd = imeim 2. 依據申請專利範圍第1項所述之方法,其中,通訊時,選取一傳送端,一接收端;該傳送端執行步驟(B),該接收端執行步驟(C)。 According to the method of claim 1, wherein, in communication, a transmitting end and a receiving end are selected; the transmitting end performs step (B), and the receiving end performs step (C). 依據申請專利範圍第1項所述之方法,其中,以連續方式,選取至少一沙紋圖像為背景圖像執行步驟(A),共產生一複數個沙紋圖像;通訊時,選取該複數 個沙紋圖像之個數-1 之數目的傳送端,至少一接收端;從該複數個沙紋圖像的配置,每一傳送端分別取得一個沙紋圖像執行步驟(B),每一接收端共同取得僅剩的一個沙紋圖像執行步驟(C)。According to the method of claim 1, wherein the step (A) is performed by selecting at least one sand image as a background image in a continuous manner, and a plurality of sand patterns are generated in total; a plurality of sand-grain images - a number of transmission ends, at least one receiving end; from the configuration of the plurality of sand-grain images, each of the transmitting ends respectively obtains a sand image execution step (B), Each receiving end jointly obtains only one sand image execution step (C). 依據申請專利範圍第1項所述之方法,其中,通訊時,選取一第三方;該第三方執行步驟(A)。 According to the method of claim 1, wherein, in the communication, a third party is selected; and the third party performs step (A). 依據申請專利範圍第2項所述之方法,其中,該步驟(B)的im 1可以由該傳送端產生,該步驟(C)的im 2可以由該接收端產生。The method according to claim 2, wherein the im 1 of the step (B) can be generated by the transmitting end, and the im 2 of the step (C) can be generated by the receiving end. 依據申請專利範圍第3項所述之方法,其中,每次執行步驟(A),可以任選一週期表。 According to the method of claim 3, wherein each time step (A) is performed, a periodic table may be selected. 依據申請專利範圍第3項所述之方法,其中,每次執行步驟(A),可以任選至少一移位值。 The method of claim 3, wherein each step (A) is performed, optionally at least one shift value. 依據申請專利範圍第1項所述之方法,其中,步驟(A)該週期表Tp 的產生,其包含以下步驟:(a)選擇一擴散區域A ,一擴散機制; (b)設定A 的初始值A 0 ;(c)設定一變數t 2 =1;(d)執行,取得A 的新值;(e)依序儲存A 值至該週期表;(f)t 2 =t 2 +1,若t 2 <2 n ,回至步驟(d)。According to the method of claim 1, wherein the step (A) generates the periodic table Tp , which comprises the following steps: (a) selecting a diffusion region A , a diffusion mechanism ; Initial value A 0 (b) A set of; (c) setting a variable t 2 = 1; (d) performing Achieved A new value (e) sequentially store the A value to the periodic table; (f) t 2 = t 2 +1, and if t 2 < 2 n , return to step (d). 依據申請專利範圍第1項所述之方法,其中,步驟(A)該移位表Ts 的產生,其包含以下步驟:(a)選擇一週期表Tp ;(b)設定一變數k =1;(c)找到Tp <k > =TpTp k ,取得<k >值;(d)依序儲存<k >值至該移位表;(e)k =k +1,若k <2 n -1,回至步驟(c)。According to the method of claim 1, wherein the step (A) generates the shift table Ts , which comprises the steps of: (a) selecting a periodic table Tp ; (b) setting a variable k =1; (c) find Tp < k > = TpTp k , obtain the < k >value; (d) store the < k > value sequentially to the shift table; (e) k = k +1 if k < 2 n -1, return to step (c). 依據申請專利範圍第1項所述之方法,其中,步驟(A)該沙紋圖像im 1與im 2的產生,其包含以下步驟:(a)該至少一個Ts (i * ),其i * 表示位置依序為i 1 ,i 2 ,…,i k ;(b)設定一變數i =1;(c)找到Tp (p i )=im (i ),取得位置p i ;(d)im 1(i )=Tp (((p i +Ts (i * ))mod(2 n -1));im 2(i )=Tp (((p i +Ts (2 n -1-i * ))mod(2 n -1));(e)i =i +1,回至步驟(c),直到讀完imThe method of claim 1, wherein the step (A) generates the sand image im 1 and im 2, comprising the steps of: (a) the at least one Ts ( i * ), i * indicates that the position is i 1 , i 2 , ..., i k ; (b) set a variable i =1; (c) find Tp ( p i ) = im ( i ), obtain position p i ; (d) Im 1( i )= Tp ((( p i + Ts ( i * )) mod(2 n -1)); im 2( i )= Tp ((( p i + Ts (2 n -1- i * )) mod(2 n -1)); (e) i = i +1, return to step (c) until im is finished.
TW100129904A 2011-08-22 2011-08-22 Method of cryptographic communications by using sand-texture images TWI448133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100129904A TWI448133B (en) 2011-08-22 2011-08-22 Method of cryptographic communications by using sand-texture images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100129904A TWI448133B (en) 2011-08-22 2011-08-22 Method of cryptographic communications by using sand-texture images

Publications (2)

Publication Number Publication Date
TW201310956A TW201310956A (en) 2013-03-01
TWI448133B true TWI448133B (en) 2014-08-01

Family

ID=48482151

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100129904A TWI448133B (en) 2011-08-22 2011-08-22 Method of cryptographic communications by using sand-texture images

Country Status (1)

Country Link
TW (1) TWI448133B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0874496B1 (en) * 1997-04-23 2002-08-28 Matsushita Electric Industrial Co., Ltd. Cryptographic processing apparatus, cryptographic processing method, and storage medium storing cryptographic processing program for improving security without greatly increasing hardware scale and processing time
CN1852088A (en) * 2005-10-13 2006-10-25 华为技术有限公司 Enciphering-deciphering method for flow medium transmission code flow and module
CN1889424A (en) * 2006-07-25 2007-01-03 深圳大学 Asynmmetric ciphering and deciphering method and apparatus based on virtual wavefront coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0874496B1 (en) * 1997-04-23 2002-08-28 Matsushita Electric Industrial Co., Ltd. Cryptographic processing apparatus, cryptographic processing method, and storage medium storing cryptographic processing program for improving security without greatly increasing hardware scale and processing time
CN1852088A (en) * 2005-10-13 2006-10-25 华为技术有限公司 Enciphering-deciphering method for flow medium transmission code flow and module
CN1889424A (en) * 2006-07-25 2007-01-03 深圳大学 Asynmmetric ciphering and deciphering method and apparatus based on virtual wavefront coding

Also Published As

Publication number Publication date
TW201310956A (en) 2013-03-01

Similar Documents

Publication Publication Date Title
CN105847629B (en) A kind of reversible information hidden method of encrypted image
CN101739695B (en) Three-dimensional Arnold mapping-based image grouping encryption method
Kester Image Encryption based on the RGB PIXEL Transposition and Shuffling
CN108768617B (en) Format-preserving encryption method based on traditional block cipher
CN107220923B (en) Digital picture feedback encryption method based on image network
CN106327414A (en) Plaintext feature-based double-chaos image encryption method
CN106411518A (en) Symmetric white box encryption method with unfixed key and apparatus
CN109714368B (en) Message encryption and decryption method and device, electronic equipment and computer readable storage medium
Patel et al. Information hiding using least significant bit steganography and blowfish algorithm
CN107968705A (en) A kind of method for encryption/decryption, enciphering/deciphering end and double random phase encrypting and deciphering system
Karthikeyan et al. An improved steganographic technique using LSB replacement on a scanned path image
CN110401667B (en) Attribute encryption method of multi-item mapping-based distributed key mechanism
Patel et al. A new technique for color share generation using visual cryptography
Sridevi et al. Image steganography combined with cryptography
CN104050625B (en) A kind of plaintext builds the composite chaotic image encryption method of initial key
CN110086606A (en) A kind of black white image Multiparty quantum secret sharing method based on quantum mechanical
TWI448133B (en) Method of cryptographic communications by using sand-texture images
Desai et al. Chaos-based system for image encryption
CN106683030B (en) Quantum multi-image encryption algorithm based on quantum multi-image model and three-dimensional transformation
Bharanivendhan et al. Visual cryptography schemes for secret image sharing using GAS Algorithm
Bin et al. Image encryption algorithm based on chaotic map and S-DES
CN113099069B (en) Multi-image encryption method based on three-dimensional spiral model
CN110311779B (en) Attribute encryption method of authority-sharing key mechanism
CN108600575B (en) RGB image encryption method based on incomplete Feistel network
Chavan et al. Data embedding technique using secret fragment visible mosaic image for covered communication

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees