JP2012168274A - Encryption method, decryption method, encryption apparatus, decryption apparatus and encryption/decryption system - Google Patents

Encryption method, decryption method, encryption apparatus, decryption apparatus and encryption/decryption system Download PDF

Info

Publication number
JP2012168274A
JP2012168274A JP2011027520A JP2011027520A JP2012168274A JP 2012168274 A JP2012168274 A JP 2012168274A JP 2011027520 A JP2011027520 A JP 2011027520A JP 2011027520 A JP2011027520 A JP 2011027520A JP 2012168274 A JP2012168274 A JP 2012168274A
Authority
JP
Japan
Prior art keywords
block
common key
cipher
encryption
ciphertext
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
JP2011027520A
Other languages
Japanese (ja)
Other versions
JP5672037B2 (en
Inventor
Fukio Handa
富己男 半田
Yoshihiro Yano
義博 矢野
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2011027520A priority Critical patent/JP5672037B2/en
Publication of JP2012168274A publication Critical patent/JP2012168274A/en
Application granted granted Critical
Publication of JP5672037B2 publication Critical patent/JP5672037B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To prevent a first ciphertext block from becoming a step to decryption when encrypting plaintext in an encryption block chain mode, and to make a length of ciphertext equal to that of plaintext.SOLUTION: When encrypting plaintext (M1...Mn) in an encryption block chain mode, an encryption apparatus 10 encrypts plaintext (P, M1...Mn) in which a preblock (P) generated by a preblock generator 12 is added to the head, and defines a result of removing ciphertext block (Cp) corresponding to the preblock (P) from ciphertext (Cp, C1...Cn) obtained by encrypting the plaintext (P, M1...Mn) as ciphertext (C1...Cn) of the plaintext (M1...Mn).

Description

本発明は、DES(Data Encryption Standard)やAES(Advanced Encryption Standard)など、暗号化を行う側と復号を行う側で同一の共通鍵を用い、定められたブロック長のブロック単位で暗号化/復号を行うブロック暗号に係わる発明である。   The present invention uses the same common key on the encryption side and the decryption side, such as DES (Data Encryption Standard) and AES (Advanced Encryption Standard), and encrypts / decrypts in units of a predetermined block length. This invention relates to block ciphers that perform the above.

DES(Data Encryption Standard)やAES(Advanced Encryption Standard)など、暗号化を行う側と復号を行う側で同一の共通鍵を用い、定められたブロック長のブロック単位で暗号化/復号を行うブロック暗号の動作モードには、暗号ブロック連鎖しないECBモード(Electric Code Book)もあるが、ECBモードは暗号解読に脆弱であるため、暗号ブロック連鎖する暗号文ブロック連鎖モード(Cipher Block Chaining)が利用されることが多い。   Block encryption such as DES (Data Encryption Standard) and AES (Advanced Encryption Standard) that uses the same common key on the encryption side and the decryption side and performs encryption / decryption in units of a block of a predetermined block length There is also an ECB mode (Electric Code Book) that does not chain cipher blocks, but since the ECB mode is vulnerable to decryption, the cipher block chaining mode (Cipher Block Chaining) is used. There are many cases.

数式1は暗号文ブロック連鎖モードの関数を説明する式である。数式1に示したように、暗号文ブロック連鎖モードの暗号化関数は、i番目の平文ブロック(Mi)を暗号化した暗号文ブロック(Ci)を算出する際に、一つ前の平文ブロック(Mi−1)を暗号化して得られた暗号文ブロック(Ci−1)と平文ブロック(Mi)の排他的論理和を算出し、その結果を暗号化した結果を暗号文ブロック(Ci)とする関数となり、暗号文ブロック連鎖モードにおける復号関数は、暗号文ブロック連鎖モードにおける暗号化関数の逆関数になる。

Figure 2012168274
Expression 1 is an expression for explaining a function of the ciphertext block chaining mode. As shown in Equation 1, the encryption function in the ciphertext block chaining mode calculates the ciphertext block (Ci) obtained by encrypting the i-th plaintext block (Mi), and the previous plaintext block ( The exclusive OR of the ciphertext block (Ci-1) obtained by encrypting Mi-1) and the plaintext block (Mi) is calculated, and the result of encrypting the result is defined as a ciphertext block (Ci). The decryption function in the ciphertext block chaining mode is an inverse function of the encryption function in the ciphertext block chaining mode.
Figure 2012168274

特許2541113号公報Japanese Patent No. 2541113

このように、暗号文ブロック連鎖モードにおいては暗号ブロックが連鎖するため、ECBモードと比較して暗号解読に強いが、最初の平文ブロック(M1)には一つ前の平文ブロックが存在しないため、最初の平文ブロック(M1)には、暗号文ブロックの代わりにIV(Initial Vector)が排他的論理和され、最初の平文ブロック(M1)の暗号文ブロック(C1)が、暗号解読の足掛かりになってしまう恐れがある。  As described above, in the ciphertext block chaining mode, cipher blocks are chained, and thus stronger against cryptanalysis than the ECB mode, but the first plaintext block (M1) has no previous plaintext block, In the first plaintext block (M1), an IV (Initial Vector) is exclusively ORed instead of the ciphertext block, and the ciphertext block (C1) of the first plaintext block (M1) becomes a starting point for decryption. There is a risk that.

このような問題を解決する一つ手法として、特許文献1において、乱数により生成された所定の長さの冗長ビットを平文の先頭に付加する発明が開示されているが、特許文献1で開示されている手法を用いると、冗長ビットを平文の先頭に付加することにより、暗号文のデータ長が平文のデータ長よりも長くなってしまい、このことが暗号解読の足掛かりになってしまう可能性がある。  As one method for solving such a problem, Patent Document 1 discloses an invention in which a redundant bit having a predetermined length generated by a random number is added to the head of a plaintext. If this method is used, adding a redundant bit to the beginning of the plaintext will cause the data length of the ciphertext to be longer than the data length of the plaintext, which may be a stepping stone for decryption. is there.

そこで、本発明は、所定のブロック暗号に従い暗号ブロック連鎖モードにて平文を暗号化する際、最初の暗号文ブロックが暗号解読の足掛かりになることを防止できると共に、暗号文の長さが平文の長さと同じになる技術を提供することを目的とする。   Therefore, the present invention can prevent the first ciphertext block from becoming a starting point for decryption when encrypting plaintext in the cipher block chaining mode according to a predetermined block cipher, and the length of the ciphertext is plaintext. The purpose is to provide a technology that is the same in length.

上述した課題を解決する第1の発明は、平文を暗号化する暗号化装置が、平文の暗号化に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを付加した平文を共通鍵で暗号化した後、暗号化した結果から前記プリブロックに対応する暗号ブロックを除去することで平文の暗号文を生成するステップ、を含むことを特徴とする暗号化方法である。   According to a first invention for solving the above-described problem, an encryption device for encrypting plaintext generates a pre-block that is an integral multiple of the block cipher block length from a block cipher common key used for plaintext encryption. A step of encrypting the plaintext with the preblock added with a common key in a cipher block chaining mode based on a predetermined block cipher, and then removing the cipher block corresponding to the preblock from the encrypted result And generating a plaintext ciphertext.

更に、第2の発明は、暗号文を復号する復号装置が、暗号文の復号に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを共通鍵で暗号化するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックの暗号ブロックを先頭に付加した暗号文を共通鍵で復号した後、復号した結果から前記プリブロックを除去することで暗号文の平文を生成するステップ、を含むことを特徴とする復号方法である。  Further, the second invention is a step in which a decryption device for decrypting ciphertext generates a pre-block that is an integral multiple of the block cipher block length from a block cipher common key used for decrypting ciphertext, A step of encrypting the pre-block with a common key in a cipher block chaining mode based on a block cipher, and a cipher with the pre-block cipher block added to the head in a cipher block chaining mode based on a predetermined block cipher And a step of generating a plaintext of the ciphertext by removing the pre-block from the decryption result after decrypting the text with a common key.

更に、第3の発明は、平文の暗号化に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するプリブロック生成部と、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを先頭に付加した平文を共通鍵で暗号化した後、暗号化した結果から前記プリブロックに対応する暗号ブロックを除去することで平文の暗号文を生成する暗号化部と、を備えたことを特徴とする暗号化装置である。 Further, the third invention is based on a pre-block generation unit that generates a pre-block that is an integral multiple of the block cipher block length from a block cipher common key used for plaintext encryption, and a predetermined block cipher. In cipher block chaining mode, plaintext with the preblock added at the beginning is encrypted with a common key, and then the ciphertext corresponding to the preblock is removed from the encrypted result to generate plaintext ciphertext And an encryption unit.

前記プリブロック生成部が前記プリブロックを生成する手法としては、所定の手順に従い共通鍵のビットを操作する手法や、共通鍵又は所定の手順に従いビットを操作した共通鍵により共通鍵を暗号化する手法が考えられる。加えて、共通鍵から派生鍵を派生させ、前記プリブロックを生成する手法も考えられる。例えば、この派生鍵により共通鍵を暗号化、又は、共通鍵によりこの派生鍵を暗号化することで前記プリブロックを生成するようにすることもできるし、この派生鍵によりこの派生鍵自身を暗号化することで前記プリブロックを生成することもできる。更に、データ長がブロック暗号のブロック長の整数倍の派生ブロックを共通鍵から派生させ、共通鍵又は共通鍵から派生させた派生鍵により、該派生ブロックを暗号化することでプリブロックを生成する手法も考えられる。  The pre-block generation unit generates the pre-block as a method of manipulating the bits of the common key according to a predetermined procedure, or encrypting the common key with a common key or a common key with bits manipulated according to a predetermined procedure A method can be considered. In addition, a method of deriving a derived key from a common key and generating the pre-block can be considered. For example, the pre-block can be generated by encrypting the common key with this derived key, or encrypting this derived key with the common key, or encrypting the derived key itself with this derived key. It is also possible to generate the pre-block by making it. Further, a derived block whose data length is an integral multiple of the block cipher block length is derived from the common key, and a pre-block is generated by encrypting the derived block with the common key or the derived key derived from the common key. A method is also conceivable.

更に、第4の発明は、暗号文の復号に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するプリブロック生成部と、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを共通鍵で暗号化するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックの暗号ブロックを先頭に付加した暗号文を前記共通鍵で復号した後、復号した結果から前記プリブロックを除去することで暗号文の平文を生成する復号を備えたことを特徴とする復号装置である。  Further, the fourth invention is based on a pre-block generation unit that generates a pre-block that is an integral multiple of the block cipher block length from a block cipher common key used for decrypting ciphertext, and a predetermined block cipher. A step of encrypting the pre-block with a common key in a cipher block chaining mode, and a ciphertext prefixed with the cipher block of the pre-block in a cipher block chaining mode based on a predetermined block cipher The decryption apparatus includes decryption that generates a plaintext of a ciphertext by removing the pre-block from the decryption result after decryption by.

第3の発明と同様に、前記プリブロック生成部が前記プリブロックを生成する手法としては、所定の手順に従い共通鍵のビットを操作する手法や、共通鍵又は所定の手順に従いビットを操作した共通鍵により共通鍵を暗号化する手法が考えられる。加えて、共通鍵から派生鍵を派生させ、前記プリブロックを生成する手法も考えられる。例えば、この派生鍵により共通鍵を暗号化、又は、共通鍵によりこの派生鍵を暗号化することで前記プリブロックを生成するようにすることもできるし、この派生鍵によりこの派生鍵自身を暗号化することで前記プリブロックを生成することもできる。更に、データ長がブロック暗号のブロック長の整数倍の派生ブロックを共通鍵から派生させ、共通鍵又は共通鍵から派生させた派生鍵により、該派生ブロックを暗号化することでプリブロックを生成する手法も考えられる。  As in the third invention, the pre-block generation unit generates the pre-block as a method of operating a bit of a common key according to a predetermined procedure, or a common key or a common key operating a bit according to a predetermined procedure. A method of encrypting the common key with a key can be considered. In addition, a method of deriving a derived key from a common key and generating the pre-block can be considered. For example, the pre-block can be generated by encrypting the common key with this derived key, or encrypting this derived key with the common key, or encrypting the derived key itself with this derived key. It is also possible to generate the pre-block by making it. Further, a derived block whose data length is an integral multiple of the block cipher block length is derived from the common key, and a pre-block is generated by encrypting the derived block with the common key or the derived key derived from the common key. A method is also conceivable.

更に、第5の発明は、他の装置とVPN(Virtual Private Network)を構築し、他の装置から受信したブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成し、生成した前記プリブロックを前記他の装置へ送信するプリブロック生成装置と、平文を暗号化する際、前記プリブロック生成装置とVPNを構築し、平文の暗号化に利用する共通鍵を前記プリブロック生成装置へ送信し、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロック生成装置から受信した前記プリブロックを先頭に付加した平文を共通鍵で暗号化した後、暗号化した結果から前記プリブロックに対応する暗号ブロックを除去することで平文の暗号文を生成する暗号化装置と、前記プリブロック生成装置とVPNを構築し、前記暗号化装置が生成した暗号文の復号に利用する共通鍵を前記プリブロック生成装置へ送信し、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを共通鍵で暗号化するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロック生成装置から受信した前記プリブロックの暗号ブロックを先頭に付加した暗号文を共通鍵で復号した後、復号した結果から前記プリブロックを除去することで暗号文の平文を生成する復号装置とから少なくとも構成されることを特徴とする暗号化/復号システムである。なお、第3の発明及び第4の発明と同様に、前記プリブロック生成装置が前記プリブロックを生成する手法としては、所定の手順に従い共通鍵をビットローテーションする手法や、共通鍵を共通鍵自身で暗号化する手法が考えられる。   Furthermore, the fifth aspect of the invention constructs a VPN (Virtual Private Network) with another device and generates a pre-block that is an integral multiple of the block cipher block length from the block cipher common key received from the other device. A pre-block generation apparatus that transmits the generated pre-block to the other apparatus, and a plain key encrypted with the pre-block generation apparatus when the plain text is encrypted, and a common key that is used to encrypt the plain text Transmitted to the block generator, and based on a predetermined block cipher, in the cipher block chaining mode, the plaintext prefixed with the preblock received from the preblock generator was encrypted with a common key, and then encrypted. An encryption device that generates plaintext ciphertext by removing the encryption block corresponding to the preblock from the result, and the preblock generation device and the VPN are configured. Then, a common key used for decrypting the ciphertext generated by the encryption device is transmitted to the preblock generation device, and the preblock is encrypted with the common key in a cipher block chaining mode based on a predetermined block cipher. Step of decrypting the ciphertext prefixed with the cipher block of the pre-block received from the pre-block generation device in the cipher block chaining mode based on a predetermined block cipher, and then decrypting the ciphertext An encryption / decryption system comprising at least a decryption device that generates plaintext of ciphertext by removing the pre-block from As in the third and fourth inventions, the pre-block generation device generates the pre-block as a method for bit-rotating the common key according to a predetermined procedure, or using the common key as the common key itself. An encryption method can be considered.

上述した発明によれば、プリブロックの暗号文ブロックが最初の平文ブロックに暗号ブロック連鎖するため、最初の平文ブロックの暗号文ブロックが暗号解読の足掛かりになることを防止できる。また、暗号化した結果から、プリブロックに係わるブロックを除去することで、暗号文の長さを平文の長さと同じにでき、暗号化する際に特別な処理が実施されていることがわからなくなる。   According to the above-described invention, since the ciphertext block of the pre-block is chained to the first plaintext block, it is possible to prevent the ciphertext block of the first plaintext block from becoming a starting point for decryption. Also, by removing the block related to the pre-block from the encrypted result, the length of the ciphertext can be made the same as the length of the plaintext, and it is not possible to know that special processing is performed when encrypting. .

実施形態1に係る暗号化/復号システムを説明する図。1 is a diagram for explaining an encryption / decryption system according to Embodiment 1. FIG. 実施形態1に係る暗号化装置が平文を暗号化する手順を示したフロー図。The flowchart which showed the procedure in which the encryption apparatus which concerns on Embodiment 1 encrypts plaintext. 実施形態1に係る復号装置が暗号文を復号する手順を示したフロー図。The flowchart which showed the procedure in which the decryption apparatus which concerns on Embodiment 1 decrypts a ciphertext. 実施例1に係る暗号化/復号システムを説明する図。1 is a diagram illustrating an encryption / decryption system according to Embodiment 1. FIG. 実施形態2に係る暗号化装置及び復号装置を説明する図。FIG. 6 is a diagram for explaining an encryption device and a decryption device according to a second embodiment. 実施形態2に係る暗号化装置が平文を暗号化する手順を示したフロー図。The flowchart which showed the procedure in which the encryption apparatus which concerns on Embodiment 2 encrypts a plaintext. 実施形態2に係る復号装置が暗号文を復号する手順を示したフロー図。The flowchart which showed the procedure in which the decryption apparatus which concerns on Embodiment 2 decrypts a ciphertext. 実施例2に係るICカードを説明する図。FIG. 6 is a diagram illustrating an IC card according to a second embodiment.

ここから,本発明の実施形態について,本発明の技術分野に係わる当業者が,発明の内容を理解し,発明を実施できる程度に説明する。なお、これから説明する実施形態は本発明の一実施形態にしか過ぎず、本発明は,これから説明する実施形態に限定されることなく、種々の変形や変更が可能である。   From here, embodiments of the present invention will be described to the extent that those skilled in the art of the present invention can understand the contents of the invention and implement the invention. The embodiment described below is only one embodiment of the present invention, and the present invention is not limited to the embodiment described below, and various modifications and changes are possible.

(実施形態1)
まず、本発明のシステムに係る実施形態1について説明する。図1は、本実施形態1に係る暗号化/復号システム1を説明する図である。
(Embodiment 1)
First, Embodiment 1 which concerns on the system of this invention is demonstrated. FIG. 1 is a diagram for explaining an encryption / decryption system 1 according to the first embodiment.

本実施形態1に係る暗号化/復号システム1には、DES(Data Encryption Standard)やAES(Advanced Encryption Standard)など、暗号化を行う側と復号を行う側で同一の共通鍵(K)を利用し、定められたブロック長のブロック単位で処理を行うブロック暗号により暗号化/復号を実行するシステムで、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードで平文(M1・・・Mn)を暗号化する暗号化装置10と、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードで暗号文(C1・・・Cn)を復号する復号装置11と、平文(M1・・・Mn)の先頭に付加するプリブロックを生成するプリブロック生成装置12が含まれ、暗号化装置10、復号装置11及びプリブロック生成装置12はインターネット13を介して接続している。  The encryption / decryption system 1 according to Embodiment 1 uses the same common key (K) on the encryption side and the decryption side, such as DES (Data Encryption Standard) and AES (Advanced Encryption Standard). In a system that performs encryption / decryption by block cipher that performs processing in block units of a predetermined block length, a plaintext (in ciphertext block chaining mode is used in accordance with a predetermined block cipher algorithm using a common key (K). Decrypting ciphertext (C1... Cn) in ciphertext block chaining mode according to a predetermined block cipher algorithm using the encryption device 10 that encrypts M1... Mn) and the common key (K) And a pre-block generation device 12 that generates a pre-block to be added to the head of the plaintext (M1... Mn), and includes an encryption device 10, a decryption device 11, and a pre-block. Generator 12 is connected via the Internet 13.

数式1で図示したように、CBCモードで平文を暗号化する場合、暗号化の対象となる平文(M1・・・Mn)を定められたブロック長(例えば、DESなら64ビット、AESなら128ビット)の複数の平文ブロック(Mi、i=1からn)に分割した後、一つ前の平文ブロック(Mi−1)の暗号文ブロック(Ci−1)と平文ブロック(Mi)を排他的論理和して暗号化した結果を平文ブロック(Mi)の暗号文ブロック(Ci)とすることで、暗号文ブロックを連鎖させて平文(M1・・・Mn)の暗号文を生成するが、最初の平文ブロック(M1)の暗号文ブロック(C1)は、暗号文ブロック連鎖しないため、暗号文ブロック(C1)が暗号解読の足掛かりになってしまう恐れがある。   As illustrated in Equation 1, when plaintext is encrypted in the CBC mode, the plaintext (M1... Mn) to be encrypted is defined as a block length (for example, 64 bits for DES and 128 bits for AES). ) Is divided into a plurality of plaintext blocks (Mi, i = 1 to n), and the ciphertext block (Ci-1) and plaintext block (Mi) of the previous plaintext block (Mi-1) are exclusive logic The ciphertext block is chained by generating the ciphertext block (Ci) of the plaintext block (Mi) as a result of summing and encryption, and the ciphertext of plaintext (M1... Mn) is generated. Since the ciphertext block (C1) of the plaintext block (M1) is not chained with ciphertext blocks, the ciphertext block (C1) may become a starting point for decryption.

これに対し、実施形態1の暗号化装置10は、暗号文ブロック連鎖モードで平文(M1・・・Mn)を暗号化する際、プロブロック生成装置12が生成したプリブロック(P)を先頭に付加した平文(P,M1・・・Mn)を暗号化し、該平文(P,M1・・・Mn)の暗号化結果(Cp、C1・・・Cn)からプリブロック(P)に対応する暗号文ブロック(Cp)を除去した結果を平文(M1・・・Mn)の暗号文(C1・・・Cn)とすることで、プリブロック(P)の暗号文ブロック(Cp)が最初の平文ブロック(M1)に連鎖するようにし、最初の平文ブロック(M1)の暗号文ブロック(C1)が暗号解読の足掛かりになることを防止すると共に、暗号文(C1・・・Cn)の長さを平文(M1・・・Mn)の長さと同じにすることで、暗号化する際に特別な処理が実施されていることをわからなくしている。  On the other hand, when encrypting plaintext (M1... Mn) in the ciphertext block chaining mode, the encryption device 10 of Embodiment 1 starts with the pre-block (P) generated by the problock generation device 12 at the top. The added plaintext (P, M1... Mn) is encrypted, and the encryption corresponding to the pre-block (P) from the encryption result (Cp, C1... Cn) of the plaintext (P, M1... Mn). The result of removing the text block (Cp) is the ciphertext (C1... Cn) of the plaintext (M1... Mn), so that the ciphertext block (Cp) of the preblock (P) is the first plaintext block. The ciphertext block (C1) of the first plaintext block (M1) is prevented from becoming a step for decryption, and the length of the ciphertext (C1... Cn) is plaintext. Same as the length of (M1 ... Mn) , Special treatment when encryption is no longer know that they are implemented.

