JP6830868B2 - Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program - Google Patents

Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program Download PDF

Info

Publication number
JP6830868B2
JP6830868B2 JP2017134878A JP2017134878A JP6830868B2 JP 6830868 B2 JP6830868 B2 JP 6830868B2 JP 2017134878 A JP2017134878 A JP 2017134878A JP 2017134878 A JP2017134878 A JP 2017134878A JP 6830868 B2 JP6830868 B2 JP 6830868B2
Authority
JP
Japan
Prior art keywords
state
encryption
block
substitution
decryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017134878A
Other languages
Japanese (ja)
Other versions
JP2019015917A (en
Inventor
悠 佐々木
悠 佐々木
幹 安田
幹 安田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017134878A priority Critical patent/JP6830868B2/en
Publication of JP2019015917A publication Critical patent/JP2019015917A/en
Application granted granted Critical
Publication of JP6830868B2 publication Critical patent/JP6830868B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、メッセージの秘匿と改ざん検知を同時に行う追加データ付き認証暗号技術に関する。 The present invention relates to an authentication encryption technique with additional data that simultaneously performs message concealment and tampering detection.

追加データ付き認証暗号とは、メッセージMの秘匿、および、メッセージMと追加データAの認証(改ざん検知)を同時に行う共通鍵暗号プリミティブである。従来の追加データ付き認証暗号としては、例えば、非特許文献1および非特許文献2に記載されたAPE(Authenticated Permutation-Based Encryption)が挙げられる。追加データ付き認証暗号は、暗号化関数および復号関数の二つの関数から構成される。追加データ付き認証暗号では、受信者と送信者との間であらかじめ秘密の鍵Kを共有しておく。 The authentication encryption with additional data is a common key cryptographic primitive that simultaneously performs confidentiality of message M and authentication (tampering detection) of message M and additional data A. Examples of the conventional authentication encryption with additional data include APE (Authenticated Permutation-Based Encryption) described in Non-Patent Document 1 and Non-Patent Document 2. Authenticated encryption with additional data consists of two functions, an encryption function and a decryption function. In the authenticated encryption with additional data, the secret key K is shared in advance between the receiver and the sender.

送信者は、メッセージMと追加データAに加えて、暗号化関数を呼び出すたびに変化するナンスと呼ばれる値Nを選択する。暗号化関数は、メッセージM、追加データA、およびナンスNに対応する暗号文CおよびタグTを生成し、(C, T, A, N)の組を受信者に送る。 In addition to message M and additional data A, the sender selects a value N, called a nonce, that changes each time the cryptographic function is called. The encryption function generates ciphertext C and tag T corresponding to message M, additional data A, and nonce N, and sends a set of (C, T, A, N) to the recipient.

受信者は(C, T, A, N)の組を受け取るが、この時点ではこれらの値が悪意ある第三者によって改ざんされていないという保証はない。受信者は受け取った(C, T, A, N)の組と自分が保有する鍵Kとを用いて検証を同時に行う復号関数を計算する。 The recipient receives a set of (C, T, A, N), but at this point there is no guarantee that these values have not been tampered with by a malicious third party. The recipient calculates a decryption function that performs verification at the same time using the received (C, T, A, N) pair and the key K that he owns.

検証を同時に行う復号関数にはいくつかの種類がある。多くの追加データ付き認証暗号では、受信者が再計算したタグT'が送信者から受け取ったタグTと一致するかどうかで検証を行う。APEでは、受信者が再計算した中間ステートの値がある値に一致するかどうかで検証を行う。いずれにせよ値が一致しなかった場合は復号に失敗した(データが改ざんされた)という結果を出力する。 There are several types of decryption functions that perform verification at the same time. Many authenticated encryptions with additional data verify that the tag T'recalculated by the recipient matches the tag T received from the sender. APE verifies whether the value of the intermediate state recalculated by the recipient matches a certain value. In any case, if the values do not match, the result that decoding failed (data has been tampered with) is output.

APEは追加データ付き認証暗号の暗号化関数と復号関数の構成法である。保証したい安全性レベル(ビット数)に比べて比較的大きなサイズの置換(bijective map)を用いて暗号化関数と復号関数を構成するという特徴を持つ。APEの復号関数は、上記のとおり、従来の復号関数とは異なる特殊な方法で検証を行う。 APE is a method of constructing the encryption function and decryption function of authenticated encryption with additional data. It has the feature that the encryption function and the decryption function are constructed by using a substitution (bijective map) whose size is relatively large compared to the security level (number of bits) to be guaranteed. As described above, the APE decoding function is verified by a special method different from the conventional decoding function.

図1を参照しながら、APEの暗号化関数の具体的な計算手順を説明する。APEの暗号化関数は、ステートと呼ばれるbビットのデータを、bビットの置換f:{0, 1}b→{0, 1}b、入力データ(N, A, M)、および鍵Kを用いて繰り返し更新しながら、暗号文CおよびタグTを計算する。置換fの詳細は非特許文献2に記載されている。なお、ナンスNの入力は必須ではなく、ナンスNがある場合も、ナンスNは追加データAの一部となる。したがって、入力データは追加データA、メッセージM、および鍵Kを考慮すれば十分である。また、追加データAはメッセージMよりも先に処理される。そのような追加データAはヘッダと呼ばれる。追加データAとメッセージMの長さはいずれもrビットの倍長に限られる。 A specific calculation procedure of the APE encryption function will be described with reference to FIG. The APE encryption function replaces b-bit data called state with b-bit substitution f: {0, 1} b → {0, 1} b , input data (N, A, M), and key K. Calculate ciphertext C and tag T with repeated updates using. Details of the substitution f are described in Non-Patent Document 2. It should be noted that the input of nonce N is not mandatory, and even if there is nonce N, nonce N becomes a part of the additional data A. Therefore, it is sufficient for the input data to consider additional data A, message M, and key K. Also, the additional data A is processed before the message M. Such additional data A is called the header. The length of both additional data A and message M is limited to double the r-bit length.

bビットのステートは、レートと呼ばれるrビットと、キャパシティと呼ばれるc(=b-r)ビットに分割される。暗号化関数を計算する場合、bビットのステートの値を、レート部分のrビットは0(すなわち、すべてのビットが0のビット列)に、キャパシティ部分のcビットは鍵Kの値に初期化する。 The state of b bits is divided into r bits called rate and c (= b-r) bits called capacity. When calculating the encryption function, the b-bit state value is initialized to 0 for the r-bit in the rate part (that is, a bit string in which all bits are 0) and the c-bit in the capacity part to the value of key K. To do.

手順1.追加データAをrビットのブロックに分割する。bビットのステートのうちレート部分のrビットに対し、追加データAの第一ブロックとの排他的論理和を計算し、bビットのステートに対し、置換fを計算する。この置換fの出力を新たなステートの値とする。この操作を追加データAの最終ブロックが排他的論理和されるまで繰り返す。 Step 1. Divide the additional data A into blocks of r bits. The exclusive OR with the first block of additional data A is calculated for the r bit of the rate part of the b-bit state, and the substitution f is calculated for the b-bit state. Let the output of this permutation f be the value of the new state. This operation is repeated until the final block of additional data A is exclusively ORed.

手順2.bビットのステートのうちキャパシティ部分のcビットに対し、整数値1(すなわち、最下位ビットのみが1のビット列)との排他的論理和を計算する。 Step 2. Calculates the exclusive OR of the c-bit of the capacity portion of the b-bit state with the integer value 1 (that is, the bit string in which only the least significant bit is 1).

手順3.メッセージMをrビットのブロックに分割する。bビットのステートのうちレート部分のrビットに対し、メッセージMの第一ブロックとの排他的論理和を計算し、bビットのステートに対し、置換fを計算する。この置換fの出力を新たなステートの値とし、レート部分のrビットを暗号文Cの第一ブロックとして出力する。この操作をメッセージMの最終ブロックが排他的論理和されるまで繰り返す。 Step 3. Divide message M into blocks of r bits. The exclusive OR with the first block of message M is calculated for the r bit of the rate part of the b-bit state, and the substitution f is calculated for the b-bit state. The output of this substitution f is used as the value of the new state, and the r bit of the rate part is output as the first block of the ciphertext C. This operation is repeated until the last block of message M is exclusively ORed.

手順4.bビットのステートのうちキャパシティ部分のcビットに対し、cビットの鍵Kとの排他的論理和を計算し、計算結果をcビットのタグTとして出力する。 Step 4. The exclusive OR of the c-bit key K is calculated for the c-bit of the capacity part of the b-bit state, and the calculation result is output as the c-bit tag T.

図2を参照しながら、APEの復号関数の具体的な計算手順を説明する。APEの復号関数は、APEの暗号化関数の計算をほぼ逆順に行う。復号関数は、通常(C, T, A, N)の組を入力にとるが、APEではナンスNは追加データAの一部とみなすことができるため、(C, T, A)の組を入力にとるとみなす。 A specific calculation procedure of the decoding function of APE will be described with reference to FIG. The APE decryption function calculates the APE encryption function in almost the reverse order. The decoding function normally takes the set of (C, T, A, N) as input, but since nonce N can be regarded as part of the additional data A in APE, the set of (C, T, A) is used. Considered as input.

復号関数を計算する場合、bビットのステートの値を、rビットの暗号文Cの最終ブロック(図2の例ではC2)とcビットのタグTとを連結した値に初期化する。 When calculating the decryption function, the value of the b-bit state is initialized to the value obtained by concatenating the final block of the r-bit ciphertext C (C 2 in the example of FIG. 2 ) and the c-bit tag T.

手順1.bビットのステートのうちキャパシティ部分のcビットに対し、cビットの鍵Kとの排他的論理和を計算し、計算結果によりキャパシティ部分のcビットを更新する。 Step 1. The exclusive OR of the c-bit key K is calculated for the c-bit of the capacity part of the b-bit state, and the c-bit of the capacity part is updated according to the calculation result.

手順2.bビットのステートに対し、置換fの逆置換f-1:{0, 1}b→{0, 1}bを計算する。この逆置換f-1の出力を新たなステートの値とする。レート部分のrビットに対し、暗号文Cの最終ブロックの一つ前のブロック(図2の例ではC1)との排他的論理和を計算し、計算結果をメッセージMの最終ブロック(図2の例ではM2)として出力する。また、レート部分のrビットを、暗号文Cの最終ブロックの一つ前のブロック(図2の例ではC1)により更新し、更新されたステートを新たなステートの値とする。この操作を暗号文Cの第一ブロック(図2の例ではC0)が処理されるまで繰り返す。これにより、メッセージMの最終ブロック(図2の例ではM2)から第二ブロック(図2の例ではM1)までが復元される。最後に更新されたステートのうち、レート部分のrビットの値をSr、キャパシティ部分のcビットの値をScとする。 Step 2. For the b-bit state, the inverse permutation of the permutation f f -1 : {0, 1} b → {0, 1} b is calculated. Let the output of this inverse permutation f -1 be the value of the new state. The exclusive OR is calculated for the r bit of the rate part with the block immediately before the final block of the ciphertext C (C 1 in the example of FIG. 2), and the calculation result is the final block of the message M (Fig. 2). In the example of, it is output as M 2 ). Further, the r bit of the rate portion is updated by the block immediately before the final block of the ciphertext C (C 1 in the example of FIG. 2), and the updated state is set as the value of the new state. This operation is repeated until the first block of ciphertext C (C 0 in the example of FIG. 2) is processed. Thus, the last block of the message M (M 2 in the example of FIG. 2) to a second block (M 1 in the example of FIG. 2) is restored. Of the last updated states, let S r be the value of the r bit in the rate part and S c be the value of the c bit in the capacity part.

