JP6732698B2 - Authentication encryption system with additional data, encryption device, decryption device, authentication encryption method with additional data, and program - Google Patents
Authentication encryption system with additional data, encryption device, decryption device, authentication encryption method with additional data, and program Download PDFInfo
- Publication number
- JP6732698B2 JP6732698B2 JP2017134875A JP2017134875A JP6732698B2 JP 6732698 B2 JP6732698 B2 JP 6732698B2 JP 2017134875 A JP2017134875 A JP 2017134875A JP 2017134875 A JP2017134875 A JP 2017134875A JP 6732698 B2 JP6732698 B2 JP 6732698B2
- Authority
- JP
- Japan
- Prior art keywords
- state
- block
- encryption
- decryption
- rate
- 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
Links
Images
Description
この発明は、メッセージの秘匿と改ざん検知を同時に行う追加データ付き認証暗号技術に関する。 The present invention relates to an authentication encryption technique with additional data that simultaneously conceals a message and detects tampering.
追加データ付き認証暗号とは、メッセージMの秘匿、および、メッセージMと追加データAの認証(改ざん検知)を同時に行う共通鍵暗号プリミティブである。従来の追加データ付き認証暗号としては、例えば、非特許文献1および非特許文献2に記載されたAPE(Authenticated Permutation-Based Encryption)が挙げられる。追加データ付き認証暗号は、暗号化関数および復号関数の二つの関数から構成される。追加データ付き認証暗号では、受信者と送信者との間であらかじめ秘密の鍵Kを共有しておく。 The authentication cipher with additional data is a common key cryptographic primitive for simultaneously concealing the message M and authenticating the message M and the additional data A (alteration detection). Examples of conventional authentication encryption with additional data include APE (Authenticated Permutation-Based Encryption) described in Non-Patent Document 1 and Non-Patent Document 2. The authentication cipher with additional data is composed of two functions, an encryption function and a decryption function. In the authentication 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 the message M and the additional data A, the sender selects a value N called a nonce that changes each time the encryption function is called. The encryption function generates the ciphertext C and the tag T corresponding to the message M, the additional data A, and the nonce N, and sends the set (C, T, A, N) to the recipient.
受信者は(C, T, A, N)の組を受け取るが、この時点ではこれらの値が悪意ある第三者によって改ざんされていないという保証はない。受信者は受け取った(C, T, A, N)の組と自分が保有する鍵Kとを用いて検証を同時に行う復号関数を計算する。 The recipient receives the (C, T, A, N) pair, but at this point there is no guarantee that these values have not been tampered with by a malicious third party. The receiver uses the received (C, T, A, N) pair and the key K held by the receiver to calculate a decryption function that performs verification at the same time.
検証を同時に行う復号関数にはいくつかの種類がある。多くの追加データ付き認証暗号では、受信者が再計算したタグT'が送信者から受け取ったタグTと一致するかどうかで検証を行う。APEでは、受信者が再計算した中間ステートの値がある値に一致するかどうかで検証を行う。いずれにせよ値が一致しなかった場合は復号に失敗した(データが改ざんされた)という結果を出力する。 There are several types of decryption functions that perform verification at the same time. In many authentication ciphers with additional data, verification is performed by checking whether the tag T'recalculated by the receiver matches the tag T received from the sender. The APE verifies whether the value of the intermediate state recalculated by the receiver matches a certain value. In any case, when the values do not match, the result that the decryption has failed (data has been tampered with) is output.
APEは追加データ付き認証暗号の暗号化関数と復号関数の構成法である。保証したい安全性レベル(ビット数)に比べて比較的大きなサイズの置換(bijective map)を用いて暗号化関数と復号関数を構成するという特徴を持つ。APEの復号関数は、上記のとおり、従来の復号関数とは異なる特殊な方法で検証を行う。 APE is a method of constructing encryption and decryption functions for authentication encryption with additional data. The feature is that the encryption function and the decryption function are configured by using a permutation (bijective map) of a relatively large size compared to the security level (number of bits) to be guaranteed. As described above, the APE decryption function is verified by a special method different from the conventional decryption 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 permutation f:{0, 1} b →{0, 1} b , input data (N, A, M), and key K. The ciphertext C and the tag T are calculated while repeatedly updating using. The details of the substitution f are described in Non-Patent Document 2. Note that the nonce N is not required to be input, and even when the nonce N is present, the nonce N becomes a part of the additional data A. Therefore, it is sufficient for the input data to consider the additional data A, the message M, and the key K. Also, the additional data A is processed before the message M. Such additional data A is called a header. The length of both the additional data A and the message M is limited to the double length of r bits.
bビットのステートは、レートと呼ばれるrビットと、キャパシティと呼ばれるc(=b-r)ビットに分割される。暗号化関数を計算する場合、bビットのステートの値を、レート部分のrビットは0(すなわち、すべてのビットが0のビット列)に、キャパシティ部分のcビットは鍵Kの値に初期化する。 The b-bit state is divided into r bits called rate and c (=b-r) bits called capacity. When calculating the encryption function, the value of the b-bit state is initialized to 0 for the r bits of the rate part (that is, a bit string in which all bits are 0) and the c bit of the capacity part to the value of the key K. To do.
手順1.追加データAをrビットのブロックに分割する。bビットのステートのうちレート部分のrビットに対し、追加データAの第一ブロックとの排他的論理和を計算し、bビットのステートに対し、置換fを計算する。この置換fの出力を新たなステートの値とする。この操作を追加データAの最終ブロックが排他的論理和されるまで繰り返す。 Step 1. The additional data A is divided into blocks of r bits. An exclusive OR with the first block of the additional data A is calculated for the r bits in the rate portion of the b-bit state, and the permutation f is calculated for the b-bit state. The output of this replacement f is taken as the value of the new state. This operation is repeated until the final block of the additional data A is exclusive ORed.
手順2.bビットのステートのうちキャパシティ部分のcビットに対し、整数値1(すなわち、最下位ビットのみが1のビット列)との排他的論理和を計算する。 Step 2. For the c bits in the capacity portion of the b bit state, the exclusive OR is calculated 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の最終ブロックが排他的論理和されるまで繰り返す。
手順4.bビットのステートのうちキャパシティ部分のcビットに対し、cビットの鍵Kとの排他的論理和を計算し、計算結果をcビットのタグTとして出力する。 Step 4. An exclusive OR of the c bits in the capacity portion of the b bit state with the c bit key K is calculated, and the calculation result is output as a c bit tag T.
図2を参照しながら、APEの復号関数の具体的な計算手順を説明する。APEの復号関数は、APEの暗号化関数の計算をほぼ逆順に行う。復号関数は、通常(C, T, A, N)の組を入力にとるが、APEではナンスNは追加データAの一部とみなすことができるため、(C, T, A)の組を入力にとるとみなす。 A specific calculation procedure of the APE decoding function will be described with reference to FIG. The APE decryption function performs the calculation of the APE encryption function in almost reverse order. The decoding function usually takes the set of (C, T, A, N) as input, but since the nonce N can be considered as a part of the additional data A in APE, the set of (C, T, A) is 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 a 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. An exclusive OR of the c bits in the capacity part of the b-bit state with the c-bit key K is calculated, and the c bits in the capacity part are 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. Compute the inverse permutation f −1 :{0, 1} b →{0, 1} b of the permutation f for the b-bit state. The output of this inverse permutation f -1 is taken as the value of the new state. For the r bits of the rate part, the exclusive OR of the block immediately before the final block of the ciphertext C (C 1 in the example of FIG. 2) is calculated, and the calculation result is the final block of the message M (FIG. 2). In the example, it is output as M 2 ). Also, the r bits of the rate portion are 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 new state value. This operation is repeated until the first block (C 0 in the example of FIG. 2) of the ciphertext C 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 state, the r-bit value of the rate part is S r , and the c-bit value of the capacity part is S c .
手順3.メッセージMの第一ブロック(図2の例ではM0)の復元方法は、それ以外のブロックとは異なる。まず、暗号化関数の手順1から手順2までと同じ計算を行う。更新されたステートのうち、レート部分のrビットの値をS'r、キャパシティ部分のcビットの値をS'cとする。rビットの値Srとrビットの値S'rとの排他的論理和を計算し、計算結果をメッセージMの第一ブロック(図2の例ではM0)として出力する。
手順4.cビットの値Scとcビットの値S'cとを比較し、値が一致すれば復号されたメッセージMを出力する。一致しなかった場合は、メッセージMは出力せず、復号に失敗した旨を表すエラーコードのみを出力する。 Step 4. The c-bit value S c is compared with the c-bit value S′ c, and if the values match, the decoded message M is output. If they do not match, the message M is not output, and only the error code indicating that the decoding has failed is output.
追加データのうちメッセージよりも後に処理されるものをトレイラと呼ぶ(例えば、非特許文献3参照)。トレイラは実利用を想定してインターフェースを柔軟にするために利用するものであり、方式の安全性には関係しない。 The additional data that is processed after the message is called a trailer (for example, see Non-Patent Document 3). The trailer is used to make the interface flexible for actual use and is not related to the security of the system.
ナンスの一種であり、値が暗号化されてから通信路を流れるものを秘密ナンスと呼ぶ。一般的にナンスとして暗号化の時点までに通信したパケット数等を用いることがあるが、その場合、ナンスにプライバシー情報が含まれるため、ナンスを暗号化してから送ることが望ましい。 A type of nonce, which is called a secret nonce that flows through the communication path after the value is encrypted. Generally, the number of packets communicated up to the time of encryption may be used as the nonce, but in that case, since the nonce includes privacy information, it is desirable to encrypt the nonce before sending it.
従来のAPEでは、(C, T, A, N)の組の全ビットを受信者に送らなければいけないため、通信コストが大きい。また、従来のAPEでは、追加データAとナンスNの長さの合計を|A+N|としたとき、復号でA, Nを処理する際に、|A+N|/r回の置換fと逆置換f-1を計算する必要があるため、計算コストが大きい。さらに、従来のAPEでは、暗号化関数は一種類の置換fのみを実装すればよいが、復号関数は置換fと逆置換f-1の二種類の置換を実装する必要があるため、復号装置の実装コストが大きい。 In the conventional APE, all the bits of the set of (C, T, A, N) have to be sent to the receiver, so the communication cost is high. Also, in the conventional APE, when the total length of the additional data A and the nonce N is set to |A+N|, when processing A and N in decoding, |A+N|/r replacements f Since the inverse permutation f -1 needs to be calculated, the calculation cost is high. Furthermore, in the conventional APE, the encryption function only needs to implement one type of permutation f, but the decryption function needs to implement two types of permutation, the permutation f and the inverse permutation f −1. Implementation cost is high.
この発明の目的は、上記のような点に鑑みて、通信コスト、計算コスト、および実装コストを低減した追加データ付き認証暗号技術を実現することである。 In view of the above points, an object of the present invention is to realize an authentication encryption technique with additional data in which communication cost, calculation cost, and implementation cost are reduced.
上記の課題を解決するために、この発明の追加データ付き認証暗号システムは、暗号化装置と復号装置とを含む。暗号化装置は、レート部分とキャパシティ部分とからなる暗号化ステートと、復号装置とあらかじめ共有した共通鍵とを記憶する記憶部と、暗号化ステートのレート部分を所定のビット列に、暗号化ステートのキャパシティ部分を共通鍵に設定する初期化部と、入力されたナンスを暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の暗号化ステートに対して所定の置換を計算するナンス計算部と、暗号化ステートのレート部分に含まれる領域を第一領域とし、暗号化ステートのキャパシティ部分に含まれる領域を第三領域とし、暗号化ステートのうち第一領域と第三領域以外の領域を第二領域とし、第二領域を所定の検証値に設定する検証値設定部と、入力されたメッセージの先頭から第一領域の長さを第一ブロックとし、メッセージの残りを暗号化ステートのレート部分の長さに分割した各ブロックを第二ブロックから最終ブロックとし、メッセージの第一ブロックについて、暗号化ステートのレート部分を当該ブロックにより更新した後の暗号化ステートに対して置換を計算し、メッセージの第二ブロックから最終ブロックについて、前方のブロックから順に、暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の暗号化ステートに対して置換を計算し、置換を計算するたびに暗号化ステートのレート部分を暗号文のブロックとして出力するメッセージ計算部と、入力された追加データを暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の暗号化ステートに対して置換を計算する追加データ計算部と、暗号化ステートのレート部分を暗号文の最終ブロックとして出力し、暗号化ステートのキャパシティ部分と共通鍵との排他的論理和をタグとして出力するタグ生成部と、を含む。復号装置は、レート部分とキャパシティ部分とからなる復号ステートと、暗号化装置とあらかじめ共有した共通鍵とを記憶する記憶部と、復号ステートのレート部分を暗号化装置から受け取った暗号文の最終ブロックに、復号ステートのキャパシティ部分を暗号化装置から受け取ったタグに設定する初期化部と、復号ステートのキャパシティ部分を共通鍵との排他的論理和により更新するタグ復号部と、暗号化装置から受け取った追加データを復号ステートのレート部分の長さに分割した各ブロックについて、後方のブロックから順に、復号ステートに対して置換の逆置換を計算し、復号ステートのレート部分を当該ブロックとの排他的論理和により更新する追加データ逆計算部と、暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、復号ステートに対して逆置換を計算し、逆置換を計算するたびに復号ステートのレート部分と当該ブロックとの排他的論理和をメッセージのブロックとして出力し、当該ブロックにより復号ステートのレート部分を更新する暗号文逆計算部と、復号ステートのうち暗号化ステートの第二領域に対応するビット列の値と検証値とが等しいとき、復号ステートのうち暗号化ステートの第一領域に対応するビット列をメッセージの第一ブロックとして出力する改ざん検知部と、を含む。 In order 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 stores an encryption state composed of a rate part and a capacity part, a storage part for storing a common key shared in advance with the decryption device, and a rate part of the encryption state in a predetermined bit string to an encryption state. For the initialization unit that sets the capacity part of the encryption key to the common key and for each block obtained by dividing the input nonce into the length of the rate part of the encryption state, the rate part of the encryption state is The nonce calculator that calculates a predetermined permutation for the encrypted state after updating by exclusive OR with the block, and the area included in the rate portion of the encrypted state as the first area An area included in the city portion is a third area, an area other than the first area and the third area in the encryption state is a second area, and a verification value setting unit that sets the second area to a predetermined verification value, The length of the first area from the beginning of the input message is the first block, and the rest of the message is divided into the length of the rate part of the encryption state. For a block, calculate the permutation for the encryption state after updating the rate part of the encryption state by the block, and for the second block to the last block of the message, in order from the block before, the rate part of the encryption state A message calculator that calculates a permutation for the encrypted state after updating by an exclusive OR with the block, and outputs the rate part of the encrypted state as a block of the ciphertext each time the permutation is calculated, For each block obtained by dividing the input additional data into the length of the rate portion of the encryption state, encryption is performed after the rate portion of the encryption state is updated by exclusive OR with the block in order from the front block. Outputs the additional data calculator that calculates the permutation for the state and the rate part of the encryption state as the final block of the ciphertext, and outputs the exclusive OR of the capacity part of the encryption state and the common key as a tag. And a tag generation unit for performing. The decryption apparatus stores a decryption state including a rate portion and a capacity portion, a storage unit that stores a common key shared in advance with the encryption apparatus, and a final portion of the ciphertext that receives the rate portion of the decryption state from the encryption apparatus. In the block, an initialization unit that sets the capacity part of the decryption state in the tag received from the encryption device, a tag decryption unit that updates the capacity part of the decryption state by exclusive OR with the common key, and encryption For each block obtained by dividing the additional data received from the device into the length of the rate part of the decoding state, the inverse permutation of the permutation is calculated for the decoding state in order from the rear block, and the rate part of the decoding state is defined as the block. An additional data inverse calculation unit for updating by exclusive OR of each block, and for each block other than the final block in the ciphertext received from the encryption device, the inverse permutation is calculated for the decryption state in order from the subsequent block, Each time the inverse permutation is calculated, the exclusive OR of the rate part of the decryption state and the block is output as a message block, and the ciphertext inverse calculator that updates the rate part of the decryption state by the block and the decryption state When the value of the bit string corresponding to the second area of the encryption state and the verification value are the same, the tampering detection unit that outputs the bit string corresponding to the first area of the encryption state of the decryption state as the first block of the message. ,including.
従来のAPEでは(C, T, A, N)の組の全ビットを送受信していたが、この発明では復号装置がナンスNを必要としないため、ナンスNを送受信する通信コストを削減することができる。また、従来のAPEでは復号装置が追加データAとナンスNを処理する際に|A+N|/r回の置換fまたは逆置換f-1を計算する必要があったが、この発明ではナンスNを処理しないため|A|/r回の逆置換f-1を計算するだけでよく、計算コストを削減することができる。さらに、暗号化装置は置換fのみを実装すればよく、復号装置は逆置換f-1のみを実装すればよいため、実装コストを削減することができる。したがって、この発明によれば、通信コスト、計算コスト、および実装コストを低減した追加データ付き認証暗号技術を実現することができる。 In the conventional APE, all bits of the set of (C, T, A, N) were transmitted and received, but since the decoding device does not need nonce N in the present invention, it is possible to reduce the communication cost of transmitting and receiving nonce N. You can Further, in the conventional APE, when the decoding device processed the additional data A and the nonce N, it was necessary to calculate the permutation f or the inverse permutation f −1 |A+N|/r times. Since N is not processed, it is only necessary to calculate the inverse permutation f −1 |A|/r times, and the calculation cost can be reduced. Further, since the encryption device only needs to implement the permutation f and the decryption device only needs to implement the inverse permutation f −1 , the implementation cost can be reduced. Therefore, according to the present invention, it is possible to realize the authentication encryption technique with additional data in which the communication cost, the calculation cost, and the implementation cost are reduced.
以下、この発明の実施の形態について詳細に説明する。なお、図面中において同じ機能を有する構成部には同じ番号を付し、重複説明を省略する。 Hereinafter, embodiments of the present invention will be described in detail. In the drawings, components having the same function are denoted by the same reference numerals, and duplicate description will be omitted.
この発明の実施形態は、従来よりも通信コスト、計算コスト、および実装コストを低減した追加データ付き認証暗号を実行する追加データ付き認証暗号システムおよび方法である。実施形態では、APEの追加データをナンスNとそれ以外の追加データAに分割して扱う。ナンスNはヘッダとしてメッセージMより前に処理し、追加データAはトレイラとしてメッセージMより後に処理する。暗号化関数では、ナンスNの処理が終了した後、bビットのステートのうちレート部分のrビットと、キャパシティ部分のcビットのうち下位c/3ビットを0に置き換える。また、ナンスNは受信者に送信しない。 Embodiments of the present invention are an authentication encryption system with additional data and a method for executing an authentication encryption with additional data that reduces communication cost, calculation cost, and implementation cost as compared with the related art. In the embodiment, the additional data of the APE is divided into the nonce N and the additional data A other than the nonce N and treated. The nonce N is processed as a header before the message M, and the additional data A is processed as a trailer after the message M. In the encryption function, after the processing of the nonce N is completed, the r bits of the rate part of the b-bit state and the lower c/3 bits of the c bits of the capacity part are replaced with 0. Also, the nonce N is not sent to the recipient.
実施形態の追加データ付き認証暗号システムは、図3に示すように、追加データ付き認証暗号の暗号化関数を実行する暗号化装置1と、追加データ付き認証暗号の復号関数を実行する復号装置2とを含む。この実施形態では、暗号化装置1および復号装置2はそれぞれ通信網3へ接続される。通信網3は、接続される各装置が相互に通信可能なように構成された回線交換方式もしくはパケット交換方式の通信網であり、例えばインターネットやLAN(Local Area Network)、WAN(Wide Area Network)などを用いることができる。なお、各装置は必ずしも通信網3を介してオンラインで通信可能である必要はない。例えば、暗号化装置1が出力する情報を磁気テープやUSBメモリなどの可搬型記録媒体に記憶し、その可搬型記録媒体から復号装置2へオフラインで入力するように構成してもよい。
As shown in FIG. 3, the authentication encryption system with additional data according to 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. Including and In this embodiment, the encryption device 1 and the decryption device 2 are each connected to the
追加データ付き認証暗号システムに含まれる暗号化装置1は、図4に示すように、記憶部10、入力部11、初期化部12、ナンス計算部13、検証値設定部14、メッセージ計算部15、境界設定部16、追加データ計算部17、タグ生成部18、および出力部19を含む。暗号化装置1に含まれるナンス計算部13は、図5に示すように、分割部131、排他的論理和部132、および置換部133を含む。暗号化装置1に含まれるメッセージ計算部15は、図6に示すように、分割部151、排他的論理和部152、置換部153、および暗号文出力部154を含む。暗号化装置1に含まれる追加データ計算部17は、図7に示すように、分割部171、排他的論理和部172、および置換部173を含む。
As shown in FIG. 4, the encryption device 1 included in the authentication encryption system with additional data includes a
追加データ付き認証暗号システムに含まれる復号装置2は、図8に示すように、例えば、記憶部20、入力部21、初期化部22、タグ復号部23、追加データ逆計算部24、境界除去部25、暗号文逆計算部26、改ざん検知部27、および出力部28を含む。復号装置2に含まれる追加データ逆計算部24は、図9に示すように、分割部241、逆置換部242、および排他的論理和部243を含む。復号装置2に含まれる暗号文逆計算部26は、図10に示すように、逆置換部261、排他的論理和部262、およびメッセージ出力部263を含む。
As shown in FIG. 8, the decryption device 2 included in the authentication encryption system with additional data includes, for example, a
暗号化装置1が図11に示す各ステップの処理を行い、復号装置2が図13に示す各ステップの処理を行うことにより実施形態の追加データ付き認証暗号方法が実現される。なお、追加データ付き認証暗号方法のうち暗号化装置1が実行する部分を暗号化方法とも呼び、復号装置2が実行する部分を復号方法とも呼ぶ。 The encryption device 1 performs the process of each step shown in FIG. 11, and the decryption device 2 performs the process of each step shown in FIG. 13 to implement the authentication encryption method with additional data of the embodiment. Note that, of the authentication encryption method with additional data, the part executed by the encryption device 1 is also called an encryption method, and the part executed by the decryption device 2 is also called 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)のような半導体メモリ素子により構成される補助記憶装置、またはリレーショナルデータベースやキーバリューストアなどのミドルウェアにより構成することができる。 For the encryption device 1 and the decryption device 2, for example, a special program is read by a known or dedicated computer having 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 in each process are stored in, for example, the main storage device, and the data stored in the main storage device is sent to the central processing unit as necessary. It is read 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, for example, a main storage device such as a RAM (Random Access Memory), an auxiliary device configured by a semiconductor memory element such as a hard disk, an optical disk, or a flash memory (Flash Memory). It can be configured by a storage device or middleware such as a relational database or a key-value store.
図11−12を参照して、実施形態の追加データ付き認証暗号システムが実行する追加データ付き認証暗号方法のうち、暗号化装置1が実行する暗号化方法について説明する。 Among the authentication encryption method with additional data executed by the authentication encryption system with additional data according to the embodiment, an encryption method executed by the encryption device 1 will be described with reference to FIGS.
暗号化装置1の記憶部10には、rビットのレート部分とcビットのキャパシティ部分とからなるbビットのステート(以下、復号装置2の記憶部20に記憶されるステートと区別するために、暗号化ステートと呼ぶ)と、復号装置2との間であらかじめ共有した共通鍵Kとが記憶されている。例えば、ステートは512ビットとし、レート部分は256ビット、キャパシティ部分は256ビットに構成する(すなわち、b=512, r=256, c=256)。レート部分とキャパシティ部分の長さの比は、処理速度と安全性のトレードオフの関係となっている。レート部分の長さが大きくなると、処理速度は向上するが安全性は低下する。逆に、キャパシティ部分の長さが大きくなると、安全性が向上するが処理速度が低下する。したがって、b, r, cの各値は、所望の処理速度と安全性のバランスを鑑みて適宜設計すればよい。
The
ステップS11において、暗号化装置1の入力部11へ、ナンスNと追加データAとメッセージMとの組(N, A, M)が入力される。ナンスNは従来のAPEと同様に追加データの一部として入力されてもよく、その場合、入力部11は入力された追加データをナンスNと追加データAとに分割する。なお、ナンスNは通常固定長であるため、例えば、入力された追加データの先頭から所定のビット数をナンスNとし、残りを追加データAとするなどにより、容易に分割することが可能である。ナンスNおよび追加データAはいずれも長さをrビットの倍長とする。入力部11は、ナンスNをナンス計算部13へ、メッセージMをメッセージ計算部15へ、追加データAを追加データ計算部17へそれぞれ入力する。
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 that 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 is possible to easily divide the nonce N by setting a predetermined number of bits from the beginning of the input additional data as the nonce N and the rest as the additional data A, for example. .. Both the nonce N and the additional data A have a double length of r bits. The input unit 11 inputs the nonce N to the
ステップS12において、暗号化装置1の初期化部12は、記憶部10に記憶されている暗号化ステートのうち、レート部分の値を0(すなわち、すべてのビットが0のビット列)に、キャパシティ部分の値を共通鍵Kの値に設定して初期化する。
In step S12, the
ステップ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
ステップS14において、暗号化装置1の検証値設定部14は、記憶部10に記憶された暗号化ステートを三つの領域に分割する。第一領域は暗号化ステートのレート部分に含まれる領域である。第三領域は暗号化ステートのキャパシティ部分に含まれる領域である。第一領域にも第三領域にも含まれない領域を第二領域とする。第一領域のサイズは、入力されたメッセージMの長さをrで割った余りとする。すなわち、メッセージMの長さから第一領域の長さを引いた長さがrビットの倍長となるように設定する。メッセージMの長さがrビットの倍長である場合、第一領域のサイズはrビットとする。第二領域と第三領域の長さの比は、検証の安全性と暗号化の安全性のトレードオフの関係となっている。したがって、第二領域と第三領域の長さは、検証と暗号化それぞれの所望の安全性を鑑みて適宜設定すればよい。例えば、第一領域はレート部分のrビットとし、第二領域はキャパシティ部分の下位c/3ビットとし、第三領域はキャパシティ部分の上位2c/3ビットとする。
In step S14, the verification
続いて、検証値設定部14は、暗号化ステートの第一領域の値を0に設定し、第二領域の値を所定の検証値に設定する。ここでは、所定の検証値は0であるものとする。すなわち、bビットの暗号化ステートのうちレート部分のrビットと、キャパシティ部分の下位c/3ビットを0で置き換える。なお、キャパシティ部分の上位2c/3ビットである第三領域は、ナンス計算部13により更新された後のビット列のままとなる。
Then, the verification
ステップS15において、暗号化装置1のメッセージ計算部15は、入力部11からメッセージMを受け取り、そのメッセージMを用いて記憶部10に記憶された暗号化ステートの値を更新する。メッセージ計算部15の分割部151は、メッセージMの先頭から第一領域の長さを第一ブロックとし、メッセージMの残りをrビットずつに分割したブロックを第二ブロックから最終ブロックとする。メッセージ計算部15の排他的論理和部152は、暗号化ステートのレート部分とメッセージMのブロックとの排他的論理和を計算し、その計算結果により暗号化ステートのレート部分を更新する。復号ステートの第一領域は検証値設定部14により0に設定されているため、第一ブロックについては復号ステートの第一領域を上書きして更新することと同義である。メッセージ計算部15の置換部153は、bビットの暗号化ステート全体に対し、bビットの置換fを計算し、その計算結果を新たな暗号化ステートの値とする。メッセージ計算部15の暗号文出力部154は、暗号化ステートのレート部分の値を暗号文Cのブロックとして出力する。メッセージ計算部15は、上記の操作をメッセージMの第一ブロックから最終ブロックまで前方のブロックから順に実行する。ただし、ここでは、メッセージMの最終ブロックに対応する暗号文Cのブロックは出力しない。
In step S15, the
ステップS16において、暗号化装置1の境界設定部16は、暗号化ステートのキャパシティ部分と整数値1(すなわち、最下位ビットのみが1のビット列)との排他的論理和を計算し、その計算結果により暗号化ステートのキャパシティ部分を更新する。言い換えると、境界設定部16は、暗号化ステートの最下位ビットのみを反転させる。この操作は、受信者が暗号文Cと追加データAとの境界を判別できるようにするために行われるものである。
In step S16, the
ステップS17において、暗号化装置1の追加データ計算部17は、入力部11から追加データAを受け取り、その追加データAを用いて記憶部10に記憶された暗号化ステートの値を更新する。追加データ計算部17の分割部171は、追加データAをrビットのブロックに分割する。追加データ計算部17の排他的論理和部172は、暗号化ステートのレート部分と追加データAのブロックとの排他的論理和を計算し、その計算結果により暗号化ステートのレート部分を更新する。追加データ計算部17の置換部173は、bビットの暗号化ステート全体に対し、bビットの置換fを計算し、その計算結果を新たな暗号化ステートの値とする。追加データ計算部17は、上記の操作を追加データAの第一ブロックから最終ブロックまで前方のブロックから順に実行する。
In step S17, the additional data calculation unit 17 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
ステップS18において、暗号化装置1のタグ生成部18は、暗号化ステートのキャパシティ部分と共通鍵Kとの排他的論理和を計算し、その計算結果により暗号化ステートのキャパシティ部分を更新する。タグ生成部18は、暗号化ステートのレート部分を暗号文Cの最終ブロックとして出力し、暗号化ステートのキャパシティ部分をタグTとして出力する。
In step S18, the
ステップS19において、暗号化装置1の出力部19は、暗号文CとタグTと追加データAとの組(C, T, A)を復号装置2へ送信する。
In step S19, the
図13−14を参照して、実施形態の追加データ付き認証暗号システムが実行する追加データ付き認証暗号方法のうち、復号装置2が実行する復号方法について説明する。 Of the authentication encryption method with additional data executed by the authentication encryption system with additional data according to the embodiment, the decryption method executed by the decryption device 2 will be described with reference to FIGS.
復号装置2の記憶部20には、rビットのレート部分とcビットのキャパシティ部分とからなるbビットのステート(以下、暗号化装置1の記憶部10に記憶されるステートと区別するために、復号ステートと呼ぶ)と、暗号化装置1との間であらかじめ共有した共通鍵Kとが記憶されている。b, r, cの各値は、暗号化装置1の記憶部10に記憶された暗号化ステートと同じものとする。
In the
ステップS21において、復号装置2の入力部21へ、暗号化装置1から受信した暗号文CとタグTと追加データAとの組(C, T, A)が入力される。入力部21は、暗号文Cの最終ブロックとタグTとを初期化部22へ、追加データAを追加データ逆計算部24へ、暗号文Cの最終ブロック以外の各ブロックを暗号文逆計算部26へそれぞれ入力する。
In step S21, the set (C, T, A) of the ciphertext C, the tag T, and the additional data A received from the encryption device 1 is input to the
ステップS22において、復号装置2の初期化部22は、入力部21から暗号文Cの最終ブロックとタグTとを受け取り、記憶部20に記憶されている復号ステートのうち、レート部分の値を暗号文Cの最終ブロックの値に、キャパシティ部分の値をタグTの値に設定して初期化する。
In step S22, the
ステップS23において、復号装置2のタグ復号部23は、復号ステートのキャパシティ部分と共通鍵Kとの排他的論理和を計算し、その計算結果により復号ステートのキャパシティ部分を更新する。
In step S23, the
ステップS24において、復号装置2の追加データ逆計算部24は、入力部21から追加データAを受け取り、その追加データAを用いて記憶部20に記憶された復号ステートの値を更新する。追加データ逆計算部24の分割部241は、追加データAをrビットのブロックに分割する。追加データ逆計算部24の逆置換部242は、bビットの復号ステート全体に対し、bビットの置換fの逆置換f-1:{0, 1}b→{0, 1}bを計算し、その計算結果を新たな復号ステートの値とする。追加データ逆計算部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
ステップS25において、復号装置2の境界除去部25は、復号ステートのキャパシティ部分と整数値1との排他的論理和を計算し、その計算結果により復号ステートのキャパシティ部分を更新する。すなわち、境界除去部25は、復号ステートの最下位ビットのみを反転させる。
In step S25, the
ステップ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
ステップS27において、復号装置2の改ざん検知部27は、記憶部20に記憶された復号ステートを三つの領域に分割する。各領域の範囲は暗号化ステートの各領域と対応しており、例えば、第一領域はレート部分のrビットとし、第二領域はキャパシティ部分の下位c/3ビットとし、第三領域はキャパシティ部分の上位2c/3ビットとする。改ざん検知部27は、復号ステートの第二領域の値を中間ステート値Scとして、例えば記憶部20などに記憶する。その後、記憶部20に記憶された中間ステート値Scと、暗号化ステートの第二領域に設定した所定の検証値とを比較する。ここでは、所定の検証値を0としたため、Sc=0が成り立つか否かを検証する。中間ステート値Scと所定の検証値が等しい場合(Sc=0)は、ステップS281へ処理を進め、復号ステートの第一領域のビット列を、メッセージMの第一ブロックとして出力部28から出力する。中間ステート値Scと所定の検証値が等しくない場合は、ステップS282へ処理を進め、復号に失敗した旨を表すエラーコードを出力部28から出力する。
In step S27, the
上記のように構成することにより、実施形態の追加データ付き認証暗号技術は、通信コスト、計算コスト、および実装コストを低減することができる。従来のAPEでは(C, T, A, N)の組の全ビットを送受信していたが、実施形態では復号装置2がナンスNを必要としないため、ナンスNを送受信する通信コストを削減することができる。また、従来のAPEでは復号装置2が追加データAとナンスNを処理する際に|A+N|/r回の置換fまたは逆置換f-1を計算する必要があったが、実施形態ではナンスNを処理しないため|A|/r回の逆置換f-1を計算するだけでよく、計算コストを削減することができる。さらに、暗号化装置1は置換fのみを実装すればよく、復号装置2は逆置換f-1のみを実装すればよいため、実装コストを削減することができる。 By configuring as described above, the authentication encryption technology with additional data according to the embodiment can reduce communication cost, calculation cost, and implementation cost. In the conventional APE, all the bits of the set of (C, T, A, N) are transmitted and received, but in the embodiment, the decoding device 2 does not need the nonce N, so the communication cost of transmitting and receiving the nonce N is reduced. be able to. Further, in the conventional APE, when the decoding device 2 processes the additional data A and the nonce N, it is necessary to calculate the replacement f or the inverse replacement f −1 |A+N|/r times, but in the embodiment, Since the nonce N is not processed, it is sufficient to calculate the inverse permutation f −1 |A|/r times, which can reduce the calculation cost. Furthermore, since the encryption device 1 only needs to implement the permutation f and the decryption device 2 only needs to implement the inverse permutation f -1 , the implementation cost can be reduced.
以上、この発明の実施の形態について説明したが、具体的な構成は、これらの実施の形態に限られるものではなく、この発明の趣旨を逸脱しない範囲で適宜設計の変更等があっても、この発明に含まれることはいうまでもない。実施の形態において説明した各種の処理は、記載の順に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。 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, Needless to say, it is included in the present invention. The various kinds of processing described in the embodiments may be executed not only in time series according to the order described, but also in parallel or individually according to the processing capability of the device that executes the processing or the need.
[プログラム、記録媒体]
上記実施形態で説明した各装置における各種の処理機能をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、上記各装置における各種の処理機能がコンピュータ上で実現される。
[Program, recording medium]
When various processing functions in each device described in the above embodiment are realized by a computer, processing contents of functions that each device should have are described by a program. Then, by executing this program on a computer, various processing functions of the above devices are realized on the computer.
この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよい。 The program describing the processing contents can be recorded in a computer-readable recording medium. The computer-readable recording medium may be, for example, a magnetic recording device, an optical disc, a magneto-optical recording medium, a semiconductor memory, or the like.
また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD-ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。 The distribution of this program is performed by, for example, selling, transferring, or lending a portable recording medium such as a DVD or a CD-ROM in which the program is recorded. Further, the program may be stored in a storage device of a server computer and transferred from the server computer to another computer via a network to distribute the program.
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記憶装置に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。 A computer that executes such a program first stores, for example, the program recorded on a portable recording medium or the program transferred from the server computer in its own storage device. Then, when executing the process, this computer reads the program stored in its own storage device and executes the process according to the read program. As another execution form of this program, a computer may directly read the program from a portable recording medium and execute processing according to the program, and the program is transferred from the server computer to this computer. Each time, the processing according to the received program may be sequentially executed. In addition, a configuration in which the above-described processing is executed by a so-called ASP (Application Service Provider) type service that realizes a processing function only by the execution instruction and result acquisition without transferring the program from the server computer to this computer May be Note that the program in this embodiment includes information that is used for processing by an electronic computer and that conforms to the program (such as data that is not a direct command to a computer but has the property of defining computer processing).
また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。 Further, in this embodiment, the present apparatus is configured by executing a predetermined program on the computer, but at least a part of the processing content may be implemented by hardware.
1 暗号化装置
2 復号装置
3 通信網
10 記憶部
11 入力部
12 初期化部
13 ナンス計算部
14 一部解放部
15 メッセージ計算部
16 境界設定部
17 追加データ計算部
18 タグ生成部
19 出力部
20 記憶部
21 入力部
22 初期化部
23 タグ復号部
24 追加データ逆計算部
25 境界除去部
26 暗号文逆計算部
27 改ざん検知部
28 出力部
1 encryption device 2
Claims (6)
上記暗号化装置は、
レート部分とキャパシティ部分とからなる暗号化ステートと、上記復号装置とあらかじめ共有した共通鍵とを記憶する記憶部と、
上記暗号化ステートのレート部分を所定のビット列に、上記暗号化ステートのキャパシティ部分を上記共通鍵に設定する初期化部と、
入力されたナンスを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して所定の置換を計算するナンス計算部と、
上記暗号化ステートのレート部分に含まれる領域を第一領域とし、上記暗号化ステートのキャパシティ部分に含まれる領域を第三領域とし、上記暗号化ステートのうち第一領域と第三領域以外の領域を第二領域とし、上記第二領域を所定の検証値に設定する検証値設定部と、
入力されたメッセージの先頭から上記第一領域の長さを第一ブロックとし、上記メッセージの残りを上記暗号化ステートのレート部分の長さに分割した各ブロックを第二ブロックから最終ブロックとし、上記メッセージの第一ブロックについて、上記暗号化ステートのレート部分を当該ブロックにより更新した後の上記暗号化ステートに対して上記置換を計算し、上記メッセージの第二ブロックから最終ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、上記置換を計算するたびに上記暗号化ステートのレート部分を暗号文のブロックとして出力するメッセージ計算部と、
入力された追加データを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算する追加データ計算部と、
上記暗号化ステートのレート部分を上記暗号文の最終ブロックとして出力し、上記暗号化ステートのキャパシティ部分と上記共通鍵との排他的論理和をタグとして出力するタグ生成部と、
を含み、
上記復号装置は、
レート部分とキャパシティ部分とからなる復号ステートと、上記暗号化装置とあらかじめ共有した上記共通鍵とを記憶する記憶部と、
上記復号ステートのレート部分を上記暗号化装置から受け取った上記暗号文の最終ブロックに、上記復号ステートのキャパシティ部分を上記暗号化装置から受け取った上記タグに設定する初期化部と、
上記復号ステートのキャパシティ部分を上記共通鍵との排他的論理和により更新するタグ復号部と、
上記暗号化装置から受け取った追加データを上記復号ステートのレート部分の長さに分割した各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記置換の逆置換を計算し、上記復号ステートのレート部分を当該ブロックとの排他的論理和により更新する追加データ逆計算部と、
上記暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記逆置換を計算し、上記逆置換を計算するたびに上記復号ステートのレート部分と当該ブロックとの排他的論理和を上記メッセージのブロックとして出力し、当該ブロックにより上記復号ステートのレート部分を更新する暗号文逆計算部と、
上記復号ステートのうち上記暗号化ステートの第二領域に対応するビット列の値と上記検証値とが等しいとき、上記復号ステートのうち上記暗号化ステートの第一領域に対応するビット列を上記メッセージの第一ブロックとして出力する改ざん検知部と、
を含む追加データ付き認証暗号システム。 An authentication encryption system with additional data including an encryption device and a decryption device,
The encryption device is
An encryption state consisting of a rate part and a capacity part, and a storage part for storing a common key previously shared with the decryption device,
An initialization unit that sets the rate part of the encryption state to a predetermined bit string and the capacity part of the encryption state to the common key,
For each block obtained by dividing the input nonce into the length of the rate portion of the encryption state, the rate portion of the encryption state is updated by exclusive OR with the block in order from the front block. A nonce calculator that calculates a predetermined permutation for the encryption state,
The area included in the rate portion of the encryption state is the first area, the area included in the capacity portion of the encryption state is the third area, and the areas other than the first area and the third area in the encryption state are A region is a second region, a verification value setting unit that sets the second region to a predetermined verification value,
From the beginning of the input message, the length of the first area is the first block, and the rest of the message is divided into the length of the rate portion of the encryption state. For the first block of the message, calculate the permutation for the encryption state after updating the rate portion of the encryption state by the block, and from the second block of the message to the final block, from the previous block. In turn, the rate part of the encryption state is calculated by calculating the permutation for the encryption state after the rate part of the encryption state is updated by exclusive OR with the block. A message calculator that outputs as a block of ciphertext,
For each block obtained by dividing the input additional data into the length of the rate part of the encryption state, the rate part of the encryption state is updated by exclusive OR with the block, in order from the front block. An additional data calculator that calculates the permutation for the encryption state,
A tag generation unit that outputs the rate part of the encryption state as the final block of the ciphertext, and outputs the exclusive OR of the capacity part of the encryption state and the common key as a tag,
Including
The decoding device is
A decryption state consisting of a rate portion and a capacity portion, and a storage unit for storing the common key previously shared with the encryption device,
An initialization unit that sets the rate part of the decryption state in the final block of the ciphertext received from the encryption device, and sets the capacity part 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;
For each block obtained by dividing the additional data received from the encryption device into the length of the rate portion of the decryption state, the reverse permutation of the permutation is calculated for the decryption state in order from the rear block, and the decryption state is calculated. An additional data inverse calculation unit that updates the rate part of the by exclusive OR with the block,
For each block other than the final block in the ciphertext received from the encryption device, the reverse substitution is calculated for the decryption state in order from the rear block, and the decryption state of the decryption state is calculated every time the inverse substitution is calculated. A ciphertext inverse calculation unit that outputs the exclusive OR of the rate portion and the block as a block of the message, and updates the rate portion of the decryption state by the block,
When the value of the bit string corresponding to the second area of the encryption state in the decryption state is equal to the verification value, the bit string corresponding to the first area of the encryption state in the decryption state is set to the first in the message. A tampering detection unit that outputs as one block,
Authentication cryptosystem with additional data including.
上記暗号化ステートのレート部分を所定のビット列に、上記暗号化ステートのキャパシティ部分を上記共通鍵に設定する初期化部と、
入力されたナンスを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して所定の置換を計算するナンス計算部と、
上記暗号化ステートのレート部分に含まれる領域を第一領域とし、上記暗号化ステートのキャパシティ部分に含まれる領域を第三領域とし、上記暗号化ステートのうち第一領域と第三領域以外の領域を第二領域とし、上記第二領域を所定の検証値に設定する検証値設定部と、
入力されたメッセージの先頭から上記第一領域の長さを第一ブロックとし、上記メッセージの残りを上記暗号化ステートのレート部分の長さに分割した各ブロックを第二ブロックから最終ブロックとし、上記メッセージの第一ブロックについて、上記暗号化ステートのレート部分を当該ブロックにより更新した後の上記暗号化ステートに対して上記置換を計算し、上記メッセージの第二ブロックから最終ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、上記置換を計算するたびに上記暗号化ステートのレート部分を暗号文のブロックとして出力するメッセージ計算部と、
入力された追加データを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算する追加データ計算部と、
上記暗号化ステートのレート部分を上記暗号文の最終ブロックとして出力し、上記暗号化ステートのキャパシティ部分と上記共通鍵との排他的論理和をタグとして出力するタグ生成部と、
を含む暗号化装置。 An encryption state consisting of a rate part and a capacity part, and a storage part for storing a common key shared in advance with the decryption device,
An initialization unit that sets the rate part of the encryption state to a predetermined bit string and the capacity part of the encryption state to the common key,
For each block obtained by dividing the input nonce into the length of the rate portion of the encryption state, the rate portion of the encryption state is updated by exclusive OR with the block in order from the preceding block. A nonce calculator that calculates a predetermined permutation for the encryption state,
The area included in the rate portion of the encryption state is the first area, the area included in the capacity portion of the encryption state is the third area, and the areas other than the first area and the third area in the encryption state are A region is a second region, a verification value setting unit that sets the second region to a predetermined verification value,
From the beginning of the input message, the length of the first area is the first block, and the rest of the message is divided into the length of the rate portion of the encryption state. For the first block of the message, calculate the permutation for the encryption state after updating the rate portion of the encryption state by the block, and from the second block of the message to the final block, from the previous block. Sequentially, the rate part of the encryption state is calculated by calculating the permutation for the encryption state after updating the rate part of the encryption state by exclusive OR with the block. A message calculator that outputs as a block of ciphertext,
For each block obtained by dividing the input additional data into the length of the rate portion of the encryption state, the rate portion of the encryption state is updated by exclusive OR with the block in order from the front block. An additional data calculator that calculates the permutation for the encryption state,
A tag generation unit that outputs the rate part of the encryption state as the final block of the ciphertext, and outputs the exclusive OR of the capacity part of the encryption state and the common key as a tag,
Encryption device including.
上記復号ステートのレート部分を上記暗号化装置から受け取った暗号文の最終ブロックに、上記復号ステートのキャパシティ部分を上記暗号化装置から受け取ったタグに設定する初期化部と、
上記復号ステートのキャパシティ部分を上記共通鍵との排他的論理和により更新するタグ復号部と、
上記暗号化装置から受け取った追加データを上記復号ステートのレート部分の長さに分割した各ブロックについて、後方のブロックから順に、上記復号ステートに対して所定の置換の逆置換を計算し、上記復号ステートのレート部分を当該ブロックとの排他的論理和により更新する追加データ逆計算部と、
上記暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記逆置換を計算し、上記逆置換を計算するたびに上記復号ステートのレート部分と当該ブロックとの排他的論理和をメッセージのブロックとして出力し、当該ブロックにより上記復号ステートのレート部分を更新する暗号文逆計算部と、
上記復号ステートのうち暗号化ステートの第二領域に対応するビット列と所定の検証値とが等しいとき、上記復号ステートのうち上記暗号化ステートの第一領域に対応するビット列を上記メッセージの第一ブロックとして出力する改ざん検知部と、
を含み、
上記暗号化装置は、
レート部分とキャパシティ部分とからなる上記暗号化ステートと、復号装置とあらかじめ共有した共通鍵とを記憶しており、
上記暗号化ステートのレート部分を所定のビット列に、上記暗号化ステートのキャパシティ部分を上記共通鍵に設定し、
入力されたナンスを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、
上記暗号化ステートのレート部分に含まれる領域を第一領域とし、上記暗号化ステートのキャパシティ部分に含まれる領域を第三領域とし、上記暗号化ステートのうち第一領域と第三領域以外の領域を第二領域とし、上記第二領域を所定の検証値に設定し、
入力されたメッセージの先頭から上記第一領域の長さを第一ブロックとし、上記メッセージの残りを上記暗号化ステートのレート部分の長さに分割した各ブロックを第二ブロックから最終ブロックとし、上記メッセージの第一ブロックについて、上記暗号化ステートのレート部分を当該ブロックにより更新した後の上記暗号化ステートに対して上記置換を計算し、上記メッセージの第二ブロックから最終ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、上記置換を計算するたびに上記暗号化ステートのレート部分を暗号文のブロックとして出力し、
入力された追加データを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、
上記暗号化ステートのレート部分を上記暗号文の最終ブロックとして出力し、上記暗号化ステートのキャパシティ部分と上記共通鍵との排他的論理和をタグとして出力する、
復号装置。 A decryption state consisting of a rate part and a capacity part, and a storage part for storing the common key previously shared with the encryption device,
An initialization unit that sets the rate part of the decryption state in the final block of the ciphertext received from the encryption device, and the capacity part 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;
For each block obtained by dividing the additional data received from the encryption device into the length of the rate portion of the decryption state, the inverse permutation of a predetermined permutation is calculated for the decryption state in order from the rear block, and the decryption is performed. An additional data inverse calculation unit that updates the rate portion of the state by exclusive OR with the block,
For each block other than the final block in the ciphertext received from the encryption device, the reverse substitution is calculated for the decryption state in order from the rear block, and the decryption state of the decryption state is calculated every time the inverse substitution is calculated. A ciphertext inverse calculation unit that outputs an exclusive OR of the rate part and the block as a message block, and updates the rate part of the decryption state by the block,
When the bit string corresponding to the second area of the encryption state in the decryption state is equal to the predetermined verification value, the bit string corresponding to the first area of the encryption state in the decryption state is set to the first block of the message. A tampering detection section that outputs as
Including
The encryption device is
The encryption state consisting of the rate part and the capacity part and the common key shared in advance with the decryption device are stored,
Set the rate part of the encryption state to a predetermined bit string and the capacity part of the encryption state to the common key,
For each block obtained by dividing the input nonce into the length of the rate portion of the encryption state, the rate portion of the encryption state is updated by exclusive OR with the block in order from the front block. Compute the above permutation for the encryption state,
The area included in the rate portion of the encryption state is the first area, the area included in the capacity portion of the encryption state is the third area, and the areas other than the first area and the third area in the encryption state are The area is the second area, the second area is set to a predetermined verification value,
From the beginning of the input message, the length of the first area is the first block, and the rest of the message is divided into the length of the rate portion of the encryption state. For the first block of the message, calculate the permutation for the encryption state after updating the rate portion of the encryption state by the block, and from the second block of the message to the final block, from the previous block. In turn, the rate part of the encryption state is calculated by calculating the permutation for the encryption state after the rate part of the encryption state is updated by exclusive OR with the block. As a block of ciphertext,
For each block obtained by dividing the input additional data into the length of the rate part of the encryption state, the rate part of the encryption state is updated by exclusive OR with the block, in order from the front block. Compute the permutation for the encryption state,
The rate part of the encryption state is output as the final block of the ciphertext, and the exclusive OR of the capacity part of the encryption state and the common key is output as a tag.
Decoding device.
上記暗号化装置は、
レート部分とキャパシティ部分とからなる暗号化ステートと、上記復号装置とあらかじめ共有した共通鍵とを記憶しており、
上記暗号化ステートのレート部分を所定のビット列に、上記暗号化ステートのキャパシティ部分を上記共通鍵に設定し、
入力されたナンスを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して所定の置換を計算し、
上記暗号化ステートのレート部分に含まれる領域を第一領域とし、上記暗号化ステートのキャパシティ部分に含まれる領域を第三領域とし、上記暗号化ステートのうち第一領域と第三領域以外の領域を第二領域とし、上記第二領域を所定の検証値に設定し、
入力されたメッセージの先頭から上記第一領域の長さを第一ブロックとし、上記メッセージの残りを上記暗号化ステートのレート部分の長さに分割した各ブロックを第二ブロックから最終ブロックとし、上記メッセージの第一ブロックについて、上記暗号化ステートのレート部分を当該ブロックにより更新した後の上記暗号化ステートに対して上記置換を計算し、上記メッセージの第二ブロックから最終ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、上記置換を計算するたびに上記暗号化ステートのレート部分を暗号文のブロックとして出力し、
入力された追加データを上記暗号化ステートのレート部分の長さに分割した各ブロックについて、前方のブロックから順に、上記暗号化ステートのレート部分を当該ブロックとの排他的論理和により更新した後の上記暗号化ステートに対して上記置換を計算し、
上記暗号化ステートのレート部分を上記暗号文の最終ブロックとして出力し、上記暗号化ステートのキャパシティ部分と上記共通鍵との排他的論理和をタグとして出力し、
上記復号装置は、
レート部分とキャパシティ部分とからなる復号ステートと、上記暗号化装置とあらかじめ共有した上記共通鍵とを記憶しており、
上記復号ステートのレート部分を上記暗号化装置から受け取った上記暗号文の最終ブロックに、上記復号ステートのキャパシティ部分を上記暗号化装置から受け取った上記タグに設定し、
上記復号ステートのキャパシティ部分を上記共通鍵との排他的論理和により更新し、
上記暗号化装置から受け取った追加データを上記復号ステートのレート部分の長さに分割した各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記置換の逆置換を計算し、上記復号ステートのレート部分を当該ブロックとの排他的論理和により更新し、
上記暗号化装置から受け取った暗号文のうち最終ブロック以外の各ブロックについて、後方のブロックから順に、上記復号ステートに対して上記逆置換を計算し、上記逆置換を計算するたびに上記復号ステートのレート部分と当該ブロックとの排他的論理和を上記メッセージのブロックとして出力し、当該ブロックにより上記復号ステートのレート部分を更新し、
上記復号ステートのうち上記暗号化ステートの第二領域に対応するビット列と上記検証値とが等しいとき、上記復号ステートのうち上記暗号化ステートの第一領域に対応するビット列を上記メッセージの第一ブロックとして出力する、
追加データ付き認証暗号方法。 An authentication encryption method with additional data executed by an authentication encryption system with additional data including an encryption device and a decryption device,
The encryption device is
It stores an encryption state consisting of a rate part and a capacity part, and a common key shared in advance with the decryption device,
Set the rate part of the encryption state to a predetermined bit string and the capacity part of the encryption state to the common key,
For each block obtained by dividing the input nonce into the length of the rate portion of the encryption state, the rate portion of the encryption state is updated by exclusive OR with the block in order from the preceding block. Calculate the given permutation for the encryption state,
The area included in the rate portion of the encryption state is the first area, the area included in the capacity portion of the encryption state is the third area, and the areas other than the first area and the third area in the encryption state are The area is the second area, the second area is set to a predetermined verification value,
From the beginning of the input message, the length of the first area is the first block, and the rest of the message is divided into the length of the rate portion of the encryption state. For the first block of the message, calculate the permutation for the encryption state after updating the rate portion of the encryption state by the block, and from the second block of the message to the final block, from the previous block. Sequentially, the rate part of the encryption state is calculated by calculating the permutation for the encryption state after updating the rate part of the encryption state by exclusive OR with the block. As a block of ciphertext,
For each block obtained by dividing the input additional data into the length of the rate portion of the encryption state, the rate portion of the encryption state is updated by exclusive OR with the block in order from the front block. Compute the permutation for the encryption state,
The rate part of the encryption state is output as the final block of the ciphertext, and the exclusive OR of the capacity part of the encryption state and the common key is output as a tag,
The decoding device is
It stores a decryption state consisting of a rate part and a capacity part, and the common key previously shared with the encryption device,
The rate portion of the decryption state is set in the final block of the ciphertext received from the encryption device, and the capacity portion of the decryption state is set in the tag received from the encryption device,
Update the capacity part of the decryption state by exclusive OR with the common key,
For each block obtained by dividing the additional data received from the encryption device into the length of the rate portion of the decryption state, the reverse permutation of the permutation is calculated for the decryption state in order from the rear block, and the decryption state is calculated. Update the rate part of the by exclusive OR with the block,
For each block other than the final block in the ciphertext received from the encryption device, the reverse substitution is calculated for the decryption state in order from the rear block, and the decryption state of the decryption state is calculated every time the inverse substitution is calculated. The exclusive OR of the rate part and the block is output as the block of the message, and the rate part of the decoding state is updated by the block,
When the bit string corresponding to the second area of the encryption state in the decryption state is equal to the verification value, the bit string corresponding to the first area of the encryption state in the decryption state is set as the first block of the message. Output as
Authentication encryption method with additional data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017134875A JP6732698B2 (en) | 2017-07-10 | 2017-07-10 | Authentication encryption system with additional data, encryption device, decryption device, authentication encryption method with additional data, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017134875A JP6732698B2 (en) | 2017-07-10 | 2017-07-10 | Authentication encryption system with additional data, encryption device, decryption device, authentication encryption method with additional data, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019015914A JP2019015914A (en) | 2019-01-31 |
JP6732698B2 true JP6732698B2 (en) | 2020-07-29 |
Family
ID=65358715
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017134875A Active JP6732698B2 (en) | 2017-07-10 | 2017-07-10 | Authentication encryption system with additional data, encryption device, decryption device, authentication encryption method with additional data, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6732698B2 (en) |
-
2017
- 2017-07-10 JP JP2017134875A patent/JP6732698B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019015914A (en) | 2019-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10880100B2 (en) | Apparatus and method for certificate enrollment | |
US10193691B2 (en) | Information processing device, server device, information processing system, moving object, and information processing method | |
EP2352251A1 (en) | Content decoding apparatus, content decoding method and integrated circuit | |
US10146701B2 (en) | Address-dependent key generation with a substitution-permutation network | |
CN110690963A (en) | Key agreement method and device based on FPGA | |
JP6735926B2 (en) | Encryption device, decryption device, encryption method, decryption method, encryption program, and decryption program | |
CN110716728A (en) | Credible updating method and device for FPGA (field programmable Gate array) logic | |
JP6273226B2 (en) | Encryption system, authentication system, encryption device, decryption device, authenticator generation device, verification device, encryption method, authentication method | |
US9946662B2 (en) | Double-mix Feistel network for key generation or encryption | |
JP6881111B2 (en) | Cryptographic data generator, decryption data generator, authenticated cryptosystem with additional data, its method, and program | |
JP6830867B2 (en) | Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program | |
JP6732698B2 (en) | Authentication encryption system with additional data, encryption device, decryption device, authentication encryption method with additional data, and program | |
US20220321322A1 (en) | Encryption device, decryption device, encryption method, decryption method, and computer readable medium | |
US20210135840A1 (en) | Message authenticator generation apparatus | |
US20230132163A1 (en) | Memory processing apparatus, memory verification apparatus, memory updating apparatus, memory protection system, method, and computer readable medium | |
JP6830868B2 (en) | Authenticated encryption system with additional data, decryption device, authenticated 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 | |
JP6881112B2 (en) | Cryptographic data generator, decryption data generator, authenticated cryptosystem with additional data, its method, and program | |
TW201543862A (en) | Encryption device, memory system, decryption device, encryption method, decryption method, encryption program product, and decryption program product | |
JP6033504B1 (en) | Message authenticator generator | |
JP5178269B2 (en) | Decoding device and program | |
JP4708914B2 (en) | Decryption method | |
JP5268413B2 (en) | Disclosure restriction processing apparatus, data processing system, and program | |
JP2009087182A (en) | Security method for information-recording medium, information-processing device, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190619 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200327 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200421 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200612 |
|
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: 20200707 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200708 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6732698 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |