JP2015022269A - Encryption device, decryption device, encryption method, decryption method, and program - Google Patents

Encryption device, decryption device, encryption method, decryption method, and program Download PDF

Info

Publication number
JP2015022269A
JP2015022269A JP2013152665A JP2013152665A JP2015022269A JP 2015022269 A JP2015022269 A JP 2015022269A JP 2013152665 A JP2013152665 A JP 2013152665A JP 2013152665 A JP2013152665 A JP 2013152665A JP 2015022269 A JP2015022269 A JP 2015022269A
Authority
JP
Japan
Prior art keywords
initialization vector
plaintext
block
ciphertext
blocks
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.)
Granted
Application number
JP2013152665A
Other languages
Japanese (ja)
Other versions
JP6167721B2 (en
Inventor
祐貴 武藤
Yuki Muto
祐貴 武藤
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.)
Toppan Inc
Original Assignee
Toppan Printing Co Ltd
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 Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP2013152665A priority Critical patent/JP6167721B2/en
Publication of JP2015022269A publication Critical patent/JP2015022269A/en
Application granted granted Critical
Publication of JP6167721B2 publication Critical patent/JP6167721B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To prevent the leakage of an initialization vector and thereby improve cipher strength in encryption by a ciphertext block chain mode.SOLUTION: An encryption device according to the present invention, in performing encryption by a CBC mode, generates an initialization vector by utilizing a prescribed plaintext block selected from second and subsequent plaintext blocks in accordance with a content indicated by initialization vector generation instruction information and encrypts plaintext data by utilizing the generated initialization vector. A decryption device according to the present invention generates, upon obtaining second and subsequent plaintext blocks by decrypting second and subsequent ciphertext blocks, an initialization vector by utilizing prescribed plaintext data selected from the second and subsequent plaintext data obtained by decryption in accordance with a content indicated by the same initialization vector generation instruction information as on the encryption device side and decrypts a first ciphertext block by utilizing the generated initialization vector to obtain a first plaintext block.

Description

本発明は、暗号化装置、復号装置、暗号化方法、復号方法及びプログラムに関する。   The present invention relates to an encryption device, a decryption device, an encryption method, a decryption method, and a program.

DES(Data Encryption Standard)やAES(Advanced Encryption Standard)などのブロック暗号方式が知られている。ブロック暗号方式は、共通鍵暗号方式の1つであり、例えば固定長のブロック単位で暗号化、復号を行う暗号方式である。   Block encryption methods such as DES (Data Encryption Standard) and AES (Advanced Encryption Standard) are known. The block encryption method is one of common key encryption methods, for example, encryption methods that perform encryption and decryption in units of fixed-length blocks.

また、ブロック暗号方式としては、ECB(Electronic CodeBook)モード(暗号ブックモード)とCBC(Cipher Block Chaining)モード(暗号文ブロック連鎖モード)が知られている。
ECBモードは、単純にブロック単位ごとで完結した暗号化、復号を行う。
CBCモードは、前の平文ブロックを暗号化して得られた暗号文ブロックと現平文ブロックとで排他的論理和演算(XOR)を行い、排他的論理和演算の結果に対して暗号化を行う。この場合、先頭の平文ブロックについては、排他的論理和演算を行うべき前の暗号文ブロックが存在しない。そこで、先頭の平文ブロックについては、暗号文ブロックに代えて予め定めた初期化ベクタと排他的論理和演算を行って暗号化する。
As block ciphers, an ECB (Electronic CodeBook) mode (cipher book mode) and a CBC (Cipher Block Chaining) mode (ciphertext block chain mode) are known.
The ECB mode simply performs encryption and decryption completed in units of blocks.
In the CBC mode, an exclusive OR operation (XOR) is performed between the ciphertext block obtained by encrypting the previous plaintext block and the current plaintext block, and the result of the exclusive OR operation is encrypted. In this case, for the first plaintext block, there is no previous ciphertext block to be subjected to the exclusive OR operation. Therefore, the first plaintext block is encrypted by performing an exclusive OR operation with a predetermined initialization vector instead of the ciphertext block.

例えばCBCモードによる暗号化にあたり、プリブロックを先頭に付加した平文を暗号化し、暗号化によって得られた暗号文からプリブロックに対応する暗号文ブロックを除去した結果を平文に対する暗号文とする技術が知られている(特許文献1)。   For example, in the encryption in the CBC mode, a technology that encrypts a plaintext with a preblock added at the head and removes a ciphertext block corresponding to the preblock from a ciphertext obtained by the encryption is used as a ciphertext for the plaintext. Known (Patent Document 1).

特開2012−168274号公報JP 2012-168274 A

CBCモードにおける初期化ベクタは、通常、暗号化を行う側と復号を行う側とで予め共有されたうえで固定的に使用される。このため、CBCモードにおいて初期化ベクタが漏洩したような場合には、初期化ベクタが暗号解読の足掛かりとなる可能性がある。つまり、CBCモードにおいては、初期化ベクタの漏洩の防止を図ることが暗号化強度を高めるうえで有効な方策の1つとなる。   The initialization vector in the CBC mode is normally used in a fixed manner after being previously shared between the encryption side and the decryption side. For this reason, in the case where the initialization vector leaks in the CBC mode, the initialization vector may become a starting point for decryption. In other words, in the CBC mode, preventing leakage of the initialization vector is one effective measure for increasing the encryption strength.

しかし、特許文献1に記載の技術は、あくまでも、最初の暗号文ブロックが暗号解読の足掛かりとなることの防止を目的とした構成であるために、初期化ベクタの漏洩の防止を図ることはできない。   However, since the technique described in Patent Document 1 has a configuration for the purpose of preventing the initial ciphertext block from becoming a starting point for decryption, it cannot prevent the initialization vector from leaking. .

本発明は、このような事情に鑑みてなされたもので、暗号文ブロック連鎖モードによる暗号化において、初期化ベクタの漏洩を防止して暗号強度の向上を図ることを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to improve the encryption strength by preventing the leakage of the initialization vector in the ciphertext block chain mode encryption.

上述した課題を解決するために、本発明の一態様としての暗号化装置は、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方を示す内容の情報であって、復号装置においても同じ内容が記憶される初期化ベクタ生成指示情報を記憶する初期化ベクタ生成指示情報記憶部と、前記初期化ベクタ生成指示情報が示す初期化ベクタの生成の仕方に従って、前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成部と、前記平文ブロックのうちの1番目の平文ブロックについて前記初期化ベクタを利用して暗号化し、2番目以降の平文ブロックについて、1つ前の暗号化によって得た暗号文ブロックを利用して暗号化する暗号化部と、前記暗号文ブロックを含む暗号文データを出力する暗号文データ出力部とを備える。   In order to solve the above-described problem, an encryption apparatus according to an aspect of the present invention is a method for generating an initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing plaintext data. An initialization vector generation instruction information storage unit for storing initialization vector generation instruction information in which the same contents are also stored in the decoding device, and an initialization vector indicated by the initialization vector generation instruction information An initialization vector generation unit that generates an initialization vector using the predetermined plaintext block according to the generation method of the first plaintext block of the plaintext block is encrypted using the initialization vector. An encryption unit that encrypts the second and subsequent plaintext blocks using the ciphertext block obtained by the previous encryption, and the ciphertext block And a ciphertext data output unit for outputting the ciphertext data including.

また、上記の暗号化装置において、前記初期化ベクタ生成指示情報は、前記所定の平文ブロックの排他的論理和を初期化ベクタとすべきことを示し、前記初期化ベクタ生成部は、前記所定の平文ブロックの排他的論理和を求めることによって初期化ベクタを生成してもよい。   In the encryption apparatus, the initialization vector generation instruction information indicates that an exclusive OR of the predetermined plaintext block should be an initialization vector, and the initialization vector generation unit An initialization vector may be generated by obtaining an exclusive OR of plaintext blocks.

また、上記の暗号化装置において、前記初期化ベクタ生成指示情報は、初期化ベクタの生成に利用する所定の平文ブロックとして、n(nは2以上の所定の自然数)番目以降の平文ブロックから順次選択すべきことを示し、前記初期化ベクタ生成部は、n番目以降の平文ブロックから順次選択した平文ブロックを初期化ベクタの生成に利用してもよい。   In the encryption apparatus, the initialization vector generation instruction information is sequentially transmitted from the n (n is a predetermined natural number of 2 or more) plaintext blocks as predetermined plaintext blocks used for generating the initialization vector. The initialization vector generation unit may use plaintext blocks sequentially selected from the nth and subsequent plaintext blocks to generate an initialization vector.

本発明の一態様としての復号装置は、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方を示す内容の情報であって、暗号化装置においても同じ内容が記憶される初期化ベクタ生成指示情報を記憶する初期化ベクタ生成指示情報記憶部と、暗号文データに含まれる暗号文ブロックのうち、2番目以降の暗号文ブロックについて1つ前の暗号文ブロックを利用して復号することで2番目以降の平文ブロックを取得し、1番目の暗号文ブロックについては初期化ベクタを利用して復号することで1番目の平文ブロックを取得する復号部と、前記初期化ベクタ生成指示情報が示す初期化ベクタの生成の仕方に従って、前記復号部により取得された2番目以降の平文ブロックのうちから所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成部とを備える。   The decryption device according to an aspect of the present invention is content information indicating how to generate an initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing plaintext data, 1 for the second and subsequent ciphertext blocks among ciphertext blocks included in the ciphertext data, and an initialization vector generation instruction information storage unit that stores initialization vector generation instruction information in which the same contents are stored. The second and subsequent plaintext blocks are obtained by decrypting using the previous ciphertext block, and the first plaintext block is obtained by decrypting using the initialization vector for the first ciphertext block. And the second and subsequent plaintext blocks acquired by the decoding unit according to the method of generating the initialization vector indicated by the initialization vector generation instruction information From among using a predetermined plaintext block and a initialization vector generator for generating an initialization vector.

また、上記の復号装置において、前記初期化ベクタ生成指示情報は、前記所定の平文ブロックの排他的論理和を初期化ベクタとすべきことを示し、前記初期化ベクタ生成部は、前記所定の平文ブロックの排他的論理和を求めることによって初期化ベクタを生成してもよい。   Further, in the above decoding device, the initialization vector generation instruction information indicates that an exclusive OR of the predetermined plaintext block should be an initialization vector, and the initialization vector generation unit includes the predetermined plaintext An initialization vector may be generated by obtaining an exclusive OR of blocks.

また、上記の復号装置において、前記初期化ベクタ生成指示情報は、初期化ベクタの生成に利用する所定の平文ブロックとして、n(nは2以上の所定の自然数)番目以降の平文ブロックから順次選択すべきことを示し、前記初期化ベクタ生成部は、n番目以降の平文ブロックから順次選択した平文ブロックを初期化ベクタの生成に利用してもよい。   In the above decoding apparatus, the initialization vector generation instruction information is sequentially selected from nth (n is a predetermined natural number of 2 or more) plaintext blocks as predetermined plaintext blocks used for generating the initialization vector. The initialization vector generation unit may use plaintext blocks sequentially selected from the nth and subsequent plaintext blocks to generate an initialization vector.

本発明の一態様としての暗号化方法は、復号装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップと、前記平文ブロックのうちの1番目の平文ブロックについて前記初期化ベクタを利用して暗号化し、2番目以降の平文ブロックについて、1つ前の暗号化によって得た暗号文ブロックを利用して暗号化する暗号化ステップと、前記暗号文ブロックを含む暗号文データを出力する暗号文データ出力ステップとを備える。   An encryption method according to an aspect of the present invention includes a predetermined plaintext block in the second and subsequent plaintext blocks among a plurality of plaintext blocks obtained by dividing plaintext data indicated by initialization vector generation instruction information in which the same content is stored in a decryption device An initialization vector generation step of generating an initialization vector using the predetermined plaintext block according to a method of generating an initialization vector using the method, and the initialization vector for the first plaintext block of the plaintext block And encrypting the second and subsequent plaintext blocks using the ciphertext block obtained by the previous encryption, and outputting ciphertext data including the ciphertext block A ciphertext data output step.