手順3.メッセージMの第一ブロック(図2の例ではM0)の復元方法は、それ以外のブロックとは異なる。まず、暗号化関数の手順1から手順2までと同じ計算を行う。更新されたステートのうち、レート部分のrビットの値をS'r、キャパシティ部分のcビットの値をS'cとする。rビットの値Srとrビットの値S'rとの排他的論理和を計算し、計算結果をメッセージMの第一ブロック(図2の例ではM0)として出力する。 Step 3. The method of restoring the first block of message M (M 0 in the example of FIG. 2) is different from that of the other blocks. First, the same calculation as in steps 1 to 2 of the encryption function is performed. Of the updated state, the value of r bits of rate portion S 'r, the value of c bit capacity portion S' and c. The exclusive OR of the r-bit value S r and the r-bit value S 'r is calculated, and outputs the calculation result as the first block of the message M (M 0 in the example of FIG. 2).

手順4.cビットの値Scとcビットの値S'cとを比較し、値が一致すれば復号されたメッセージMを出力する。一致しなかった場合は、メッセージMは出力せず、復号に失敗した旨を表すエラーコードのみを出力する。 Step 4. comparing the c-bit value S c and c-bit values S 'c, and outputs a message M whose value is decoded if they match. If they do not match, message M is not output and only an error code indicating that decoding has failed is output.

追加データのうちメッセージよりも後に処理されるものをトレイラと呼ぶ(例えば、非特許文献3参照)。トレイラは実利用を想定してインターフェースを柔軟にするために利用するものであり、方式の安全性には関係しない。 Of the additional data, the data processed after the message is called a trailer (see, for example, Non-Patent Document 3). The trailer is used to make the interface flexible assuming actual use, and is not related to the safety of the method.

追加データ付き認証暗号の安全性概念の一つに未検証復号データ出力がある(例えば、非特許文献4参照)。復号時に、改ざんされていないことが検証されていない復号データを出力してしまうと、安全性が著しく損なわれ、強力な攻撃を許してしまう。そのため、通常の追加データ付き認証暗号では、前述の通り、検証に失敗した場合にはメッセージを出力せずに検証失敗のエラーコードのみを出力するように実装することが望ましい。未検証復号データ出力とは、検証の結果によらず(もしくは検証を行わずに)、復号データを出力してしまう誤った実装における安全性である。 One of the security concepts of the authentication cipher with additional data is unverified decrypted data output (see, for example, Non-Patent Document 4). If the decrypted data that has not been verified to have been tampered with is output at the time of decryption, the security is significantly impaired and a powerful attack is allowed. Therefore, as described above, it is desirable to implement normal authentication encryption with additional data so that when verification fails, only the verification failure error code is output without outputting a message. Unverified decrypted data output is safety in an erroneous implementation that outputs decrypted data regardless of the result of verification (or without verification).

未検証復号データ出力についてより詳細に説明する。APEの暗号化関数は、(N, A, M)の組を入力にとり、(C, T)の組を出力する。APEの復号関数を正しい(C, T, A, N)の組に対して行った場合、検証の結果によらず正しいメッセージMが復号されるが、これは未検証復号データ出力とは呼ばない。未検証復号データ出力とは、受信者が知っている正しい組(C, T, A, N)に対し、C, T, A, Nのいずれか一つ以上の値を改変し(したがって検証をすれば失敗する)、検証を行わなかった場合にメッセージMの情報が攻撃者に漏洩するかどうかを議論するものである。なお、APEでは、ナンスNは追加データAの一部であるため、ナンスNは無視できる。 The unverified decrypted data output will be described in more detail. The APE encryption function takes a set of (N, A, M) as an input and outputs a set of (C, T). When the APE decoding function is performed on the correct (C, T, A, N) pairs, the correct message M is decoded regardless of the verification result, but this is not called unverified decrypted data output. .. Unverified decrypted data output is the modification of one or more of the values of C, T, A, N to the correct set (C, T, A, N) known to the recipient (and therefore validation). If you do, it will fail), and it will discuss whether the information in message M will be leaked to the attacker if the verification is not performed. In APE, nonce N is a part of additional data A, so nonce N can be ignored.

APEが持つ未検証復号データ出力に対する脆弱性を説明する。正しい(C, T, A)の組に対し、攻撃者が暗号文Cの一部を改変した暗号文C'と正しいタグTを指定した場合を考える。任意の追加データAについて、未検証復号データ出力は、正しい暗号文Cと改変された暗号文C'に関して、最終ブロックから数え始めて最初に同一値でなくなるブロックまで、対応する正しいメッセージMを攻撃者に漏洩してしまう。 Explain the vulnerability of APE to unverified decrypted data output. Consider the case where an attacker specifies a ciphertext C', which is a partial modification of the ciphertext C, and a correct tag T for the correct (C, T, A) pair. For any additional data A, the unverified decrypted data output will attack the correct message M for the correct ciphertext C and the modified ciphertext C', starting from the last block and up to the first block that is not the same value. It leaks to.