なお、DESやASEなどのブロック暗号において、暗号文の生成側と復号側とで共通鍵(K)は共有されるので、暗号化/復号でプリブロック(P)の生成に利用する手法を共通にしておけば、暗号文(C1・・・Cn)を生成するときに生成したプリブロック(P)及びプリブロック(P)の暗号文ブロック(Cp)を復号側でも生成することが可能になり、復号装置11が、暗号化の逆の手順を実行することで、暗号文(C1・・・Cn)を平文(M1・・・Mn)に復号することができる。   In block ciphers such as DES and ASE, since the common key (K) is shared between the ciphertext generation side and the decryption side, a common technique is used to generate the pre-block (P) in encryption / decryption. By doing so, it becomes possible to generate the pre-block (P) generated when generating the ciphertext (C1... Cn) and the ciphertext block (Cp) of the pre-block (P) also on the decryption side. The decryption apparatus 11 can decrypt the ciphertext (C1... Cn) into plaintext (M1... Mn) by executing the reverse procedure of encryption.

ここから、暗号化システムに含まれるプリブロック生成装置12、暗号化装置10及び復号装置11についてより詳細に説明する。   From here, the pre-block generation device 12, the encryption device 10, and the decryption device 11 included in the encryption system will be described in more detail.

まず、プリブロック生成装置12について説明する。プリブロック生成装置12は、受け渡された共通鍵(K)から、平文(M1・・・Mn)の先頭に付加するプリブロック(P)を生成する装置で、プリブロック生成装置12には、プリブロックを生成するためのコンピュータプログラムで実現される。   First, the pre-block generation device 12 will be described. The pre-block generation device 12 is a device that generates a pre-block (P) to be added to the head of the plaintext (M1... Mn) from the delivered common key (K). It is realized by a computer program for generating a pre-block.

プリブロック生成装置12がプリブロック(P)を生成する手法は、データ長がブロック暗号のブロック長の整数倍となれば任意でよく、このような手法としては、共通鍵(K)を該共通鍵(K)で暗号化する手法や、共通鍵(K)を所定の手順従いビットローテーションする手法などが考えられ、極端な例を挙げれば恒等関数であってもよい。   The pre-block generation device 12 may generate the pre-block (P) by any method as long as the data length is an integral multiple of the block cipher block length. As such a method, the common key (K) is shared. A method of encrypting with the key (K), a method of bit-rotating the common key (K) according to a predetermined procedure, and the like are conceivable, and an extreme example may be an identity function.

加えて、共通鍵(K)から派生鍵を派生させ、プリブロック(P)を生成する手法も考えられる。例えば、この派生鍵により共通鍵(K)を暗号化、又は、共通鍵(K)によりこの派生鍵を暗号化することでプリブロック(P)を生成するようにすることもできるし、この派生鍵によりこの派生鍵自身を暗号化することでプリブロック(P)を生成することもできる。なお、派生鍵は、共通鍵(K)の所定のバイトをシフト又はローテートすることで派生させればよい。   In addition, a method of generating a pre-block (P) by deriving a derived key from the common key (K) is also conceivable. For example, the pre-block (P) can be generated by encrypting the common key (K) with this derived key, or encrypting this derived key with the common key (K). A pre-block (P) can also be generated by encrypting the derived key itself with a key. The derived key may be derived by shifting or rotating a predetermined byte of the common key (K).

更に、暗号鍵の拡張アルゴリズムなどを利用して、データ長がブロック暗号のブロック長の整数倍の派生ブロックを共通鍵(K)から派生させ、プリブロック(P)を生成する手法も考えられる。例えば、共通鍵(K)により、この派生ブロックを暗号化することでプリブロック(P)を生成するようにすることができる。なお、派生ブロックの暗号に用いる暗号鍵は、上述した派生鍵でも構わない。   Further, a method of generating a pre-block (P) by deriving a derived block whose data length is an integral multiple of the block cipher block length from the common key (K) using an encryption key extension algorithm or the like is also conceivable. For example, the pre-block (P) can be generated by encrypting this derived block with the common key (K). The encryption key used for the encryption of the derived block may be the above-described derived key.

プリブロック(P)のデータ長は、プリブロック(P)を生成する手法によって決定し、例えば、プリブロック(P)を生成する関数として、共通鍵(K)を該共通鍵(K)で暗号化する手法を用いる場合、シングルDESをブロック暗号とすれば、シングルDESの鍵長はパリティを含めて64ビットであるため、プリブロック(P)のデータ長はDESのブロック長(64ビット)の1倍になる。また、AESをブロック暗号とする際、AESの鍵長が256ビットであれば、プリブロック(P)のデータ長はAESのブロック長の2倍(256ビット)になる。  The data length of the pre-block (P) is determined by a method for generating the pre-block (P). For example, the common key (K) is encrypted with the common key (K) as a function for generating the pre-block (P). If the single DES is a block cipher, the key length of the single DES is 64 bits including parity, so the data length of the pre-block (P) is the DES block length (64 bits). 1x. In addition, when AES is a block cipher, if the AES key length is 256 bits, the data length of the pre-block (P) is twice the AES block length (256 bits).

次に、暗号化装置10について説明する。暗号化装置10は、プリブロック生成装置12に共通鍵(K)を受け渡し、プリブロック生成装置12が生成したプリブロック(P)を用い、暗号化の対象となる平文(M1・・・Mn)を暗号化した暗号文(C1・・・Cn)を生成する装置で、暗号化部は、暗号化装置10として利用するコンピュータを暗号化部として動作させるためのコンピュータプログラムで実現される。  Next, the encryption device 10 will be described. The encryption device 10 passes the common key (K) to the pre-block generation device 12, and uses the pre-block (P) generated by the pre-block generation device 12, and the plaintext (M1... Mn) to be encrypted. The encryption unit is realized by a computer program for causing a computer used as the encryption device 10 to operate as an encryption unit.

図2は、暗号化装置10が平文(M1・・・Mn)を暗号化する手順を示したフロー図である。  FIG. 2 is a flowchart showing a procedure in which the encryption device 10 encrypts plain text (M1... Mn).

暗号化装置10が平文(M1・・・Mn)を暗号化する際、まず、暗号化の対象となる平文(M1・・・Mn)と暗号化に利用する共通鍵(K)が暗号化装置10に指定される(S1)。平文(M1・・・Mn)及び共通鍵(K)が暗号化装置10に記憶されていない場合、平文(M1・・・Mn)及び共通鍵(K)は、操作者や外部装置によって暗号化装置10に入力されることになり、また、平文(M1・・・Mn)及び共通鍵(K)が暗号化装置10に記憶されている場合、暗号化装置10に記憶されている平文(M1・・・Mn)及び共通鍵(K)が、操作者や外部装置によって指定されることになる。   When the encryption device 10 encrypts plaintext (M1... Mn), first, the plaintext (M1... Mn) to be encrypted and the common key (K) used for encryption are encrypted. 10 (S1). When the plaintext (M1... Mn) and the common key (K) are not stored in the encryption device 10, the plaintext (M1... Mn) and the common key (K) are encrypted by the operator or an external device. When the plaintext (M1... Mn) and the common key (K) are stored in the encryption device 10, the plaintext (M1) stored in the encryption device 10 is to be input to the device 10. ... Mn) and the common key (K) are designated by an operator or an external device.

なお、ブロック暗号ではブロック長のブロック単位で処理するため、指定された平文のデータ長がブロック暗号のブロック長の整数倍でない場合、データ長がブロック暗号のブロック長の整数倍になるように、PKCS#5などの規格に従い所定のデータがパディングされ、該平文は、n個の平文ブロック(Mi、i=1からn)に分割される。  Since block ciphers are processed in units of block length, if the specified plaintext data length is not an integer multiple of the block cipher block length, the data length is an integer multiple of the block cipher block length. Predetermined data is padded according to a standard such as PKCS # 5, and the plaintext is divided into n plaintext blocks (Mi, i = 1 to n).

次に、暗号化装置10は、SSL(Secure Socket Layer)などの技術を利用して、プリブロック生成装置12とVPN(Virtual Private Network)を構築した後(S2)、指定された共通鍵(K)をプリブロック生成装置12に受け渡し、プリブロック生成装置12が生成したプリブロック(P)をプリブロック生成装置12から受け取る(S3)。  Next, the encryption device 10 constructs a pre-block generation device 12 and a VPN (Virtual Private Network) using a technology such as SSL (Secure Socket Layer) (S2), and then designates a specified common key (K ) To the pre-block generation device 12, and the pre-block (P) generated by the pre-block generation device 12 is received from the pre-block generation device 12 (S3).

プリブロック生成装置12からプリブロック(P)が受け渡されると、暗号化装置10は、プリブロック(P)を先頭に付加した平文(P,M1・・・Mn)を生成した後(S4)、該平文(P,M1・・・Mn)を、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードにて暗号化する(S5)。   When the preblock (P) is delivered from the preblock generation device 12, the encryption device 10 generates plaintext (P, M1... Mn) with the preblock (P) added to the head (S4). The plaintext (P, M1,... Mn) is encrypted in the ciphertext block chain mode according to a predetermined block cipher algorithm using the common key (K) (S5).

なお、暗号文ブロック連鎖モードでは、最初の平文ブロックから順に暗号化されるため、平文(P,M1・・・Mn)の暗号結果は、プリブロック(P)に対応する暗号ブロック(Cp)と平文ブロック(Mi、i=1からn)に対応する暗号ブロック(Ci、i=1からn)を結合した暗号文(Cp,C1・・・Cn)になる。   In the ciphertext block chaining mode, since encryption is performed sequentially from the first plaintext block, the ciphertext (P, M1... Mn) cipher result is the cipher block (Cp) corresponding to the pre-block (P). The ciphertext (Cp, C1... Cn) is obtained by combining the cipher blocks (Ci, i = 1 to n) corresponding to the plaintext blocks (Mi, i = 1 to n).

そして、暗号化装置10の暗号化部は、平文(P,M1・・・Mn)を暗号化するこで得られた暗号文(Cp,C1・・・Cn)の先頭から、プリブロック(P)のデータ長のデータを除去することで、プリブロック(P)に対応する暗号ブロック(Cp)を除去する処理を行い、平文(M1・・・Mn)に対応する暗号文(C1・・・Cn)を生成して(S6)、図2で図示した手順は終了する。   And the encryption part of the encryption apparatus 10 preblocks (P from the head of the ciphertext (Cp, C1 ... Cn) obtained by encrypting plaintext (P, M1 ... Mn). ) To remove the cipher block (Cp) corresponding to the pre-block (P), and the cipher text (C1... Mn) corresponding to the plain text (M1... Mn). Cn) is generated (S6), and the procedure illustrated in FIG.

例えば、プリブロック(P)が1ブロックならば、暗号化装置10の暗号化部は、暗号文(Cp,C1・・・Cn)の先頭からブロック長のデータを除去することになり、また、プリブロック(P)が2ブロックならば、暗号化装置10の暗号化部は、暗号文(Cp,C1・・・Cn)の先頭からブロック長の2倍のデータを除去することになる。   For example, if the pre-block (P) is one block, the encryption unit of the encryption device 10 will remove block-length data from the beginning of the ciphertext (Cp, C1... Cn). If the pre-block (P) is two blocks, the encryption unit of the encryption device 10 removes data twice the block length from the beginning of the ciphertext (Cp, C1,... Cn).

次に、復号装置11について説明する。復号装置11は、プリブロック生成装置12に共通鍵(K)を受け渡し、プリブロック生成装置12が生成したプリブロック(P)を用い、復号の対象となる暗号文(C1・・・Cn)を復号した平文(M1・・・Mn)を生成する装置で、復号装置11には、暗号文(C1・・・Cn)を復号するためのコンピュータプログラムが実装される。  Next, the decoding device 11 will be described. The decryption device 11 passes the common key (K) to the pre-block generation device 12, and uses the pre-block (P) generated by the pre-block generation device 12, and transmits the ciphertext (C1... Cn) to be decrypted. A computer that generates decrypted plaintext (M1... Mn) and a decryption device 11 is installed with a computer program for decrypting ciphertext (C1... Cn).

図3は、復号装置11が暗号文(C1・・・Cn)を復号する手順を示したフロー図である。  FIG. 3 is a flowchart showing a procedure in which the decryption device 11 decrypts the ciphertext (C1... Cn).

復号装置11の復号部が暗号文(C1・・・Cn)を復号する際、復号の対象となる暗号文(C1・・・Cn)と共通鍵(K)が指定される(S10)。平文(M1・・・Mn)のデータ長はブロック暗号のブロック長の整数倍にパディングされた後に暗号化されるため、暗号文(C1・・・Cn)のデータ長は必ずブロック暗号のブロック長の整数倍になっており、図3において、暗号文(C1・・・Cn)は、n個の暗号文ブロック(Ci、i=1からn)に分割されている。   When the decryption unit of the decryption device 11 decrypts the ciphertext (C1... Cn), the ciphertext (C1... Cn) to be decrypted and the common key (K) are designated (S10). Since the plaintext (M1... Mn) data length is encrypted after being padded to an integral multiple of the block cipher block length, the ciphertext (C1... Cn) data length is always the block cipher block length. In FIG. 3, the ciphertext (C1... Cn) is divided into n ciphertext blocks (Ci, i = 1 to n).

復号の対象となる暗号文(C1・・・Cn)が指定されると、SSL(Secure Socket Layer)などの技術を利用して、プリブロック生成装置12とVPN(Virtual Private Network)を構築した後(S11)、指定された共通鍵(K)をプリブロック生成装置12に受け渡し、プリブロック生成装置12が生成したプリブロック(P)をプリブロック生成装置12から受け取る(S12)。   When a ciphertext (C1... Cn) to be decrypted is designated, a pre-block generation device 12 and a VPN (Virtual Private Network) are constructed using a technology such as SSL (Secure Socket Layer). (S11) The designated common key (K) is transferred to the pre-block generation device 12, and the pre-block (P) generated by the pre-block generation device 12 is received from the pre-block generation device 12 (S12).

上述しているように、ブロック暗号において、暗号文(C1・・・Cn)の生成側と復号側とで共通鍵は共有されるので、暗号化装置10と同じ手法で同じ共通鍵(K)を用いることで、暗号文(C1・・・Cn)を生成するときに用いたプリブロック(P)を生成することが復号装置11側でも可能である。  As described above, in the block cipher, since the common key is shared between the generation side and the decryption side of the ciphertext (C1... Cn), the same common key (K) is used in the same manner as the encryption device 10. By using, the pre-block (P) used when generating the ciphertext (C1... Cn) can be generated also on the decryption apparatus 11 side.

次に、復号装置11は、指定された共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い、暗号文ブロック連鎖モードでプリブロック(P)を暗号化することで、プリブロック(P)の暗号ブロック(Cp)を生成する(S13)。   Next, the decryption device 11 encrypts the pre-block (P) in the ciphertext block chaining mode according to a predetermined block cipher algorithm using the designated common key (K), thereby pre-block (P) The encryption block (Cp) is generated (S13).

プリブロック(P)の暗号ブロック(Cp)を生成すると、復号装置11は、プリブロック(P)の暗号ブロック(Cp)を除去する処理と逆の手順、すなわち、プリブロック(P)の暗号ブロック(Cp)を先頭に付加した暗号文(Cp、C1・・・Cn)を生成した後(S14)、暗号化と逆の手順、すなわち、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い、暗号文ブロック連鎖モードで、該暗号文(Cp,C1・・・Cn)を復号する(S15)。   When the encryption block (Cp) of the pre-block (P) is generated, the decryption device 11 performs the reverse procedure to the process of removing the encryption block (Cp) of the pre-block (P), that is, the encryption block of the pre-block (P). After generating a ciphertext (Cp, C1... Cn) prefixed with (Cp) (S14), a procedure reverse to the encryption, that is, using a common key (K), a predetermined block cipher algorithm Then, the ciphertext (Cp, C1... Cn) is decrypted in the ciphertext block chain mode (S15).

暗号文ブロック連鎖モードでは、最初のブロックから順に復号されるため、暗号文(Cp,C1・・・Cn)の復号結果は、暗号ブロック(Cp)を復号したブロック、すなわち、プリブロック(P)と、暗号文(Ci、i=1からn)に対応する平文ブロック(Mi、i=1からn)を結合した平文(P、M1・・・Mn)になる。   In the ciphertext block chaining mode, decryption is performed in order from the first block, so that the decryption result of the ciphertext (Cp, C1... Cn) is a block obtained by decrypting the cipher block (Cp), that is, a pre-block (P) To plaintext (P, M1... Mn) obtained by combining plaintext blocks (Mi, i = 1 to n) corresponding to ciphertext (Ci, i = 1 to n).

次に、復号装置11は、暗号文(Cp,C1・・・Cn)の復号結果(P、M1・・・Mn)の先頭から、プリブロック(P)のデータ長のデータを除去することで、プリブロック(P)を除去する処理を行い、暗号文(C1・・・Cn)に対応する平文(M1・・・Mn)を生成して(S16)、図3で図示した手順は終了する。   Next, the decryption device 11 removes the data having the data length of the pre-block (P) from the head of the decryption result (P, M1... Mn) of the ciphertext (Cp, C1... Cn). Then, the pre-block (P) is removed, plaintext (M1... Mn) corresponding to the ciphertext (C1... Cn) is generated (S16), and the procedure illustrated in FIG. .

なお、PKCS#5などの規格に従い所定のデータがパディングされて暗号化されている場合、PKCS#5などの規格に従いパディングされた所定のデータが、平文(M1・・・Mn)から除去される。  When predetermined data is padded and encrypted according to a standard such as PKCS # 5, the predetermined data padded according to a standard such as PKCS # 5 is removed from the plaintext (M1... Mn). .

ここから、本発明に係る暗号化システムの実施例について説明する。図4は、実施例1に係る暗号化/復号システム2を説明する図である。図4で図示した暗号化/復号システム2には、暗号化装置10として機能するパーソナルコンピュータ20と、復号装置11として機能するパーソナルコンピュータ21と、プリブロック生成装置12として機能するサーバ22が含まれ、パーソナルコンピュータ20,21とサーバ22はインターネット23を介して接続している。   From here, the Example of the encryption system based on this invention is described. FIG. 4 is a diagram illustrating the encryption / decryption system 2 according to the first embodiment. The encryption / decryption system 2 illustrated in FIG. 4 includes a personal computer 20 that functions as the encryption device 10, a personal computer 21 that functions as the decryption device 11, and a server 22 that functions as the pre-block generation device 12. The personal computers 20 and 21 and the server 22 are connected via the Internet 23.

プリブロック生成装置12として機能するサーバ22では、必要な機能に対応するアプリケーションソフトウェアを複数のユーザにシェアするSaas(Software as a Service)や、業務用のアプリケーションソフトウェアを特定のユーザにレンタルするASP(Application Service Provider)などが運営され、実施例1において、サーバ22が提供するアプリケーションソフトウェアは、これまで説明したプリブロック生成装置12として機能するソフトウェアになる。   In the server 22 functioning as the pre-block generation device 12, a software as a service (Saas) for sharing application software corresponding to a required function to a plurality of users, or an ASP (for renting application software for business use to a specific user) In the first embodiment, the application software provided by the server 22 is software that functions as the pre-block generation device 12 described so far.

