TW202244765A - Public key QR code encryption method and applications thereof capable of effectively reducing the probability of the QR code being maliciously decrypted to improve the security of QR code transmission - Google Patents

Public key QR code encryption method and applications thereof capable of effectively reducing the probability of the QR code being maliciously decrypted to improve the security of QR code transmission Download PDF

Info

Publication number
TW202244765A
TW202244765A TW110116425A TW110116425A TW202244765A TW 202244765 A TW202244765 A TW 202244765A TW 110116425 A TW110116425 A TW 110116425A TW 110116425 A TW110116425 A TW 110116425A TW 202244765 A TW202244765 A TW 202244765A
Authority
TW
Taiwan
Prior art keywords
code
public key
plaintext
key
unit
Prior art date
Application number
TW110116425A
Other languages
Chinese (zh)
Other versions
TWI763474B (en
Inventor
林基源
王俊傑
楊勝智
張錫淵
林胤忱
林明臻
Original Assignee
國立勤益科技大學
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 國立勤益科技大學 filed Critical 國立勤益科技大學
Priority to TW110116425A priority Critical patent/TWI763474B/en
Application granted granted Critical
Publication of TWI763474B publication Critical patent/TWI763474B/en
Publication of TW202244765A publication Critical patent/TW202244765A/en

Links

Images

Abstract

The present invention discloses a public key QR code encryption method and applications thereof, in which the plaintext QR code is subjected to Arnold conversion to disrupt and rearrange the positioning area and the coded data area of the plaintext QR code, so that every point inside the plaintext QR code can perform periodic conversion to form a secret gold key pair, and then the gold key pair is used to encrypt the plaintext QR code to generate a public key type ciphertext QR code, as a result, the QR code can be transmitted securely to a receiving end by using the way of generating the public key, in addition, the QR code is undeniable after it is sent out, so as to effectively reduce the probability of being maliciously decrypted, thereby improving the security of QR code transmission.

Description

公鑰加密QR碼方法及其應用 Public key encryption QR code method and its application

本發明係有關一種公鑰加密QR碼方法及其應用,尤指一種以利用產生公鑰的方式讓QR碼可以保密傳輸至接收端具備不可否認特性的公鑰加密QR碼技術。 The invention relates to a public key encryption QR code method and its application, in particular to a public key encryption QR code technology that uses the method of generating a public key so that the QR code can be securely transmitted to the receiving end and has non-repudiation characteristics.

按,一般常見的QR碼係呈正方形,而且為黑白兩色,具體圖樣呈現如圖5所示。在QR碼三個邊角為定位區11,該三定位區11呈現出略呈「回」字的圖案。該三定位區11的圖案主要是幫助解碼軟體來定位圖案,使用者不需要對準,無論以任何角度掃描,資料仍然可以正確被讀取,因而使得QR碼已然成為目前最為普遍與接受的一種編碼方式,它的應用場合有數位優惠券、商務交易、驗証功能與提供網址連結。另外,如圖6所示,傳統QR碼的編/解碼過程可分成下列三個步驟: Press, generally common QR codes are square and black and white, the specific pattern is shown in Figure 5. The three corners of the QR code are positioning areas 11, and the three positioning areas 11 present a pattern of a character "Hui". The pattern of the three positioning areas 11 is mainly to help the decoding software to locate the pattern. The user does not need to align. No matter scanning at any angle, the data can still be read correctly, thus making the QR code the most common and accepted one at present. Encoding method, its applications include digital coupons, business transactions, verification functions and providing URL links. In addition, as shown in Figure 6, the encoding/decoding process of a traditional QR code can be divided into the following three steps:

1、資料編/解碼步驟。 1. Data encoding/decoding steps.

2、更正編碼(RS碼編/解碼)步驟。 2. Correct the encoding (RS code encoding/decoding) step.

3、填入/取出編碼格式步驟。 3. Fill in/take out encoding format steps.

在QR碼中主要的技術核心是利用Reed-Solomon與BCH更正碼進行叢集錯誤的更正。當QR碼經過資料編碼、更正編碼(包含RS與BCH碼)後,因為QR碼上的資料是可以直接觀查到其資料特性,如補齊符號的重覆位置,這樣子會造成QR碼容易被發現內部的資料。因此為求能夠保密QR 碼的內容,QR碼將RS碼編碼資料12區罩上一個亂碼樣圖稱為遮罩圖樣(Mask Pattern)。 The main technical core in QR codes is to use Reed-Solomon and BCH correction codes to correct cluster errors. After the QR code has undergone data coding and correction coding (including RS and BCH codes), because the data on the QR code can directly observe its data characteristics, such as filling in the repeated position of the symbol, this will cause the QR code to be easily read. The information was found inside. Therefore, in order to keep the QR confidential The content of the code, the QR code covers the 12th area of the RS code encoding data with a garbled pattern called a mask pattern (Mask Pattern).

傳統QR碼的遮罩圖樣以QR碼版本為例,它會有八種遮罩圖樣如圖7所示。遮罩圖樣主要是對於定位區與格式資料區以外的RS編碼資料區域進行保護,遮罩圖樣欲保護的資料為圖5所示的編碼資料區12灰色區域:圖6所示為QR碼的編/解碼區塊示意。欲編碼的資料首先進行資料編碼的區塊,區塊輸出為一個二位元串的資料,再將二位元串的資料排成八個位元為一個符號的資料形式進行RS碼編,RS碼編碼後的字碼資料會依據QR碼的格式填入編碼資料區12,之後再選取一個遮罩與原QR碼的RS碼編碼資料區進行XOR運算產生出保密的QR碼,最後再將容錯等級與遮罩型式資料進行BCH碼編碼填入圖5所示的BCH碼資料區13。此外,當遮罩圖樣選定後,方能將容錯等級資料與遮罩型式資料進行BCH碼編碼,因此可以說除定位資訊外,QR碼還包含RS碼,如圖5所示的編碼資料區12與BCH碼如圖5所示的BCH碼資料區13。 The mask pattern of the traditional QR code takes the QR code version as an example, it has eight mask patterns as shown in Figure 7. The mask pattern is mainly to protect the RS coded data area other than the positioning area and the format data area. The data to be protected by the mask pattern is the gray area of the coded data area 12 shown in Figure 5: Figure 6 shows the coded data area of the QR code /decoding block hints. The data to be encoded is firstly coded in the block of data, and the output of the block is a data of a two-byte string, and then the data of the two-byte string is arranged into eight bits as a data form of a symbol for RS coding, RS The character code data after code encoding will be filled in the code data area 12 according to the format of the QR code, and then select a mask and perform XOR operation with the RS code code data area of the original QR code to generate a confidential QR code, and finally the error tolerance level Carry out BCH code encoding with the mask type data and fill in the BCH code data area 13 shown in FIG. 5 . In addition, when the mask pattern is selected, the fault-tolerant level data and mask type data can be encoded with BCH codes. Therefore, it can be said that in addition to positioning information, the QR code also includes RS codes, as shown in the coded data area 12 in Figure 5 BCH code and BCH code data area 13 as shown in FIG. 5 .

雖然傳統QR碼的遮罩圖樣具備初步的安全保密性,惟其僅具備八種遮罩圖樣而已,以致會因遮罩圖樣變化性不足而較容易遭到惡意破解的機率產生,從而降低QR碼傳輸的安全性,因而造成使用上得安全性疑慮的產生。由上述得知,習知技術確實未臻完善,仍有再改善的必要性。 Although the mask pattern of the traditional QR code has preliminary security and confidentiality, it only has eight mask patterns, so that the probability of being maliciously cracked is more likely to occur due to the lack of variability of the mask pattern, thereby reducing the transmission of the QR code The security, thus causing the use of safety concerns. Known from the above, the known technology is indeed not perfect, and there is still a need for further improvement.

緣是,如何開發出一種利用產生公鑰方式讓QR碼可以保密傳輸至接收端而降低遭到惡意破解機率的QR碼產生技術,實已成為相關技 術領域業者所亟欲挑戰與解決的技術課題,而且基於相關產業的迫切需求之下,本發明人等乃憑藉多年之實務經驗及相關的專業知識,經不斷的努力研發之下,終於研發出一種有別於上述習知技術與前揭專利的本發明。 The reason is that how to develop a QR code generation technology that uses the method of generating a public key to allow the QR code to be transmitted confidentially to the receiving end and reduce the probability of being maliciously cracked has become a related technology. Based on the urgent needs of related industries, the inventors of the present invention have finally developed A kind of present invention that is different from above-mentioned prior art and above-disclosed patent.

本發明主要目的,在於提供一種公鑰加密QR碼方法及其應用,主要是利用產生公鑰的方式讓QR碼可以保密的傳輸至接收端,而且QR碼於發送出去後則具備不可否認的特性,以有效降低遭到惡意破解的機率產生,進而提升QR碼傳輸的安全性。達成本發明主要目的之技術手段,係將明文QR碼進行Arnold轉換,以將明文QR碼的定位區及編碼資料區打亂重排,使明文QR碼內部每一點皆做週期性的轉換,以形成具保密性的金鑰對,再以金鑰對對明文QR碼進行加密而產生公鑰型式的密文QR碼。 The main purpose of the present invention is to provide a public key encryption QR code method and its application, mainly to use the way of generating public key to make the QR code can be transmitted to the receiving end in a confidential manner, and the QR code has the characteristic of non-repudiation after sending out , to effectively reduce the probability of being maliciously cracked, thereby improving the security of QR code transmission. The technical means to achieve the main purpose of the present invention is to perform Arnold conversion on the plaintext QR code, so as to disrupt and rearrange the positioning area and the coded data area of the plaintext QR code, so that every point inside the plaintext QR code is periodically converted, so that A confidential key pair is formed, and then the plaintext QR code is encrypted with the key pair to generate a public key type ciphertext QR code.

10:QR碼 10: QR code

11:定位區 11: Positioning area

12:編碼資料區 12: Coding data area

13:BCH碼資料區 13: BCH code data area

20:第三方公證端單元 20: Third-party notary terminal unit

30:傳輸端單元 30: Transmitter unit

40:接收端單元 40: Receiver unit

50:網路通訊單元 50: Network communication unit

T:明文QR碼 T: plain text QR code

E:密文QR碼 E: Cipher text QR code

B1:第一公鑰 B 1 : the first public key

B2:第二公鑰 B 2 : Second public key

C1:第一私鑰 C 1 : the first private key

C2:第二私鑰 C 2 : Second private key

圖1係本發明系統實施架構的示意圖。 Fig. 1 is a schematic diagram of the implementation framework of the system of the present invention.

圖2係本發明公鑰加密QR碼實施的示意圖。 Fig. 2 is a schematic diagram of the implementation of the public key encryption QR code of the present invention.

圖3係本發明轉換打散重排QR碼的定位區與編碼資料區實施示意圖。 Fig. 3 is a schematic diagram of the implementation of the conversion, dispersal and rearrangement of the positioning area and the coding data area of the QR code according to the present invention.

圖4係本發明經週期性Arnold轉換所產生的多種遮罩圖樣實施示意圖。 Fig. 4 is a schematic diagram of the implementation of various mask patterns generated by periodic Arnold transformation in the present invention.

圖5係傳統QR碼的具體圖樣實施示意圖。 Fig. 5 is a schematic diagram of implementing a specific pattern of a traditional QR code.

圖6係傳統QR碼的碼編/解碼步驟流程的實施示意圖。 FIG. 6 is an implementation schematic diagram of the encoding/decoding steps of a traditional QR code.

圖7係傳統QR碼的遮罩圖樣實施示意圖。 FIG. 7 is a schematic diagram of implementing a mask pattern of a traditional QR code.

為讓 貴審查委員能進一步瞭解本發明整體的技術特徵與 達成本發明目的之技術手段,玆以具體實施例並配合圖式加以詳細說明如下: In order to allow your review committee to further understand the overall technical characteristics and The technical means for achieving the object of the present invention are described in detail as follows with specific embodiments and drawings:

請配合參看圖1~4所示,為達成本發明主要目的之具體實施例,係包括下列步驟: Please cooperate and refer to shown in Fig. 1~4, in order to reach the concrete embodiment of main purpose of the present invention, system comprises the following steps:

(a)QR碼10提供步驟,係提供待加密的明文QR碼T。 (a) The step of providing the QR code 10 is to provide the plaintext QR code T to be encrypted.

(b)QR碼10轉換步驟,係將明文QR碼T進行Arnold轉換,以將明文QR碼的定位區11及編碼資料區12打亂重排,使明文QR碼T內部每一點皆做週期性的轉換,以形成具保密性的金鑰對,再以金鑰對對明文QR碼T進行加密而產生公鑰型式的密文QR碼E。 (b) The QR code 10 conversion step is to perform Arnold conversion on the plaintext QR code T, so as to scramble and rearrange the positioning area 11 and the coded data area 12 of the plaintext QR code T, so that every point inside the plaintext QR code T is periodically conversion to form a confidential key pair, and then use the key pair to encrypt the plaintext QR code T to generate a public key type ciphertext QR code E.

具體的,該Arnold轉換表示為: Specifically, the Arnold transformation is expressed as:

Figure 110116425-A0101-12-0004-1
,A為矩陣
Figure 110116425-A0101-12-0004-2
,p為該QR碼10 的邊長大小,該QR碼10內部每一點為(x,y)。
Figure 110116425-A0101-12-0004-1
, A is a matrix
Figure 110116425-A0101-12-0004-2
, p is the side length of the QR code 10, and each point inside the QR code 10 is (x, y).

該Arnold轉換的過程中而形成具保密性的轉換矩陣,並將該轉換矩陣分割出該至少一金鑰對;該至少一金鑰對包含相互對應的一第一公鑰B1與一第一私鑰C1及相互對應的一第二公鑰B2與一第二私鑰C2During the Arnold conversion process, a confidential conversion matrix is formed, and the conversion matrix is divided into the at least one key pair; the at least one key pair includes a first public key B 1 and a first public key corresponding to each other. The private key C 1 corresponds to a second public key B 2 and a second private key C 2 .

該第一公鑰B1與該第二公鑰B2表示為: The first public key B 1 and the second public key B 2 are expressed as:

Figure 110116425-A0101-12-0004-4
,其中,n為Arnold轉換的週期數,k1 為第一秘密常數,k2為第二秘密常數。
Figure 110116425-A0101-12-0004-4
, where n is the cycle number of Arnold transformation, k1 is the first secret constant, and k2 is the second secret constant.

請配合參看圖2所示的實施例,該密文QR碼(E)表示為:E=EB2(EC1(T)),該EB2為第二公鑰加密,該EC1為第一私鑰加密;該明文QR碼(T)表示為:T=DC2(DB1(E)),該DC2為第二私鑰解密,該DB1為第一公鑰解密。 Please refer to the embodiment shown in Figure 2, the ciphertext QR code (E) is expressed as: E=E B2 (E C1 (T)), the E B2 is the second public key encryption, and the E C1 is the first Private key encryption; the plaintext QR code (T) is expressed as: T=D C2 ( DB1 (E)), the DC 2 is decrypted by the second private key, and the DB1 is decrypted by the first public key.

具體的,請配合參看圖6所示,於該QR碼10提供步驟之前更包括下列步驟(此步驟係與習知技術相同): Concretely, please cooperate and refer to shown in Figure 6, before this QR code 10 provides steps, further include the following steps (this step is the same as the prior art):

(c)資料編碼步驟,係將資料訊息轉換為二元串資料。 (c) The data encoding step is to convert the data message into binary string data.

(d)更正編碼步驟,將該二元串資料排成八個位元為一個符號的資料形式進行RS碼編。 (d) Correct the coding step, arrange the binary string data into a data form in which eight bits are a symbol for RS code coding.

(e)QR碼10填入步驟,將RS碼編碼後的字碼資料依據QR碼10的格式填入該編碼資料區12內。 (e) The QR code 10 filling step is to fill in the encoded data area 12 with the character code data encoded by the RS code according to the format of the QR code 10 .

(f)遮罩運算步驟,選取一個遮罩與QR碼10的RS碼編碼資料區12進行XOR運算產生出該明文QR碼。 (f) a mask operation step, select a mask and perform XOR operation with the RS code encoding data area 12 of the QR code 10 to generate the plaintext QR code.

(g)BCH碼填入步驟,將容錯等級與遮罩型式資料進行BCH碼編碼填入該QR碼10的BCH碼資料區13。 (g) BCH code filling step, carry out the BCH code encoding of the error tolerance level and mask type data into the BCH code data area 13 of the QR code 10 .

請配合參看圖1~2所示為本發明一種應用上述公鑰加密QR碼方法的加密系統,其中,該至少一金鑰對包含相互對應的一第一公鑰B1與一第一私鑰C1相互對應的一第二公鑰B2與一第二私鑰C2;該加密系統包括一第三方公證端單元20、一傳輸端單元30至、少一接收端單元40及一網路通訊單元50,該網路通訊單元50用以提供該傳輸端單元30、該第三方公證端單元20及該至少一接收端單元40之間訊號連結;該第三方公證端單元20用以提供該第一公鑰B1及該第二公鑰B2;該傳輸端單元30用以產生該明文 QR碼,並以其所儲存之該第一私鑰C1及由該第三方公證端單元20所提供之該第二公鑰B2進行該QR碼10轉換步驟,以得到該密文QR碼,再將該密文QR碼傳送到該至少一接收端單元40進行解碼;該至少一接收端單元40解碼時,係以其所儲存之該第二私鑰C2及由該第三方公證端單元20所提供之該第一公鑰B1進行解碼,以得到該明文QR碼。 Please refer to Figures 1 to 2 which show an encryption system using the above-mentioned public key encryption method for QR codes according to the present invention, wherein the at least one key pair includes a first public key B1 and a first private key corresponding to each other C 1 corresponds to a second public key B 2 and a second private key C 2 ; the encryption system includes a third-party notarization unit 20, a transmission unit 30, at least a receiving unit 40 and a network A communication unit 50, the network communication unit 50 is used to provide a signal connection between the transmitting unit 30, the third-party notary unit 20 and the at least one receiving unit 40; the third-party notary unit 20 is used to provide the The first public key B 1 and the second public key B 2 ; the transmission end unit 30 is used to generate the plaintext QR code, and the first private key C 1 stored in it and the third-party notary end unit 20 The provided second public key B2 performs the step of converting the QR code 10 to obtain the ciphertext QR code, and then transmits the ciphertext QR code to the at least one receiving end unit 40 for decoding; the at least one receiving end When the unit 40 decodes, it uses the stored second private key C 2 and the first public key B 1 provided by the third-party notary unit 20 to decode to obtain the plaintext QR code.

承上所述,當至少一接收端單元40得到明文QR碼時,則進行上述取出QR碼10格式步驟、RS解碼步驟及資料解碼步驟,進而得到完全解密的資料訊息。 As mentioned above, when at least one receiver unit 40 obtains the plaintext QR code, the steps of extracting the format of the QR code 10 , RS decoding and data decoding are performed to obtain a completely decrypted data message.

簡言之,本發明主要是提出運用於公鑰加密方式的一種QR碼10技術,公鑰加密QR碼是利用數學上的Arnold轉換產生出公鑰。此方法的優點是可以利用產生公鑰的方式讓QR碼可以保密的送至對方,而且此QR碼發送出去後具有不可否認的特性。在本發明中,我們提出了一個公鑰式加密的QR碼。公鑰式QR碼是利用改變遮罩圖樣的方式進行公鑰加密。本發明主要是利用Arnolda轉換產生公鑰遮罩區進行QR碼10的遮罩保護。 In short, the present invention mainly proposes a QR code 10 technology applied to the public key encryption method. The public key encryption QR code uses the mathematical Arnold transformation to generate the public key. The advantage of this method is that the QR code can be sent to the other party confidentially by using the method of generating the public key, and the QR code has the characteristic of non-repudiation after sending out. In this invention, we propose a public-key encrypted QR code. The public-key QR code uses public-key encryption by changing the mask pattern. The present invention mainly utilizes Arnolda conversion to generate a public key mask area for mask protection of the QR code 10 .

假設一個QR碼之定位區11與編碼資料區12表示如圖5所示。公鑰加密QR碼是利用重排將QR碼的資料(包含定位區11與資料區)打亂,使其具有保密性,在此打擾的方法由Arnold轉換。Arnold轉換描述如下:假有一個QR碼10內部的點為(x,y)。 Assume that the positioning area 11 and coded data area 12 of a QR code are shown in FIG. 5 . The public key encrypted QR code uses rearrangement to scramble the data of the QR code (including the positioning area 11 and the data area) to make it confidential. The method of scrambling is converted by Arnold. The Arnold transformation is described as follows: Suppose there is a point inside a QR code 10 as (x, y).

Figure 110116425-A0101-12-0006-5
Figure 110116425-A0101-12-0006-5

其中a i

Figure 110116425-A0101-12-0006-32
Z +,且行列式|A|=1,而p為QR碼10的邊長大小。上述運算具有下列幾個特性: where a i
Figure 110116425-A0101-12-0006-32
Z + , and the determinant | A |=1, and p is the side length of QR code 10. The above operation has the following properties:

1、轉換T a 具週期性,而且週期性與A的內容值有關,亦即QR碼10內部的每一點(x,y)在一個週期P T 將會回到原來的位置。 1. The conversion T a is periodic, and the periodicity is related to the content value of A , that is, each point ( x , y ) inside the QR code 10 will return to its original position in a period PT .

2、轉換T a 可將QR碼內部的點很均勻的打散。 2. Converting T a can evenly disperse the points inside the QR code.

3、轉換T a 具週期性是隨機的。 3. The periodicity of switching T a is random.

我們利用以下例子做一說明,假設有一矩陣A為: We use the following example to illustrate, assuming a matrix A is:

Figure 110116425-A0101-12-0007-6
Figure 110116425-A0101-12-0007-6

我們不難發現|A|=1。現在我們將QR碼10內部的每一點(x,y)進行轉換如下: We can easily find that | A |=1. Now we convert each point ( x , y ) inside the QR code 10 as follows:

Figure 110116425-A0101-12-0007-7
Figure 110116425-A0101-12-0007-7

上述的Arnold轉換可以由實驗發現,轉換後的QR碼會有24個週期。但是這是由矩陣A所產生的週期,不一樣的A會有不特性的週期數。 我們可將轉換的過程表示如下: The above-mentioned Arnold conversion can be found by experiments, and the converted QR code will have 24 cycles. But this is the cycle generated by the matrix A , and different A will have different cycle numbers. We can express the conversion process as follows:

Figure 110116425-A0101-12-0007-8
Figure 110116425-A0101-12-0007-8

當n=1~24時每一個映射點都不一樣,但是第25次映射時點(x,y)就會回到原點,實驗結果如圖4所示。 When n=1~24, each mapping point is different, but the point ( x , y ) will return to the origin at the 25th mapping. The experimental results are shown in Figure 4.

在上述轉換過程,我們將轉換矩陣分割成兩把鑰匙分別為公鑰B與私鑰C。假設有一密秘常數為k,以下為鑰匙產生方法: In the above conversion process, we divide the conversion matrix into two keys, public key B and private key C. Assuming that there is a secret constant k, the key generation method is as follows:

Figure 110116425-A0101-12-0008-11
Figure 110116425-A0101-12-0008-11

以上述為例,如果k=17,則公鑰為: Taking the above as an example, if k = 17, the public key is:

Figure 110116425-A0101-12-0008-10
Figure 110116425-A0101-12-0008-10

私鑰為: The private key is:

Figure 110116425-A0101-12-0008-13
Figure 110116425-A0101-12-0008-13

由上述例子可以說明公、私鑰的產一方法,以下則為公鑰加密QR碼的產生過程如圖5所示。 The method of generating public and private keys can be illustrated by the above example, and the following is the generation process of the public key encryption QR code as shown in Figure 5.

以上述例子為例,假設圖2左方為傳輸端,有一第三公証方保管公鑰: Take the above example as an example, assuming that the left side of Figure 2 is the transmission end, and there is a third notary to keep the public key:

Figure 110116425-A0101-12-0008-14
Figure 110116425-A0101-12-0008-14

and

Figure 110116425-A0101-12-0008-17
Figure 110116425-A0101-12-0008-17

而對應的私鑰為: And the corresponding private key is:

Figure 110116425-A0101-12-0008-15
Figure 110116425-A0101-12-0008-15

and

Figure 110116425-A0101-12-0008-16
Figure 110116425-A0101-12-0008-16

假設(x i ,y i )

Figure 110116425-A0101-12-0008-33
T,而加密端進行以下運算: Assume ( x i , y i )
Figure 110116425-A0101-12-0008-33
T , and the encryption side performs the following operations:

Figure 110116425-A0101-12-0009-18
Figure 110116425-A0101-12-0009-18

and

Figure 110116425-A0101-12-0009-19
Figure 110116425-A0101-12-0009-19

上述中(x",y")

Figure 110116425-A0101-12-0009-34
E。另外,在解密端進行運算如下: In the above ( x ", y ")
Figure 110116425-A0101-12-0009-34
E. In addition, the operation on the decryption side is as follows:

Figure 110116425-A0101-12-0009-20
Figure 110116425-A0101-12-0009-20

在解碼過程中,只要密文QR碼E是可以任意傳送給任何人,因為只有具有第二私鑰C2的接收者才能夠解密,除了使用第二私鑰C2外。接收者在解密過程中,還需要利用到傳送者的公鑰第一公鑰B1才能夠看見明文QR碼T。因此系統除了保密性(C 2)外還具備了不可否認性(B 1)。 In the decoding process, as long as the ciphertext QR code E is arbitrarily transmitted to anyone, because only the recipient with the second private key C2 can decrypt it, except for using the second private key C2. During the decryption process, the recipient also needs to use the sender's public key first public key B1 to be able to see the plaintext QR code T. Therefore, the system has non-repudiation ( B 1 ) in addition to confidentiality ( C 2 ).

經由上述具體實施例的說明之後,本發明已說明公鑰加密方式,為求配合現有的QR碼標準,我們可以利用圖7遮罩方式進行結合。圖7的遮罩是以QR碼版本為例,傳統的做法是最後選擇一種遮罩樣式進行xor運算,但是如果卻配合公鑰加密的方法,我們可以將傳統QR碼遮罩後的QR碼資料,加上上述公鑰加密方法形成公鑰型式之QR碼。公鑰加密QR碼會有比傳統一般QR碼除了保密性外會增加不可否認性的特性。 After the description of the above specific embodiments, the present invention has explained the public key encryption method, in order to cooperate with the existing QR code standard, we can use the mask method shown in Figure 7 to combine. The mask in Figure 7 is an example of the QR code version. The traditional method is to choose a mask style for XOR operation at the end, but if we use the public key encryption method, we can mask the QR code data of the traditional QR code , plus the above-mentioned public-key encryption method to form a QR code in public-key format. The public key encrypted QR code will have the feature of non-repudiation in addition to confidentiality compared with the traditional general QR code.

以上所述,僅為本發明之可行實施例,並非用以限定本發明之專利範圍,凡舉依據下列請求項所述之內容、特徵以及其精神而為之其他變化的等效實施,皆應包含於本發明之專利範圍內。本發明所具體界定於請求項之結構特徵,未見於同類物品,且具實用性與進步性,已符合發明專利要件,爰依法具文提出申請,謹請 鈞局依法核予專利,以維護本申請人合法之權益。 The above is only a feasible embodiment of the present invention, and is not intended to limit the patent scope of the present invention. Any equivalent implementation of other changes based on the content, features and spirit of the following claims should be Included in the patent scope of the present invention. The structural features of the invention specifically defined in the claims are not found in similar items, and are practical and progressive, and have met the requirements of an invention patent. I file an application in accordance with the law. I would like to ask the Jun Bureau to approve the patent in accordance with the law to maintain this invention. The legitimate rights and interests of the applicant.

20:第三方公證端單元 20: Third-party notary terminal unit

30:傳輸端單元 30: Transmitter unit

40:接收端單元 40: Receiver unit

50:網路通訊單元 50: Network communication unit

Claims (9)

一種公鑰加密QR碼方法,其包括: A method for encrypting a QR code with a public key, comprising: QR碼提供步驟,係提供一待加密的明文QR碼;及 The step of providing the QR code is to provide a plain text QR code to be encrypted; and QR碼轉換步驟,係將該明文QR碼進行Arnold轉換,以將該明文QR碼的定位區及編碼資料區打亂重排,使該明文QR碼內部每一點皆做週期性的轉換,以形成具保密性的至少一金鑰對,再以該至少一金鑰對對該明文QR碼進行加密而產生公鑰型式的密文QR碼。 The QR code conversion step is to perform Arnold conversion on the plaintext QR code to scramble and rearrange the positioning area and coded data area of the plaintext QR code, so that every point inside the plaintext QR code is periodically converted to form At least one key pair with confidentiality, and then use the at least one key pair to encrypt the plaintext QR code to generate a public key type ciphertext QR code. 如請求項1所述之公鑰加密QR碼方法,其中,該Arnold轉換表示為: The public key encryption QR code method as described in Claim 1, wherein the Arnold conversion is expressed as:
Figure 110116425-A0101-13-0001-21
,A為矩陣
Figure 110116425-A0101-13-0001-22
,p為該QR碼的邊 長大小,該QR碼內部每一點為(x,y)。
Figure 110116425-A0101-13-0001-21
, A is a matrix
Figure 110116425-A0101-13-0001-22
, p is the side length of the QR code, and each point inside the QR code is (x, y).
如請求項1所述之公鑰加密QR碼方法,其中,該Arnold轉換的過程中而形成具保密性的轉換矩陣,並將該轉換矩陣分割出該至少一金鑰對;該至少一金鑰對包含相互對應的一第一公鑰B1與一第一私鑰C1及相互對應的一第二公鑰B2與一第二私鑰C2The public key encryption QR code method as described in Claim 1, wherein, in the process of the Arnold transformation, a confidential transformation matrix is formed, and the transformation matrix is divided into the at least one key pair; the at least one key The pair includes a first public key B 1 and a first private key C 1 corresponding to each other, and a second public key B 2 and a second private key C 2 corresponding to each other. 如請求項3所述之公鑰加密QR碼方法,其中,該第一公鑰B1與該第二公鑰B2表示為: The public key encryption QR code method as described in Claim 3, wherein the first public key B1 and the second public key B2 are expressed as:
Figure 110116425-A0101-13-0001-23
中,n為該Arnold轉換的週期數,k1為第一秘密常數,k2為第二秘密常數。
Figure 110116425-A0101-13-0001-23
Among them, n is the cycle number of the Arnold transformation, k1 is the first secret constant, and k2 is the second secret constant.
如請求項3所述之公鑰加密QR碼方法,其中,該第一私鑰C1與該 第二私鑰C2表示為: The public key encryption QR code method as described in Claim 3, wherein the first private key C 1 and the second private key C 2 are expressed as:
Figure 110116425-A0101-13-0002-24
其中, k1為第一秘密常數,k2為第二秘密常數。
Figure 110116425-A0101-13-0002-24
Wherein, k1 is the first secret constant, and k2 is the second secret constant.
如請求項3所述之公鑰加密QR碼方法,其中,該密文QR碼(E)表示為:E=EB2(EC1(T)),該EB2為第二公鑰加密,該EC1為第一私鑰加密;該明文QR碼(T)表示為:T=DC2(DB1(E)),該DC2為第二私鑰解密,該DB1為第一公鑰解密。 The public key encryption QR code method as described in claim item 3, wherein, the ciphertext QR code (E) is expressed as: E=E B2 (E C1 (T)), the E B2 is the second public key encryption, the E C1 is encrypted by the first private key; the plaintext QR code (T) is expressed as: T=D C2 (D B1 (E)), the DC 2 is decrypted by the second private key, and the D B1 is decrypted by the first public key . 如請求項1所述之公鑰加密QR碼方法,其中,於該QR碼提供步驟之前更包括下列步驟: The method for encrypting a QR code with a public key as described in Claim 1, wherein the following steps are further included before the step of providing the QR code: 資料編碼步驟,係將資料訊息轉換為二元串資料; The data encoding step is to convert the data message into binary string data; 更正編碼步驟,將該二元串資料排成八個位元為一個符號的資料形式進行RS碼編; Correct the encoding step, arrange the binary string data into a data form in which eight bits are a symbol for RS code encoding; QR碼填入步驟,將RS碼編碼後的字碼資料依據QR碼的格式填入該編碼資料區內; The step of filling in the QR code is to fill in the coded data of the RS code in the coded data area according to the format of the QR code; 遮罩運算步驟,選取一個遮罩與QR碼的RS碼編碼資料區進行XOR運算產生出該明文QR碼;及 The mask operation step is to select a mask and the RS code encoding data area of the QR code to perform XOR operation to generate the plaintext QR code; and BCH碼填入步驟,將容錯等級與遮罩型式資料進行BCH碼編碼填入該QR碼的BCH碼資料區。 The BCH code filling step is to encode the error tolerance level and mask type data into the BCH code data area of the QR code. 一種應如請求項1所述之公鑰加密QR碼方法的加密系統,其中,該至少一金鑰對包含相互對應的一第一公鑰B1與一第一私鑰C1相互對應的一第二公鑰B2與一第二私鑰C2;該加密系統包括一第三方公證端單元、一 傳輸端單元至、少一接收端單元及一網路通訊單元,該網路通訊單元用以提供該傳輸端單元、該第三方公證端單元及該至少一接收端單元之間訊號連結;該第三方公證端單元用以提供該第一公鑰B1及該第二公鑰B2;該傳輸端單元用以產生該明文QR碼,並以其所儲存之該第一私鑰C1及由該第三方公證端單元所提供之該第二公鑰B2進行該QR碼轉換步驟,以得到該密文QR碼,再將該密文QR碼傳送到該至少一接收端單元進行解碼;該至少一接收端單元解碼時,係以其所儲存之該第二私鑰C2及由該第三方公證端單元所提供之該第一公鑰B1進行解碼,以得到該明文QR碼。 An encryption system according to the public key encryption QR code method as described in Claim 1, wherein the at least one key pair includes a first public key B 1 corresponding to each other and a first private key C 1 corresponding to each other. A second public key B 2 and a second private key C 2 ; the encryption system includes a third-party notary end unit, a transmission end unit to at least one receiving end unit and a network communication unit, and the network communication unit uses To provide a signal connection between the transmitting unit, the third-party notary unit and the at least one receiving unit; the third-party notary unit is used to provide the first public key B 1 and the second public key B 2 ; The transmission end unit is used to generate the plaintext QR code, and perform the QR code conversion step with the stored first private key C 1 and the second public key B 2 provided by the third-party notary end unit, To obtain the ciphertext QR code, then transmit the ciphertext QR code to the at least one receiver unit for decoding; when the at least one receiver unit decodes, it uses the stored second private key C2 and the The first public key B1 provided by the third-party notary unit is decoded to obtain the plaintext QR code. 如請求項8所述之加密系統,其中,當該至少一接收端單元得到該明文QR碼時,則進行取出QR碼格式步驟、RS解碼步驟及資料解碼步驟,進而得到完全解密的資料訊息。 The encryption system as described in Claim 8, wherein, when the at least one receiver unit obtains the plaintext QR code, it performs the step of extracting the QR code format, RS decoding step and data decoding step, and then obtains a completely decrypted data message.
TW110116425A 2021-05-06 2021-05-06 Public key encryption QR code method and its application TWI763474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110116425A TWI763474B (en) 2021-05-06 2021-05-06 Public key encryption QR code method and its application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110116425A TWI763474B (en) 2021-05-06 2021-05-06 Public key encryption QR code method and its application

Publications (2)

Publication Number Publication Date
TWI763474B TWI763474B (en) 2022-05-01
TW202244765A true TW202244765A (en) 2022-11-16

Family

ID=82593952

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110116425A TWI763474B (en) 2021-05-06 2021-05-06 Public key encryption QR code method and its application

Country Status (1)

Country Link
TW (1) TWI763474B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646264B (en) * 2013-11-06 2016-07-06 杭州电子科技大学 A kind of dimension code anti-counterfeit method of multiple information encryption
CN104063838B (en) * 2014-06-26 2017-09-12 上海理工大学 Asymmetric Watermarking Schemes method based on Logistic chaotic maps and Walsh sequences
US10079684B2 (en) * 2015-10-09 2018-09-18 Intel Corporation Technologies for end-to-end biometric-based authentication and platform locality assertion
CN112215738A (en) * 2020-09-14 2021-01-12 华东交通大学 Two-dimensional code-based tamper-proof digital watermark method

Also Published As

Publication number Publication date
TWI763474B (en) 2022-05-01

Similar Documents

Publication Publication Date Title
KR101343774B1 (en) Encryption method for message authentication
US20070028088A1 (en) Polymorphic encryption method and system
EP3178190B1 (en) Encoder, decoder and method
CN112202984B (en) Ciphertext domain reversible information hiding method based on error correction redundancy
CN110138739B (en) Data information encryption method and device, computer equipment and storage medium
WO2007071140A1 (en) A method for transmitting data securely
CN105812816B (en) A kind of compression encryption certification joint coding method
CN102073977A (en) Methods and equipment for generating and authenticating digital signatures and digital signature system
GB2526636A (en) Encoder, decoder and methods employing partial data encryption
CN111431716B (en) Data transmission method and device, computer equipment and storage medium
JP2008099243A (en) Error correction encoding device, error correction encoding method, and program
CN110932863B (en) Generalized signcryption method based on coding
CN116566597A (en) Controllable security level covert communication method based on bit coin address confusion ciphertext
TWI763474B (en) Public key encryption QR code method and its application
CN111130755B (en) Matrix double encryption method based on signature
CN115102768A (en) Data processing method and device and computer equipment
US11196447B2 (en) Computer-implemented method for error-correction-encoding and encrypting of a file
CN109905241B (en) Short Chinese character encoding and decoding method of elliptic curve public key
CN111654859A (en) Mobile block chain resource allocation method and device
CN111800384A (en) Financial service application management method and device based on block chain
CN113221131B (en) LWE-based QR code encryption and decryption method
Kaur et al. Applying Graph Theory to Secure Data by Cryptography
Rao et al. A Novel Image Encryption Algorithm with Image Integrity Check
Abdelmged et al. A Combined approach of steganography and cryptography technique based on parity checker and huffman encoding
JPH06339036A (en) Ciphering device and method for facsimile equipment