図3は、攻撃者が、rビットの追加データA(ナンスNを含む)と、5rビットのメッセージM(=M0||M1||M2||M3||M4)に対応する暗号文C(=C0||C1||C2||C3||C4)と、タグTとを取得し、改変された暗号文C'(=C0||C1||C'2||C3||C4)(すなわち、C2のみが改変されている)と、正しいタグTと、改変された追加データA'とに対して復号処理を行った場合に、復号されたメッセージMの各ブロックが正しいか誤っているかを表している。 In Figure 3, the attacker responds to r-bit additional data A (including nonce N) and 5-r-bit message M (= M 0 || M 1 || M 2 || M 3 || M 4 ). Ciphertext C (= C 0 || C 1 || C 2 || C 3 || C 4 ) and the tag T are obtained and the modified ciphertext C'(= C 0 || C 1 | | C '2 || C 3 || C 4) ( i.e., the C 2 only has been modified), and the correct tag T, modified additional data a' if the decoding process was performed on the , Indicates whether each block of the decrypted message M is correct or incorrect.

正しい暗号文Cと改変された暗号文C'に関して、最終ブロックから数え始めて最初に同一値でなくなるブロックとは、図3の例ではC'2のブロックを指す。実際、C4, C3(およびT)を使ったM4の復元手順は正しい値を用いた処理であり、正しいM4が攻撃者に漏洩してしまう。また、C3, C'2を使ったM'3の復元手順では、M3とは異なる値になるものの、C2とC'2との排他的論理和の分だけM3からずれた値がM'3と等しくなることがわかるため、攻撃者はM'3から正しいM3を復元できてしまう。なお、M2の復元では、誤ったC'2の影響が逆置換f-1を通してレート部分とキャパシティ部分に拡大しているため、正しいC1を入力したとしても、正しいM2が攻撃者に漏洩することはない。 Ciphertext C which has been modified to be correct ciphertext C 'with respect to, the first not the same value block beginning to last block, in the example of FIG. 3 C' refers to the second block. In fact, the M 4 restore procedure using C 4 , C 3 (and T) is a process with the correct values, and the correct M 4 is leaked to the attacker. The value in the C 3, C '2 and using the M' 3 restoration procedure, although becomes a value different from the M 3, displaced from C 2 and C '2 and exclusive amount corresponding M 3 of the sum of There 'because it can be seen that equal to 3, the attacker M' M she can restore the correct M 3 from 3. In the restoration of M 2, the influence of false C '2 is expanded to rate portion and capacity portion through inverse permutation f -1, even entered the correct C 1, the correct M 2 attacker Will not leak to.

Elena Andreeva, Begul Bilgin, Andrey Bogdanov, Atul Luykx, Bart Mennink, Nicky Mouha and Kan Yasuda, "APE: Authenticated Permutation-Based Encryption for Lightweight Cryptography," FSE 2014, (eds.) Carlos Cid and Christian Rechberger, LNCS, Vol. 8540, pages 168-186, Springer, 2015.Elena Andreeva, Begul Bilgin, Andrey Bogdanov, Atul Luykx, Bart Mennink, Nicky Mouha and Kan Yasuda, "APE: Authenticated Permutation-Based Encryption for Lightweight Cryptography," FSE 2014, (eds.) Carlos Cid and Christian Rechberger, LNCS, Vol . 8540, pages 168-186, Springer, 2015. Elena Andreeva, Begul Bilgin, Andrey Bogdanov, Atul Luykx, Florian Mendel, Bart Mennink, Nicky Mouha, Qingju Wang and Kan Yasuda, "PRIMATEs v1 - Submission to the CAESAR Competition," Submitted to CAESAR, 2014.Elena Andreeva, Begul Bilgin, Andrey Bogdanov, Atul Luykx, Florian Mendel, Bart Mennink, Nicky Mouha, Qingju Wang and Kan Yasuda, "PRIMATEs v1 --Submission to the CAESAR Competition," Submitted to CAESAR, 2014. Jean-Philippe Aumasson, Philipp Jovanovic and Samuel Neves, "NORX V3," Submitted to CAESAR, 2015.Jean-Philippe Aumasson, Philipp Jovanovic and Samuel Neves, "NORX V3," Submitted to CAESAR, 2015. Elena Andreeva, Andrey Bogdanov, Atul Luykx, Bart Mennink, Nicky Mouha, and Kan Yasuda, "How to Securely Release Unveried Plaintext in Authenticated Encryption," ASIACRYPT 2014, (eds.) Palash Sarkar and Tetsu Iwata, LNCS, Vol. 8873, pages 105-125, Springer, 2014.Elena Andreeva, Andrey Bogdanov, Atul Luykx, Bart Mennink, Nicky Mouha, and Kan Yasuda, "How to Securely Release Unveried Plaintext in Authenticated Encryption," ASIACRYPT 2014, (eds.) Palash Sarkar and Tetsu Iwata, LNCS, Vol. 8873, pages 105-125, Springer, 2014.

従来のAPEで未検証復号データ出力を行うと、攻撃者が誤った追加データA'を指定したとしても、正しい暗号文Cに対応するメッセージMの一部が漏洩してしまうことがある。 When unverified decrypted data is output with the conventional APE, even if the attacker specifies the wrong additional data A', a part of the message M corresponding to the correct ciphertext C may be leaked.

この発明の目的は、上記のような点に鑑みて、未検証復号データ出力に対する安全性が向上した追加データ付き認証暗号技術を実現することである。 In view of the above points, an object of the present invention is to realize an authentication encryption technique with additional data, which has improved security for unverified decrypted data output.

上記の課題を解決するために、この発明の追加データ付き認証暗号システムは、暗号化装置と復号装置とを含む。暗号化装置は、レート部分とキャパシティ部分とからなる暗号化ステートと、復号装置とあらかじめ共有した共通鍵とを記憶する記憶部と、暗号化ステートのレート部分を所定のビット列に、暗号化ステートのキャパシティ部分を共通鍵に設定する初期化部と、入力されたナンスを暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の暗号化ステートに対して所定の置換を計算するナンス計算部と、入力されたメッセージを暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の暗号化ステートに対して置換を計算し、置換を計算するたびに暗号化ステートのレート部分を暗号文のブロックとして出力するメッセージ計算部と、入力された追加データを用いて暗号化ステートのレート部分を変化させる補助入力付き置換を計算する追加データ計算部と、暗号化ステートのレート部分を暗号文の最終ブロックとして出力し、暗号化ステートのキャパシティ部分と共通鍵との排他的論理和をタグとして出力するタグ生成部と、を含む。復号装置は、レート部分とキャパシティ部分とからなる復号ステートと、暗号化装置とあらかじめ共有した共通鍵とを記憶する記憶部と、復号ステートのレート部分を暗号化装置から受け取った暗号文の最終ブロックに、復号ステートのキャパシティ部分を暗号化装置から受け取ったタグに設定する第一初期化部と、復号ステートのキャパシティ部分を共通鍵との排他的論理和により更新するタグ復号部と、暗号化装置から受け取った追加データを用いて復号ステートのレート部分を変化させる補助入力付き置換の逆置換を計算する追加データ逆計算部と、暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、復号ステートに対して置換の逆置換を計算し、置換の逆置換を計算するたびに復号ステートのレート部分と当該ブロックとの排他的論理和をメッセージのブロックとして出力し、当該ブロックにより復号ステートのレート部分を更新する暗号文逆計算部と、復号ステートの値を中間ステート値として記憶した後、復号ステートのレート部分を所定のビット列に、復号ステートのキャパシティ部分を共通鍵に設定する第二初期化部と、暗号化装置から受け取ったナンスを復号ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、復号ステートのレート部分を当該ブロックとの排他的論理和により更新した後の復号ステートに対して置換を計算するナンス計算部と、中間ステート値のキャパシティ部分と復号ステートのキャパシティ部分とが一致するとき、中間ステート値のレート部分と復号ステートのレート部分との排他的論理和をメッセージの第一ブロックとして出力する改ざん検知部と、を含む。 To solve the above problems, the authentication encryption system with additional data of the present invention includes an encryption device and a decryption device. The encryption device has a storage unit that stores an encryption state consisting of a rate part and a capacity part, a common key shared in advance with the decryption device, and a rate part of the encryption state in a predetermined bit string, and is in the encryption state. For the initialization part that sets the capacity part of the above to the common key and each block that divides the input nonce into the length of the rate part of the encryption state, the rate part of the encryption state is applied in order from the previous block. For the nonce calculation unit that calculates a predetermined replacement for the encryption state after updating by exclusive logical sum with the block, and for each block that divides the input message into the length of the rate part of the encryption state. In order from the previous block, the replacement is calculated for the encryption state after updating the rate part of the encryption state by the exclusive logical sum with the block, and each time the replacement is calculated, the rate part of the encryption state is calculated. A message calculation unit that outputs as a block of encrypted text, an additional data calculation unit that calculates replacement with an auxiliary input that changes the rate part of the encryption state using the input additional data, and an encryption unit that encrypts the rate part of the encryption state. It includes a tag generator that outputs as the final block of the statement and outputs as a tag the exclusive logical sum of the capacity part of the encryption state and the common key. The decryption device is a storage unit that stores a decryption state consisting of a rate portion and a capacity portion, a common key shared in advance with the encryption device, and a final encryption text that receives the rate portion of the decryption state from the encryption device. In the block, a first initialization unit that sets the capacity part of the decryption state to the tag received from the encryption device, and a tag decryption unit that updates the capacity part of the decryption state by an exclusive logical sum with the common key. The additional data inverse calculator that calculates the inverse replacement of the replacement with auxiliary input that changes the rate part of the decryption state using the additional data received from the encryption device, and the cipher statement received from the encryption device other than the last block For each block, the inverse substitution of the substitution is calculated for the decryption state in order from the subsequent block, and each time the inverse substitution of the substitution is calculated, the exclusive logical sum of the rate part of the decryption state and the block is the block of the message. The cryptographic inverse calculation unit that updates the rate part of the decryption state by the block, and after storing the value of the decryption state as an intermediate state value, the rate part of the decryption state is stored in a predetermined bit string and the capacity of the decryption state. For the second initialization unit that sets the city part as the common key, and for each block that divides the nonce received from the encryption device into the length of the rate part of the decryption state, the rate part of the decryption state is displayed in order from the previous block. When the nonce calculation unit that calculates the replacement for the decryption state after updating by the exclusive logical sum with the block and the capacity part of the intermediate state value and the capacity part of the decryption state match, the intermediate state value Includes a tampering detector that outputs the exclusive logical sum of the rate portion of the message and the rate portion of the decryption state as the first block of the message.

この発明によれば、追加データ付き認証暗号において、未検証復号データ出力に対する安全性が向上する。 According to the present invention, in the authenticated encryption with additional data, the security against unverified decrypted data output is improved.

図1は、従来の暗号化関数を説明するための図である。FIG. 1 is a diagram for explaining a conventional encryption function. 図2は、従来の復号関数を説明するための図である。FIG. 2 is a diagram for explaining a conventional decoding function. 図3は、未検証復号データ出力に対する脆弱性を説明するための図である。FIG. 3 is a diagram for explaining the vulnerability to unverified decrypted data output. 図4は、追加データ付き認証暗号システムの機能構成を例示する図である。FIG. 4 is a diagram illustrating a functional configuration of an authenticated encryption system with additional data. 図5は、暗号化装置の機能構成を例示する図である。FIG. 5 is a diagram illustrating the functional configuration of the encryption device. 図6は、ナンス計算部の機能構成を例示する図である。FIG. 6 is a diagram illustrating the functional configuration of the nonce calculation unit. 図7は、メッセージ計算部の機能構成を例示する図である。FIG. 7 is a diagram illustrating the functional configuration of the message calculation unit. 図8は、追加データ計算部の機能構成を例示する図である。FIG. 8 is a diagram illustrating the functional configuration of the additional data calculation unit. 図9は、復号装置の機能構成を例示する図である。FIG. 9 is a diagram illustrating the functional configuration of the decoding device. 図10は、追加データ逆計算部の機能構成を例示する図である。FIG. 10 is a diagram illustrating the functional configuration of the additional data inverse calculation unit. 図11は、暗号文逆計算部の機能構成を例示する図である。FIG. 11 is a diagram illustrating the functional configuration of the ciphertext inverse calculation unit. 図12は、ナンス計算部の機能構成を例示する図である。FIG. 12 is a diagram illustrating the functional configuration of the nonce calculation unit. 図13は、暗号化方法の処理手続きを例示する図である。FIG. 13 is a diagram illustrating the processing procedure of the encryption method. 図14は、実施形態の暗号化関数の一例を説明するための図である。FIG. 14 is a diagram for explaining an example of the encryption function of the embodiment. 図15は、実施形態の暗号化関数の一例を説明するための図である。FIG. 15 is a diagram for explaining an example of the encryption function of the embodiment. 図16は、復号方法の処理手続きを例示する図である。FIG. 16 is a diagram illustrating a processing procedure of the decoding method. 図17は、実施形態の復号関数の一例を説明するための図である。FIG. 17 is a diagram for explaining an example of the decoding function of the embodiment. 図18は、実施形態の復号関数の一例を説明するための図である。FIG. 18 is a diagram for explaining an example of the decoding function of the embodiment.

以下、この発明の実施の形態について詳細に説明する。なお、図面中において同じ機能を有する構成部には同じ番号を付し、重複説明を省略する。 Hereinafter, embodiments of the present invention will be described in detail. In the drawings, the components having the same function are given the same number, and duplicate description is omitted.

この発明の実施形態は、未検証復号データ出力に対する安全性が従来よりも向上した追加データ付き認証暗号を実行する追加データ付き認証暗号システムおよび方法である。従来のAPEでは、ナンスNは追加データAの一部として扱われていたが、実施形態では、APEの追加データをナンスNとそれ以外の追加データAに分割して扱う。ナンスNはヘッダとしてメッセージMより前に処理し、追加データAはトレイラとしてメッセージMより後に処理する。 An embodiment of the present invention is an authentication encryption system and method with additional data that performs authentication encryption with additional data, which is more secure than ever before for unverified decrypted data output. In the conventional APE, the nonce N is treated as a part of the additional data A, but in the embodiment, the additional data of the APE is divided into the nonce N and the other additional data A and treated. Nonce N is processed as a header before message M, and additional data A is processed as a trailer after message M.

実施形態の追加データ付き認証暗号システムは、図4に示すように、追加データ付き認証暗号の暗号化関数を実行する暗号化装置1と、追加データ付き認証暗号の復号関数を実行する復号装置2とを含む。この実施形態では、暗号化装置1および復号装置2はそれぞれ通信網3へ接続される。通信網3は、接続される各装置が相互に通信可能なように構成された回線交換方式もしくはパケット交換方式の通信網であり、例えばインターネットやLAN(Local Area Network)、WAN(Wide Area Network)などを用いることができる。なお、各装置は必ずしも通信網3を介してオンラインで通信可能である必要はない。例えば、暗号化装置1が出力する情報を磁気テープやUSBメモリなどの可搬型記録媒体に記憶し、その可搬型記録媒体から復号装置2へオフラインで入力するように構成してもよい。 As shown in FIG. 4, the authentication encryption system with additional data of the embodiment includes an encryption device 1 that executes an encryption function of the authentication encryption with additional data and a decryption device 2 that executes a decryption function of the authentication encryption with additional data. And include. In this embodiment, the encryption device 1 and the decryption device 2 are each connected to the communication network 3. The communication network 3 is a circuit-switched or packet-switched communication network configured so that each connected device can communicate with each other. For example, the Internet, LAN (Local Area Network), WAN (Wide Area Network). Etc. can be used. It should be noted that each device does not necessarily have to be able to communicate online via the communication network 3. For example, the information output by the encryption device 1 may be stored in a portable recording medium such as a magnetic tape or a USB memory, and the information may be input offline from the portable recording medium to the decoding device 2.

追加データ付き認証暗号システムに含まれる暗号化装置1は、図5に示すように、記憶部10、入力部11、初期化部12、ナンス計算部13、メッセージ計算部14、境界設定部15、追加データ計算部16、タグ生成部17、および出力部18を含む。暗号化装置1に含まれるナンス計算部13は、図6に示すように、分割部131、排他的論理和部132、および置換部133を含む。暗号化装置1に含まれるメッセージ計算部14は、図7に示すように、分割部141、排他的論理和部142、置換部143、および暗号文出力部144を含む。暗号化装置1に含まれる追加データ計算部16は、図8に示すように、分割部161、排他的論理和部162、および置換部163を含む。 As shown in FIG. 5, the encryption device 1 included in the authentication encryption system with additional data includes a storage unit 10, an input unit 11, an initialization unit 12, a nonce calculation unit 13, a message calculation unit 14, and a boundary setting unit 15. It includes an additional data calculation unit 16, a tag generation unit 17, and an output unit 18. As shown in FIG. 6, the nonce calculation unit 13 included in the encryption device 1 includes a division unit 131, an exclusive OR unit 132, and a replacement unit 133. As shown in FIG. 7, the message calculation unit 14 included in the encryption device 1 includes a division unit 141, an exclusive OR unit 142, a replacement unit 143, and a ciphertext output unit 144. The additional data calculation unit 16 included in the encryption device 1 includes a division unit 161, an exclusive OR unit 162, and a replacement unit 163, as shown in FIG.

追加データ付き認証暗号システムに含まれる復号装置2は、図9に示すように、例えば、記憶部20、入力部21、第一初期化部22、タグ復号部23、追加データ逆計算部24、境界除去部25、暗号文逆計算部26、第二初期化部27、ナンス計算部28、改ざん検知部29、および出力部30を含む。復号装置2に含まれる追加データ逆計算部24は、図10に示すように、分割部241、逆置換部242、および排他的論理和部243を含む。復号装置2に含まれる暗号文逆計算部26は、図11に示すように、逆置換部261、排他的論理和部262、およびメッセージ出力部263を含む。復号装置2に含まれるナンス計算部28は、図12に示すように、分割部281、排他的論理和部282、および置換部283を含む。 As shown in FIG. 9, the decryption device 2 included in the authentication encryption system with additional data includes, for example, a storage unit 20, an input unit 21, a first initialization unit 22, a tag decryption unit 23, and an additional data inverse calculation unit 24. It includes a boundary removal unit 25, a ciphertext inverse calculation unit 26, a second initialization unit 27, a nonce calculation unit 28, a tampering detection unit 29, and an output unit 30. As shown in FIG. 10, the additional data inverse calculation unit 24 included in the decoding device 2 includes a division unit 241, an inverse replacement unit 242, and an exclusive OR unit 243. As shown in FIG. 11, the ciphertext inverse calculation unit 26 included in the decryption device 2 includes an inverse replacement unit 261, an exclusive OR unit 262, and a message output unit 263. As shown in FIG. 12, the nonce calculation unit 28 included in the decoding device 2 includes a division unit 281, an exclusive OR unit 282, and a replacement unit 283.

暗号化装置1が図13に示す各ステップの処理を行い、復号装置2が図16に示す各ステップの処理を行うことにより実施形態の追加データ付き認証暗号方法が実現される。なお、追加データ付き認証暗号方法のうち暗号化装置1が実行する部分を暗号化方法とも呼び、復号装置2が実行する部分を復号方法とも呼ぶ。 The encryption device 1 performs the processing of each step shown in FIG. 13, and the decryption device 2 performs the processing of each step shown in FIG. 16, thereby realizing the authentication encryption method with additional data of the embodiment. Of the authenticated encryption methods with additional data, the portion executed by the encryption device 1 is also referred to as an encryption method, and the portion executed by the decryption device 2 is also referred to as a decryption method.

暗号化装置1および復号装置2は、例えば、中央演算処理装置(CPU: Central Processing Unit)、主記憶装置(RAM: Random Access Memory)などを有する公知又は専用のコンピュータに特別なプログラムが読み込まれて構成された特別な装置である。暗号化装置1および復号装置2は、例えば、中央演算処理装置の制御のもとで各処理を実行する。暗号化装置1および復号装置2に入力されたデータや各処理で得られたデータは、例えば、主記憶装置に格納され、主記憶装置に格納されたデータは必要に応じて中央演算処理装置へ読み出されて他の処理に利用される。暗号化装置1および復号装置2の各処理部は、少なくとも一部が集積回路等のハードウェアによって構成されていてもよい。暗号化装置1および復号装置2が備える各記憶部は、例えば、RAM(Random Access Memory)などの主記憶装置、ハードディスクや光ディスクもしくはフラッシュメモリ(Flash Memory)のような半導体メモリ素子により構成される補助記憶装置、またはリレーショナルデータベースやキーバリューストアなどのミドルウェアにより構成することができる。 In the encryption device 1 and the decryption device 2, a special program is read into a known or dedicated computer having, for example, a central processing unit (CPU), a main storage device (RAM: Random Access Memory), and the like. It is a special device configured. The encryption device 1 and the decryption device 2 execute each process under the control of the central processing unit, for example. The data input to the encryption device 1 and the decryption device 2 and the data obtained by each process are stored in the main storage device, for example, and the data stored in the main storage device is stored in the central processing unit as needed. It is read out and used for other processing. At least a part of each processing unit of the encryption device 1 and the decryption device 2 may be configured by hardware such as an integrated circuit. Each storage unit included in the encryption device 1 and the decryption device 2 is composed of, for example, a main storage device such as RAM (Random Access Memory) and a semiconductor memory element such as a hard disk, an optical disk, or a flash memory (Flash Memory). It can be configured with storage or middleware such as relational databases and key-value stores.

図13−15を参照して、実施形態の追加データ付き認証暗号システムが実行する追加データ付き認証暗号方法のうち、暗号化装置1が実行する暗号化方法について説明する。 Among the authentication encryption methods with additional data executed by the authentication encryption system with additional data of the embodiment, the encryption method executed by the encryption device 1 will be described with reference to FIGS. 13-15.

暗号化装置1の記憶部10には、rビットのレート部分とcビットのキャパシティ部分とからなるbビットのステート(以下、復号装置2の記憶部20に記憶されるステートと区別するために、暗号化ステートと呼ぶ)と、復号装置2との間であらかじめ共有した共通鍵Kとが記憶されている。例えば、ステートは512ビットとし、レート部分は256ビット、キャパシティ部分は256ビットに構成する(すなわち、b=512, r=256, c=256)。レート部分とキャパシティ部分の長さの比は、処理速度と安全性のトレードオフの関係となっている。レート部分の長さが大きくなると、処理速度は向上するが安全性は低下する。逆に、キャパシティ部分の長さが大きくなると、安全性が向上するが処理速度が低下する。したがって、b, r, cの各値は、所望の処理速度と安全性のバランスを鑑みて適宜設計すればよい。 In the storage unit 10 of the encryption device 1, a b-bit state composed of an r-bit rate portion and a c-bit capacity portion (hereinafter, in order to distinguish from the state stored in the storage unit 20 of the decryption device 2). , Called the encryption state) and the common key K shared in advance with the decryption device 2. For example, the state is 512 bits, the rate part is 256 bits, and the capacity part is 256 bits (that is, b = 512, r = 256, c = 256). The ratio of the length of the rate part to the length part of the capacity part is a trade-off between processing speed and safety. As the length of the rate portion increases, the processing speed increases but the safety decreases. On the contrary, when the length of the capacity portion is increased, the safety is improved but the processing speed is lowered. Therefore, each value of b, r, and c may be appropriately designed in consideration of a desired balance between processing speed and safety.