暗号化装置10として機能するパーソナルコンピュータ20には、これまで説明した暗号化装置10として機能するコンピュータプログラムが実装され、また、復号装置11として機能するパーソナルコンピュータ21には、これまで説明した復号装置11として機能するコンピュータプログラムが実装されている。   The personal computer 20 that functions as the encryption device 10 is mounted with the computer program that functions as the encryption device 10 described so far, and the personal computer 21 that functions as the decryption device 11 includes the decryption device described so far. A computer program functioning as 11 is implemented.

暗号化装置10及び復号装置11として機能するコンピュータプログラムは、パーソナルコンピュータ間で送信されるデータを暗号化することが必要なアプリケーションのアドインなどで具体的には実現され、該アプリケーションの一例としてはメールクライアントソフトが挙げられる。   The computer program that functions as the encryption device 10 and the decryption device 11 is specifically realized by an add-in of an application that needs to encrypt data transmitted between personal computers. An example of the application is a mail Client software.

パーソナルコンピュータ20は、パーソナルコンピュータ21へ送信するデータを暗号化する際、図2で図示した手順を実行して、該データの暗号文を生成し、生成した暗号文をパーソナルコンピュータ21へ送信する。なお、実施例1では、プリブロック(P)を生成する装置はサーバ22になるため、パーソナルコンピュータ20は、サーバ22で運営されているアプリケーションソフトウェアを利用して、プリブロック(P)を生成することになる。   When encrypting the data to be transmitted to the personal computer 21, the personal computer 20 executes the procedure illustrated in FIG. 2 to generate a ciphertext of the data, and transmits the generated ciphertext to the personal computer 21. In the first embodiment, since the apparatus that generates the pre-block (P) is the server 22, the personal computer 20 generates the pre-block (P) using application software operated by the server 22. It will be.

また、パーソナルコンピュータ21は、パーソナルコンピュータ20から受信した暗号文を復号する際、図3で図示した手順を実行して、該暗号文を復号する。なお、実施例1では、プリブロック(P)を生成する装置はサーバ22になるため、パーソナルコンピュータ21は、サーバ22で運営されているアプリケーションソフトウェアを利用して、プリブロック(P)を生成することになる。   Further, when decrypting the ciphertext received from the personal computer 20, the personal computer 21 executes the procedure illustrated in FIG. 3 to decrypt the ciphertext. In the first embodiment, since the apparatus that generates the pre-block (P) is the server 22, the personal computer 21 generates the pre-block (P) using application software operated by the server 22. It will be.

(実施形態2)
次に、本発明の暗号化装置及び復号装置に係る実施形態2を説明する。図5は、実施形態2に係る暗号化装置3及び復号装置4を説明する図である。
(Embodiment 2)
Next, a second embodiment according to the encryption device and the decryption device of the present invention will be described. FIG. 5 is a diagram illustrating the encryption device 3 and the decryption device 4 according to the second embodiment.

実施形態2に係る暗号化装置3は、DESやAESなど、暗号化を行う側と復号を行う側で同一の共通鍵(K)を利用し、定められたブロック長のブロック単位で暗号化する装置で、図5(a)に図示したように、暗号化装置3は、受け渡された共通鍵(K)からプリブロック(P)を生成するプリブロック生成部31と、プリブロック生成部31に共通鍵(K)を受け渡し、プリブロック生成部31が生成したプリブロック(P)を用い、暗号化の対象となる平文(M1・・・Mn)を暗号化した暗号文(C1・・・Cn)を生成する暗号化部30を備え、プリブロック生成部31及び暗号化部30は、暗号化装置3として利用するコンピュータをプリブロック生成部31及び暗号化部30として動作させるためのコンピュータプログラムで実現される。  The encryption device 3 according to the second embodiment uses the same common key (K) on the encryption side and the decryption side, such as DES and AES, and encrypts in units of blocks having a predetermined block length. As shown in FIG. 5A, the encryption device 3 includes a pre-block generation unit 31 that generates a pre-block (P) from the transferred common key (K), and a pre-block generation unit 31. The ciphertext (C1... Mn) encrypted by encrypting the plaintext (M1... Mn) to be encrypted using the preblock (P) generated by the preblock generation unit 31. Cn) is generated, and the pre-block generation unit 31 and the encryption unit 30 are computer programs for causing a computer used as the encryption device 3 to operate as the pre-block generation unit 31 and the encryption unit 30. Real It is.

また、実施形態2に係る復号装置4は、DESやAESなど、暗号化を行う側と復号を行う側で同一の共通鍵(K)を利用し、定められたブロック長のブロック単位で復号する装置で、図5(b)に図示したように、復号装置4は、受け渡された共通鍵(K)からプリブロック(P)を生成するプリブロック生成部41と、プリブロック生成部41に共通鍵(K)を受け渡し、プリブロック生成部41が生成したプリブロック(P)を用い、復号の対象となる暗号文(C1・・・Cn)を復号した平文(M1・・・Mn)を生成する復号部40を備え、プリブロック生成部及び復号部40は、復号装置4として利用するコンピュータを復号部として動作させるためのコンピュータプログラムで実現される。   In addition, the decryption device 4 according to the second embodiment uses the same common key (K) on the encryption side and the decryption side, such as DES and AES, and decrypts in units of blocks having a predetermined block length. As shown in FIG. 5B, the decryption device 4 includes a pre-block generation unit 41 that generates a pre-block (P) from the transferred common key (K), and a pre-block generation unit 41. A plaintext (M1... Mn) obtained by passing the common key (K) and decrypting the ciphertext (C1... Cn) to be decrypted using the preblock (P) generated by the preblock generation unit 41. The pre-block generation unit and the decoding unit 40 are provided by a computer program that causes a computer used as the decoding device 4 to operate as a decoding unit.

ここから、暗号化装置3が実行する手順について説明する。図6は、暗号化装置3が平文(M1・・・Mn)を暗号化する手順を示したフロー図である。   From here, the procedure which the encryption apparatus 3 performs is demonstrated. FIG. 6 is a flowchart showing a procedure in which the encryption device 3 encrypts plain text (M1... Mn).

暗号化装置3の暗号化部が平文(M1・・・Mn)を暗号化する際、まず、暗号化の対象となる平文(M1・・・Mn)と暗号化に利用する共通鍵(K)が暗号化装置3に指定される(S20)。平文(M1・・・Mn)及び共通鍵(K)が暗号化装置3に記憶されていない場合、平文(M1・・・Mn)及び共通鍵(K)は、操作者や外部装置によって暗号化装置3に入力されることになり、また、平文(M1・・・Mn)及び共通鍵(K)が暗号化装置3に記憶されている場合、暗号化装置3に記憶されている平文(M1・・・Mn)及び共通鍵(K)が、操作者や外部装置によって指定されることになる。   When the encryption unit of the encryption device 3 encrypts plaintext (M1... Mn), first, the plaintext (M1... Mn) to be encrypted and the common key (K) used for encryption. Is designated as the encryption device 3 (S20). When the plaintext (M1... Mn) and the common key (K) are not stored in the encryption device 3, the plaintext (M1... Mn) and the common key (K) are encrypted by the operator or an external device. When the plaintext (M1... Mn) and the common key (K) are stored in the encryption device 3, the plaintext (M1) stored in the encryption device 3 is input to the device 3. ... Mn) and the common key (K) are designated by an operator or an external device.

なお、ブロック暗号ではブロック長のブロック単位で処理するため、指定された平文のデータ長がブロック長の整数倍でない場合、データ長がブロック暗号のブロック長の整数倍になるように、PKCS#5などの規格に従い所定のデータがパディングされ、該平文は、n個の平文ブロック(Mi、i=1からn)に分割される。  Since block ciphers are processed in units of block length, if the data length of the specified plaintext is not an integral multiple of the block length, PKCS # 5 is set so that the data length is an integral multiple of the block cipher block length. Predetermined data is padded according to a standard such as, and the plaintext is divided into n plaintext blocks (Mi, i = 1 to n).

次に、暗号化装置3は、指定された共通鍵(K)をプリブロック生成部31に受け渡し、プリブロック生成部31は、共通鍵(K)からプリブロック(P)を生成し、生成したプリブロック(P)を暗号化部30へ受け渡す(S21)。  Next, the encryption device 3 passes the designated common key (K) to the pre-block generation unit 31, and the pre-block generation unit 31 generates and generates a pre-block (P) from the common key (K). The pre-block (P) is transferred to the encryption unit 30 (S21).

プリブロック生成部31がプリブロック(P)生成するときに利用する手法は、データ長がブロック暗号のブロック長の整数倍となれば任意でよく、このような手法としては、共通鍵(K)を該共通鍵(K)で暗号化する手法や、共通鍵(K)を所定の手順従いビットローテーションする手法、極端な例を挙げれば恒等関数を利用する手法が考えられる。   The method used when the pre-block generation unit 31 generates the pre-block (P) may be arbitrary as long as the data length is an integral multiple of the block length of the block cipher. As such a method, the common key (K) Can be encrypted with the common key (K), bit rotation can be performed according to a predetermined procedure for the common key (K), and an extreme example can be used.

加えて、共通鍵(K)から派生鍵を派生させ、プリブロック(P)を生成する手法も考えられる。例えば、この派生鍵により共通鍵(K)を暗号化、又は、共通鍵(K)によりこの派生鍵を暗号化することでプリブロック(P)を生成するようにすることもできるし、この派生鍵によりこの派生鍵自身を暗号化することでプリブロック(P)を生成することもできる。なお、派生鍵は、共通鍵(K)の所定のバイトをシフト又はローテートすることで派生させればよい。   In addition, a method of generating a pre-block (P) by deriving a derived key from the common key (K) is also conceivable. For example, the pre-block (P) can be generated by encrypting the common key (K) with this derived key, or encrypting this derived key with the common key (K). A pre-block (P) can also be generated by encrypting the derived key itself with a key. The derived key may be derived by shifting or rotating a predetermined byte of the common key (K).

更に、暗号鍵の拡張アルゴリズムなどを利用して、データ長がブロック暗号のブロック長の整数倍の派生ブロックを共通鍵(K)から派生させ、プリブロック(P)を生成する手法も考えられる。例えば、共通鍵(K)により、この派生ブロックを暗号化することでプリブロック(P)を生成するようにすることができる。なお、派生ブロックの暗号に用いる暗号鍵は、上述した派生鍵でも構わない。   Further, a method of generating a pre-block (P) by deriving a derived block whose data length is an integral multiple of the block cipher block length from the common key (K) using an encryption key extension algorithm or the like is also conceivable. For example, the pre-block (P) can be generated by encrypting this derived block with the common key (K). The encryption key used for the encryption of the derived block may be the above-described derived key.

プリブロック生成部31からプリブロック(P)が受け渡されると、暗号化装置3の暗号化部30は、プリブロック(P)を先頭に付加した平文(P,M1・・・Mn)を生成した後(S22)、該平文(P,M1・・・Mn)を、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードにて暗号化する(S23)。   When the preblock (P) is delivered from the preblock generation unit 31, the encryption unit 30 of the encryption device 3 generates plaintext (P, M1... Mn) with the preblock (P) added to the head. After that, the plaintext (P, M1... Mn) is encrypted in the ciphertext block chain mode according to a predetermined block cipher algorithm using the common key (K) (S23).

なお、暗号文ブロック連鎖モードでは、最初の平文ブロックから順に暗号化されるため、該平文(P,M1・・・Mn)の暗号結果は、プリブロック(P)に対応する暗号ブロック(Cp)と平文ブロック(Mi、i=1からn)に対応する暗号ブロック(Ci、i=1からn)を結合した暗号文(Cp,C1・・・Cn)になる。   In the ciphertext block chaining mode, since encryption is performed sequentially from the first plaintext block, the encryption result of the plaintext (P, M1... Mn) is the cipher block (Cp) corresponding to the pre-block (P). And ciphertext (Cp, C1... Cn) obtained by combining cipher blocks (Ci, i = 1 to n) corresponding to plaintext blocks (Mi, i = 1 to n).

そして、暗号化装置3の暗号化部は、平文(P,M1・・・Mn)を暗号化して得られた暗号文(Cp,C1・・・Cn)の先頭から、プリブロック(P)のデータ長のデータを除去することで、プリブロック(P)に対応する暗号ブロック(Cp)を除去する処理を行い、平文(M1・・・Mn)に対応する暗号文(C1・・・Cn)を生成して(S24)、図6で図示した手順は終了する。   Then, the encryption unit of the encryption device 3 starts from the top of the ciphertext (Cp, C1... Cn) obtained by encrypting the plaintext (P, M1. By removing the data of the data length, a process of removing the cipher block (Cp) corresponding to the pre-block (P) is performed, and the cipher text (C1... Cn) corresponding to the plain text (M1... Mn). (S24), and the procedure illustrated in FIG. 6 ends.

次に、復号装置4が実行する手順について説明する。図7は、復号装置4が暗号文(C1・・・Cn)を復号する手順を示したフロー図である。  Next, a procedure executed by the decoding device 4 will be described. FIG. 7 is a flowchart showing a procedure in which the decryption device 4 decrypts the ciphertext (C1... Cn).

復号装置4が暗号文(C1・・・Cn)を復号する際、復号の対象となる暗号文(C1・・・Cn)と共通鍵(K)が指定される(S30)。平文(M1・・・Mn)のデータ長はブロック暗号のブロック長の整数倍にパディングされた後に暗号化されるため、暗号文(C1・・・Cn)のデータ長は必ずブロック暗号のブロック長の整数倍になっており、図3において、暗号文(C1・・・Cn)は、n個の暗号文ブロック(Ci、i=1からn)に分割されている。   When the decryption device 4 decrypts the ciphertext (C1... Cn), the ciphertext (C1... Cn) to be decrypted and the common key (K) are designated (S30). Since the plaintext (M1... Mn) data length is encrypted after being padded to an integral multiple of the block cipher block length, the ciphertext (C1... Cn) data length is always the block cipher block length. In FIG. 3, the ciphertext (C1... Cn) is divided into n ciphertext blocks (Ci, i = 1 to n).

次に、復号装置4は、指定された共通鍵(K)をプリブロック生成部41に受け渡し、プリブロック生成部41は、所定の関数に共通鍵(K)を代入してプリブロック(P)を生成し、生成したプリブロック(P)を復号部40へ受け渡す(S31)。  Next, the decryption device 4 passes the designated common key (K) to the pre-block generation unit 41, and the pre-block generation unit 41 substitutes the common key (K) for a predetermined function to pre-block (P) And the generated pre-block (P) is transferred to the decoding unit 40 (S31).

プリブロック生成部41がプリブロック(P)生成するときに利用する手法は、データ長がブロック暗号のブロック長の整数倍となれば任意でよく、このような手法としては、共通鍵(K)を該共通鍵(K)で暗号化する手法や、共通鍵(K)を所定の手順従いビットローテーションする手法、極端な例を挙げれば恒等関数を利用する手法が考えられる。   The method used when the pre-block generation unit 41 generates the pre-block (P) may be arbitrary as long as the data length is an integral multiple of the block length of the block cipher. As such a method, the common key (K) Can be encrypted with the common key (K), bit rotation can be performed according to a predetermined procedure for the common key (K), and an extreme example can be used.

プリブロック生成部41がプリブロック(P)を生成すると、復号装置4の復号部40は、指定された共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードでプリブロック(P)を暗号化することで、プリブロック(P)に対応する暗号ブロック(Cp)を生成する(S32)。   When the pre-block generation unit 41 generates the pre-block (P), the decryption unit 40 of the decryption device 4 uses the designated common key (K) and pre-blocks in the ciphertext block chain mode according to a predetermined block cipher algorithm. By encrypting (P), a cipher block (Cp) corresponding to the pre-block (P) is generated (S32).

プリブロックに対応する暗号ブロックを生成すると、復号装置4の復号部40は、プリブロック(P)に対応する暗号ブロック(Cp)を除去する処理と逆の手順、すなわち、プリブロック(P)に対応する暗号ブロック(Cp)を先頭に付加した暗号文(Cp,C1・・・Cn)を生成した後(S33)、暗号化と逆の手順、すなわち、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードで、該暗号文(Cp,C1・・・Cn)を復号する(S34)。   When the encryption block corresponding to the pre-block is generated, the decryption unit 40 of the decryption device 4 performs the procedure reverse to the process of removing the encryption block (Cp) corresponding to the pre-block (P), that is, the pre-block (P). After generating a ciphertext (Cp, C1... Cn) prefixed with the corresponding cipher block (Cp) (S33), a procedure reverse to the encryption, that is, using a common key (K) In accordance with the block cipher algorithm, the ciphertext (Cp, C1... Cn) is decrypted in the ciphertext block chain mode (S34).

暗号文ブロック連鎖モードでは、最初のブロックから順に復号されるため、該暗号文(Cp,C1・・・Cn)の復号結果は、暗号ブロック(Cp)を復号したブロック、すなわち、プリブロック(P)と、暗号文(Ci、i=1からn)に対応する平文ブロック(Mi、i=1からn)を結合した平文(P、M1・・・Mn)になる。   In the ciphertext block chaining mode, since the decryption is performed sequentially from the first block, the decryption result of the ciphertext (Cp, C1... Cn) is the block obtained by decrypting the cipher block (Cp), that is, the pre-block (P ) And plaintext (P, M1... Mn) obtained by combining plaintext blocks (Mi, i = 1 to n) corresponding to ciphertext (Ci, i = 1 to n).

次に、復号装置4の復号部40は、平文(Cp,C1・・・Cn)の復号結果(P、M1・・・Mn)の先頭から、プリブロック(P)のデータ長のデータを除去することで、平文(P、M1・・・Mn)からプリブロック(P)を除去する処理を行い、暗号文(C1・・・Cn)に対応する平文(M1・・・Mn)を生成して(S35)、図7で図示した手順は終了する。   Next, the decryption unit 40 of the decryption device 4 removes the data having the data length of the pre-block (P) from the head of the decryption result (P, M1... Mn) of the plaintext (Cp, C1... Cn). By doing so, the process of removing the pre-block (P) from the plaintext (P, M1... Mn) is performed, and the plaintext (M1... Mn) corresponding to the ciphertext (C1... Cn) is generated. (S35), the procedure illustrated in FIG. 7 ends.

次に、暗号化装置3と復号装置4の実施例として、本発明に係る暗号化装置3及び復号装置4の機能を兼ね備えたICカード5について説明する。   Next, as an embodiment of the encryption device 3 and the decryption device 4, an IC card 5 having the functions of the encryption device 3 and the decryption device 4 according to the present invention will be described.

図8は、実施例2に係るICカード5を説明する図である。図8(a)では、ICカード5に実装されたICチップ6が有する回路・メモリを図示し、図8(a)に図示したように、ICカード5に実装されるICチップ6には、演算機能およびメモリを制御する機能を備えた中央演算装置60(CPU:Central Processing Unit)、外部装置とのデータの入出力に利用されるI/O回路61、揮発性メモリであるランダムアクセスメモリ62(RAM:Random Access Memory)、読み出し専用の不揮発性メモリ63(ROM:Read Only Memory、)、電気的に書換え可能な不揮発性メモリであるEEPROM64(EEPROM:Electrically Erasable Programmable Read-Only Memory)、DESの暗号演算に特化した回路であるコプロセッサ回路65、乱数を生成する回路であるRNG回路66(Random Number Generator)などが備えられ、CPU60とCPU60以外のメモリ及び回路はデータバス67及びアドレスバス68を介して接続されている。   FIG. 8 is a diagram illustrating the IC card 5 according to the second embodiment. FIG. 8A illustrates a circuit and a memory included in the IC chip 6 mounted on the IC card 5. As illustrated in FIG. 8A, the IC chip 6 mounted on the IC card 5 includes A central processing unit 60 (CPU: Central Processing Unit) having an arithmetic function and a function for controlling a memory, an I / O circuit 61 used for data input / output with an external device, and a random access memory 62 which is a volatile memory (RAM: Random Access Memory), read-only nonvolatile memory 63 (ROM: Read Only Memory), EEPROM 64 (EEPROM: Electrically Erasable Programmable Read-Only Memory), DES, The CPU 60 and the CPU 6 are provided with a coprocessor circuit 65 that is a circuit specialized for cryptographic operations, an RNG circuit 66 (Random Number Generator) that is a circuit that generates random numbers, and the like. Memory and circuits other than being connected via a data bus 67 and address bus 68.

なお、図8(a)では、DESの暗号演算に特化した回路であるコプロセッサ回路65を図示しているが、DESの暗号演算をコンピュータプログラムのみで実現することも可能であるため、DESの暗号演算に特化した回路であるコプロセッサ回路65が実装されないケースも考えられる。   In FIG. 8A, the coprocessor circuit 65, which is a circuit specialized for DES cryptographic operations, is illustrated. However, since DES cryptographic operations can be realized only by a computer program, DES There may be a case where the coprocessor circuit 65, which is a circuit specialized for the cryptographic operation, is not mounted.

図8(b)では、ICカードに実装されるコンピュータプログラムを図示し、図8(b)に図示したように、ICチップ6のROM63やEEPROM64には、所定のブロック暗号で利用する共通鍵(K)が記憶され、更に、ICカード1上で動作するコンピュータプログラムとして、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードで平文(M1・・・Mn)を暗号化する暗号化装置3の暗号化手段30として機能する暗号化モジュール50と、共通鍵(K)を用い、所定のブロック暗号のアルゴリズムに従い暗号文ブロック連鎖モードで暗号文(C1・・・Cn)を復号する復号装置4の復号手段40として機能する復号モジュール51と、暗号化装置3のプリブロック生成手段31又は復号装置4のプリブロック生成手段41として機能するプリブロック生成モジュール52が備えられ、図8(b)では、暗号化モジュール50を利用するコマンドの一例として内部認証コマンド53(Internal Authentication Command)を図示し、復号モジュール51を利用するコマンドの一例として外部認証コマンド54(External Authentication Command)を図示している。  FIG. 8B illustrates a computer program mounted on the IC card. As illustrated in FIG. 8B, the ROM 63 and the EEPROM 64 of the IC chip 6 have a common key (used for a predetermined block cipher ( K) is stored, and the plaintext (M1... Mn) is encrypted in the ciphertext block chaining mode according to a predetermined block cipher algorithm as a computer program operating on the IC card 1 using a common key (K). The ciphertext (C1... Cn) in the ciphertext block chain mode using the encryption module 50 functioning as the encryption means 30 of the encryption device 3 to be encrypted and the common key (K) according to a predetermined block cipher algorithm Decryption module 51 functioning as the decryption means 40 of the decryption device 4 for decrypting the data, and the pre-block generation means 31 or the decryption device of the encryption device 3 8 includes a pre-block generation module 52 that functions as the pre-block generation unit 41 of FIG. 4, and FIG. 8B illustrates an internal authentication command 53 (Internal Authentication Command) as an example of a command that uses the encryption module 50. As an example of a command using the decryption module 51, an external authentication command 54 (External Authentication Command) is illustrated.

暗号化モジュール50を利用する内部認証コマンド53は、JICSAP等のICカード規格に記載されているように、内部認証鍵(ここでは、共通鍵)を用いて、外部装置から送信されたチャレンジ(乱数)を暗号化することで内部認証コードを生成するコマンドで、内部認証鍵(ここでは、共通鍵)を用いて、外部装置から送信されたチャレンジ(乱数)を暗号化する際、図6で図示したように、暗号化モジュール50はプリブロック生成モジュール52を利用してプリブロック(P)を生成して、外部装置から送信されたチャレンジ(乱数)を暗号化する。   The internal authentication command 53 using the encryption module 50 is a challenge (random number) transmitted from an external device using an internal authentication key (here, a common key) as described in an IC card standard such as JICSAP. When encrypting a challenge (random number) transmitted from an external device using an internal authentication key (here, a common key) with a command that generates an internal authentication code by encrypting As described above, the encryption module 50 generates the pre-block (P) using the pre-block generation module 52 and encrypts the challenge (random number) transmitted from the external device.

復号モジュール51を利用する外部認証コマンド54は、JICSAP等のICカード規格に記載されているように、外部認証鍵(ここでは、共通鍵)を用いて、外部装置から送信された外部認証コードを復号し、ICカードが出力したチャレンジ(乱数)と復号結果を比較することで外部認証コードを認証するコマンドで、外部認証鍵(ここでは、共通鍵)を用いて、外部装置から送信された外部認証コードを復号する際、図7で図示したように、復号モジュール51はプリブロック生成モジュール52を利用してプリブロック(P)を生成して、外部装置から送信された外部認証コードを復号する。 As described in the IC card standard such as JICSAP, the external authentication command 54 using the decryption module 51 uses an external authentication key (here, a common key) to send an external authentication code transmitted from an external device. A command that authenticates the external authentication code by decrypting and comparing the decryption result with the challenge (random number) output from the IC card, and using the external authentication key (here, the common key) When decrypting the authentication code, as illustrated in FIG. 7, the decryption module 51 generates a pre-block (P) using the pre-block generation module 52 and decrypts the external authentication code transmitted from the external device. .

1 実施形態1に係る暗号化/復号システム
10 実施形態1に係る暗号化装置
11 実施形態1に係る復号装置
12 実施形態1に係るプリブロック生成装置
2 実施例1に係る暗号化/復号システム
20 暗号化装置として機能するパーソナルコンピュータ
21 復号装置として機能するパーソナルコンピュータ
22 プリブロック生成装置として機能するサーバ
3 実施形態2に係る暗号化装置
30 暗号化手段
31 プリブロック生成手段
4 実施形態2に係る復号装置
40 復号手段
41 プリブロック生成手段
5 実施例2に係るICカード
50 暗号化モジュール
51 復号モジュール
52 プリブロック生成モジュール
53 内部認証コマンド
54 外部認証コマンド
DESCRIPTION OF SYMBOLS 1 Encryption / decryption system according to Embodiment 1 10 Encryption device according to Embodiment 1 11 Decryption device according to Embodiment 1 12 Pre-block generation device according to Embodiment 1 2 Encryption / decryption system 20 according to Example 1 Personal computer that functions as an encryption device 21 Personal computer that functions as a decryption device 22 Server that functions as a pre-block generation device 3 Encryption device according to the second embodiment 30 Encryption means 31 Pre-block generation means 4 Decryption according to the second embodiment Device 40 Decryption Unit 41 Preblock Generation Unit 5 IC Card According to Embodiment 2 50 Encryption Module 51 Decryption Module 52 Preblock Generation Module 53 Internal Authentication Command 54 External Authentication Command

Claims (19)

平文を暗号化する暗号化装置が、平文の暗号化に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを先頭に付加した平文を共通鍵で暗号化した後、暗号化した結果から前記プリブロックに対応する暗号ブロックを除去することで平文の暗号文を生成するステップ、を含むことを特徴とする暗号化方法。  An encryption device for encrypting plaintext generates a pre-block that is an integral multiple of the block cipher block length from a block cipher common key used for plaintext encryption, based on a predetermined block cipher In the chain mode, after encrypting the plaintext with the preblock added at the head with a common key, generating a plaintext ciphertext by removing the encryption block corresponding to the preblock from the encrypted result; An encryption method comprising: 暗号文を復号する復号装置が、暗号文の復号に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを共通鍵で暗号化するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックの暗号ブロックを先頭に付加した暗号文を共通鍵で復号した後、復号した結果から前記プリブロックを除去することで暗号文の平文を生成するステップ、を含むことを特徴とする復号方法。  A step in which a decryption device for decrypting a ciphertext generates a pre-block that is an integral multiple of the block cipher block length from a block cipher common key used for decrypting the ciphertext, and a cipher block chain based on a predetermined block cipher Encrypting the pre-block with a common key in the mode, after decrypting the ciphertext prefixed with the cipher block of the pre-block with the common key in the cipher block chaining mode based on a predetermined block cipher And a step of generating plaintext of ciphertext by removing the pre-block from the decryption result. 平文の暗号化に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するプリブロック生成部と、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを先頭に付加した平文を共通鍵で暗号化した後、暗号化した結果から前記プリブロックに対応する暗号ブロックを除去することで平文の暗号文を生成する暗号化部と、を備えたことを特徴とする暗号化装置。  Based on a block cipher common key used for plaintext encryption, a preblock generation unit that generates a preblock that is an integral multiple of the block length of the block cipher, and a predetermined block cipher in the cipher block chaining mode, An encryption unit that generates a plaintext ciphertext by removing a cipher block corresponding to the preblock from the encrypted result after encrypting the plaintext with the preblock added at the head, and An encryption device characterized by that. 前記プリブロック生成部は、所定の手順に従い共通鍵のビットを操作することで、前記プリブロックを生成することを特徴とする、請求項3に記載の暗号化装置。   The encryption apparatus according to claim 3, wherein the pre-block generation unit generates the pre-block by manipulating bits of a common key according to a predetermined procedure. 前記プリブロック生成部は、共通鍵又は所定の手順に従いビットを操作した共通鍵により共通鍵を暗号化することで、前記プリブロックを生成することを特徴とする、請求項3に記載の暗号化装置。   The encryption according to claim 3, wherein the pre-block generation unit generates the pre-block by encrypting a common key using a common key or a common key obtained by manipulating bits according to a predetermined procedure. apparatus. 前記プリブロック生成部は、派生鍵を共通鍵から派生させ、該派生鍵により共通鍵を暗号化、又は、共通鍵により該派生鍵を暗号化することで前記プリブロックを生成することを特徴とする、請求項3に記載の暗号化装置。   The pre-block generation unit generates the pre-block by deriving a derived key from a common key, encrypting the common key with the derived key, or encrypting the derived key with the common key The encryption device according to claim 3. 前記プリブロック生成部は、派生鍵を共通鍵から派生させ、該派生鍵により該派生鍵を暗号化することで前記プリブロックを生成することを特徴とする、請求項3に記載の暗号化装置。   4. The encryption apparatus according to claim 3, wherein the pre-block generation unit generates the pre-block by deriving a derived key from a common key and encrypting the derived key with the derived key. . 前記プリブロック生成部は、データ長がブロック暗号のブロック長の整数倍の派生ブロックを共通鍵から派生させ、共通鍵により、該派生ブロックを暗号化することでプリブロックを生成することを特徴とする、請求項3に記載の暗号化装置。   The pre-block generation unit generates a pre-block by deriving a derived block whose data length is an integral multiple of the block length of the block cipher from a common key, and encrypting the derived block with the common key. The encryption device according to claim 3. 前記プリブロック生成部は、データ長がブロック暗号のブロック長の整数倍の派生ブロックと派生鍵を共通鍵から派生させ、該派生鍵により、該派生ブロックを暗号化することでプリブロックを生成することを特徴とする、請求項3に記載の暗号化装置。  The pre-block generation unit generates a pre-block by deriving a derived block and a derived key whose data length is an integral multiple of the block cipher block length from a common key, and encrypting the derived block with the derived key The encryption apparatus according to claim 3, wherein: 暗号文の復号に利用するブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成するプリブロック生成部と、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを共通鍵で暗号化するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックの暗号ブロックを暗号文の先頭に付加した暗号文を前記共通鍵で復号した後、復号した結果から前記プリブロックを除去することで暗号文の平文を生成する復号を備えたことを特徴とする復号装置。  Based on a pre-block generation unit that generates a pre-block that is an integral multiple of the block cipher block length from the block cipher common key used for decrypting the ciphertext, and based on a predetermined block cipher, in the cipher block chaining mode, Encrypting a pre-block with a common key, based on a predetermined block cipher, in a cipher block chaining mode, after decrypting the ciphertext with the pre-block cipher block added to the beginning of the ciphertext with the common key, A decryption apparatus comprising decryption for generating plaintext of ciphertext by removing the pre-block from the decryption result. 前記プリブロック生成部は、所定の手順に従い共通鍵のビットを操作することで、前記プリブロックを生成することを特徴とする、請求項10に記載の復号装置。   The decoding apparatus according to claim 10, wherein the pre-block generation unit generates the pre-block by manipulating bits of a common key according to a predetermined procedure. 前記プリブロック生成部は、共通鍵又は所定の手順に従いビットを操作した共通鍵により共通鍵を暗号化することで、前記プリブロックを生成することを特徴とする、請求項10に記載の復号装置。   The decryption apparatus according to claim 10, wherein the pre-block generation unit generates the pre-block by encrypting a common key using a common key or a common key obtained by manipulating bits according to a predetermined procedure. . 前記プリブロック生成部は、派生鍵を共通鍵から派生させ、該派生鍵により共通鍵を暗号化、又は、共通鍵により該派生鍵を暗号化することで前記プリブロックを生成することを特徴とする、請求項10に記載の復号装置。   The pre-block generation unit generates the pre-block by deriving a derived key from a common key, encrypting the common key with the derived key, or encrypting the derived key with the common key The decoding device according to claim 10. 前記プリブロック生成部は、派生鍵を共通鍵から派生させ、該派生鍵により該派生鍵を暗号化することで前記プリブロックを生成することを特徴とする、請求項10に記載の復号装置。   The decryption apparatus according to claim 10, wherein the pre-block generation unit generates the pre-block by deriving a derived key from a common key and encrypting the derived key with the derived key. 前記プリブロック生成部は、データ長がブロック暗号のブロック長の整数倍の派生ブロックを共通鍵から派生させ、共通鍵により、該派生ブロックを暗号化することでプリブロックを生成することを特徴とする、請求項10に記載の復号装置。   The pre-block generation unit generates a pre-block by deriving a derived block whose data length is an integral multiple of the block length of the block cipher from a common key, and encrypting the derived block with the common key. The decoding device according to claim 10. 前記プリブロック生成部は、データ長がブロック暗号のブロック長の整数倍の派生ブロックと派生鍵を共通鍵から派生させ、該派生鍵により、該派生ブロックを暗号化することでプリブロックを生成することを特徴とする、請求項10に記載の復号装置。  The pre-block generation unit generates a pre-block by deriving a derived block and a derived key whose data length is an integral multiple of the block cipher block length from a common key, and encrypting the derived block with the derived key The decoding device according to claim 10, wherein: 他の装置とVPN(Virtual Private Network)を構築し、他の装置から受信したブロック暗号の共通鍵から、ブロック暗号のブロック長の整数倍となるプリブロックを生成し、生成した前記プリブロックを前記他の装置へ送信するプリブロック生成装置と、
平文を暗号化する際、前記プリブロック生成装置とVPNを構築し、平文の暗号化に利用する共通鍵を前記プリブロック生成装置へ送信し、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロック生成装置から受信した前記プリブロックを先頭に付加した平文を共通鍵で暗号化した後、暗号化した結果から前記プリブロックに対応する暗号ブロックを除去することで平文の暗号文を生成する暗号化装置と、
前記プリブロック生成装置とVPNを構築し、前記暗号化装置が生成した暗号文の復号に利用する共通鍵を前記プリブロック生成装置へ送信し、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロックを共通鍵で暗号化するステップ、所定のブロック暗号に基づき、暗号ブロック連鎖モードにて、前記プリブロック生成装置から受信した前記プリブロックの暗号ブロックを先頭に付加した暗号文を共通鍵で復号した後、復号した結果から前記プリブロックを除去することで暗号文の平文を生成する復号装置と、
から少なくとも構成されることを特徴とする暗号化/復号システム。
A VPN (Virtual Private Network) is constructed with another device, a pre-block that is an integral multiple of the block cipher block length is generated from the block cipher common key received from the other device, and the generated pre-block is A pre-block generation device that transmits to another device;
When encrypting plaintext, construct a VPN with the pre-block generation device, send a common key to be used for plaintext encryption to the pre-block generation device, and in cipher block chaining mode based on a predetermined block cipher Then, after encrypting the plaintext added with the preblock received from the preblock generation device with a common key, the ciphertext corresponding to the preblock is removed from the encrypted result by removing the encrypted block corresponding to the preblock. An encryption device to generate;
A VPN is constructed with the pre-block generation device, and a common key used for decrypting the ciphertext generated by the encryption device is transmitted to the pre-block generation device, and in a cipher block chaining mode based on a predetermined block cipher A step of encrypting the pre-block with a common key, based on a predetermined block cipher, in a cipher block chaining mode, a ciphertext prefixed with the pre-block cipher block received from the pre-block generation device is shared A decryption device that generates plaintext of ciphertext by removing the pre-block from the decryption result after decryption with the key;
An encryption / decryption system comprising:
前記プリブロック生成装置は、所定の手順に従い共通鍵をビットローテーションすることで、前記プリブロックを生成することを特徴とする、請求項17に記載の暗号化/復号システム。   18. The encryption / decryption system according to claim 17, wherein the pre-block generation device generates the pre-block by bit-rotating a common key according to a predetermined procedure. 前記プリブロック生成装置は、共通鍵を共通鍵自身で暗号化することで、前記プリブロックを生成することを特徴とする、請求項17に記載の暗号化/復号システム。
18. The encryption / decryption system according to claim 17, wherein the pre-block generation device generates the pre-block by encrypting a common key with the common key itself.
JP2011027520A 2011-02-10 2011-02-10 Encryption method, decryption method, encryption device, decryption device, and encryption / decryption system Active JP5672037B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011027520A JP5672037B2 (en) 2011-02-10 2011-02-10 Encryption method, decryption method, encryption device, decryption device, and encryption / decryption system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011027520A JP5672037B2 (en) 2011-02-10 2011-02-10 Encryption method, decryption method, encryption device, decryption device, and encryption / decryption system

Publications (2)

Publication Number Publication Date
JP2012168274A true JP2012168274A (en) 2012-09-06
JP5672037B2 JP5672037B2 (en) 2015-02-18

Family

ID=46972510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011027520A Active JP5672037B2 (en) 2011-02-10 2011-02-10 Encryption method, decryption method, encryption device, decryption device, and encryption / decryption system

Country Status (1)

Country Link
JP (1) JP5672037B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015158665A (en) * 2014-02-21 2015-09-03 韓國電子通信研究院Electronics and Telecommunications Research Institute Variable-length block encrypting device and method for form storage encryption

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275857B (en) * 2016-06-21 2022-02-01 创新先进技术有限公司 Control method of intelligent lock and intelligent lock

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7025A (en) * 1850-01-15 Buckle
US8017A (en) * 1851-04-01 Splint-machine
US8010A (en) * 1851-04-01 Peter mckinlay
JP2002500388A (en) * 1997-12-26 2002-01-08 サン・マイクロシステムズ・インコーポレーテッド System and method for deriving an initialization vector suitable for secure communication
JP2005167635A (en) * 2003-12-02 2005-06-23 Ntt Docomo Inc Apparatus, and data transmission reception method
JP2007013503A (en) * 2005-06-29 2007-01-18 Seiko Precision Inc Encryption device and method and decryption device and method
JP2010140026A (en) * 2008-12-15 2010-06-24 Thomson Licensing Method and device for encryption chained mode
JP2010185982A (en) * 2009-02-10 2010-08-26 Toshiba Storage Device Corp Encryption device, decryption device, and storage device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7025A (en) * 1850-01-15 Buckle
US8017A (en) * 1851-04-01 Splint-machine
US8010A (en) * 1851-04-01 Peter mckinlay
JP2002500388A (en) * 1997-12-26 2002-01-08 サン・マイクロシステムズ・インコーポレーテッド System and method for deriving an initialization vector suitable for secure communication
JP2005167635A (en) * 2003-12-02 2005-06-23 Ntt Docomo Inc Apparatus, and data transmission reception method
JP2007013503A (en) * 2005-06-29 2007-01-18 Seiko Precision Inc Encryption device and method and decryption device and method
JP2010140026A (en) * 2008-12-15 2010-06-24 Thomson Licensing Method and device for encryption chained mode
JP2010185982A (en) * 2009-02-10 2010-08-26 Toshiba Storage Device Corp Encryption device, decryption device, and storage device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015158665A (en) * 2014-02-21 2015-09-03 韓國電子通信研究院Electronics and Telecommunications Research Institute Variable-length block encrypting device and method for form storage encryption

Also Published As

Publication number Publication date
JP5672037B2 (en) 2015-02-18

Similar Documents

Publication Publication Date Title
US11233659B2 (en) Method of RSA signature or decryption protected using a homomorphic encryption
RU2647685C2 (en) Authenticated encryption device, authenticated encryption method and program for authenticated encryption
JP5855696B2 (en) Block encryption method and block decryption method including integrity verification
RU2005104945A (en) EFFECTIVE ENCRYPTION AND AUTHENTICATION FOR DATA PROCESSING SYSTEMS
JP2004355615A5 (en)
JP6877889B2 (en) Cryptographic device, encryption method, decryption device, and decryption method
JP2011010291A (en) Generating session key for authentication and secure data transfer
US9565018B2 (en) Protecting cryptographic operations using conjugacy class functions
CN104660590B (en) A kind of file encryption secure cloud storage scheme
JPWO2011105367A1 (en) Block encryption device, block decryption device, block encryption method, block decryption method, and program
KR20120072011A (en) Data encoding and decoding apparatus capable of verifying integrity
CN110868291B (en) Data encryption transmission method, device, system and storage medium
CN109450615A (en) A kind of efficient OPC UA client and server data transfer encryption method
KR20130093557A (en) System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction
Reyad et al. Key-based enhancement of data encryption standard for text security
US20210266175A1 (en) Device for data encryption and integrity
JP5171787B2 (en) Sign-encryption system and sign-encryption generation method
JP5672037B2 (en) Encryption method, decryption method, encryption device, decryption device, and encryption / decryption system
US11093213B1 (en) Cryptographic computer machines with novel switching devices
JP6631989B2 (en) Encryption device, control method, and program
TWI675578B (en) Encryption and decryption system, encryption device, decryption device and encryption and decryption method
JP2005309148A (en) Data converter and the data conversion method
Kumar et al. Handling secure healthcare data streaming using R2E algorithm
CN103475466A (en) USBKey bus protection implementation method
KR20110042419A (en) Mode of operation adapted to multimedia environments

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20130823

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140812

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140826

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141020

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141208

R150 Certificate of patent or registration of utility model

Ref document number: 5672037

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150