本発明の一態様としての復号方法は、暗号文データに含まれる暗号文ブロックのうち、2番目以降の暗号文ブロックについて1つ前の暗号文ブロックを利用して復号することで2番目以降の平文ブロックを取得し、1番目の暗号文ブロックについては初期化ベクタを利用して復号することで1番目の平文ブロックを取得する復号ステップと、暗号化装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記復号ステップにより取得された2番目以降の平文ブロックのうちから前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップとを備える。   In the decryption method as one aspect of the present invention, the second and subsequent ciphertext blocks of ciphertext data included in the ciphertext data are decrypted using the previous ciphertext block. A plaintext block is obtained, and the first ciphertext block is decrypted using an initialization vector to obtain the first plaintext block, and initialization in which the same content is stored in the encryption device The second and subsequent plaintexts acquired by the decryption step according to the method of generating an initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing the plaintext data indicated by the vector generation instruction information An initialization vector generation step of generating an initialization vector using the predetermined plaintext block from among the blocks.

本発明の一態様としてのプログラムは、コンピュータに、復号装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップと、前記平文ブロックのうちの1番目の平文ブロックについて前記初期化ベクタを利用して暗号化し、2番目以降の平文ブロックについて、1つ前の暗号化によって得た暗号文ブロックを利用して暗号化する暗号化ステップと、前記暗号文ブロックを含む暗号文データを出力する暗号文データ出力ステップとを実行させるためのものである。   A program according to one aspect of the present invention is a program in which a predetermined plaintext in a second and subsequent plaintext blocks among a plurality of plaintext blocks divided by plaintext data indicated by initialization vector generation instruction information in which the same contents are stored in a decryption device An initialization vector generation step of generating an initialization vector using the predetermined plaintext block according to a method of generating an initialization vector using the block, and the initialization of the first plaintext block of the plaintext block Encrypting using a vector, encrypting the second and subsequent plaintext blocks using the ciphertext block obtained by the previous encryption, and ciphertext data including the ciphertext block This is for executing the ciphertext data output step to be output.

本発明の一態様としてのプログラムは、コンピュータに、暗号文データに含まれる暗号文ブロックのうち、2番目以降の暗号文ブロックについて1つ前の暗号文ブロックを利用して復号することで2番目以降の平文ブロックを取得し、1番目の暗号文ブロックについては初期化ベクタを利用して復号することで1番目の平文ブロックを取得する復号ステップと、暗号化装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記復号ステップにより取得された2番目以降の平文ブロックのうちから前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップとを実行させるためのものである。   The program as one aspect of the present invention allows the computer to decrypt the second and subsequent ciphertext blocks out of ciphertext blocks included in the ciphertext data by using the previous ciphertext block. The subsequent plaintext block is acquired, and the first ciphertext block is decrypted using the initialization vector to obtain the first plaintext block, and the same contents are stored in the encryption device. The second and subsequent acquired by the decryption step according to the method of generating an initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing the plaintext data indicated by the initialization vector generation instruction information An initialization vector generating step for generating an initialization vector using the predetermined plaintext block from among the plaintext blocks of It is intended to execute.

本発明によれば、暗号文ブロック連鎖モードによる暗号化において、初期化ベクタの漏洩が防止され、暗号強度が向上するという効果が得られる。   According to the present invention, it is possible to prevent the initialization vector from being leaked and improve the encryption strength in the encryption in the ciphertext block chain mode.

本実施形態における暗号化装置と復号装置の構成例を示す図である。It is a figure which shows the structural example of the encryption apparatus and decryption apparatus in this embodiment. 本実施形態の暗号化装置と復号装置を具現化した例としてのICカードとリーダライタを示す図である。It is a figure which shows the IC card and reader / writer as an example which actualized the encryption apparatus and decryption apparatus of this embodiment. CBCモードに対応する暗号化装置が実行する一般的な暗号化の手順例を示す図である。It is a figure which shows the example of a general encryption procedure which the encryption apparatus corresponding to CBC mode performs. CBCモードに対応する復号装置が実行する一般的な復号の手順例を示す図である。It is a figure which shows the example of the procedure of the general decoding which the decoding apparatus corresponding to CBC mode performs. 本実施形態の暗号化装置が実行する暗号化の手順例を示す図である。It is a figure which shows the example of a procedure of the encryption which the encryption apparatus of this embodiment performs. 本実施形態における初期化ベクタ生成部の構成例を示す図である。It is a figure which shows the structural example of the initialization vector production | generation part in this embodiment. 本実施形態の復号装置が実行する復号の手順例を示す図である。It is a figure which shows the example of a procedure of the decoding which the decoding apparatus of this embodiment performs. 本実施形態の暗号化装置が初期化ベクタ生成のための生成アルゴリズムを設定するための処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence for the encryption apparatus of this embodiment to set the production | generation algorithm for initialization vector production | generation. 本実施形態の暗号化装置が実行する暗号化と復号装置が実行する復号のための処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence for the encryption which the encryption apparatus of this embodiment performs, and the decoding which a decoding apparatus performs. 本実施形態の変形例としての平文ブロックの選択例を示す図である。It is a figure which shows the example of selection of the plaintext block as a modification of this embodiment. 本実施形態の他の変形例としての平文ブロックの選択例を示す図である。It is a figure which shows the example of selection of the plaintext block as another modification of this embodiment.

[暗号化装置と復号装置の構成例]
図1は、本実施形態の暗号化装置100と復号装置200の構成例を示している。
まず、暗号化装置100について説明する。本実施形態の暗号化装置100は、CBC(Cipher Block Chaining)モードとしてのブロック暗号方式に対応する。
同図に示す暗号化装置100は、平文データ出力部101、平文データ分割部102、初期化ベクタ生成指示情報記憶部103、初期化ベクタ生成部104、暗号化部105、暗号文データ出力部106及び送信部107を備える。
[Configuration example of encryption device and decryption device]
FIG. 1 shows a configuration example of the encryption device 100 and the decryption device 200 of the present embodiment.
First, the encryption device 100 will be described. The encryption apparatus 100 according to the present embodiment corresponds to a block encryption method as a CBC (Cipher Block Chaining) mode.
The encryption apparatus 100 shown in the figure includes a plaintext data output unit 101, a plaintext data division unit 102, an initialization vector generation instruction information storage unit 103, an initialization vector generation unit 104, an encryption unit 105, and a ciphertext data output unit 106. And a transmission unit 107.

平文データ出力部101は、暗号化対象の平文データを出力する。具体例として、平文データ出力部101は、平文データ記憶部(図示せず)を備え、平文データ記憶部が予め記憶している平文データを読み出し、平文データ分割部102に出力するように構成することができる。あるいは、平文データ出力部101は、例えばデータインターフェースなどを経由して外部から入力された平文データを平文データ分割部102に出力するようにしてもよい。   The plaintext data output unit 101 outputs plaintext data to be encrypted. As a specific example, the plaintext data output unit 101 includes a plaintext data storage unit (not shown), and is configured to read plaintext data stored in advance in the plaintext data storage unit and output the plaintext data to the plaintext data division unit 102. be able to. Alternatively, the plaintext data output unit 101 may output plaintext data input from the outside via a data interface or the like to the plaintext data division unit 102, for example.

平文データ分割部102は、平文データ出力部101が出力した平文データを平文ブロックの単位に分割する。平文ブロックは、例えば8ビットまたは16ビットの固定長である。   The plaintext data dividing unit 102 divides the plaintext data output by the plaintext data output unit 101 into plaintext block units. The plaintext block has a fixed length of 8 bits or 16 bits, for example.

初期化ベクタ生成指示情報記憶部103は、初期化ベクタ生成指示情報を記憶する。初期化ベクタ生成指示情報は、所定の平文ブロックを利用した初期化ベクタの生成の仕方を示す情報である。
初期化ベクタ生成指示情報は、初期化ベクタの生成の仕方として、例えば初期化ベクタを生成するにあたりどの平文ブロックを選択し、選択した平文ブロックをどのように利用して初期化ベクタを生成するのかを示す情報である。
初期化ベクタは、1番目(先頭)の平文ブロックを暗号化するのに利用されることから、初期化ベクタの生成に利用することのできる平文ブロックは、平文データ分割部102によって得られた平文ブロックのうち、1番目を除いた2番目以降の平文ブロックになる。
The initialization vector generation instruction information storage unit 103 stores initialization vector generation instruction information. The initialization vector generation instruction information is information indicating how to generate an initialization vector using a predetermined plaintext block.
The initialization vector generation instruction information indicates how to generate the initialization vector. For example, which plaintext block is selected when generating the initialization vector, and how the selected plaintext block is used to generate the initialization vector. It is information which shows.
Since the initialization vector is used to encrypt the first (first) plaintext block, the plaintext block that can be used to generate the initialization vector is the plaintext obtained by the plaintext data dividing unit 102. Among the blocks, the second and subsequent plaintext blocks excluding the first are used.

初期化ベクタ生成指示情報は、復号装置200においても同じ内容が記憶される。このために、初期化ベクタ生成指示情報は、例えば暗号化装置100のユーザに引き渡される前の段階において、暗号化装置100の初期化ベクタ生成指示情報記憶部103に記憶される。同様に、復号装置200側においても、初期化ベクタ生成指示情報は、復号装置200のユーザに引き渡される前に復号装置200に対して記憶される。
つまり、本実施形態において、初期化ベクタ生成指示情報は、暗号化装置100と復号装置200との間で予め共有される。
The same content is stored in the decoding device 200 as the initialization vector generation instruction information. For this reason, the initialization vector generation instruction information is stored in the initialization vector generation instruction information storage unit 103 of the encryption apparatus 100, for example, before being transferred to the user of the encryption apparatus 100. Similarly, on the decoding device 200 side, the initialization vector generation instruction information is stored in the decoding device 200 before being delivered to the user of the decoding device 200.
That is, in the present embodiment, the initialization vector generation instruction information is shared in advance between the encryption device 100 and the decryption device 200.

初期化ベクタ生成部104は、初期化ベクタ(Initial Vector:IV)を生成する。初期化ベクタは、本実施形態が対応するCBCモードによるブロック暗号において、先頭の平文ブロックの暗号化に利用されるデータである。
本実施形態における初期化ベクタ生成部104は、初期化ベクタ生成指示情報が指示する初期化ベクタの生成の仕方に従って、所定の平文ブロックを利用して初期化ベクタを生成する。
The initialization vector generation unit 104 generates an initialization vector (Initial Vector: IV). The initialization vector is data used for encryption of the first plaintext block in the block cipher in the CBC mode corresponding to the present embodiment.
The initialization vector generation unit 104 in the present embodiment generates an initialization vector using a predetermined plaintext block according to the method of generating the initialization vector indicated by the initialization vector generation instruction information.

具体的に、初期化ベクタ生成部104は、暗号化装置100の起動時などにおいて、初期化ベクタ生成指示情報記憶部103から初期化ベクタ生成指示情報を読み出す。初期化ベクタ生成部104は、読み出した初期化ベクタ生成指示情報が示す初期化ベクタの生成の仕方に従った初期化ベクタの生成アルゴリズムを設定する。
以降において、初期化ベクタ生成部104は、平文データを暗号化すべきタイミングごとに応じて、生成アルゴリズムに従って、平文データ分割部102によって得られた平文ブロックのうちから、初期化ベクタの生成に利用すべき平文ブロックを入力する。初期化ベクタ生成部104は、入力した平文ブロックを利用して設定した生成アルゴリズムに従った演算を行うことで初期化ベクタを生成する。
Specifically, the initialization vector generation unit 104 reads the initialization vector generation instruction information from the initialization vector generation instruction information storage unit 103 when the encryption apparatus 100 is activated. The initialization vector generation unit 104 sets an initialization vector generation algorithm according to the method of generating the initialization vector indicated by the read initialization vector generation instruction information.
Thereafter, the initialization vector generation unit 104 uses the generated plaintext block from the plaintext block obtained by the plaintext data division unit 102 according to the generation algorithm according to the timing at which the plaintext data should be encrypted. Enter the power plaintext block. The initialization vector generation unit 104 generates an initialization vector by performing an operation according to a generation algorithm set using the input plaintext block.

暗号化部105は、平文データ分割部102によって得られた平文ブロックのうちの1番目の平文ブロックについて初期化ベクタを利用して暗号化し、2番目以降の平文ブロックについて、1つ前の暗号化によって得た暗号文ブロックを利用して暗号化する。つまり、暗号化部105は、ブロック暗号方式におけるCBCモードに対応したブロック単位の暗号化を行い、暗号文ブロックを得る。   The encryption unit 105 encrypts the first plaintext block of the plaintext blocks obtained by the plaintext data division unit 102 using the initialization vector, and encrypts the previous plaintext block for the second and subsequent plaintext blocks. Encrypt using the ciphertext block obtained by That is, the encryption unit 105 performs encryption in block units corresponding to the CBC mode in the block encryption method to obtain ciphertext blocks.

暗号文データ出力部106は、暗号化部105によって得られた平文ブロックごとに対応する暗号文ブロックにより暗号文データを生成する。具体的に、暗号文データ出力部106は、暗号文ブロックを連結することにより暗号文データを生成することができる。暗号文データ出力部106は、生成した暗号文データを出力する。
送信部107は、暗号文データ出力部106が出力した暗号文データを復号装置200に送信する。なお、送信部107が復号装置200に暗号文データを送信するための伝送路は、ネットワークあるいは所定のデータインターフェースなどであればよく、また、無線であってもよいし有線であってもよい。
The ciphertext data output unit 106 generates ciphertext data using a ciphertext block corresponding to each plaintext block obtained by the encryption unit 105. Specifically, the ciphertext data output unit 106 can generate ciphertext data by concatenating ciphertext blocks. The ciphertext data output unit 106 outputs the generated ciphertext data.
The transmission unit 107 transmits the ciphertext data output from the ciphertext data output unit 106 to the decryption device 200. The transmission path for transmitting the ciphertext data to the decryption apparatus 200 by the transmitting unit 107 may be a network or a predetermined data interface, and may be wireless or wired.

次に、復号装置200について説明する。
復号装置200は、受信部201、暗号文データ分割部202、復号部203、初期化ベクタ生成指示情報記憶部204、初期化ベクタ生成部205及び平文データ生成部206を備える。
Next, the decoding device 200 will be described.
The decryption apparatus 200 includes a reception unit 201, a ciphertext data division unit 202, a decryption unit 203, an initialization vector generation instruction information storage unit 204, an initialization vector generation unit 205, and a plaintext data generation unit 206.

受信部201は、暗号化装置100から送信された暗号文データを受信する。
暗号文データ分割部202は、受信部201により受信された暗号文データを暗号文ブロックの単位に分割する。1つの暗号文ブロックは1つの平文ブロックに対応し、所定の固定長によるサイズを有する。
The receiving unit 201 receives the ciphertext data transmitted from the encryption device 100.
The ciphertext data dividing unit 202 divides the ciphertext data received by the receiving unit 201 into ciphertext block units. One ciphertext block corresponds to one plaintext block and has a size with a predetermined fixed length.

復号部203は、暗号文データに含まれる暗号文ブロックのうち、2番目以降の暗号文ブロックについて1つ前の暗号文ブロックを利用して復号を行うことで2番目以降の平文ブロックを取得する。また、復号部203は、1番目の暗号文ブロックについては初期化ベクタを利用して復号を行うことで1番目の平文ブロックを取得する。   The decryption unit 203 obtains second and subsequent plaintext blocks by decrypting the second and subsequent ciphertext blocks using the previous ciphertext block among ciphertext blocks included in the ciphertext data. . In addition, the decryption unit 203 obtains the first plaintext block by performing decryption using the initialization vector for the first ciphertext block.

初期化ベクタ生成指示情報記憶部204は、暗号化装置100の初期化ベクタ生成指示情報記憶部103にて記憶されているのと同じ内容の初期化ベクタ生成指示情報を記憶する。つまり、暗号化装置100と復号装置200は、前述のように、同じ内容の初期化ベクタ生成指示情報を予め共有する。これにより、暗号化装置100と復号装置200は同じ処理によって初期化ベクタを生成することができる。   The initialization vector generation instruction information storage unit 204 stores initialization vector generation instruction information having the same content as that stored in the initialization vector generation instruction information storage unit 103 of the encryption device 100. That is, the encryption apparatus 100 and the decryption apparatus 200 share the initialization vector generation instruction information having the same contents in advance as described above. Thereby, the encryption apparatus 100 and the decryption apparatus 200 can generate an initialization vector by the same process.

初期化ベクタ生成部205は、復号部203により取得された2番目以降の平文ブロックのうちから初期化ベクタ生成指示情報が示す所定の平文ブロックを利用して初期化ベクタを生成する。
具体的に、初期化ベクタ生成部205は、例えば復号装置の起動時などにおいて、初期化ベクタ生成指示情報記憶部204から初期化ベクタ生成指示情報を読み出す。初期化ベクタ生成部205は、読み出した初期化ベクタ生成指示情報が示す初期化ベクタの生成の仕方に従った初期化ベクタの生成アルゴリズムを設定する。
また、復号装置200における復号部203は、暗号文データの受信に応じて2番目以降の暗号文ブロックの復号を行って2番目以降の平文ブロックを取得する。そこで、初期化ベクタ生成部205は、生成アルゴリズムに従って、復号部203によって得られた2番目以降の平文ブロックのうちから、初期化ベクタの生成に利用すべき平文ブロックを入力する。初期化ベクタ生成部205は、入力した平文ブロックを利用して生成アルゴリズムに従った所定の演算を行うことで初期化ベクタを生成する。
復号部203は、上記のように生成された初期化ベクタを利用して1番目の暗号文ブロックを復号する。
The initialization vector generation unit 205 generates an initialization vector using a predetermined plaintext block indicated by the initialization vector generation instruction information from the second and subsequent plaintext blocks acquired by the decryption unit 203.
Specifically, the initialization vector generation unit 205 reads the initialization vector generation instruction information from the initialization vector generation instruction information storage unit 204, for example, when the decoding device is activated. The initialization vector generation unit 205 sets an initialization vector generation algorithm according to the method of generating the initialization vector indicated by the read initialization vector generation instruction information.
Also, the decryption unit 203 in the decryption device 200 decrypts the second and subsequent ciphertext blocks in response to the reception of the ciphertext data, and acquires the second and subsequent plaintext blocks. Therefore, the initialization vector generation unit 205 inputs a plaintext block to be used for generation of the initialization vector from the second and subsequent plaintext blocks obtained by the decryption unit 203 according to the generation algorithm. The initialization vector generation unit 205 generates an initialization vector by performing a predetermined operation according to a generation algorithm using the input plaintext block.
The decryption unit 203 decrypts the first ciphertext block using the initialization vector generated as described above.

平文データ生成部206は、復号部203が復号して得た、1番目と2番目以降の各平文ブロックにより平文データを生成する。具体的に、平文データ生成部206は、1番目と2番目以降の各平文ブロックを連結することにより平文データを生成することができる。   The plaintext data generation unit 206 generates plaintext data from the first and second and subsequent plaintext blocks obtained by the decryption unit 203. Specifically, the plaintext data generation unit 206 can generate plaintext data by connecting the first and second and subsequent plaintext blocks.

[暗号化装置と復号装置の具現化例]
図2は、本実施形態の暗号化装置100と復号装置200とを具現化した一例として、ICカード300及びリーダライタ400を示している。
ICカード300は、集積回路が実装されたカードである。リーダライタ400は、ICカード300と所定の通信方式による通信を行うことで、ICカード300からのデータの読み出し、あるいはICカード300に対するデータの書き込みを行う。
[Implementation example of encryption device and decryption device]
FIG. 2 shows an IC card 300 and a reader / writer 400 as an example of realizing the encryption device 100 and the decryption device 200 of the present embodiment.
The IC card 300 is a card on which an integrated circuit is mounted. The reader / writer 400 reads data from the IC card 300 or writes data to the IC card 300 by communicating with the IC card 300 using a predetermined communication method.

図2のICカード300とリーダライタ400の組合せにおいては、ICカード300がリーダライタ400にデータを送信するときと、リーダライタ400がICカード300にデータを送信するときとがある。
ICカード300がリーダライタ400にデータを送信するにあたりデータが暗号化されるときには、ICカード300が暗号化装置100として機能し、リーダライタ400が復号装置200として機能する。
また、リーダライタ400がICカード300にデータを送信するにあたりデータが暗号化されるときには、リーダライタ400が暗号化装置100として機能し、ICカード300が復号装置200として機能する。
In the combination of the IC card 300 and the reader / writer 400 in FIG. 2, there are a case where the IC card 300 transmits data to the reader / writer 400 and a case where the reader / writer 400 transmits data to the IC card 300.
When data is encrypted when the IC card 300 transmits data to the reader / writer 400, the IC card 300 functions as the encryption device 100 and the reader / writer 400 functions as the decryption device 200.
When data is encrypted when the reader / writer 400 transmits data to the IC card 300, the reader / writer 400 functions as the encryption device 100 and the IC card 300 functions as the decryption device 200.

[CBCモードとしての一般的な暗号化と復号処理]
本実施形態の暗号化装置100と復号装置200が対応するCBCモードは、ブロック暗号方式における利用モードの1つである。ブロック暗号方式は、共通鍵暗号方式の1つであり、固定長のブロック単位で暗号化、復号を行う。そのうえで、CBCモードでは、1つ前の平文ブロックを暗号化して得られた暗号文ブロックと現平文ブロックとの排他的論理和(exclusive or)を求め、求められた排他的論理和の結果に対して暗号化を行う。
[General encryption and decryption processing as CBC mode]
The CBC mode corresponding to the encryption device 100 and the decryption device 200 of this embodiment is one of the usage modes in the block encryption method. The block encryption method is one of the common key encryption methods, and performs encryption and decryption in units of fixed-length blocks. In addition, in the CBC mode, an exclusive OR between the ciphertext block obtained by encrypting the previous plaintext block and the current plaintext block is obtained, and the obtained exclusive OR result is obtained. To encrypt.

図3は、CBCモードに対応する暗号化装置が実行する一般的な暗号化の手順例を示している。
CBCモードでの暗号化では、暗号化対象の平文データを複数の固定長のブロックに分割する。図3の例では、平文データDplnを4つの平文ブロックM1,M2,M3,M4に分割した例を示している。
FIG. 3 shows an example of a general encryption procedure executed by the encryption apparatus corresponding to the CBC mode.
In encryption in the CBC mode, plaintext data to be encrypted is divided into a plurality of fixed-length blocks. In the example of FIG. 3, the plaintext data Dpln is divided into four plaintext blocks M1, M2, M3, and M4.

上記のように、CBCモードでは、平文ブロックを暗号化するにあたり、1つ前の平文ブロックを暗号化した暗号文ブロックを利用する。しかし、先頭の平文ブロックM1については、1つ前の平文ブロックを暗号化した暗号文ブロックは存在しない。
そこで、CBCモードにおいて先頭の平文ブロックM1を暗号化するにあたっては初期化ベクタDivを利用する。図3の場合における初期化ベクタDivは、予め定められた固定値であり、復号装置は暗号化装置と同じ初期化ベクタDivを共有している。そして、暗号化装置は、図3に示すように、先頭の平文ブロックM1と初期化ベクタDivとの排他的論理和を求める(ステップS11)。
次に、暗号化装置は、ステップS11により求められた排他的論理和の結果について、予め定められた共通鍵を利用してブロック単位の暗号化(ブロック暗号化)を行う(ステップS21)。これにより、平文ブロックM1に対応する暗号文ブロックC1が得られる。
As described above, in the CBC mode, when encrypting a plaintext block, a ciphertext block obtained by encrypting the previous plaintext block is used. However, for the first plaintext block M1, there is no ciphertext block obtained by encrypting the previous plaintext block.
Therefore, the initialization vector Div is used to encrypt the head plaintext block M1 in the CBC mode. The initialization vector Div in the case of FIG. 3 is a predetermined fixed value, and the decryption device shares the same initialization vector Div as the encryption device. Then, as shown in FIG. 3, the encryption apparatus obtains an exclusive OR of the head plaintext block M1 and the initialization vector Div (step S11).
Next, the encryption apparatus performs block unit encryption (block encryption) using the predetermined common key for the exclusive OR result obtained in step S11 (step S21). Thereby, the ciphertext block C1 corresponding to the plaintext block M1 is obtained.

次に、暗号化装置は、平文ブロックM1の次の平文ブロックM2と暗号文ブロックC1との排他的論理和を求める(ステップS12)。そのうえで、暗号化装置は、排他的論理和の結果についてブロック暗号化を実行する(ステップS22)。これにより、平文ブロックM2に対応する暗号文ブロックC2が得られる。
次に、暗号化装置は、平文ブロックM3と暗号文ブロックC2との排他的論理和を求め(ステップS13)、ブロック暗号化(ステップS23)を実行することにより、平文ブロックM3に対応する暗号文ブロックC3を得る。
次に、暗号化装置は、平文ブロックM4と暗号文ブロックC3との排他的論理和演算を求め(ステップS14)、ブロック暗号化(ステップS24)を実行することにより、平文ブロックM4に対応する暗号文ブロックC4を得る。
このようにして、CBCモードでは、平文ブロックM1〜M4ごとに対応する暗号文ブロックC1〜C4が得られる。そして、暗号文ブロックC1〜C4により平文データDplnに対応する暗号文データDencが得られる。
Next, the encryption device obtains an exclusive OR of the plaintext block M2 next to the plaintext block M1 and the ciphertext block C1 (step S12). In addition, the encryption apparatus performs block encryption on the result of the exclusive OR (step S22). Thereby, the ciphertext block C2 corresponding to the plaintext block M2 is obtained.
Next, the encryption device obtains an exclusive OR of the plaintext block M3 and the ciphertext block C2 (step S13), and executes block encryption (step S23) to thereby obtain a ciphertext corresponding to the plaintext block M3. Get block C3.
Next, the encryption device obtains an exclusive OR operation between the plaintext block M4 and the ciphertext block C3 (step S14), and executes block encryption (step S24), thereby encrypting the ciphertext corresponding to the plaintext block M4. A sentence block C4 is obtained.
In this way, in the CBC mode, ciphertext blocks C1 to C4 corresponding to the plaintext blocks M1 to M4 are obtained. Then, the ciphertext data Denc corresponding to the plaintext data Dpln is obtained by the ciphertext blocks C1 to C4.

図4は、CBCモードに対応する復号装置が図3の暗号文データDencを復号する一般的な手順例を示している。
この場合の暗号文データDencは、4つの暗号文ブロックC1〜C4に分割される。復号装置は、暗号化装置が暗号化の際に利用したのと同じ初期化ベクタDivを共有している。
そこで、復号装置は、先頭の暗号文ブロックC1については、まず、共通鍵を利用したブロック単位での復号(ブロック復号)を行い(ステップS31)、ステップS31による復号結果と初期化ベクタDivとの排他的論理和を求める(ステップS41)。これにより、暗号文ブロックC1に対応する平文ブロックM1が取得される。
また、復号装置は、2番目の暗号文ブロックC2についてブロック復号を行い(ステップS32)、復号結果と1つ前の暗号文ブロックC1との排他的論理和を求めることで(ステップS42)、暗号文ブロックC2に対応する平文ブロックM2を取得する。
また、復号装置は、3番目の暗号文ブロックC3についてブロック復号を行い(ステップS33)、復号結果と暗号文ブロックC2との排他的論理和を求めることで(ステップS43)、暗号文ブロックC3に対応する平文ブロックM3を取得する。
また、復号装置は、4番目の暗号文ブロックC4についてブロック復号を行い(ステップS34)、復号結果と暗号文ブロックC3との排他的論理和を求めることで(ステップS44)、暗号文ブロックC4に対応する平文ブロックM4を取得する。
このように取得された平文ブロックM1〜M4を順に配列することにより、復元された平文データDplnが取得される。
FIG. 4 shows an example of a general procedure in which the decryption apparatus corresponding to the CBC mode decrypts the ciphertext data Denc in FIG.
In this case, the ciphertext data Denc is divided into four ciphertext blocks C1 to C4. The decryption device shares the same initialization vector Div used by the encryption device during encryption.
Therefore, the decryption device first performs decryption (block decryption) in units of blocks using the common key for the first ciphertext block C1 (step S31), and the decryption result of step S31 and the initialization vector Div An exclusive OR is obtained (step S41). Thereby, the plaintext block M1 corresponding to the ciphertext block C1 is acquired.
Also, the decryption device performs block decryption on the second ciphertext block C2 (step S32), and obtains an exclusive OR of the decryption result and the previous ciphertext block C1 (step S42), thereby A plaintext block M2 corresponding to the sentence block C2 is acquired.
Further, the decryption device performs block decryption on the third ciphertext block C3 (step S33), and obtains an exclusive OR between the decryption result and the ciphertext block C2 (step S43), thereby obtaining the ciphertext block C3. The corresponding plaintext block M3 is acquired.
Further, the decryption device performs block decryption on the fourth ciphertext block C4 (step S34), and obtains an exclusive OR between the decryption result and the ciphertext block C3 (step S44), thereby obtaining the ciphertext block C4. The corresponding plaintext block M4 is acquired.
By arranging the plaintext blocks M1 to M4 thus obtained in order, the restored plaintext data Dpln is obtained.

図3及び図4に示したCBCモードによる暗号化と復号にあっては、同じ固定値の初期化ベクタDivを暗号化装置と復号装置とのそれぞれが予め記憶している。そして、暗号化装置と復号装置は、それぞれが記憶している初期化ベクタDivを暗号化、復号化に利用する。このように、初期化ベクタDivが予め固定的に記憶されている場合、暗号化装置または復号装置のいずれかが記憶している初期化ベクタDivが漏洩した場合には暗号解読の足掛かりとなる可能性がある。
そこで、本実施形態では、以下に説明するようにしてCBCモードにおける暗号化と復号とを行うことで、初期化ベクタDivの漏洩に関するセキュリティを向上させる。
In the encryption and decryption in the CBC mode shown in FIGS. 3 and 4, the encryption device and the decryption device each store the initialization vector Div having the same fixed value in advance. The encryption device and the decryption device use the initialization vector Div stored in the encryption device and the decryption device, respectively. As described above, when the initialization vector Div is stored in a fixed manner in advance, if the initialization vector Div stored in either the encryption device or the decryption device leaks, it may become a step for decryption. There is sex.
Therefore, in the present embodiment, the security relating to the leakage of the initialization vector Div is improved by performing encryption and decryption in the CBC mode as described below.

[本実施形態における暗号化、復号の手順例]
図5は、本実施形態の暗号化装置100が実行する暗号化の手順例を示している。なお、同図において、図3と同様の部分については同じ符号を付している。また、図5の説明にあたって、初期化ベクタ生成部104は、初期化ベクタ生成指示情報の内容に従って生成アルゴリズムを既に設定している状態にあることを前提とする。
[Example of encryption and decryption procedures in this embodiment]
FIG. 5 shows an example of an encryption procedure executed by the encryption apparatus 100 of this embodiment. In the figure, the same parts as those in FIG. In the description of FIG. 5, it is assumed that the initialization vector generation unit 104 has already set a generation algorithm according to the content of the initialization vector generation instruction information.

暗号化にあたり、暗号化装置100の平文データ出力部101は、平文データDplnを出力する。平文データ分割部102は、平文データ出力部101から出力された平文データDplnを平文ブロックの単位に分割する。図5においては、図3と同様に、平文データDplnが4つの平文ブロックM1〜M4に分割された例を示している。   For encryption, the plaintext data output unit 101 of the encryption device 100 outputs plaintext data Dpln. The plaintext data division unit 102 divides the plaintext data Dpln output from the plaintext data output unit 101 into plaintext block units. FIG. 5 shows an example in which the plaintext data Dpln is divided into four plaintext blocks M1 to M4, as in FIG.

上記のように平文ブロックM1〜M4が得られるのに応じて、初期化ベクタ生成部104は、以下のように初期化ベクタDivを生成する(ステップS51)。
ここでは、初期化ベクタ生成指示情報が、「2番目以降の平文ブロックから1つずつ順次選択し、選択した平文ブロックの排他的論理和を求める」という内容の初期化ベクタの生成の仕方を示している場合を例に挙げる。
In response to the plaintext blocks M1 to M4 being obtained as described above, the initialization vector generation unit 104 generates the initialization vector Div as follows (step S51).
Here, the initialization vector generation instruction information indicates how to generate an initialization vector whose content is “select one by one from the second and subsequent plaintext blocks and find the exclusive OR of the selected plaintext blocks”. Take the case as an example.

この場合、初期化ベクタ生成部104は、ステップS51の初期化ベクタ生成の処理として、初期化ベクタ生成指示情報に従って、2番目から最後までの平文ブロックM2、M3、M4を選択する。初期化ベクタ生成部104は、選択した平文ブロックM2、M3、M4についての排他的論理和を求めることで初期化ベクタDivを生成する。つまり、この場合には、平文ブロックM2、M3、M4についての排他的論理和を求めた結果が初期化ベクタDivとなる。   In this case, the initialization vector generation unit 104 selects the second to last plaintext blocks M2, M3, and M4 according to the initialization vector generation instruction information as the initialization vector generation processing in step S51. The initialization vector generation unit 104 generates an initialization vector Div by obtaining an exclusive OR for the selected plaintext blocks M2, M3, and M4. That is, in this case, the result of obtaining the exclusive OR for the plaintext blocks M2, M3, and M4 is the initialization vector Div.

ここで、図6を参照して、図5の例に対応して生成アルゴリズムを設定した場合の初期化ベクタ生成部104の機能構成例について説明する。
同図に示す初期化ベクタ生成部104は、演算部141−1、141−2を備える。演算部141−1は、平文ブロックM2とM3との排他的論理和を演算し、演算結果を演算部141−2に出力する。演算部141−2は、演算部141−1が出力した排他的論理和の演算結果と、平文ブロックM4との排他的論理和を演算し、演算結果を初期化ベクタDivとして出力する。
Here, a functional configuration example of the initialization vector generation unit 104 when a generation algorithm is set corresponding to the example of FIG. 5 will be described with reference to FIG.
The initialization vector generation unit 104 shown in the figure includes calculation units 141-1 and 141-2. The calculation unit 141-1 calculates an exclusive OR of the plaintext blocks M2 and M3 and outputs the calculation result to the calculation unit 141-2. The operation unit 141-2 calculates the exclusive OR of the exclusive OR operation result output from the operation unit 141-1 and the plaintext block M4, and outputs the operation result as an initialization vector Div.

このように、本実施形態の初期化ベクタ生成部104は、初期化ベクタDivの生成に利用すべき平文データについての排他的論理和を求めることにより、初期化ベクタDivを生成する。
排他的論理和演算の場合、演算部141−1、141−2による演算は、それぞれ、各ビット位置での桁上がりの無い加算演算に相当する。つまり、演算部141−1、141−2による演算は、平文ブロックM2、M3、M4の間での各ビット位置について、1の数が奇数であれば1の結果を出力し、偶数であれば0の結果を出力するという演算によって実現できる。このように、排他的論理和の演算であれば、例えば、初期化ベクタの生成に利用すべき平文ブロックの数が増加したとしても、特に演算が複雑になることはない。このような点で、排他的論理和の演算によっては、平文ブロックの数に依存すること無く効率的に初期化ベクタDivを生成することができる。
As described above, the initialization vector generation unit 104 according to the present embodiment generates the initialization vector Div by obtaining the exclusive OR of the plain text data to be used for generating the initialization vector Div.
In the case of an exclusive OR operation, the operations by the operation units 141-1 and 141-2 are equivalent to addition operations without carry at each bit position. That is, the calculation by the calculation units 141-1 and 141-2 outputs a result of 1 if the number of 1 is an odd number for each bit position between the plaintext blocks M2, M3, and M4, and if it is an even number. This can be realized by an operation of outputting a result of 0. Thus, in the case of an exclusive OR operation, for example, even if the number of plaintext blocks to be used for generating the initialization vector is increased, the operation is not particularly complicated. In this respect, depending on the exclusive OR operation, the initialization vector Div can be generated efficiently without depending on the number of plaintext blocks.

説明を図5に戻す。
暗号化部105は、ステップS51により初期化ベクタDivが生成されるのに応じて、以下のように1番目の平文ブロックM1を暗号化する。
つまり、暗号化部105は、1番目の平文ブロックM1と初期化ベクタDivとの排他的論理和を求める(ステップS11)。暗号化部105は、ステップS11により求められた排他的論理和の結果を共通鍵によりブロック暗号化する(ステップS21)。これにより、平文ブロックM1に対応する暗号文ブロックC1が得られる。
Returning to FIG.
The encryption unit 105 encrypts the first plaintext block M1 as follows in response to the generation of the initialization vector Div in step S51.
That is, the encryption unit 105 obtains an exclusive OR of the first plaintext block M1 and the initialization vector Div (step S11). The encryption unit 105 performs block encryption on the result of the exclusive OR obtained in step S11 using the common key (step S21). Thereby, the ciphertext block C1 corresponding to the plaintext block M1 is obtained.

次に、暗号化部105は、2番目の平文ブロックM2と、1つ前の平文ブロックM1の暗号化により得られた暗号文ブロックC1との排他的論理和を求め(ステップS12)、求められた排他的論理和の結果をブロック暗号化して暗号文ブロックC2を得る(ステップS22)。
次に、暗号化部105は、3番目の平文ブロックM3と、1つ前の平文ブロックM2に対応する暗号文ブロックC2との排他的論理和を求め(ステップS13)、求められた排他的論理和の結果をブロック暗号化して暗号文ブロックC3を得る(ステップS23)。
次に、暗号化部105は、4番目の平文ブロックM4と、1つ前の平文ブロックM3に対応する暗号文ブロックC3との排他的論理和を求め(ステップS14)、求められた排他的論理和の結果をブロック暗号化して暗号文ブロックC4を得る(ステップS24)。
Next, the encryption unit 105 obtains an exclusive OR of the second plaintext block M2 and the ciphertext block C1 obtained by encrypting the previous plaintext block M1 (step S12). The result of the exclusive OR is block-encrypted to obtain a ciphertext block C2 (step S22).
Next, the encryption unit 105 obtains an exclusive OR of the third plaintext block M3 and the ciphertext block C2 corresponding to the previous plaintext block M2 (step S13), and the obtained exclusive logic The ciphertext block C3 is obtained by block-encrypting the sum result (step S23).
Next, the encryption unit 105 obtains an exclusive OR of the fourth plaintext block M4 and the ciphertext block C3 corresponding to the previous plaintext block M3 (step S14), and the obtained exclusive logic The ciphertext block C4 is obtained by block-encrypting the sum result (step S24).

暗号文データ出力部106は、暗号文ブロックC1〜C4を含む暗号文データDencを生成し、生成した暗号文データDencを送信部107に出力する。
送信部107は、暗号文データ出力部106が出力した暗号文データDencを復号装置200に対して送信する。
The ciphertext data output unit 106 generates ciphertext data Denc including the ciphertext blocks C1 to C4, and outputs the generated ciphertext data Denc to the transmission unit 107.
The transmission unit 107 transmits the ciphertext data Denc output from the ciphertext data output unit 106 to the decryption device 200.

このように、本実施形態の暗号化装置100は、初期化ベクタ生成指示情報が示す初期化ベクタの生成手順に従って、平文データDplnから分割した平文ブロックのうちの2番目以降の平文ブロックを利用して初期化ベクタDivを生成する。そのうえで、暗号化装置100は、生成した初期化ベクタDivを利用して暗号化を行って暗号文データDencを得る。   As described above, the encryption apparatus 100 according to the present embodiment uses the second and subsequent plaintext blocks among the plaintext blocks divided from the plaintext data Dpln in accordance with the initialization vector generation procedure indicated by the initialization vector generation instruction information. To generate the initialization vector Div. In addition, the encryption apparatus 100 performs encryption using the generated initialization vector Div to obtain ciphertext data Denc.

次に、図7を参照して、本実施形態の復号装置200が、図6の暗号化によって出力された暗号文データDencに対応して実行する復号の手順例について説明する。なお、図7において、図4と同様の部分については図4と同一符号を付している。また、同図の説明にあたって、初期化ベクタ生成部205は、初期化ベクタ生成指示情報の内容に従って生成アルゴリズムを既に設定している状態にあることを前提とする。   Next, with reference to FIG. 7, an example of a decryption procedure executed by the decryption apparatus 200 according to the present embodiment in response to the ciphertext data Denc output by the encryption in FIG. 6 will be described. In FIG. 7, the same parts as those in FIG. 4 are denoted by the same reference numerals as those in FIG. In the description of the figure, it is assumed that the initialization vector generation unit 205 has already set a generation algorithm according to the content of the initialization vector generation instruction information.

復号装置200において、受信部201にて受信された暗号文データDencは、暗号文データ分割部202が4つの暗号文ブロックC1〜C4に分割する。
ここで、暗号文ブロックC1〜C4のうち、1番目の暗号文ブロックC1の復号には、平文ブロックM1の暗号化のときと同じ初期化ベクタDivを利用する。この場合の初期化ベクタ生成指示情報は、「2番目以降の平文ブロックから1つずつ順次選択し、選択した平文ブロックの排他的論理和を求める」という内容である。従って、この場合には、2番目以降の全ての平文ブロックである平文ブロックM2、M3、M4を利用して初期化ベクタDivを生成する必要がある。
In the decryption apparatus 200, the ciphertext data Denc received by the receiving unit 201 is divided into four ciphertext blocks C1 to C4 by the ciphertext data dividing unit 202.
Here, among the ciphertext blocks C1 to C4, the same initialization vector Div as that used when encrypting the plaintext block M1 is used to decrypt the first ciphertext block C1. The initialization vector generation instruction information in this case has the content of “select one by one from the second and subsequent plaintext blocks, and obtain an exclusive OR of the selected plaintext blocks”. Therefore, in this case, it is necessary to generate the initialization vector Div using the plaintext blocks M2, M3, and M4, which are all the second and subsequent plaintext blocks.

そこで、まず、復号部203が、2番目〜4番目の暗号文ブロックC2〜C4の各々について1つ前の暗号文ブロックC1〜C3を利用した復号処理を行って平文ブロックM2、M3、M4を得る。   Therefore, first, the decryption unit 203 performs decryption processing using the previous ciphertext blocks C1 to C3 for each of the second to fourth ciphertext blocks C2 to C4 to obtain plaintext blocks M2, M3, and M4. obtain.

つまり、復号部203は、暗号文ブロックC2については、ブロック復号を行ったうえで(ステップS32)、その復号結果と暗号文ブロックC1との排他的論理和を求めることにより平文ブロックM2を得る(ステップS42)。
また、復号部203は、暗号文ブロックC3についてブロック復号を行ったうえで(ステップS33)、その復号結果と暗号文ブロックC2との排他的論理和を求めることにより平文ブロックM3を得る(ステップS43)。
また、復号部203は、暗号文ブロックC4についてブロック復号を行ったうえで(ステップS34)、その復号結果と暗号文ブロックC3との排他的論理和演算を求めることにより平文ブロックM4を得る(ステップS44)。
That is, the decryption unit 203 performs block decryption on the ciphertext block C2 (step S32), and obtains a plaintext block M2 by obtaining an exclusive OR of the decryption result and the ciphertext block C1 ( Step S42).
The decryption unit 203 performs block decryption on the ciphertext block C3 (step S33), and obtains a plaintext block M3 by obtaining an exclusive OR of the decryption result and the ciphertext block C2 (step S43). ).
The decrypting unit 203 performs block decryption on the ciphertext block C4 (step S34), and obtains a plaintext block M4 by obtaining an exclusive OR operation between the decryption result and the ciphertext block C3 (step S34). S44).

上記のように、2番目以降の全ての平文ブロックである平文ブロックM2、M3、M4が復号によって得られたのに応じて、初期化ベクタ生成部205は、平文ブロックM2、M3、M4を入力して初期化ベクタDivを生成する(ステップS61)。
ここで、復号装置200において初期化ベクタ生成指示情報記憶部204が記憶する初期化ベクタ生成指示情報は、これまでの説明から理解されるように、暗号化装置100において記憶される初期化ベクタ生成指示情報と同じ内容の初期化ベクタDivの生成の仕方を示す。これにより、初期化ベクタ生成部205は、暗号化装置100における初期化ベクタ生成部104と同じ生成アルゴリズムによって初期化ベクを生成する。
従って、この場合の初期化ベクタ生成部205の構成は図6と同様である。これにより、初期化ベクタ生成部205は、暗号化装置100の初期化ベクタ生成部104と同様に平文ブロックの数に依存することなく効率的に初期化ベクタDivを生成することができる。
As described above, the initialization vector generation unit 205 inputs the plaintext blocks M2, M3, and M4 in response to the plaintext blocks M2, M3, and M4 that are all the plaintext blocks after the second being obtained by decryption. Then, the initialization vector Div is generated (step S61).
Here, the initialization vector generation instruction information stored in the initialization vector generation instruction information storage unit 204 in the decryption apparatus 200 is the initialization vector generation stored in the encryption apparatus 100 as understood from the above description. A method of generating the initialization vector Div having the same contents as the instruction information is shown. Accordingly, the initialization vector generation unit 205 generates an initialization vector using the same generation algorithm as that of the initialization vector generation unit 104 in the encryption device 100.
Therefore, the configuration of the initialization vector generation unit 205 in this case is the same as that in FIG. As a result, the initialization vector generation unit 205 can efficiently generate the initialization vector Div without depending on the number of plaintext blocks, like the initialization vector generation unit 104 of the encryption device 100.

復号部203は、ステップS61により初期化ベクタ生成部205が生成した初期化ベクタDivを利用して、暗号文ブロックC1を復号する。
つまり、復号部203は、暗号文ブロックC1についてブロック復号を行ったうえで(ステップS31)、その復号結果と初期化ベクタ生成部205が生成した初期化ベクタDivとの排他的論理和を求めることにより平文ブロックM1を得る(ステップS41)。
The decryption unit 203 decrypts the ciphertext block C1 using the initialization vector Div generated by the initialization vector generation unit 205 in step S61.
That is, the decryption unit 203 performs block decryption on the ciphertext block C1 (step S31), and obtains an exclusive OR of the decryption result and the initialization vector Div generated by the initialization vector generation unit 205. Thus, a plaintext block M1 is obtained (step S41).

上記のように復号処理が行われることで、復号された全ての平文ブロックM1〜M4が得られる。平文データ生成部206は、復号処理によって得られた平文ブロックM1〜M4により平文データDplnを生成する。   By performing the decryption process as described above, all the decrypted plaintext blocks M1 to M4 are obtained. The plaintext data generation unit 206 generates plaintext data Dpln from the plaintext blocks M1 to M4 obtained by the decryption process.

このように、本実施形態においては、暗号化装置100と復号装置200とで予め同じ初期化ベクタ生成指示情報を共有しておくことで、暗号化装置100と復号装置200との間で同じ手順によって初期化ベクタDivの生成が行われるようにしている。   Thus, in the present embodiment, the same procedure is performed between the encryption device 100 and the decryption device 200 by sharing the same initialization vector generation instruction information in advance between the encryption device 100 and the decryption device 200. Thus, the initialization vector Div is generated.

このような構成により、本実施形態における暗号化装置100と復号装置200は、予め初期化ベクタDiv自体を共有しておく必要がない。
本実施形態の場合、初期化ベクタDivの生成の仕方を示す初期化ベクタ生成指示情報については暗号化装置100と復号装置200との間で予め共有している。しかし、初期化ベクタ生成指示情報が漏洩して初期化ベクタDivの生成の仕方が分かったとしても、初期化ベクタDivを生成するには2番目以降の所定の平文ブロックが必要である。2番目以降の所定の平文ブロックを得るためには、対応の暗号文ブロックの復号が必要であり、共通鍵が分かっている必要がある。従って、例えば攻撃者に初期化ベクタDivの生成の仕方が分かったとしても、共通鍵が分からず平文ブロックに復号できない以上、セキュリティが保たれることになる。
一方、固定の初期化ベクタDiv自体が漏洩した場合、1番目の暗号文ブロックC1と平文ブロックM1との対応関係などを検証することにより初期化ベクタDivが共通鍵の推定の足掛かりとなる可能性が上がる。このように、本実施形態では、暗号化装置と復号装置との間で初期化ベクタDiv自体を共有している場合と比較してセキュリティが向上する。
With such a configuration, the encryption apparatus 100 and the decryption apparatus 200 in the present embodiment do not need to share the initialization vector Div itself in advance.
In the present embodiment, initialization vector generation instruction information indicating how to generate the initialization vector Div is shared in advance between the encryption device 100 and the decryption device 200. However, even if the initialization vector generation instruction information is leaked and the generation method of the initialization vector Div is known, the second and subsequent predetermined plaintext blocks are required to generate the initialization vector Div. In order to obtain the second and subsequent predetermined plaintext blocks, it is necessary to decrypt the corresponding ciphertext block and to know the common key. Therefore, for example, even if an attacker knows how to generate the initialization vector Div, the security is maintained as long as the common key is not known and cannot be decrypted into a plaintext block.
On the other hand, when the fixed initialization vector Div itself is leaked, the initialization vector Div may become a starting point for estimating the common key by verifying the correspondence between the first ciphertext block C1 and the plaintext block M1. Goes up. Thus, in this embodiment, the security is improved as compared with the case where the initialization vector Div itself is shared between the encryption device and the decryption device.

また、本実施形態では、平文データの一部である平文ブロックを利用して初期化ベクタDivを生成するのであるが、例えば1つのセッションやトランザクションにおける複数回のシーケンスにおいて、同じ内容の平文データが暗号化されることはほぼないとみてよい。
このため、本実施形態のように平文ブロックを初期化ベクタDivの生成に利用することによっては、平文データを暗号化するごとに異なる初期化ベクタDivが生成される。これにより、本実施形態においては初期化ベクタDivの漏洩に対するセキュリティをさらに向上させることができる。
In this embodiment, the initialization vector Div is generated using a plaintext block that is a part of the plaintext data. For example, in a single session or a plurality of sequences in a transaction, plaintext data having the same content is generated. It can be assumed that there is almost no encryption.
Therefore, by using the plaintext block for generating the initialization vector Div as in the present embodiment, a different initialization vector Div is generated every time plaintext data is encrypted. Thereby, in this embodiment, the security with respect to the leakage of the initialization vector Div can further be improved.

また、図5及び図7にて説明した例において、初期化ベクタ生成指示情報によって示されている初期化ベクタの生成に利用すべき平文ブロックの選択指示は「2番目以降の平文ブロックから1つずつ順次選択」するというものである。このような選択指示であれば、分割によって得られる平文ブロックの数が平文データごとに異なっているとしても、暗号化装置100と復号装置200は、常に2番目から最後の平文データを選択することになり、互いが初期化ベクタDivの生成に利用する平文データも同じにすることができる。つまり、「2番目以降の平文ブロックから1つずつ順次選択」するという平文ブロックの選択指示は、平文データから分割される平文ブロックの数にかかわらず適用できるという汎用性を有している。   In the example described with reference to FIGS. 5 and 7, the instruction to select a plaintext block to be used for generating the initialization vector indicated by the initialization vector generation instruction information is “one from the second and subsequent plaintext blocks”. "Sequentially select one by one". With such a selection instruction, the encryption device 100 and the decryption device 200 always select the second to last plaintext data even if the number of plaintext blocks obtained by division differs for each plaintext data. Thus, the plaintext data used for generating the initialization vector Div can be the same. In other words, the plaintext block selection instruction of “sequentially selecting from the second and subsequent plaintext blocks one by one” can be applied regardless of the number of plaintext blocks divided from the plaintext data.

また、これまでの説明から理解されるように、本実施形態における初期化ベクタの生成には平文ブロックを利用するのであるが、1番目の平文ブロックは、初期化ベクタを利用して暗号化、復号されるデータになるので初期化ベクタの生成には利用しない。従って、本実施形態における初期化ベクタの生成は、平文データから分割される平文ブロックが2以上の場合に対応する。
しかし、CBCモードにより暗号化される平文データはある程度長く、具体的には平文ブロックのサイズである8ビットまたは16ビットよりも大きいサイズであることが一般的である。一例として、CBCモードを用いた通信は、認証に際して共通鍵により符号化すべきデータなどであるが、このようなデータは、セキュリティなどの観点から意図的に長文が用いられる。
従って、CBCモードの通信においては、常に平文ブロックの数は2以上であり、この点で、本実施形態の初期化ベクタの生成が制限されるような状況が生じることはない。
Further, as understood from the above description, the plaintext block is used for generating the initialization vector in the present embodiment, but the first plaintext block is encrypted using the initialization vector, Since it becomes the data to be decoded, it is not used for generating the initialization vector. Therefore, the generation of the initialization vector in the present embodiment corresponds to the case where there are two or more plaintext blocks divided from the plaintext data.
However, the plaintext data encrypted by the CBC mode is somewhat long, specifically, it is generally larger than the plaintext block size of 8 bits or 16 bits. As an example, communication using the CBC mode is data to be encoded with a common key at the time of authentication, but such data is intentionally used in a long sentence from the viewpoint of security or the like.
Therefore, in the CBC mode communication, the number of plaintext blocks is always 2 or more, and in this respect, there is no situation where the generation of the initialization vector of the present embodiment is limited.

また、本実施形態としては、最小で2番目の平文ブロックを1つのみ利用して初期化ベクタの生成を行うことも可能であるが、初期化ベクタの生成に利用する平文データの数は、2以上のほうが好ましく、また、平文データの数が多いほどセキュリティが高くなる。   In this embodiment, it is also possible to generate an initialization vector using only one second plaintext block at the minimum, but the number of plaintext data used for generating an initialization vector is Two or more are preferable, and the greater the number of plaintext data, the higher the security.

[処理手順例]
図8のフローチャートは、暗号化装置100における初期化ベクタ生成部104が初期化ベクタ生成のための生成アルゴリズムを設定するための処理手順例を示している。
例えば暗号化装置100が起動されるのに応じて、初期化ベクタ生成部104は、初期化ベクタ生成指示情報記憶部103から初期化ベクタ生成指示情報を読み込む(ステップS101)。
初期化ベクタ生成部104は、ステップS101により読み込んだ初期化ベクタ生成指示情報が示す初期化ベクタの生成の仕方に従って、初期化ベクタ生成のための生成アルゴリズムを自己に設定する(ステップS102)。
[Example of processing procedure]
The flowchart in FIG. 8 illustrates an example of a processing procedure for the initialization vector generation unit 104 in the encryption apparatus 100 to set a generation algorithm for generating an initialization vector.
For example, in response to the activation of the encryption device 100, the initialization vector generation unit 104 reads initialization vector generation instruction information from the initialization vector generation instruction information storage unit 103 (step S101).
The initialization vector generation unit 104 sets the generation algorithm for generating the initialization vector to itself according to the method of generating the initialization vector indicated by the initialization vector generation instruction information read in step S101 (step S102).

なお、復号装置200における初期化ベクタ生成部205も図8にて説明したのと同様の処理によって初期化ベクタ生成指示情報記憶部204から読み出した初期化ベクタ生成指示情報に従って、初期化ベクタ生成のための生成アルゴリズムを設定することができる。   Note that the initialization vector generation unit 205 in the decoding device 200 also performs initialization vector generation according to the initialization vector generation instruction information read from the initialization vector generation instruction information storage unit 204 by the same process as described in FIG. A generation algorithm can be set.

図9のフローチャートは、暗号化装置100が実行する暗号化と復号装置200が実行する復号のための処理手順例を示している。
暗号化装置100における初期化ベクタ生成部104は、暗号化対象の平文データが平文データ出力部101から出力されるのを待機している(ステップS201−NO)。
平文データ出力部101が平文データを出力するのに応じて(ステップS201−YES)、平文データ分割部102は、平文データ出力部101が出力した平文データを平文ブロックの単位で分割する(ステップS202)。
The flowchart in FIG. 9 illustrates an example of a processing procedure for encryption executed by the encryption apparatus 100 and decryption executed by the decryption apparatus 200.
The initialization vector generation unit 104 in the encryption device 100 waits for the plaintext data to be encrypted to be output from the plaintext data output unit 101 (step S201—NO).
In response to the plaintext data output unit 101 outputting the plaintext data (step S201—YES), the plaintext data dividing unit 102 divides the plaintext data output by the plaintext data output unit 101 in units of plaintext blocks (step S202). ).

初期化ベクタ生成部104は、生成アルゴリズムに従って、ステップS202による平文データの分割によって得られた平文ブロックのうちから、初期化ベクタの生成に利用する平文ブロックを入力する(ステップS203)。
初期化ベクタ生成部104は、ステップS203により入力した平文ブロックについて、生成アルゴリズムに従った演算(例えば、排他的論理和を求める演算)を行うことにより初期化ベクタを生成する(ステップS204)。
The initialization vector generation unit 104 inputs a plaintext block to be used for generating an initialization vector from the plaintext blocks obtained by dividing the plaintext data in step S202 according to the generation algorithm (step S203).
The initialization vector generation unit 104 generates an initialization vector by performing an operation according to the generation algorithm (for example, an operation for obtaining an exclusive OR) for the plaintext block input in step S203 (step S204).

暗号化部105は、ステップS204により初期化ベクタが生成されるのに応じて、ステップS202により分割された平文ブロックごとの暗号化を行う(ステップS205)。
つまり、暗号化部105は、図5にて説明したように、1番目の平文ブロックについて初期化ベクタを利用して暗号化を行うことにより、1番目の暗号文ブロックを得る。次に、暗号化部105は、2番目以降から最後の平文ブロックごとに、1つ前の暗号文ブロックを利用して暗号化を行って、2番目以降から最後の暗号文ブロックを得る。
The encryption unit 105 performs encryption for each plaintext block divided in step S202 in response to the generation of the initialization vector in step S204 (step S205).
That is, the encryption unit 105 obtains the first ciphertext block by performing the encryption using the initialization vector for the first plaintext block, as described with reference to FIG. Next, the encryption unit 105 performs encryption using the previous ciphertext block for each of the second and subsequent plaintext blocks, and obtains the second and subsequent ciphertext blocks.

暗号文データ出力部106は、ステップS205により得られた1番目から最後までの暗号文ブロックを連結して暗号文データを生成し、生成した暗号文データを送信部107から復号装置200に送信させる(ステップS206)。   The ciphertext data output unit 106 concatenates the first to last ciphertext blocks obtained in step S205 to generate ciphertext data, and causes the transmission unit 107 to transmit the generated ciphertext data to the decryption device 200. (Step S206).

復号装置200においては、ステップS206により送信された暗号文データが受信部201にて受信される(ステップS301)。
暗号文データ分割部202は、ステップS301にて受信された暗号文データを暗号文ブロック単位で分割する(ステップS302)。
In the decryption device 200, the ciphertext data transmitted in step S206 is received by the receiving unit 201 (step S301).
The ciphertext data dividing unit 202 divides the ciphertext data received in step S301 into ciphertext block units (step S302).

復号部203は、ステップS302の分割によって得られた暗号文ブロックのうち、2番目以降の各暗号文ブロックを復号して2番目以降の各平文ブロックを得る(ステップS303)。CBCモードにおける復号は、図4の例からも理解されるように、2番目以降の暗号文ブロックについては、初期化ベクタが得られていなくとも、1つ前の暗号文ブロックを利用して復号が可能である。   The decryption unit 203 decrypts the second and subsequent ciphertext blocks among the ciphertext blocks obtained by the division in step S302 to obtain the second and subsequent plaintext blocks (step S303). As can be understood from the example of FIG. 4, the decryption in the CBC mode is performed by using the previous ciphertext block for the second and subsequent ciphertext blocks even if the initialization vector is not obtained. Is possible.

次に、初期化ベクタ生成部205は、生成アルゴリズムに従って、ステップS303によって得られた2番目以降の平文ブロックのうちから、初期化ベクタの生成に利用する平文ブロックを入力する(ステップS304)。
初期化ベクタ生成部205は、ステップS304により入力した平文ブロックについて、生成アルゴリズムに従った演算(例えば、排他的論理和を求める演算)を行うことにより初期化ベクタを生成する(ステップS305)。
Next, the initialization vector generating unit 205 inputs a plaintext block used for generating an initialization vector from the second and subsequent plaintext blocks obtained in step S303 according to the generation algorithm (step S304).
The initialization vector generation unit 205 generates an initialization vector by performing an operation according to the generation algorithm (for example, an operation for obtaining an exclusive OR) for the plaintext block input in step S304 (step S305).

復号部203は、ステップS305によって生成された初期化ベクタを利用して1番目の暗号文ブロックを復号して1番目の暗号文ブロックを得る(ステップS306)。これにより、先のステップS303の処理と合わせて1番目から最後までの暗号文ブロックの復号が完了し、1番目から最後までの平文ブロックが得られる。
そこで、平文データ生成部206は、1番目から最後までの平文ブロックにより平文データを生成する(ステップS307)。
The decryption unit 203 decrypts the first ciphertext block using the initialization vector generated in step S305 to obtain the first ciphertext block (step S306). As a result, the decryption of the ciphertext blocks from the first to the end is completed together with the processing of the previous step S303, and the plaintext blocks from the first to the end are obtained.
Therefore, the plaintext data generation unit 206 generates plaintext data with the plaintext blocks from the first to the last (step S307).

なお、復号部203は、ステップS303において、以下のように復号してもよい。つまり、復号部203は、2番目以降の暗号文ブロックのうち、初期化ベクタの生成に利用する平文データに対応する暗号文ブロックのみを先ず復号しておくようにする。そのうえで、復号部203は、ステップS306において、1番目の暗号文ブロックの復号と、ステップS303にて復号されなかった2番目以降の暗号文ブロックを復号してもよい。   In addition, the decoding part 203 may decode as follows in step S303. That is, the decryption unit 203 first decrypts only the ciphertext block corresponding to the plaintext data used for generating the initialization vector among the second and subsequent ciphertext blocks. In addition, the decrypting unit 203 may decrypt the first ciphertext block in step S306 and the second and subsequent ciphertext blocks that were not decrypted in step S303.

[変形例]
図5及び図7の説明においては、初期化ベクタの生成に利用する平文ブロックとして、「2番目以降の平文ブロックから1つずつ順次選択」すべきことが初期化ベクタ生成指示情報により示されていた。
ここで、初期化ベクタの生成に利用する平文ブロックを、2番目以降の平文ブロックから「順次選択」するにあたっては、上記のように1つずつによる選択パターンにより選択するのではなく、他の選択パターンに従って順次選択していくようにしてもよい。
そこで、本実施形態の変形例として、初期化ベクタの生成に利用する平文ブロックについて、2番目以降の平文ブロックから順次選択する他の例について、図10を参照して説明する。
[Modification]
In the description of FIG. 5 and FIG. 7, the initialization vector generation instruction information indicates that “sequential selection from the second and subsequent plaintext blocks” should be performed as the plaintext block used to generate the initialization vector. It was.
Here, when “sequentially selecting” the plaintext blocks used for generating the initialization vector from the second and subsequent plaintext blocks, the selection is not performed by the selection pattern one by one as described above. You may make it select sequentially according to a pattern.
Therefore, as a modification of the present embodiment, another example in which plaintext blocks used for generating an initialization vector are sequentially selected from the second and subsequent plaintext blocks will be described with reference to FIG.

図10は、初期化ベクタの生成に利用する平文ブロックについて、「2番目以降の平文ブロックから1つおきに順次選択する」ことが初期化ベクタ生成指示情報により示されている場合を示している。
つまり、この場合において初期化ベクタの生成に利用する平文ブロックは、2番目を起点として以降において1つおきに選択した、平文ブロックM2、M4、M6、M8・・・・Mmaxである。なお、同図では、最後の平文ブロックMmaxが(Even:偶数番)である場合の例を示している。図示は省略するが、最後の平文ブロックMmaxが奇数番である場合には、最後の平文ブロックMmaxの1つ前の平文ブロックが、初期化ベクタの生成に利用する最後の平文ブロックとして選択される。
このような平文ブロックの選択が初期化ベクタ生成指示情報により示されていても、暗号化装置100と復号装置200のいずれもが、選択パターンに従って2番目以降から順次平文ブロックを選択していくことに変わりはない。従って、平文データを分割して得られる平文ブロックの数が例えばシーケンスごとに異なっていても、暗号化装置100と復号装置200は、初期化ベクタの生成に利用する平文ブロックとして常に互いに同じものを取得できる。
FIG. 10 shows a case where the initialization vector generation instruction information indicates that “every other one from the second and subsequent plaintext blocks” is indicated for the plaintext block used for generating the initialization vector. .
That is, in this case, the plaintext blocks used for generating the initialization vector are plaintext blocks M2, M4, M6, M8,. In the figure, an example in which the last plaintext block Mmax is (Even: even number) is shown. Although illustration is omitted, when the last plaintext block Mmax is an odd number, the plaintext block immediately before the last plaintext block Mmax is selected as the last plaintext block used for generating the initialization vector. .
Even if such plaintext block selection is indicated by the initialization vector generation instruction information, both of the encryption device 100 and the decryption device 200 sequentially select plaintext blocks from the second onward according to the selection pattern. There is no change. Therefore, even if the number of plaintext blocks obtained by dividing the plaintext data is different for each sequence, for example, the encryption device 100 and the decryption device 200 always use the same plaintext blocks used for generating the initialization vector. You can get it.

なお、一例として、平文データを分割して得られる平文ブロックの下限数が3であることが保証されている場合には、これに対応して、初期化ベクタ生成指示情報について「3番目以降の平文ブロックから順次選択する」という内容としてもよい。
つまり、初期化ベクタ生成指示情報が示す平文データの選択の仕方について、「n番目以降の平文ブロックから順次選択」するというように表現する。この場合、変数nについては、平文データを分割して得られる平文ブロックの下限数をNとして、2≦n≦Nの範囲であればいずれの数であってもよい。
As an example, when it is guaranteed that the lower limit number of plaintext blocks obtained by dividing plaintext data is 3, corresponding to this, the initialization vector generation instruction information “3rd and later The contents may be “select sequentially from plaintext blocks”.
That is, the method of selecting plaintext data indicated by the initialization vector generation instruction information is expressed as “selecting sequentially from the nth and subsequent plaintext blocks”. In this case, the variable n may be any number within the range of 2 ≦ n ≦ N, where N is the lower limit number of plaintext blocks obtained by dividing plaintext data.

また、平文データを分割して得られる平文ブロックの下限数が保証されているのであれば、初期化ベクタ生成指示情報により、平文ブロックの下限数以下の範囲内で選択対象の平文ブロックを個別に指定することもできる。
具体例を図11に示す。同図においては、2番目の平文ブロックM2から最後の平文ブロックMmaxの間において、平文ブロックMi、Mj、Mkの3つの平文ブロックが選択対象として個別に指定されている。この場合の初期化ベクタ生成指示情報は、「i番目、j番目、k番目の平文ブロックを選択」すべきことを示す。
In addition, if the lower limit number of plaintext blocks obtained by dividing the plaintext data is guaranteed, the plaintext blocks to be selected are individually selected within the range below the lower limit number of plaintext blocks by the initialization vector generation instruction information. It can also be specified.
A specific example is shown in FIG. In the drawing, between the second plaintext block M2 and the last plaintext block Mmax, three plaintext blocks Mi, Mj, and Mk are individually designated as selection targets. The initialization vector generation instruction information in this case indicates that “i-th, j-th and k-th plaintext blocks should be selected”.

なお、上述の暗号化装置100と復号装置200の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述の暗号化装置100と復号装置200の処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、インターネットやWAN、LAN、専用回線等の通信回線を含むネットワークを介して接続された複数のコンピュータ装置を含んでもよい。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。このように、プログラムを記憶した記録媒体は、CD−ROM等の非一過性の記録媒体であってもよい。また、記録媒体には、当該プログラムを配信するために配信サーバからアクセス可能な内部または外部に設けられた記録媒体も含まれる。配信サーバの記録媒体に記憶されるプログラムのコードは、端末装置で実行可能な形式のプログラムのコードと異なるものでもよい。すなわち、配信サーバからダウンロードされて端末装置で実行可能な形でインストールができるものであれば、配信サーバで記憶される形式は問わない。なお、プログラムを複数に分割し、それぞれ異なるタイミングでダウンロードした後に端末装置で合体される構成や、分割されたプログラムのそれぞれを配信する配信サーバが異なっていてもよい。さらに「コンピュータ読み取り可能な記録媒体」とは、ネットワークを介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、上述した機能の一部を実現するためのものであってもよい。さらに、上述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。   Note that a program for realizing the functions of the encryption device 100 and the decryption device 200 described above is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. Thus, the processing of the encryption device 100 and the decryption device 200 described above may be performed. Here, “loading and executing a program recorded on a recording medium into a computer system” includes installing the program in the computer system. The “computer system” here includes an OS and hardware such as peripheral devices. Further, the “computer system” may include a plurality of computer devices connected via a network including a communication line such as the Internet, WAN, LAN, and dedicated line. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. As described above, the recording medium storing the program may be a non-transitory recording medium such as a CD-ROM. The recording medium also includes a recording medium provided inside or outside that is accessible from the distribution server in order to distribute the program. The code of the program stored in the recording medium of the distribution server may be different from the code of the program that can be executed by the terminal device. That is, the format stored in the distribution server is not limited as long as it can be downloaded from the distribution server and installed in a form that can be executed by the terminal device. Note that the program may be divided into a plurality of parts, downloaded at different timings, and combined in the terminal device, or the distribution server that distributes each of the divided programs may be different. Furthermore, the “computer-readable recording medium” holds a program for a certain period of time, such as a volatile memory (RAM) inside a computer system that becomes a server or a client when the program is transmitted via a network. Including things. The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, what is called a difference file (difference program) may be sufficient.

100 暗号化装置
101 平文データ出力部
102 平文データ分割部
103 初期化ベクタ生成指示情報記憶部
104 初期化ベクタ生成部
105 暗号化部
106 暗号文データ出力部
107 送信部
200 復号装置
201 受信部
202 暗号文データ分割部
203 復号部
204 初期化ベクタ生成指示情報記憶部
205 初期化ベクタ生成部
206 平文データ生成部
300 カード
400 リーダライタ
DESCRIPTION OF SYMBOLS 100 Encryption apparatus 101 Plaintext data output part 102 Plaintext data division | segmentation part 103 Initialization vector production | generation instruction information storage part 104 Initialization vector production | generation part 105 Encryption part 106 Ciphertext data output part 107 Transmission part 200 Decryption apparatus 201 Reception part 202 Encryption Sentence data division unit 203 Decoding unit 204 Initialization vector generation instruction information storage unit 205 Initialization vector generation unit 206 Plaintext data generation unit 300 Card 400 Reader / writer

Claims (10)

平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方を示す内容の情報であって、復号装置においても同じ内容が記憶される初期化ベクタ生成指示情報を記憶する初期化ベクタ生成指示情報記憶部と、
前記初期化ベクタ生成指示情報が示す初期化ベクタの生成の仕方に従って、前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成部と、
前記平文ブロックのうちの1番目の平文ブロックについて前記初期化ベクタを利用して暗号化し、2番目以降の平文ブロックについて、1つ前の暗号化によって得た暗号文ブロックを利用して暗号化する暗号化部と、
前記暗号文ブロックを含む暗号文データを出力する暗号文データ出力部と
を備える暗号化装置。
Initialization information indicating how to generate an initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing plaintext data, and the same content is stored in the decryption device An initialization vector generation instruction information storage unit for storing vector generation instruction information;
In accordance with a method of generating an initialization vector indicated by the initialization vector generation instruction information, an initialization vector generation unit that generates an initialization vector using the predetermined plaintext block;
The first plaintext block of the plaintext blocks is encrypted using the initialization vector, and the second and subsequent plaintext blocks are encrypted using the ciphertext block obtained by the previous encryption. An encryption unit;
An encryption apparatus comprising: a ciphertext data output unit that outputs ciphertext data including the ciphertext block.
前記初期化ベクタ生成指示情報は、
前記所定の平文ブロックの排他的論理和を初期化ベクタとすべきことを示し、
前記初期化ベクタ生成部は、
前記所定の平文ブロックの排他的論理和を求めることによって初期化ベクタを生成する
請求項1に記載の暗号化装置。
The initialization vector generation instruction information is
Indicates that an exclusive OR of the predetermined plaintext block should be an initialization vector,
The initialization vector generation unit
The encryption apparatus according to claim 1, wherein an initialization vector is generated by obtaining an exclusive OR of the predetermined plaintext block.
前記初期化ベクタ生成指示情報は、
初期化ベクタの生成に利用する所定の平文ブロックとして、n(nは2以上の所定の自然数)番目以降の平文ブロックから順次選択すべきことを示し、
前記初期化ベクタ生成部は、
n番目以降の平文ブロックから順次選択した平文ブロックを初期化ベクタの生成に利用する
請求項1または2に記載の暗号化装置。
The initialization vector generation instruction information is
As a predetermined plaintext block used for generating an initialization vector, it indicates that it should be sequentially selected from n (n is a predetermined natural number of 2 or more) plaintext blocks.
The initialization vector generation unit
The encryption apparatus according to claim 1 or 2, wherein plaintext blocks sequentially selected from the nth and subsequent plaintext blocks are used for generating an initialization vector.
平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方を示す内容の情報であって、暗号化装置においても同じ内容が記憶される初期化ベクタ生成指示情報を記憶する初期化ベクタ生成指示情報記憶部と、
暗号文データに含まれる暗号文ブロックのうち、2番目以降の暗号文ブロックについて1つ前の暗号文ブロックを利用して復号することで2番目以降の平文ブロックを取得し、1番目の暗号文ブロックについては初期化ベクタを利用して復号することで1番目の平文ブロックを取得する復号部と、
前記初期化ベクタ生成指示情報が示す初期化ベクタの生成の仕方に従って、前記復号部により取得された2番目以降の平文ブロックのうちから所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成部と、
を備える復号装置。
Information indicating the method of generating an initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing plaintext data, and the initial content in which the same content is stored in the encryption device An initialization vector generation instruction information storage unit for storing initialization vector generation instruction information;
Of the ciphertext blocks included in the ciphertext data, the second and subsequent plaintext blocks are obtained by decrypting the second and subsequent ciphertext blocks using the previous ciphertext block, and the first ciphertext For the block, a decryption unit that obtains the first plaintext block by decrypting using an initialization vector;
Initialization for generating an initialization vector using a predetermined plaintext block from the second and subsequent plaintext blocks acquired by the decoding unit according to a method of generating an initialization vector indicated by the initialization vector generation instruction information A vector generator,
A decoding device comprising:
前記初期化ベクタ生成指示情報は、
前記所定の平文ブロックの排他的論理和を初期化ベクタとすべきことを示し、
前記初期化ベクタ生成部は、
前記所定の平文ブロックの排他的論理和を求めることによって初期化ベクタを生成する
請求項4に記載の復号装置。
The initialization vector generation instruction information is
Indicates that an exclusive OR of the predetermined plaintext block should be an initialization vector,
The initialization vector generation unit
The decryption device according to claim 4, wherein an initialization vector is generated by obtaining an exclusive OR of the predetermined plaintext block.
前記初期化ベクタ生成指示情報は、
初期化ベクタの生成に利用する所定の平文ブロックとして、n(nは2以上の所定の自然数)番目以降の平文ブロックから順次選択すべきことを示し、
前記初期化ベクタ生成部は、
n番目以降の平文ブロックから順次選択した平文ブロックを初期化ベクタの生成に利用する
請求項4または5に記載の復号装置。
The initialization vector generation instruction information is
As a predetermined plaintext block used for generating an initialization vector, it indicates that it should be sequentially selected from n (n is a predetermined natural number of 2 or more) plaintext blocks.
The initialization vector generation unit
6. The decryption device according to claim 4, wherein plaintext blocks sequentially selected from the nth and subsequent plaintext blocks are used for generating an initialization vector.
復号装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップと、
前記平文ブロックのうちの1番目の平文ブロックについて前記初期化ベクタを利用して暗号化し、2番目以降の平文ブロックについて、1つ前の暗号化によって得た暗号文ブロックを利用して暗号化する暗号化ステップと、
前記暗号文ブロックを含む暗号文データを出力する暗号文データ出力ステップと
を備える暗号化方法。
According to the initialization vector generation instruction information in which the same content is also stored in the decryption device, according to the method of generating the initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing the plaintext data, An initialization vector generating step for generating an initialization vector using the predetermined plaintext block;
The first plaintext block of the plaintext blocks is encrypted using the initialization vector, and the second and subsequent plaintext blocks are encrypted using the ciphertext block obtained by the previous encryption. An encryption step;
An encryption method comprising: a ciphertext data output step for outputting ciphertext data including the ciphertext block.
暗号文データに含まれる暗号文ブロックのうち、2番目以降の暗号文ブロックについて1つ前の暗号文ブロックを利用して復号することで2番目以降の平文ブロックを取得し、1番目の暗号文ブロックについては初期化ベクタを利用して復号することで1番目の平文ブロックを取得する復号ステップと、
暗号化装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記復号ステップにより取得された2番目以降の平文ブロックのうちから前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップと、
を備える復号方法。
Of the ciphertext blocks included in the ciphertext data, the second and subsequent plaintext blocks are obtained by decrypting the second and subsequent ciphertext blocks using the previous ciphertext block, and the first ciphertext For the block, a decryption step for obtaining the first plaintext block by decrypting using the initialization vector;
In the encryption apparatus, the initialization vector generation instruction information storing the same contents indicates the initialization vector generation method using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing the plaintext data. An initialization vector generation step of generating an initialization vector using the predetermined plaintext block from the second and subsequent plaintext blocks acquired by the decryption step;
A decoding method comprising:
コンピュータに、
復号装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップと、
前記平文ブロックのうちの1番目の平文ブロックについて前記初期化ベクタを利用して暗号化し、2番目以降の平文ブロックについて、1つ前の暗号化によって得た暗号文ブロックを利用して暗号化する暗号化ステップと、
前記暗号文ブロックを含む暗号文データを出力する暗号文データ出力ステップと
を実行させるためのプログラム。
On the computer,
According to the initialization vector generation instruction information in which the same content is also stored in the decryption device, according to the method of generating the initialization vector using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing the plaintext data, An initialization vector generating step for generating an initialization vector using the predetermined plaintext block;
The first plaintext block of the plaintext blocks is encrypted using the initialization vector, and the second and subsequent plaintext blocks are encrypted using the ciphertext block obtained by the previous encryption. An encryption step;
A ciphertext data output step for outputting ciphertext data including the ciphertext block.
コンピュータに、
暗号文データに含まれる暗号文ブロックのうち、2番目以降の暗号文ブロックについて1つ前の暗号文ブロックを利用して復号することで2番目以降の平文ブロックを取得し、1番目の暗号文ブロックについては初期化ベクタを利用して復号することで1番目の平文ブロックを取得する復号ステップと、
暗号化装置においても同じ内容が記憶される初期化ベクタ生成指示情報が示す、平文データを分割した複数の平文ブロックのうち2番目以降における所定の平文ブロックを利用した初期化ベクタの生成の仕方に従って、前記復号ステップにより取得された2番目以降の平文ブロックのうちから前記所定の平文ブロックを利用して初期化ベクタを生成する初期化ベクタ生成ステップと、
を実行させるためのプログラム。
On the computer,
Of the ciphertext blocks included in the ciphertext data, the second and subsequent plaintext blocks are obtained by decrypting the second and subsequent ciphertext blocks using the previous ciphertext block, and the first ciphertext For the block, a decryption step for obtaining the first plaintext block by decrypting using the initialization vector;
In the encryption apparatus, the initialization vector generation instruction information storing the same contents indicates the initialization vector generation method using a predetermined plaintext block in the second and subsequent plaintext blocks obtained by dividing the plaintext data. An initialization vector generation step of generating an initialization vector using the predetermined plaintext block from the second and subsequent plaintext blocks acquired by the decryption step;
A program for running
JP2013152665A 2013-07-23 2013-07-23 ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM Active JP6167721B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013152665A JP6167721B2 (en) 2013-07-23 2013-07-23 ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013152665A JP6167721B2 (en) 2013-07-23 2013-07-23 ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2015022269A true JP2015022269A (en) 2015-02-02
JP6167721B2 JP6167721B2 (en) 2017-07-26

Family

ID=52486737

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013152665A Active JP6167721B2 (en) 2013-07-23 2013-07-23 ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP6167721B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018010237A (en) * 2016-07-15 2018-01-18 コニカミノルタ株式会社 Encryption device, decryption device, decryption method, computer program, data structure, and storage medium
CN109377683A (en) * 2018-09-06 2019-02-22 深圳市奈士迪技术研发有限公司 A kind of mobile phone card reader for being convenient to clean maintenance based on block chain technology
CN115965388A (en) * 2022-12-30 2023-04-14 国网数字科技控股有限公司 Industrial chain financial confidential traceability method and device based on block chain and related equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08248879A (en) * 1995-02-06 1996-09-27 Internatl Business Mach Corp <Ibm> Method and apparatus for encryption by using two keys
JP2002108205A (en) * 2000-09-28 2002-04-10 Hitachi Software Eng Co Ltd Block ciphering method and decoding method
JP2002202719A (en) * 2000-11-06 2002-07-19 Sony Corp Device and method for enciphering, device and method for deciphering, and storage medium
JP2003134106A (en) * 2001-10-22 2003-05-09 Victor Co Of Japan Ltd Encryption method, decoding method and apparatus, and information recording medium
JP2004318154A (en) * 2003-04-14 2004-11-11 Sony Electronics Inc Protection of digital content using block cipher cryptography
JP2004325677A (en) * 2003-04-23 2004-11-18 Sony Corp Encryption processing device, encryption processing method, and computer program
JP2005167635A (en) * 2003-12-02 2005-06-23 Ntt Docomo Inc Apparatus, and data transmission reception method
JP2011091494A (en) * 2009-10-20 2011-05-06 Nippon Hoso Kyokai <Nhk> Data distribution device, data reception device, data distribution program and data reception program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08248879A (en) * 1995-02-06 1996-09-27 Internatl Business Mach Corp <Ibm> Method and apparatus for encryption by using two keys
JP2002108205A (en) * 2000-09-28 2002-04-10 Hitachi Software Eng Co Ltd Block ciphering method and decoding method
JP2002202719A (en) * 2000-11-06 2002-07-19 Sony Corp Device and method for enciphering, device and method for deciphering, and storage medium
JP2003134106A (en) * 2001-10-22 2003-05-09 Victor Co Of Japan Ltd Encryption method, decoding method and apparatus, and information recording medium
JP2004318154A (en) * 2003-04-14 2004-11-11 Sony Electronics Inc Protection of digital content using block cipher cryptography
JP2004325677A (en) * 2003-04-23 2004-11-18 Sony Corp Encryption processing device, encryption processing method, and computer program
JP2005167635A (en) * 2003-12-02 2005-06-23 Ntt Docomo Inc Apparatus, and data transmission reception method
JP2011091494A (en) * 2009-10-20 2011-05-06 Nippon Hoso Kyokai <Nhk> Data distribution device, data reception device, data distribution program and data reception program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018010237A (en) * 2016-07-15 2018-01-18 コニカミノルタ株式会社 Encryption device, decryption device, decryption method, computer program, data structure, and storage medium
CN109377683A (en) * 2018-09-06 2019-02-22 深圳市奈士迪技术研发有限公司 A kind of mobile phone card reader for being convenient to clean maintenance based on block chain technology
CN115965388A (en) * 2022-12-30 2023-04-14 国网数字科技控股有限公司 Industrial chain financial confidential traceability method and device based on block chain and related equipment
CN115965388B (en) * 2022-12-30 2023-12-22 国网数字科技控股有限公司 Block chain-based industrial chain financial secret state tracing method, device and related equipment

Also Published As

Publication number Publication date
JP6167721B2 (en) 2017-07-26

Similar Documents

Publication Publication Date Title
US9712319B2 (en) Method and apparatus to encrypt plaintext data
JP6030103B2 (en) Data protection apparatus and method
CN101753292B (en) Methods and devices for a chained encryption mode
US8634549B2 (en) Ciphertext key chaining
US9515818B2 (en) Multi-block cryptographic operation
CN105406969B (en) Data encryption device and method
US10623176B2 (en) Authentication encryption method, authentication decryption method, and information-processing device
KR101600016B1 (en) method of encrypting data using Homomorphic Encryption and Computing device performing the method
US10721059B2 (en) Apparatus and method for data encryption, apparatus and method for data decryption
US9917695B2 (en) Authenticated encryption method using working blocks
JPWO2009087972A1 (en) Data transmitting apparatus, data receiving apparatus, methods thereof, computer program, and data communication system thereof
KR20170097509A (en) Operation method based on white-box cryptography and security apparatus for performing the method
US8804953B2 (en) Extensive ciphertext feedback
JP6167721B2 (en) ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM
JP5992651B2 (en) ENCRYPTION METHOD, PROGRAM, AND SYSTEM
US8774402B2 (en) Encryption/decryption apparatus and method using AES rijndael algorithm
JP6187624B1 (en) Information processing apparatus, information processing method, and program
KR101583285B1 (en) Block cipher method using expansion key and apparatus thereof
JP6070408B2 (en) ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM
US20170126399A1 (en) Encryption apparatus, storage system, decryption apparatus, encryption method, decryption method, and computer readable medium
JP2016139861A (en) Encryption device, encryption method and distribution system
KR20210049412A (en) Communication method and system through cbc encryption and decryption
JP2013098722A (en) Ciphering device of stream cipher, deciphering device of stream cipher, ciphering method of stream cipher, deciphering method of stream cipher, and program
JP2007158967A (en) Information processing apparatus, tamper resistant device, encryption processing method and computer program
KR101613565B1 (en) The System and Method for one way security communications using Block cipher

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170104

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170228

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20170301

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: 20170530

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170612

R150 Certificate of patent or registration of utility model

Ref document number: 6167721

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250