ステップS11において、暗号化装置1の入力部11へ、ナンスNと追加データAとメッセージMとの組(N, A, M)が入力される。ナンスNは従来のAPEと同様に追加データの一部として入力されてもよく、その場合、入力部11は入力された追加データをナンスNと追加データAとに分割する。なお、ナンスNは通常固定長であるため、例えば、入力された追加データの先頭から所定のビット数をナンスNとし、残りを追加データAとするなどにより、容易に分割することが可能である。ナンスN、追加データA、およびメッセージMはいずれも長さをrビットの倍長とする。入力部11は、ナンスNをナンス計算部13へ、メッセージMをメッセージ計算部14へ、追加データAを追加データ計算部16へそれぞれ入力する。 In step S11, the set (N, A, M) of the nonce N, the additional data A, and the message M is input to the input unit 11 of the encryption device 1. The nonce N may be input as a part of the additional data as in the conventional APE, in which case the input unit 11 divides the input additional data into the nonce N and the additional data A. Since the nonce N is usually a fixed length, it can be easily divided by, for example, setting a predetermined number of bits from the beginning of the input additional data as the nonce N and setting the rest as the additional data A. .. Nonce N, additional data A, and message M are all r bits in length. The input unit 11 inputs the nonce N to the nonce calculation unit 13, the message M to the message calculation unit 14, and the additional data A to the additional data calculation unit 16.

ステップS12において、暗号化装置1の初期化部12は、記憶部10に記憶されている暗号化ステートのうち、レート部分の値を0(すなわち、すべてのビットが0のビット列)に、キャパシティ部分の値を共通鍵Kの値に設定して初期化する。 In step S12, the initialization unit 12 of the encryption device 1 sets the value of the rate portion of the encryption state stored in the storage unit 10 to 0 (that is, a bit string in which all bits are 0) and has a capacity. Initialize by setting the value of the part to the value of the common key K.

ステップS13において、暗号化装置1のナンス計算部13は、入力部11からナンスNを受け取り、そのナンスNを用いて記憶部10に記憶された暗号化ステートの値を更新する。ナンス計算部13の分割部131は、ナンスNをrビット(すなわち、暗号化ステートのレート部分と同じ長さ)のブロックに分割する。ナンス計算部13の排他的論理和部132は、暗号化ステートのレート部分とナンスNのブロックとの排他的論理和を計算し、その計算結果により暗号化ステートのレート部分を更新する。ナンス計算部13の置換部133は、bビットの暗号化ステート全体に対し、あらかじめ定めたbビットの置換f:{0, 1}b→{0, 1}bを計算し、その計算結果を新たな暗号化ステートの値とする。置換fは、例えば、非特許文献2に記載された置換を用いることができる。ナンス計算部13は、上記の操作をナンスNの第一ブロックから最終ブロックまで前方のブロックから順に実行する。 In step S13, the nonce calculation unit 13 of the encryption device 1 receives the nonce N from the input unit 11, and uses the nonce N to update the value of the encryption state stored in the storage unit 10. The division unit 131 of the nonce calculation unit 13 divides the nonce N into blocks of r bits (that is, the same length as the rate portion of the encryption state). The exclusive OR unit 132 of the nonce calculation unit 13 calculates the exclusive OR of the rate portion of the encryption state and the block of the nonce N, and updates the rate portion of the encryption state according to the calculation result. The replacement unit 133 of the nonce calculation unit 13 calculates a predetermined b-bit replacement f: {0, 1} b → {0, 1} b for the entire b-bit encryption state, and calculates the calculation result. The value of the new encryption state. As the substitution f, for example, the substitution described in Non-Patent Document 2 can be used. The nonce calculation unit 13 executes the above operation from the first block to the final block of the nonce N in order from the previous block.

ステップS14において、暗号化装置1のメッセージ計算部14は、入力部11からメッセージMを受け取り、そのメッセージMを用いて記憶部10に記憶された暗号化ステートの値を更新する。メッセージ計算部14の分割部141は、メッセージMをrビットのブロックに分割する。メッセージ計算部14の排他的論理和部142は、暗号化ステートのレート部分とメッセージMのブロックとの排他的論理和を計算し、その計算結果により暗号化ステートのレート部分を更新する。メッセージ計算部14の置換部143は、bビットの暗号化ステート全体に対し、bビットの置換fを計算し、その計算結果を新たな暗号化ステートの値とする。メッセージ計算部14の暗号文出力部144は、暗号化ステートのレート部分の値を暗号文Cのブロックとして出力する。メッセージ計算部14は、上記の操作をメッセージMの第一ブロックから最終ブロックまで前方のブロックから順に実行する。ただし、ここでは、メッセージMの最終ブロックに対応する暗号文Cのブロックは出力しない。 In step S14, the message calculation unit 14 of the encryption device 1 receives the message M from the input unit 11, and uses the message M to update the value of the encryption state stored in the storage unit 10. The division unit 141 of the message calculation unit 14 divides the message M into blocks of r bits. The exclusive OR unit 142 of the message calculation unit 14 calculates the exclusive OR of the rate portion of the encryption state and the block of the message M, and updates the rate portion of the encryption state according to the calculation result. The replacement unit 143 of the message calculation unit 14 calculates the b-bit replacement f for the entire b-bit encryption state, and sets the calculation result as the value of the new encryption state. The ciphertext output unit 144 of the message calculation unit 14 outputs the value of the rate portion of the encryption state as a block of the ciphertext C. The message calculation unit 14 executes the above operation from the first block to the last block of the message M in order from the previous block. However, here, the block of ciphertext C corresponding to the final block of message M is not output.

ステップS15において、暗号化装置1の境界設定部15は、暗号化ステートのキャパシティ部分と整数値1(すなわち、最下位ビットのみが1のビット列)との排他的論理和を計算し、その計算結果により暗号化ステートのキャパシティ部分を更新する。言い換えると、境界設定部15は、暗号化ステートの最下位ビットのみを反転させる。この操作は、受信者が暗号文Cと追加データAとの境界を判別できるようにするために行われるものである。 In step S15, the boundary setting unit 15 of the encryption device 1 calculates the exclusive OR of the capacity portion of the encryption state and the integer value 1 (that is, the bit string in which only the least significant bit is 1), and the calculation thereof. The capacity part of the encryption state is updated according to the result. In other words, the boundary setting unit 15 inverts only the least significant bit of the encryption state. This operation is performed so that the recipient can determine the boundary between the ciphertext C and the additional data A.

ステップS16において、暗号化装置1の追加データ計算部16は、入力部11から追加データAを受け取り、その追加データAを用いて記憶部10に記憶された暗号化ステートの値を更新する。追加データ計算部16は、図14に示すように、補助入力付き置換f':{0, 1}b→{0, 1}bを、bビットの暗号化ステートを入力とし、追加データAを補助入力として計算し、その計算結果を新たな暗号化ステートの値とする。補助入力付き置換f'は、補助入力の値を用いて入力された値を変化させ、かつ、同じ補助入力を用いて置換後の値から入力された値を復元する逆置換f'-1:{0, 1}b→{0, 1}bを定義できる置換である。具体的には、図15に示すように、補助入力付き置換f'は、置換fを用いて実装することができる。この場合、追加データ計算部16は以下のように構成する。追加データ計算部16の分割部161は、追加データAをrビットのブロックに分割する。追加データ計算部16の排他的論理和部162は、暗号化ステートのレート部分と追加データAのブロックとの排他的論理和を計算し、その計算結果により暗号化ステートのレート部分を更新する。追加データ計算部16の置換部163は、bビットの暗号化ステート全体に対し、bビットの置換fを計算し、その計算結果を新たな暗号化ステートの値とする。追加データ計算部16は、上記の操作を追加データAの第一ブロックから最終ブロックまで前方のブロックから順に実行する。 In step S16, the additional data calculation unit 16 of the encryption device 1 receives the additional data A from the input unit 11, and updates the value of the encryption state stored in the storage unit 10 using the additional data A. As shown in FIG. 14, the additional data calculation unit 16 inputs the replacement f': {0, 1} b → {0, 1} b with an auxiliary input and the b-bit encryption state as an input, and inputs the additional data A. It is calculated as an auxiliary input, and the calculation result is used as the value of the new encryption state. Substitution f'with auxiliary input is an inverse substitution f'- 1 : that changes the input value using the auxiliary input value and restores the input value from the replaced value using the same auxiliary input. {0, 1} b → {0, 1} b is a permutation that can be defined. Specifically, as shown in FIG. 15, the substitution f'with an auxiliary input can be implemented by using the substitution f. In this case, the additional data calculation unit 16 is configured as follows. The division unit 161 of the additional data calculation unit 16 divides the additional data A into blocks of r bits. The exclusive OR unit 162 of the additional data calculation unit 16 calculates the exclusive OR of the rate portion of the encryption state and the block of the additional data A, and updates the rate portion of the encryption state according to the calculation result. The replacement unit 163 of the additional data calculation unit 16 calculates the b-bit replacement f for the entire b-bit encryption state, and sets the calculation result as the value of the new encryption state. The additional data calculation unit 16 executes the above operation from the first block to the final block of the additional data A in order from the previous block.

ステップS17において、暗号化装置1のタグ生成部17は、暗号化ステートのキャパシティ部分と共通鍵Kとの排他的論理和を計算し、その計算結果により暗号化ステートのキャパシティ部分を更新する。タグ生成部17は、暗号化ステートのレート部分を暗号文Cの最終ブロックとして出力し、暗号化ステートのキャパシティ部分をタグTとして出力する。 In step S17, the tag generation unit 17 of the encryption device 1 calculates the exclusive OR of the capacity portion of the encryption state and the common key K, and updates the capacity portion of the encryption state based on the calculation result. .. The tag generation unit 17 outputs the rate portion of the encryption state as the final block of the ciphertext C, and outputs the capacity portion of the encryption state as the tag T.

ステップS18において、暗号化装置1の出力部18は、暗号文CとタグTと追加データAとナンスNとの組(C, T, A, N)を復号装置2へ送信する。 In step S18, the output unit 18 of the encryption device 1 transmits a set (C, T, A, N) of the ciphertext C, the tag T, the additional data A, and the nonce N to the decryption device 2.

図16−18を参照して、実施形態の追加データ付き認証暗号システムが実行する追加データ付き認証暗号方法のうち、復号装置2が実行する復号方法について説明する。 Of the authentication encryption methods with additional data executed by the authentication encryption system with additional data of the embodiment, the decryption method executed by the decryption device 2 will be described with reference to FIGS. 16-18.

復号装置2の記憶部20には、rビットのレート部分とcビットのキャパシティ部分とからなるbビットのステート(以下、暗号化装置1の記憶部10に記憶されるステートと区別するために、復号ステートと呼ぶ)と、暗号化装置1との間であらかじめ共有した共通鍵Kとが記憶されている。b, r, cの各値は、暗号化装置1の記憶部10に記憶された暗号化ステートと同じものとする。 In the storage unit 20 of the decryption device 2, a b-bit state composed of an r-bit rate portion and a c-bit capacity portion (hereinafter, for distinguishing from the state stored in the storage unit 10 of the encryption device 1). , Called a decryption state) and the common key K shared in advance with the encryption device 1. Each value of b, r, and c is assumed to be the same as the encryption state stored in the storage unit 10 of the encryption device 1.

ステップS21において、復号装置2の入力部21へ、暗号化装置1から受信した暗号文CとタグTと追加データAとナンスNとの組(C, T, A, N)が入力される。入力部21は、暗号文Cの最終ブロックとタグTとを第一初期化部22へ、追加データAを追加データ逆計算部24へ、暗号文Cの最終ブロック以外の各ブロックを暗号文逆計算部26へ、ナンスNをナンス計算部28へそれぞれ入力する。 In step S21, the set (C, T, A, N) of the ciphertext C, the tag T, the additional data A, and the nonce N received from the encryption device 1 is input to the input unit 21 of the decryption device 2. The input unit 21 transfers the final block of the ciphertext C and the tag T to the first initialization unit 22, additional data A to the additional data inverse calculation unit 24, and each block other than the final block of the ciphertext C to the ciphertext inverse. The nonce N is input to the calculation unit 26 and the nonce N is input to the nonce calculation unit 28, respectively.

ステップS22において、復号装置2の第一初期化部22は、入力部21から暗号文Cの最終ブロックとタグTとを受け取り、記憶部20に記憶されている復号ステートのうち、レート部分の値を暗号文Cの最終ブロックの値に、キャパシティ部分の値をタグTの値に設定して初期化する。 In step S22, the first initialization unit 22 of the decryption device 2 receives the final block of the ciphertext C and the tag T from the input unit 21, and the value of the rate portion of the decryption state stored in the storage unit 20. Is set to the value of the last block of ciphertext C, and the value of the capacity part is set to the value of tag T, and initialized.

ステップS23において、復号装置2のタグ復号部23は、復号ステートのキャパシティ部分と共通鍵Kとの排他的論理和を計算し、その計算結果により復号ステートのキャパシティ部分を更新する。 In step S23, the tag decoding unit 23 of the decoding device 2 calculates the exclusive OR of the capacity portion of the decoding state and the common key K, and updates the capacity portion of the decoding state based on the calculation result.

ステップS24において、復号装置2の追加データ逆計算部24は、入力部21から追加データAを受け取り、その追加データAを用いて記憶部20に記憶された復号ステートの値を更新する。追加データ逆計算部24は、図17に示すように、補助入力付き置換f'の逆置換f'-1:{0, 1}b→{0, 1}bを、bビットの復号ステートを入力とし、追加データAを補助入力として計算し、その計算結果を新たな復号ステートの値とする。補助入力付き置換f'の逆置換f'-1は、具体的には、図18に示すように、置換fの逆置換f-1を用いて実装することができる。この場合、追加データ逆計算部24は以下のように構成する。追加データ逆計算部24の分割部241は、追加データAをrビットのブロックに分割する。追加データ逆計算部24の逆置換部242は、bビットの復号ステート全体に対し、bビットの置換fの逆置換f-1を計算し、その計算結果を新たな復号ステートの値とする。追加データ逆計算部24の排他的論理和部243は、復号ステートのレート部分と追加データAのブロックとの排他的論理和を計算し、その計算結果により復号ステートのレート部分を更新する。追加データ逆計算部24は、上記の操作を追加データAの最終ブロックから第一ブロックまで後方のブロックから順に実行する。 In step S24, the additional data inverse calculation unit 24 of the decoding device 2 receives the additional data A from the input unit 21, and updates the value of the decoding state stored in the storage unit 20 using the additional data A. As shown in FIG. 17, the additional data inverse calculation unit 24 sets the inverse substitution f'- 1 : {0, 1} b → {0, 1} b of the substitution f'with auxiliary input, and the decoding state of the b bit. As an input, the additional data A is calculated as an auxiliary input, and the calculation result is used as the value of the new decoding state. The inverse permutation f'- 1 of the permutation f'with an auxiliary input can be specifically implemented using the inverse permutation f -1 of the permutation f, as shown in FIG. In this case, the additional data inverse calculation unit 24 is configured as follows. The division unit 241 of the additional data inverse calculation unit 24 divides the additional data A into blocks of r bits. The inverse substitution unit 242 of the additional data inverse calculation unit 24 calculates the inverse substitution f -1 of the b-bit substitution f for the entire decoding state of the b bit, and sets the calculation result as the value of the new decoding state. The exclusive OR unit 243 of the additional data inverse calculation unit 24 calculates the exclusive OR of the rate portion of the decoding state and the block of the additional data A, and updates the rate portion of the decoding state according to the calculation result. The additional data inverse calculation unit 24 executes the above operation in order from the block after the last block to the first block of the additional data A.

ステップS25において、復号装置2の境界除去部25は、復号ステートのキャパシティ部分と整数値1との排他的論理和を計算し、その計算結果により復号ステートのキャパシティ部分を更新する。すなわち、境界除去部25は、復号ステートの最下位ビットのみを反転させる。 In step S25, the boundary removing unit 25 of the decoding device 2 calculates the exclusive OR of the capacity portion of the decoding state and the integer value 1, and updates the capacity portion of the decoding state based on the calculation result. That is, the boundary removing unit 25 inverts only the least significant bit of the decoding state.

ステップS26において、復号装置2の暗号文逆計算部26は、入力部21から暗号文Cの最終ブロック以外の各ブロックを受け取り、その暗号文Cの各ブロックを用いて記憶部20に記憶された復号ステートの値を更新する。暗号文逆計算部26の逆置換部261は、bビットの復号ステート全体に対し、置換fの逆置換f-1を計算し、その計算結果を新たな復号ステートの値とする。暗号文逆計算部26の排他的論理和部262は、復号ステートのレート部分と暗号文Cのブロックとの排他的論理和を計算し、その暗号文Cのブロックにより復号ステートのレート部分を更新する。暗号文逆計算部26のメッセージ出力部263は、復号ステートのレート部分と暗号文Cのブロックとの排他的論理和をメッセージMのブロックとして出力する。暗号文逆計算部26は、上記の操作を暗号文Cの最終ブロックの一つ前のブロックから第一ブロックまで後方のブロックから順に実行する。 In step S26, the ciphertext inverse calculation unit 26 of the decryption device 2 receives each block other than the final block of the ciphertext C from the input unit 21, and stores each block of the ciphertext C in the storage unit 20. Update the value of the decryption state. The inverse substitution unit 261 of the ciphertext inverse calculation unit 26 calculates the inverse substitution f -1 of the substitution f for the entire decoding state of the b bit, and sets the calculation result as the value of the new decoding state. The exclusive OR unit 262 of the ciphertext inverse calculation unit 26 calculates the exclusive OR of the rate portion of the decryption state and the block of the ciphertext C, and updates the rate portion of the decryption state by the block of the ciphertext C. To do. The message output unit 263 of the ciphertext inverse calculation unit 26 outputs the exclusive OR of the rate portion of the decryption state and the block of the ciphertext C as a block of the message M. The ciphertext inverse calculation unit 26 executes the above operation in order from the block immediately before the final block of the ciphertext C to the first block from the block behind.

ステップS27において、復号装置2の第二初期化部27は、復号ステートのレート部分の値を中間ステート値Srとし、復号ステートのキャパシティ部分の値を中間ステート値Scとして、例えば記憶部20などに記憶する。その後、記憶部20に記憶されている復号ステートのうち、レート部分の値を0に、キャパシティ部分の値を共通鍵Kの値に設定して初期化する。 In step S27, the second initialization unit 27 of the decoding device 2 sets the value of the rate portion of the decoding state as the intermediate state value S r and the value of the capacity portion of the decoding state as the intermediate state value S c , for example, a storage unit. Store in 20 etc. After that, among the decryption states stored in the storage unit 20, the value of the rate portion is set to 0 and the value of the capacity portion is set to the value of the common key K for initialization.

ステップS28において、復号装置2のナンス計算部28は、入力部21からナンスNを受け取り、そのナンスNを用いて記憶部20に記憶された復号ステートの値を更新する。ナンス計算部28の分割部281は、ナンスNをrビットのブロックに分割する。ナンス計算部28の排他的論理和部282は、復号ステートのレート部分とナンスNのブロックとの排他的論理和を計算し、その計算結果により復号ステートのレート部分を更新する。ナンス計算部28の置換部283は、bビットの復号ステート全体に対し、bビットの置換fを計算し、その計算結果を新たな復号ステートの値とする。ナンス計算部28は、上記の操作をナンスNの第一ブロックから最終ブロックまで前方のブロックから順に実行する。 In step S28, the nonce calculation unit 28 of the decoding device 2 receives the nonce N from the input unit 21, and uses the nonce N to update the value of the decoding state stored in the storage unit 20. The division unit 281 of the nonce calculation unit 28 divides the nonce N into blocks of r bits. The exclusive OR unit 282 of the nonce calculation unit 28 calculates the exclusive OR of the rate portion of the decoding state and the block of the nonce N, and updates the rate portion of the decoding state according to the calculation result. The replacement unit 283 of the nonce calculation unit 28 calculates the replacement f of the b bit for the entire decoding state of the b bit, and sets the calculation result as the value of the new decoding state. The nonce calculation unit 28 executes the above operation from the first block to the final block of nonce N in order from the previous block.

ステップS29において、復号装置2の改ざん検知部29は、復号ステートのレート部分の値を中間ステート値S'rとし、復号ステートのキャパシティ部分の値を中間ステート値S'cとして、例えば記憶部20などに記憶する。その後、記憶部20に記憶された中間ステート値Scと中間ステート値S'cとを比較する。2つの中間ステート値が等しい場合(Sc=S'c)は、ステップS301へ処理を進め、記憶部20に記憶された中間ステート値Srと中間ステート値S'rとの排他的論理和を、メッセージMの第一ブロックとして出力部30から出力する。2つの中間ステート値が等しくない場合は、ステップS302へ処理を進め、復号に失敗した旨を表すエラーコードを出力部30から出力する。 In step S29, the tampering detection unit 29 of the decoding device 2, the value of the rate portion of the decoding state 'and r, the value of the capacity part of the decoding state intermediate state value S' intermediate state value S as c, for example, a storage unit Store in 20 etc. Then compared with the intermediate state value S c stored in the storage unit 20 and an intermediate state value S 'c. Exclusive of the case two intermediate state values is equal to (S c = S 'c) advances the process to step S301, the intermediate state value S r and the intermediate state value S stored in the storage unit 20' and r Is output from the output unit 30 as the first block of the message M. If the two intermediate state values are not equal, the process proceeds to step S302, and an error code indicating that decoding has failed is output from the output unit 30.

上記のように構成することにより、実施形態の追加データ付き認証暗号技術は、未検証復号データ出力に対する安全性が向上する。実施形態の追加データ付き認証暗号技術では、未検証復号データ出力が行われる際、攻撃者が正しい暗号文Cの一部を改変した暗号文C'と正しいタグTを指定するだけでなく、正しい追加データAも指定しない限り、正しいメッセージMが漏洩することはない。正しい追加データAから1ビットでも誤っている追加データA'を使った場合、メッセージMの最終ブロックを計算する段階でステートの値が誤った状態となっているため、メッセージMの全ブロックが誤ったデータとなる。そのため、未検証復号データ出力を行っても正しいメッセージMが漏洩することがなく、未検証復号データ出力に対する安全性が向上している。 By configuring as described above, the authentication encryption technique with additional data of the embodiment is improved in security against unverified decrypted data output. In the authentication encryption technique with additional data of the embodiment, when the unverified decrypted data is output, the attacker not only specifies the ciphertext C'which is a part of the correct ciphertext C modified and the correct tag T, but also is correct. Unless additional data A is also specified, the correct message M will not be leaked. Correct additional data A is incorrect even by 1 bit If additional data A'is used, all blocks of message M are incorrect because the state value is incorrect at the stage of calculating the final block of message M. It becomes the data. Therefore, the correct message M is not leaked even if the unverified decrypted data is output, and the security for the unverified decrypted data output is improved.

以上、この発明の実施の形態について説明したが、具体的な構成は、これらの実施の形態に限られるものではなく、この発明の趣旨を逸脱しない範囲で適宜設計の変更等があっても、この発明に含まれることはいうまでもない。実施の形態において説明した各種の処理は、記載の順に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。 Although the embodiments of the present invention have been described above, the specific configuration is not limited to these embodiments, and even if the design is appropriately changed without departing from the spirit of the present invention, the specific configuration is not limited to these embodiments. Needless to say, it is included in the present invention. The various processes described in the embodiments are not only executed in chronological order according to the order described, but may also be executed in parallel or individually as required by the processing capacity of the device that executes the processes.

[プログラム、記録媒体]
上記実施形態で説明した各装置における各種の処理機能をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、上記各装置における各種の処理機能がコンピュータ上で実現される。
[Program, recording medium]
When various processing functions in each device described in the above embodiment are realized by a computer, the processing contents of the functions that each device should have are described by a program. Then, by executing this program on the computer, various processing functions in each of the above devices are realized on the computer.

この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよい。 The program describing the processing content can be recorded on a computer-readable recording medium. The computer-readable recording medium may be, for example, a magnetic recording device, an optical disk, a photomagnetic recording medium, a semiconductor memory, or the like.

また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD-ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。 In addition, the distribution of this program is carried out, for example, by selling, transferring, renting, or the like a portable recording medium such as a DVD or CD-ROM on which the program is recorded. Further, the program may be stored in the storage device of the server computer, and the program may be distributed by transferring the program from the server computer to another computer via a network.

このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記憶装置に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。 A computer that executes such a program first stores, for example, a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. Then, when the process is executed, the computer reads the program stored in its own storage device and executes the process according to the read program. Further, as another execution form of this program, a computer may read the program directly from a portable recording medium and execute processing according to the program, and further, the program is transferred from the server computer to this computer. It is also possible to execute the process according to the received program one by one each time. In addition, the above processing is executed by a so-called ASP (Application Service Provider) type service that realizes the processing function only by the execution instruction and result acquisition without transferring the program from the server computer to this computer. May be. The program in this embodiment includes information used for processing by a computer and equivalent to the program (data that is not a direct command to the computer but has a property of defining the processing of the computer, etc.).

また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。 Further, in this embodiment, the present device is configured by executing a predetermined program on the computer, but at least a part of these processing contents may be realized by hardware.

1 暗号化装置
2 復号装置
3 通信網
10 記憶部
11 入力部
12 初期化部
13 ナンス計算部
14 メッセージ計算部
15 境界設定部
16 追加データ計算部
17 タグ生成部
18 出力部
20 記憶部
21 入力部
22 第一初期化部
23 タグ復号部
24 追加データ逆計算部
25 境界除去部
26 暗号文逆計算部
27 第二初期化部
28 ナンス計算部
29 改ざん検知部
30 出力部
1 Encryption device 2 Decryption device 3 Communication network 10 Storage unit 11 Input unit 12 Initialization unit 13 Nonce calculation unit 14 Message calculation unit 15 Boundary setting unit 16 Additional data calculation unit 17 Tag generation unit 18 Output unit 20 Storage unit 21 Input unit 22 First initialization unit 23 Tag decoding unit 24 Additional data inverse calculation unit 25 Boundary removal unit 26 Ciphertext inverse calculation unit 27 Second initialization unit 28 Nonce calculation unit 29 Tampering detection unit 30 Output unit

Claims (5)

暗号化装置と復号装置とを含む追加データ付き認証暗号システムであって、
上記暗号化装置は、
レート部分とキャパシティ部分とからなる暗号化ステートと、上記復号装置とあらかじめ共有した共通鍵とを記憶する記憶部と、
上記暗号化ステートのレート部分を所定のビット列に、上記暗号化ステートのキャパシティ部分を上記共通鍵に設定する初期化部と、
入力されたナンスを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して所定の置換を計算し、その計算結果で上記暗号化ステートを更新するナンス計算部と、
入力されたメッセージを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、その計算結果で上記暗号化ステートを更新し、上記置換を計算するたびに上記暗号化ステートのレート部分を暗号文のブロックとして出力するメッセージ計算部と、
入力された追加データを用いて上記暗号化ステートのレート部分を変化させる補助入力付き置換を計算し、その計算結果で上記暗号化ステートを更新する追加データ計算部と、
上記暗号化ステートのレート部分を上記暗号文の最終ブロックとして出力し、上記暗号化ステートのキャパシティ部分と上記共通鍵との排他的論理和をタグとして出力するタグ生成部と、
を含み、
上記復号装置は、
レート部分とキャパシティ部分とからなる復号ステートと、上記暗号化装置とあらかじめ共有した上記共通鍵とを記憶する記憶部と、
上記復号ステートのレート部分を上記暗号化装置から受け取った上記暗号文の最終ブロックに、上記復号ステートのキャパシティ部分を上記暗号化装置から受け取った上記タグに設定する第一初期化部と、
上記復号ステートのキャパシティ部分を上記共通鍵との排他的論理和により更新するタグ復号部と、
上記暗号化装置から受け取った追加データを用いて上記復号ステートのレート部分を変化させる上記補助入力付き置換の逆置換を計算し、その計算結果で上記復号ステートを更新する追加データ逆計算部と、
上記暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記置換の逆置換を計算し、その計算結果で上記復号ステートを更新し、上記置換の逆置換を計算するたびに上記復号ステートのレート部分と当該ブロックとの排他的論理和を上記メッセージのブロックとして出力し、当該ブロックにより上記復号ステートのレート部分を更新する暗号文逆計算部と、
上記復号ステートの値を中間ステート値として上記復号装置の記憶部へ記憶した後、上記復号ステートのレート部分を上記所定のビット列に、上記復号ステートのキャパシティ部分を上記共通鍵に設定する第二初期化部と、
上記暗号化装置から受け取ったナンスを上記復号ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記復号ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記復号ステートに対して上記置換を計算し、その計算結果で上記復号ステートを更新するナンス計算部と、
上記中間ステート値のキャパシティ部分と上記復号ステートのキャパシティ部分とが一致するとき、上記中間ステート値のレート部分と上記復号ステートのレート部分との排他的論理和を上記メッセージの第一ブロックとして出力する改ざん検知部と、
を含み、
上記所定の置換は、ランダム置換と区別不能な置換であり、
上記補助入力付き置換は、補助入力の値を用いて入力された値を変化させ、かつ、同じ補助入力を用いて置換後の値から入力された値を復元する逆置換を定義できる置換であり、
上記暗号化装置は、上記初期化部、上記ナンス計算部、上記メッセージ計算部、上記追加データ計算部、上記タグ生成部の順に処理を行うものであり、
上記復号装置は、上記第一初期化部、上記タグ復号部、上記追加データ逆計算部、上記暗号文逆計算部、上記第二初期化部、上記ナンス計算部、上記改ざん検知部の順に処理を行うものである、
追加データ付き認証暗号システム。
An authenticated encryption system with additional data, including an encryption device and a decryption device.
The above encryption device
A storage unit that stores an encryption state consisting of a rate part and a capacity part, and a common key shared in advance with the decryption device.
An initialization unit that sets the rate portion of the encryption state to a predetermined bit string and the capacity portion of the encryption state to the common key.
For each block in which the input nonce is divided into the lengths of the rate portion of the encryption state, the rate portion of the encryption state is updated by the exclusive OR with the block in order from the previous block. A nonce calculation unit that calculates a predetermined replacement for the encryption state and updates the above encryption state with the calculation result ,
For each block in which the input message is divided into the lengths of the rate portion of the encrypted state, the rate portion of the encrypted state is updated by the exclusive OR with the block in order from the previous block. A message calculation unit that calculates the above substitution for the encryption state, updates the above encryption state with the calculation result, and outputs the rate part of the above encryption state as a ciphertext block each time the above substitution is calculated. ,
An additional data calculation unit that calculates a replacement with an auxiliary input that changes the rate part of the encryption state using the input additional data, and updates the encryption state with the calculation result .
A tag generation unit that outputs the rate portion of the encryption state as the final block of the ciphertext and outputs the exclusive OR of the capacity portion of the encryption state and the common key as a tag.
Including
The above decoding device
A storage unit that stores a decryption state consisting of a rate portion and a capacity portion, and a common key shared in advance with the encryption device.
A first initialization unit that sets the rate portion of the decryption state in the final block of the ciphertext received from the encryption device, and the capacity portion of the decryption state in the tag received from the encryption device.
A tag decryption unit that updates the capacity portion of the decryption state by exclusive OR with the common key,
An additional data inverse calculation unit that calculates the inverse substitution of the substitution with an auxiliary input that changes the rate portion of the decryption state using the additional data received from the encryption device, and updates the decryption state with the calculation result .
For each block other than the final block of the ciphertext received from the encryption device, the inverse substitution of the substitution is calculated for the decryption state in order from the subsequent block, and the decryption state is updated with the calculation result. , Each time the inverse substitution of the above substitution is calculated, the exclusive logical sum of the rate portion of the decryption state and the block is output as a block of the message, and the ciphertext reverse that updates the rate portion of the decryption state by the block. Calculation department and
After storing the value of the decoding state as an intermediate state value in the storage unit of the decoding device, the rate portion of the decoding state is set in the predetermined bit string, and the capacity portion of the decoding state is set in the common key. Initialization part and
For each block obtained by dividing the nonce received from the encryption device into the lengths of the rate portion of the decryption state, the rate portion of the decryption state is updated by exclusive OR with the block in order from the previous block. A nonce calculation unit that calculates the substitution for the decoding state of the above and updates the decoding state with the calculation result ,
When the capacity portion of the intermediate state value and the capacity portion of the decoding state match, the exclusive OR of the rate portion of the intermediate state value and the rate portion of the decoding state is used as the first block of the message. The tampering detector that outputs and
Only including,
The above-mentioned predetermined substitution is a substitution indistinguishable from a random substitution, and is
The above substitution with auxiliary input is a substitution that can define an inverse substitution that changes the input value using the auxiliary input value and restores the input value from the replaced value using the same auxiliary input. ,
The encryption device performs processing in the order of the initialization unit, the nonce calculation unit, the message calculation unit, the additional data calculation unit, and the tag generation unit.
The decoding device processes the first initialization unit, the tag decoding unit, the additional data inverse calculation unit, the ciphertext inverse calculation unit, the second initialization unit, the nonce calculation unit, and the falsification detection unit in this order. Is to do,
Authenticated encryption system with additional data.
請求項1に記載の追加データ付き認証暗号システムであって、
上記追加データ計算部は、入力された追加データを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算することにより上記補助入力付き置換を計算するものであり、
上記追加データ逆計算部は、上記暗号化装置から受け取った追加データを上記復号ステートのレート部分の長さに分割した各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記置換の逆置換を計算することにより上記補助入力付き置換の逆置換を計算し、上記復号ステートのレート部分を当該ブロックとの排他的論理和により更新するものである、
追加データ付き認証暗号システム。
The authentication encryption system with additional data according to claim 1.
The additional data calculation unit divides the input additional data into the lengths of the rate portion of the encryption state, and in order from the previous block, the rate portion of the encryption state is exclusive to the block. The replacement with an auxiliary input is calculated by calculating the replacement for the encryption state after updating by exclusive-or.
The additional data back calculation unit divides the additional data received from the encryption device into the lengths of the rate portion of the decryption state, and in order from the rear block, the reverse of the substitution with respect to the decryption state. By calculating the substitution, the inverse substitution of the substitution with the auxiliary input is calculated, and the rate portion of the decoding state is updated by the exclusive OR with the block.
Authenticated encryption system with additional data.
レート部分とキャパシティ部分とからなる復号ステートと、暗号化装置とあらかじめ共有した共通鍵とを記憶する記憶部と、
上記復号ステートのレート部分を上記暗号化装置から受け取った暗号文の最終ブロックに、上記復号ステートのキャパシティ部分を上記暗号化装置から受け取ったタグに設定する第一初期化部と、
上記復号ステートのキャパシティ部分を上記共通鍵との排他的論理和により更新するタグ復号部と、
上記暗号化装置から受け取った追加データを用いて上記復号ステートのレート部分を変化させる補助入力付き置換の逆置換を計算し、その計算結果で上記復号ステートを更新する追加データ逆計算部と、
上記暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、上記復号ステートに対して所定の置換の逆置換を計算し、その計算結果で上記復号ステートを更新し、上記置換の逆置換を計算するたびに上記復号ステートのレート部分と当該ブロックとの排他的論理和をメッセージのブロックとして出力し、当該ブロックにより上記復号ステートのレート部分を更新する暗号文逆計算部と、
上記復号ステートの値を中間ステート値として上記記憶部へ記憶した後、上記復号ステートのレート部分を所定のビット列に、上記復号ステートのキャパシティ部分を上記共通鍵に設定する第二初期化部と、
上記暗号化装置から受け取ったナンスを上記復号ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記復号ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記復号ステートに対して上記置換を計算し、その計算結果で上記復号ステートを更新するナンス計算部と、
上記中間ステート値のキャパシティ部分と上記復号ステートのキャパシティ部分とが一致するとき、上記中間ステート値のレート部分と上記復号ステートのレート部分との排他的論理和を上記メッセージの第一ブロックとして出力する改ざん検知部と、
を含み、
上記第一初期化部、上記タグ復号部、上記追加データ逆計算部、上記暗号文逆計算部、上記第二初期化部、上記ナンス計算部、上記改ざん検知部の順に処理が行われ、
上記暗号化装置は、
記憶部が、レート部分とキャパシティ部分とからなる暗号化ステートと、復号装置とあらかじめ共有した共通鍵とを記憶しており、
初期化部が、上記暗号化ステートのレート部分を上記所定のビット列に、上記暗号化ステートのキャパシティ部分を上記共通鍵に設定し、
ナンス計算部が、入力されたナンスを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、その計算結果で上記暗号化ステートを更新し、
メッセージ計算部が、入力されたメッセージを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、その計算結果で上記暗号化ステートを更新し、上記置換を計算するたびに上記暗号化ステートのレート部分を上記暗号文のブロックとして出力し、
追加データ計算部が、入力された追加データを用いて上記暗号化ステートのレート部分を変化させる上記補助入力付き置換を計算し、その計算結果で上記暗号化ステートを更新し、
タグ生成部が、上記暗号化ステートのレート部分を上記暗号文の最終ブロックとして出力し、上記暗号化ステートのキャパシティ部分と上記共通鍵との排他的論理和を上記タグとして出力し、
上記所定の置換は、ランダム置換と区別不能な置換であり、
上記補助入力付き置換は、補助入力の値を用いて入力された値を変化させ、かつ、同じ補助入力を用いて置換後の値から入力された値を復元する逆置換を定義できる置換であり、
上記暗号化装置は、上記初期化部、上記ナンス計算部、上記メッセージ計算部、上記追加データ計算部、上記タグ生成部の順に処理を行うものである、
復号装置。
A storage unit that stores the decryption state consisting of the rate part and the capacity part, and the common key shared in advance with the encryption device.
A first initialization unit that sets the rate portion of the decryption state in the final block of the ciphertext received from the encryption device and the capacity portion of the decryption state in the tag received from the encryption device.
A tag decryption unit that updates the capacity portion of the decryption state by exclusive OR with the common key,
An additional data inverse calculation unit that calculates the inverse substitution of the substitution with an auxiliary input that changes the rate portion of the decryption state using the additional data received from the encryption device, and updates the decryption state with the calculation result .
For each block other than the final block of the ciphertext received from the encryption device, the inverse substitution of the predetermined substitution is calculated for the decryption state in order from the subsequent block, and the decryption state is updated with the calculation result. Then, every time the inverse substitution of the above substitution is calculated, the exclusive logical sum of the rate portion of the decryption state and the block is output as a block of the message, and the ciphertext reverse that updates the rate portion of the decryption state by the block. Calculation department and
After storing the value of the decoding state as an intermediate state value in the storage unit, the second initialization unit sets the rate portion of the decoding state in a predetermined bit string and the capacity portion of the decoding state in the common key. ,
For each block obtained by dividing the nonce received from the encryption device into the lengths of the rate portion of the decryption state, the rate portion of the decryption state is updated by exclusive OR with the block in order from the previous block. A nonce calculation unit that calculates the substitution for the decoding state of the above and updates the decoding state with the calculation result ,
When the capacity portion of the intermediate state value and the capacity portion of the decoding state match, the exclusive OR of the rate portion of the intermediate state value and the rate portion of the decoding state is used as the first block of the message. The tampering detector that outputs and
Including
The first initialization unit, the tag decoding unit, the additional data inverse calculation unit, the ciphertext inverse calculation unit, the second initialization unit, the nonce calculation unit, and the falsification detection unit are processed in this order.
The above encryption device
The storage unit stores the encryption state consisting of the rate part and the capacity part and the common key shared in advance with the decryption device.
The initialization unit sets the rate portion of the encryption state to the predetermined bit string and the capacity portion of the encryption state to the common key.
For each block in which the input nonce is divided into the lengths of the rate portion of the encryption state , the nonce calculation unit divides the input nonce into the lengths of the rate portion of the encryption state. The above substitution is calculated for the above-mentioned encryption state after the update, and the above- mentioned encryption state is updated with the calculation result.
For each block in which the input message is divided into the lengths of the rate portion of the encryption state , the message calculation unit performs the rate portion of the encryption state in order from the previous block by exclusive-OR with the block. The above substitution is calculated for the above encryption state after the update, the above encryption state is updated by the calculation result, and the rate portion of the above encryption state is used as a block of the above ciphertext each time the above substitution is calculated. Output and
The additional data calculation unit calculates the replacement with the auxiliary input that changes the rate portion of the encryption state using the input additional data, and updates the encryption state with the calculation result.
The tag generation unit outputs the rate portion of the encryption state as the final block of the ciphertext, and outputs the exclusive OR of the capacity portion of the encryption state and the common key as the tag .
The above-mentioned predetermined substitution is a substitution indistinguishable from a random substitution, and is
The above substitution with auxiliary input is a substitution that can define an inverse substitution that changes the input value using the auxiliary input value and restores the input value from the replaced value using the same auxiliary input. ,
The encryption device performs processing in the order of the initialization unit, the nonce calculation unit, the message calculation unit, the additional data calculation unit, and the tag generation unit.
Decoding device.
暗号化装置と復号装置とを含む追加データ付き認証暗号システムが実行する追加データ付き認証暗号方法であって、
上記暗号化装置は、
記憶部が、レート部分とキャパシティ部分とからなる暗号化ステートと、上記復号装置とあらかじめ共有した共通鍵とを記憶しており、
初期化部が、上記暗号化ステートのレート部分を所定のビット列に、上記暗号化ステートのキャパシティ部分を上記共通鍵に設定し、
ナンス計算部が、入力されたナンスを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して所定の置換を計算し、その計算結果で上記暗号化ステートを更新し、
メッセージ計算部が、入力されたメッセージを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、その計算結果で上記暗号化ステートを更新し、上記置換を計算するたびに上記暗号化ステートのレート部分を暗号文のブロックとして出力し、
追加データ計算部が、入力された追加データを用いて上記暗号化ステートのレート部分を変化させる補助入力付き置換を計算し、その計算結果で上記暗号化ステートを更新し、
タグ生成部が、上記暗号化ステートのレート部分を上記暗号文の最終ブロックとして出力し、上記暗号化ステートのキャパシティ部分と上記共通鍵との排他的論理和をタグとして出力し、
上記復号装置は、
記憶部が、レート部分とキャパシティ部分とからなる復号ステートと、上記暗号化装置とあらかじめ共有した上記共通鍵とを記憶しており、
第一初期化部が、上記復号ステートのレート部分を上記暗号化装置から受け取った上記暗号文の最終ブロックに、上記復号ステートのキャパシティ部分を上記暗号化装置から受け取った上記タグに設定し、
タグ復号部が、上記復号ステートのキャパシティ部分を上記共通鍵との排他的論理和により更新し、
追加データ逆計算部が、上記暗号化装置から受け取った追加データを用いて上記復号ステートのレート部分を変化させる上記補助入力付き置換の逆置換を計算し、その計算結果で上記復号ステートを更新し、
暗号文逆計算部が、上記暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記置換の逆置換を計算し、その計算結果で上記復号ステートを更新し、上記置換の逆置換を計算するたびに上記復号ステートのレート部分と当該ブロックとの排他的論理和を上記メッセージのブロックとして出力し、当該ブロックにより上記復号ステートのレート部分を更新し、
第二初期化部が、上記復号ステートの値を中間ステート値として上記復号装置の記憶部へ記憶した後、上記復号ステートのレート部分を上記所定のビット列に、上記復号ステートのキャパシティ部分を上記共通鍵に設定し、
ナンス計算部が、上記暗号化装置から受け取ったナンスを上記復号ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記復号ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記復号ステートに対して上記置換を計算し、その計算結果で上記復号ステートを更新し、
改ざん検知部が、上記中間ステート値のキャパシティ部分と上記復号ステートのキャパシティ部分とが一致するとき、上記中間ステート値のレート部分と上記復号ステートのレート部分との排他的論理和を上記メッセージの第一ブロックとして出力し、
上記所定の置換は、ランダム置換と区別不能な置換であり、
上記補助入力付き置換は、補助入力の値を用いて入力された値を変化させ、かつ、同じ補助入力を用いて置換後の値から入力された値を復元する逆置換を定義できる置換であり、
上記暗号化装置は、上記初期化部、上記ナンス計算部、上記メッセージ計算部、上記追加データ計算部、上記タグ生成部の順に処理を行うものであり、
上記復号装置は、上記第一初期化部、上記タグ復号部、上記追加データ逆計算部、上記暗号文逆計算部、上記第二初期化部、上記ナンス計算部、上記改ざん検知部の順に処理を行うものである、
追加データ付き認証暗号方法。
An authentication encryption method with additional data performed by an authentication encryption system with additional data, including an encryption device and a decryption device.
The above encryption device
The storage unit stores the encryption state consisting of the rate part and the capacity part and the common key shared in advance with the decryption device.
The initialization unit sets the rate portion of the encryption state to a predetermined bit string and the capacity portion of the encryption state to the common key.
For each block in which the input nonce is divided into the lengths of the rate portion of the encryption state , the nonce calculation unit divides the input nonce into the lengths of the rate portion of the encryption state. A predetermined replacement is calculated for the above-mentioned encryption state after the update, and the above-mentioned encryption state is updated with the calculation result.
For each block in which the input message is divided into the lengths of the rate portion of the encryption state , the message calculation unit performs the rate portion of the encryption state in order from the previous block by exclusive-OR with the block. The above substitution is calculated for the above encryption state after the update, the above encryption state is updated by the calculation result, and the rate part of the above encryption state is output as a ciphertext block each time the above substitution is calculated. And
The additional data calculation unit calculates the replacement with an auxiliary input that changes the rate part of the encryption state using the input additional data, and updates the encryption state with the calculation result.
The tag generation unit outputs the rate portion of the encryption state as the final block of the ciphertext, and outputs the exclusive OR of the capacity portion of the encryption state and the common key as a tag.
The above decoding device
The storage unit stores the decryption state consisting of the rate portion and the capacity portion and the common key shared in advance with the encryption device.
The first initialization unit sets the rate portion of the decryption state in the final block of the ciphertext received from the encryption device, and sets the capacity portion of the decryption state in the tag received from the encryption device.
The tag decryption unit updates the capacity portion of the decryption state by the exclusive OR with the common key.
The additional data inverse calculation unit calculates the inverse substitution of the substitution with the auxiliary input that changes the rate portion of the decryption state using the additional data received from the encryption device, and updates the decryption state with the calculation result. ,
The ciphertext inverse calculation unit calculates the inverse substitution of the substitution for the decryption state in order from the subsequent block for each block other than the final block of the ciphertext received from the encryption device, and the calculation result. Updates the decoding state with, and each time the inverse substitution of the substitution is calculated, the exclusive logical sum of the rate portion of the decoding state and the block is output as a block of the message, and the rate of the decoding state is output by the block. Update the part,
After the second initialization unit stores the value of the decoding state as an intermediate state value in the storage unit of the decoding device, the rate portion of the decoding state is set to the predetermined bit string, and the capacity portion of the decoding state is set to the above. Set to common key,
For each block in which the nonce calculation unit divides the nonce received from the encryption device into the lengths of the rate portion of the decryption state, the rate portion of the decryption state is exclusively ORed with the block in order from the previous block. The substitution is calculated for the decoding state after being updated by the sum, and the decoding state is updated with the calculation result.
When the tampering detection unit matches the capacity portion of the intermediate state value and the capacity portion of the decoding state, the above message indicates the exclusive OR of the rate portion of the intermediate state value and the rate portion of the decoding state. and outputs as the first block of,
The above-mentioned predetermined substitution is a substitution indistinguishable from a random substitution, and is
The above substitution with auxiliary input is a substitution that can define an inverse substitution that changes the input value using the auxiliary input value and restores the input value from the replaced value using the same auxiliary input. ,
The encryption device performs processing in the order of the initialization unit, the nonce calculation unit, the message calculation unit, the additional data calculation unit, and the tag generation unit.
The decoding device processes the first initialization unit, the tag decoding unit, the additional data inverse calculation unit, the ciphertext inverse calculation unit, the second initialization unit, the nonce calculation unit, and the falsification detection unit in this order. Is to do,
Authenticated encryption method with additional data.
請求項3に記載の復号装置としてコンピュータを機能させるためのプログラム。 A program for operating a computer as the decoding device according to claim 3 .
JP2017134878A 2017-07-10 2017-07-10 Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program Active JP6830868B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017134878A JP6830868B2 (en) 2017-07-10 2017-07-10 Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017134878A JP6830868B2 (en) 2017-07-10 2017-07-10 Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program

Publications (2)

Publication Number Publication Date
JP2019015917A JP2019015917A (en) 2019-01-31
JP6830868B2 true JP6830868B2 (en) 2021-02-17

Family

ID=65356490

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017134878A Active JP6830868B2 (en) 2017-07-10 2017-07-10 Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program

Country Status (1)

Country Link
JP (1) JP6830868B2 (en)

Also Published As

Publication number Publication date
JP2019015917A (en) 2019-01-31

Similar Documents

Publication Publication Date Title
JP7454564B2 (en) Methods, user devices, management devices, storage media and computer program products for key management
US9537657B1 (en) Multipart authenticated encryption
US8799679B2 (en) Message authentication code pre-computation with applications to secure memory
KR20190052631A (en) Remote re-enrollment of physical unclonable functions
EP2885737B1 (en) Storing and accessing data
CN111052670B (en) Encryption device, decryption device, encryption method, decryption method, and computer-readable storage medium
US20110026712A1 (en) Concealing plain text in scrambled blocks
WO2019142307A1 (en) Semiconductor device, update data-providing method, update data-receiving method, and program
JP6881111B2 (en) Cryptographic data generator, decryption data generator, authenticated cryptosystem with additional data, its method, and program
KR102282788B1 (en) Blockchain system for supporting change of plain text data included in transaction
JP6830867B2 (en) Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program
JP6830868B2 (en) Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program
US11177936B2 (en) Message authenticator generation apparatus
JP7012920B2 (en) Cryptographic device, decryption device, encryption method, decryption method, encryption program and decryption program
JP7428239B2 (en) Memory processing device, memory verification device, memory update device, memory protection system, method and program
KR20160109891A (en) Apparatus and Method for Generating Cryptographic Key based on PUF
CN112565201B (en) Private key processing method and device in block chain and computer storage medium
JP6732698B2 (en) Authentication encryption system with additional data, encryption device, decryption device, authentication encryption method with additional data, and program
JP6723958B2 (en) Encrypted data generation device, decrypted data generation device, authentication encryption system with additional data, method thereof, and program
US11095429B2 (en) Circuit concealing apparatus, calculation apparatus, and program
JP6881112B2 (en) Cryptographic data generator, decryption data generator, authenticated cryptosystem with additional data, its method, and program
US20110154058A1 (en) Method and apparatus for storing and verifying data
CN117527209A (en) Cryptographic machine trusted starting method and device, cryptographic machine and storage medium
JP5268413B2 (en) Disclosure restriction processing apparatus, data processing system, and program
KR20220054059A (en) Device and method for lattice-based fuzzy extraction supporting variable length fuzzy data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190819

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200625

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200908

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201030

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210127

R150 Certificate of patent or registration of utility model

Ref document number: 6830868

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150