JP7063628B2 - Cryptographic devices, encryption methods and programs - Google Patents

Cryptographic devices, encryption methods and programs Download PDF

Info

Publication number
JP7063628B2
JP7063628B2 JP2018002875A JP2018002875A JP7063628B2 JP 7063628 B2 JP7063628 B2 JP 7063628B2 JP 2018002875 A JP2018002875 A JP 2018002875A JP 2018002875 A JP2018002875 A JP 2018002875A JP 7063628 B2 JP7063628 B2 JP 7063628B2
Authority
JP
Japan
Prior art keywords
common key
subkey
key
held
holding means
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018002875A
Other languages
Japanese (ja)
Other versions
JP2019124713A (en
Inventor
由利 樋口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Platforms Ltd
Original Assignee
NEC Platforms 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 NEC Platforms Ltd filed Critical NEC Platforms Ltd
Priority to JP2018002875A priority Critical patent/JP7063628B2/en
Publication of JP2019124713A publication Critical patent/JP2019124713A/en
Application granted granted Critical
Publication of JP7063628B2 publication Critical patent/JP7063628B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、暗号化装置、復号装置、回線暗号システム、暗号化方法およびプログラムに関する。特に、ブロック暗号を用いた暗号化装置、復号装置、回線暗号システム、暗号化方法およびプログラムに関する。 The present invention relates to an encryption device, a decryption device, a line encryption system, an encryption method and a program. In particular, the present invention relates to an encryption device using a block cipher, a decryption device, a line encryption system, an encryption method and a program.

情報化社会の発展に伴って、情報の漏洩や改ざんなどのリスクが高まっている。情報の安全性や信頼性を確保するためには情報セキュリティ技術が重要である。情報セキュリティ技術を構成する1つの要素として暗号化技術が挙げられる。暗号化技術は、ハードウェアやソフトウェアを問わず様々な製品で利用されている。 With the development of the information-oriented society, the risk of information leakage and falsification is increasing. Information security technology is important to ensure the security and reliability of information. Encryption technology is one of the elements that make up information security technology. Encryption technology is used in various products regardless of hardware or software.

暗号化技術は、公開鍵暗号方式と共通鍵暗号方式という2つの方式に大別される。公開鍵暗号方式では、誰でも取得できる公開鍵と、受信側のみが保持する秘密鍵との2種類の鍵が使用される。公開鍵暗号方式は、鍵の受け渡しが容易であることが特徴である。一方、共通鍵暗号方式は、共通鍵と呼ばれる同一の鍵が使用される。共通鍵暗号方式は、仕組みがシンプルであるために処理が速いのが特徴である。 Encryption technology is roughly divided into two methods, a public key cryptosystem and a common key cryptosystem. In public key cryptography, two types of keys are used: a public key that can be obtained by anyone and a private key that is held only by the receiving side. The public key cryptosystem is characterized by easy key transfer. On the other hand, in the common key cryptosystem, the same key called a common key is used. The common key cryptosystem is characterized by its fast processing due to its simple mechanism.

共通鍵暗号方式を暗号アルゴリズムのタイプで分類すると、ストリーム暗号とブロック暗号の2つに分けられる。ストリーム暗号は、1バイトなどの細かい単位で処理を行う暗号アルゴリズムである。一方、ブロック暗号は、暗号化処理の単位をブロックと呼ばれる一定長のまとまりに分けて処理を行う暗号アルゴリズムである。ブロック暗号は、ラウンドと呼ばれる繰り返し処理を行う構造を有する。ブロック暗号では、鍵スケジュール部が各ラウンドで使用するサブ鍵を生成し、データスクランブル部が各サブ鍵を使用して平文を暗号文に変換する。ブロック暗号は、大量のデータを暗号化するのに適している。 When the common key cryptosystem is classified by the type of cryptographic algorithm, it can be divided into two types: stream cipher and block cipher. Stream cipher is a cryptographic algorithm that performs processing in small units such as 1 byte. On the other hand, the block cipher is a cryptographic algorithm that divides the unit of encryption processing into a group called a block and performs processing. The block cipher has a structure that performs iterative processing called a round. In the block cipher, the key schedule unit generates a subkey to be used in each round, and the data scramble unit uses each subkey to convert plaintext into ciphertext. Block ciphers are suitable for encrypting large amounts of data.

特許文献1には、共通鍵ブロック暗号処理を実行する暗号処理装置について開示されている。特許文献1の装置は、ラウンド関数を複数ラウンド繰り返すデータ変換処理を行なう暗号処理部と、ラウンド関数の実行に適用するラウンド鍵を生成する鍵スケジュール部とを有する。鍵スケジュール部は、暗号処理部で利用するラウンド関数を含む暗号化関数に秘密鍵を入力して中間鍵を生成する中間鍵生成部と、中間鍵生成部の生成する中間鍵を入力してラウンド鍵を生成する中間鍵拡大部とを有する。 Patent Document 1 discloses a cryptographic processing apparatus that executes common key block cipher processing. The apparatus of Patent Document 1 has a cryptographic processing unit that performs data conversion processing that repeats a round function for a plurality of rounds, and a key schedule unit that generates a round key to be applied to the execution of the round function. The key schedule unit inputs an intermediate key generator that generates an intermediate key by inputting a private key into an encryption function including a round function used in the encryption processing unit, and an intermediate key generator that generates an intermediate key. It has an intermediate key expansion unit that generates a key.

ブロック暗号の手法の一つとして、大量のデータを高速に暗号化するためにサブ鍵の生成回数を限定する手法がある。例えば、鍵スケジュール部の処理を最初のブロックでのみ行い、鍵スケジュール部が生成したサブ鍵をレジスタやメモリなどの記憶部に格納させる。2回目以降の暗号ブロックでは、記憶部に格納されたサブ鍵を使用して平文の暗号化を行う。この手法を用いる場合は、安全に暗号化処理を行うために、共通鍵だけではなくサブ鍵を管理する。 As one of the block cipher methods, there is a method of limiting the number of times a subkey is generated in order to encrypt a large amount of data at high speed. For example, the processing of the key schedule unit is performed only in the first block, and the subkey generated by the key schedule unit is stored in a storage unit such as a register or a memory. In the second and subsequent encryption blocks, plaintext is encrypted using the subkey stored in the storage unit. When this method is used, not only the common key but also the subkey is managed in order to perform the encryption process safely.

特開2008-058831号公報Japanese Unexamined Patent Publication No. 2008-058831

一般的な共通鍵暗号方式のブロック暗号の暗号化処理では、共通鍵を記憶部に格納し、暗号化処理を行うたびに鍵スケジュールを実行するため、大量のデータを暗号化処理する場合に時間が掛かるという問題点があった。 In the block encryption processing of the general common key encryption method, the common key is stored in the storage unit and the key schedule is executed each time the encryption processing is performed. There was a problem that it was hung.

また、特許文献1の装置は、平文を暗号化する際に、秘密鍵や中間鍵、ラウンド鍵などの複数の種類の鍵を用いることによって鍵解析の困難性を高めることができる。しかしながら、特許文献1の装置には、鍵の管理が複雑になるという問題点があった。 Further, the device of Patent Document 1 can increase the difficulty of key analysis by using a plurality of types of keys such as a private key, an intermediate key, and a round key when encrypting plaintext. However, the device of Patent Document 1 has a problem that key management becomes complicated.

また、サブ鍵の生成回数を限定する手法によれば、大量のデータを高速に暗号化できる。しかしながら、この手法の場合、共通鍵に加えて、鍵スケジュールにより生成したサブ鍵も記憶部に格納するため、鍵の漏洩や改ざんなどのリスクが高まるという問題点があった。 Further, according to the method of limiting the number of times of subkey generation, a large amount of data can be encrypted at high speed. However, in the case of this method, in addition to the common key, the subkey generated by the key schedule is also stored in the storage unit, so that there is a problem that the risk of key leakage or falsification increases.

本発明の目的は、上述した課題を解決するために、処理性能に影響を与えることなく、大量のデータを安全かつ高速に暗号化できる暗号化装置を提供することにある。 An object of the present invention is to provide an encryption device capable of securely and high-speed encryption of a large amount of data without affecting the processing performance in order to solve the above-mentioned problems.

本発明の一態様の暗号化装置は、第1共通鍵を保持する第1共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成部と、サブ鍵生成部によって生成されるサブ鍵を保持するサブ鍵保持部と、サブ鍵保持部に保持されたサブ鍵を取得して第2共通鍵を復号する共通鍵復号部と、共通鍵復号部によって復号される第2共通鍵を保持する第2共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵と、第2共通鍵保持部に保持された第2共通鍵とを比較する共通鍵比較部と、サブ鍵保持部に保持されたサブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する暗号化部と、共通鍵比較部による第1共通鍵と第2共通鍵との比較結果と、暗号化部によって生成された暗号文ブロックとが入力され、共通鍵比較部による比較結果に基づいて暗号文ブロックを出力するか否かを判定する出力判定部とを備える。 In the encryption device of one aspect of the present invention, at least one subkey from the first common key holder holding the first common key and the first common key held in the first common key holder is key-scheduled. A common key that acquires a subkey generator to generate, a subkey holder that holds the subkey generated by the subkey generator, and a subkey held by the subkey holder to decrypt the second common key. The decryption unit, the second common key holder that holds the second common key decrypted by the common key decryption unit, the first common key held by the first common key holder, and the second common key holder. A common key comparison unit that compares the held second common key, an encryption unit that encrypts a plain text block using the sub key held in the sub key holder, and generates an encryption block, and a common key comparison. Whether or not the comparison result between the first common key and the second common key by the unit and the encryption text block generated by the encryption unit are input and the encryption text block is output based on the comparison result by the common key comparison unit. It is provided with an output determination unit for determining whether or not.

本発明の一態様の復号装置は、第1共通鍵を保持する第1共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成部と、サブ鍵生成部によって生成されるサブ鍵を保持するサブ鍵保持部と、サブ鍵保持部に保持されたサブ鍵を取得して第2共通鍵を復号する共通鍵復号部と、共通鍵復号部によって復号される第2共通鍵を保持する第2共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵と、第2共通鍵保持部に保持された第2共通鍵とを比較する共通鍵比較部と、サブ鍵保持部に保持されたサブ鍵を用いて暗号文ブロックから平文ブロックを復号する復号部と、共通鍵比較部による第1共通鍵と第2共通鍵との比較結果と、復号部によって復号された平文ブロックとが入力され、共通鍵比較部による比較結果に基づいて平文ブロックを出力するか否かを判定する出力判定部とを備える。 The decryption device of one aspect of the present invention generates at least one subkey from the first common key holding unit holding the first common key and the first common key held in the first common key holding unit by a key schedule. Sub-key generation unit, sub-key holding unit that holds the sub-key generated by the sub-key generation unit, and common key decryption that acquires the sub-key held in the sub-key holding unit and decrypts the second common key. A unit, a second common key holding unit that holds the second common key decrypted by the common key decrypting unit, a first common key held in the first common key holding unit, and a second common key holding unit. A common key comparison unit that compares the second common key that has been created, a decryption unit that decrypts a plain text block from a cryptographic text block using the subkey held in the subkey holding unit, and a first common key comparison unit. An output determination unit that inputs the comparison result between the key and the second common key and the plain text block decoded by the decoding unit, and determines whether or not to output the plain text block based on the comparison result by the common key comparison unit. To prepare for.

本発明の一態様の回線暗号システムは、第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成されたサブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成するとともに、生成されたサブ鍵を用いて第2共通鍵を復号して、第1共通鍵と第2共通鍵との比較結果に基づいて暗号文ブロックを出力するか否かを判定する暗号化装置と、第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成されたサブ鍵を用いて暗号文ブロックから平文ブロックを復号するとともに、生成されたサブ鍵を用いて第2共通鍵を復号して、第1共通鍵と第2共通鍵との比較結果に基づいて平文ブロックを出力するか否かを判定する復号装置とを備え、暗号化装置は、平文ブロックを暗号化した暗号文ブロックを復号装置に送信し、復号装置は、暗号化装置から受信した暗号文ブロックから平文ブロックを復号する。 The line encryption system of one aspect of the present invention generates at least one subkey from the first common key in a key schedule, encrypts a plain text block using the generated subkey, and generates a cryptographic block. An encryption device that decrypts the second common key using the generated subkey and determines whether to output a ciphertext block based on the comparison result between the first common key and the second common key. At least one subkey is generated from the first common key in the key schedule, the plain text block is decrypted from the ciphertext block using the generated subkey, and the second common key is decrypted using the generated subkey. Then, the encryption device is provided with a decryption device that determines whether or not to output the plain text block based on the comparison result between the first common key and the second common key, and the encryption device is an encrypted text block in which the plain text block is encrypted. Is transmitted to the decryption device, and the decryption device decrypts the plain text block from the ciphertext block received from the encryption device.

本発明の一態様の暗号化方法においては、第1共通鍵を第1共通鍵保持部に保持し、第1共通鍵保持部に保持された第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成されたサブ鍵をサブ鍵保持部に保持し、サブ鍵保持部に保持されたサブ鍵を用いて第2共通鍵を復号し、復号された第2共通鍵を第2共通鍵保持部に保持し、第1共通鍵保持部に保持された第1共通鍵と、第2共通鍵保持部に保持された第2共通鍵とを比較し、サブ鍵保持部に保持されたサブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成し、第1共通鍵と第2共通鍵との比較結果に基づいて暗号文ブロックを出力するか否かを判定する。 In the encryption method of one aspect of the present invention, the first common key is held in the first common key holding unit, and at least one subkey from the first common key held in the first common key holding unit is key-scheduled. The generated subkey is held in the subkey holder, the second common key is decrypted using the subkey held in the subkey holder, and the decrypted second common key is used in the second common. The first common key held in the key holding unit and held in the first common key holding unit is compared with the second common key held in the second common key holding unit, and held in the sub key holding unit. The plain text block is encrypted using the sub key to generate the cipher text block, and it is determined whether or not to output the cipher text block based on the comparison result between the first common key and the second common key.

本発明の一態様のプログラムは、第1共通鍵を第1共通鍵保持部に保持する処理と、第1共通鍵保持部に保持された第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成する処理と、生成されたサブ鍵をサブ鍵保持部に保持する処理と、サブ鍵保持部に保持されたサブ鍵を用いて第2共通鍵を復号する処理と、復号された第2共通鍵を第2共通鍵保持部に保持する処理と、第1共通鍵保持部に保持された第1共通鍵と、第2共通鍵保持部に保持された第2共通鍵とを比較する処理と、サブ鍵保持部に保持されたサブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する処理と、第1共通鍵と第2共通鍵との比較結果に基づいて暗号文ブロックを出力するか否かを判定する処理とをコンピュータに実行させるプログラム。 In the program of one aspect of the present invention, the process of holding the first common key in the first common key holder and at least one subkey from the first common key held in the first common key holder are key-scheduled. The process of generating, the process of holding the generated subkey in the subkey holder, the process of decrypting the second common key using the subkey held in the subkey holder, and the process of decrypting the second common The process of holding the key in the second common key holder and the process of comparing the first common key held in the first common key holder with the second common key held in the second common key holder. , The process of encrypting a plain text block using the sub key held in the sub key holder to generate a cryptographic block, and outputting the cipher block based on the comparison result between the first common key and the second common key. A program that causes a computer to execute a process that determines whether or not to do so.

本発明によれば、処理性能に影響を与えることなく、大量のデータを安全かつ高速に暗号化できる暗号化装置を提供することが可能になる。 According to the present invention, it is possible to provide an encryption device capable of securely and at high speed encrypting a large amount of data without affecting the processing performance.

本発明の第1の実施形態に係る暗号化装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the encryption apparatus which concerns on 1st Embodiment of this invention. 本発明の第1の実施形態に係る暗号化装置の動作例について説明するためのフローチャートである。It is a flowchart for demonstrating the operation example of the encryption apparatus which concerns on 1st Embodiment of this invention. 本発明の第2の実施形態に係る暗号化装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the encryption apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2の実施形態に係る暗号化装置の動作例について説明するためのフローチャートである。It is a flowchart for demonstrating the operation example of the encryption apparatus which concerns on 2nd Embodiment of this invention. 本発明の第3の実施形態に係る暗号化装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the encryption apparatus which concerns on 3rd Embodiment of this invention. 本発明の第3の実施形態に係る暗号化装置の動作例について説明するためのフローチャートである。It is a flowchart for demonstrating the operation example of the encryption apparatus which concerns on 3rd Embodiment of this invention. 本発明の第4の実施形態に係る暗号化装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the encryption apparatus which concerns on 4th Embodiment of this invention. 本発明の第4の実施形態に係る暗号化装置の動作例について説明するためのフローチャートである。It is a flowchart for demonstrating the operation example of the encryption apparatus which concerns on 4th Embodiment of this invention. 本発明の第5の実施形態に係る暗号化装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the encryption apparatus which concerns on 5th Embodiment of this invention. 本発明の第5の実施形態に係る暗号化装置の動作例について説明するためのフローチャートである。It is a flowchart for demonstrating the operation example of the encryption apparatus which concerns on 5th Embodiment of this invention. 本発明の第6の実施形態に係る復号装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the decoding apparatus which concerns on 6th Embodiment of this invention. 本発明の第7の実施形態に係る回線暗号システムの構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the line encryption system which concerns on 7th Embodiment of this invention. 本発明の各実施形態に係る暗号化装置および復号装置のハードウェア構成例を示すブロック図である。It is a block diagram which shows the hardware configuration example of the encryption apparatus and the decryption apparatus which concerns on each embodiment of this invention.

以下に、本発明を実施するための形態について図面を用いて説明する。ただし、以下に述べる実施形態には、本発明を実施するために技術的に好ましい限定がされているが、発明の範囲を以下に限定するものではない。また、以下の実施形態の説明に用いる全図においては、特に理由がない限り、同様箇所には同一符号を付す。また、以下の実施形態において、同様の構成・動作に関しては繰り返しの説明を省略する場合がある。また、図面中の矢印の向きは、一例を示すものであり、信号の向きを限定するものではない。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. However, although the embodiments described below have technically preferable limitations for carrying out the present invention, the scope of the invention is not limited to the following. Further, in all the drawings used in the following embodiments, the same reference numerals are given to the same parts unless there is a specific reason. Further, in the following embodiments, repeated explanations may be omitted for similar configurations and operations. Further, the direction of the arrow in the drawing shows an example and does not limit the direction of the signal.

(第1の実施形態)
まず、本発明の第1の実施形態の暗号化装置について図面を参照しながら説明する。本実施形態の暗号化装置には、暗号化対象データ(対象データとも呼ぶ)を構成する少なくとも一つの平文ブロックと、平文ブロックを暗号化するための共通鍵とが入力される。本実施形態の暗号化装置は、共通鍵からサブ鍵を生成し、生成したサブ鍵を用いて平文ブロックを暗号化することによって暗号文ブロックを生成する。なお、本実施形態の暗号化装置は、予め記憶された共通鍵を用いて平文ブロックを暗号化ブロックに暗号化するように構成してもよい。
(First Embodiment)
First, the encryption device according to the first embodiment of the present invention will be described with reference to the drawings. In the encryption device of the present embodiment, at least one plaintext block constituting the encryption target data (also referred to as target data) and a common key for encrypting the plaintext block are input. The encryption device of the present embodiment generates a ciphertext block by generating a subkey from a common key and encrypting the plaintext block using the generated subkey. The encryption device of the present embodiment may be configured to encrypt a plaintext block into an encryption block using a common key stored in advance.

(構成)
図1は、本実施形態の暗号化装置1の構成の一例を示すブロック図である。図1のように、暗号化装置1は、第1共通鍵保持部11、鍵スケジュール部12、サブ鍵保持部13、共通鍵復号部14、第2共通鍵保持部15、共通鍵比較部16、データスクランブル部17、出力判定部18を備える。
(Constitution)
FIG. 1 is a block diagram showing an example of the configuration of the encryption device 1 of the present embodiment. As shown in FIG. 1, the encryption device 1 includes a first common key holding unit 11, a key schedule unit 12, a sub key holding unit 13, a common key decryption unit 14, a second common key holding unit 15, and a common key comparison unit 16. , A data scramble unit 17, and an output determination unit 18.

第1共通鍵保持部11(第1共通鍵保持手段とも呼ぶ)は、入力された共通鍵(以下、第1共通鍵とも呼ぶ)を保持する。例えば、第1共通鍵保持部11は、レジスタやメモリによって実現される。 The first common key holding unit 11 (also referred to as a first common key holding means) holds an input common key (hereinafter, also referred to as a first common key). For example, the first common key holding unit 11 is realized by a register or a memory.

鍵スケジュール部12(サブ鍵生成手段とも呼ぶ)は、第1共通鍵保持部11に保持された第1共通鍵を取得する。鍵スケジュール部12は、取得した第1共通鍵からサブ鍵を生成する。例えば、鍵スケジュール部12は、全てのラウンドで用いられるN個のサブ鍵を第1共通鍵から生成する(Nは自然数)。鍵スケジュール部12は、生成したサブ鍵をサブ鍵保持部13に記憶させる。 The key schedule unit 12 (also referred to as a sub-key generation means) acquires the first common key held by the first common key holding unit 11. The key schedule unit 12 generates a subkey from the acquired first common key. For example, the key schedule unit 12 generates N subkeys used in all rounds from the first common key (N is a natural number). The key schedule unit 12 stores the generated subkey in the subkey holding unit 13.

例えば、鍵スケジュール部12は、AES(Advanced Encryption Standard)などの共通鍵方式のブロック暗号アルゴリズムを用いて鍵スケジュールを行う。なお、鍵スケジュール部12は、DES(Data Encryption Standard)やトリプルDESなどのブロック暗号アルゴリズムを用いて鍵スケジュールを行ってもよい。また、鍵スケジュール部12は、MISTY1(Mitsubishi Improved Security Technology)やCameliaなどのブロック暗号アルゴリズムを用いて鍵スケジュールを行ってもよい。ただし、鍵スケジュール部12による鍵スケジュールは、ここで挙げた手法に限定されない。 For example, the key schedule unit 12 performs a key schedule using a block cipher algorithm of a common key method such as AES (Advanced Encryption Standard). The key schedule unit 12 may perform a key schedule using a block encryption algorithm such as DES (Data Encryption Standard) or triple DES. Further, the key schedule unit 12 may perform a key schedule using a block cipher algorithm such as MISTY1 (Mitsubishi Improved Security Technology) or Camelia. However, the key schedule by the key schedule unit 12 is not limited to the method described here.

サブ鍵保持部13(サブ鍵保持手段とも呼ぶ)は、鍵スケジュール部12によって生成されたサブ鍵が記憶される。例えば、サブ鍵保持部13は、レジスタやメモリによって実現される。 The sub-key holding unit 13 (also referred to as a sub-key holding means) stores the sub-key generated by the key schedule unit 12. For example, the sub-key holding unit 13 is realized by a register or a memory.

共通鍵復号部14(共通鍵復号手段とも呼ぶ)は、サブ鍵保持部13に記憶されたサブ鍵から共通鍵(以下、第2共通鍵とも呼ぶ)を復号する。例えば、共通鍵復号部14は、サブ鍵保持部13に格納されたN個のサブ鍵から第2共通鍵を復号する(Nは自然数)。共通鍵復号部14は、復号された第2共通鍵を第2共通鍵保持部15に保持させる。 The common key decryption unit 14 (also referred to as a common key decryption means) decodes a common key (hereinafter, also referred to as a second common key) from the subkey stored in the subkey holding unit 13. For example, the common key decryption unit 14 decodes the second common key from the N subkeys stored in the subkey holding unit 13 (N is a natural number). The common key decryption unit 14 causes the second common key holding unit 15 to hold the decrypted second common key.

第2共通鍵保持部15(第2共通鍵保持手段とも呼ぶ)は、共通鍵復号部14によって復号された第2共通鍵を保持する。例えば、第2共通鍵保持部15は、レジスタやメモリによって実現される。 The second common key holding unit 15 (also referred to as a second common key holding means) holds the second common key decrypted by the common key decoding unit 14. For example, the second common key holding unit 15 is realized by a register or a memory.

共通鍵比較部16(共通鍵比較手段とも呼ぶ)は、第1共通鍵保持部11に保持された第1共通鍵と、第2共通鍵保持部15に保持された第2共通鍵とを比較する。共通鍵比較部16は、第1共通鍵と第2共通鍵の比較結果を出力判定部18に出力する。 The common key comparison unit 16 (also referred to as a common key comparison means) compares the first common key held in the first common key holding unit 11 with the second common key held in the second common key holding unit 15. do. The common key comparison unit 16 outputs the comparison result of the first common key and the second common key to the output determination unit 18.

データスクランブル部17(暗号化手段とも呼ぶ)には、暗号化対象データ(対象データとも呼ぶ)を構成する少なくとも一つの平文ブロックが入力され、サブ鍵保持部13からサブ鍵が入力される。データスクランブル部17は、サブ鍵を用いて、入力された平文ブロックを暗号化することによって暗号文ブロックを生成する。データスクランブル部17は、生成した暗号文ブロックを出力判定部18に出力する。 At least one plaintext block constituting the encryption target data (also referred to as target data) is input to the data scramble unit 17 (also referred to as encryption means), and the sub key is input from the sub key holding unit 13. The data scramble unit 17 generates a ciphertext block by encrypting the input plaintext block using the subkey. The data scramble unit 17 outputs the generated ciphertext block to the output determination unit 18.

出力判定部18(出力判定手段とも呼ぶ)には、データスクランブル部17から暗号文ブロックが入力され、共通鍵比較部16から第1共通鍵と第2共通鍵との比較結果が入力される。出力判定部18は、共通鍵比較部16による比較結果に基づいて、暗号文ブロックを出力するか否かを判定する。出力判定部18は、第1共通鍵と第2共通鍵とが同じ場合、暗号文ブロックを出力すると判定する。一方、出力判定部18は、第1共通鍵と第2共通鍵とが異なる場合、サブ鍵に故障や改ざんなどの異常(エラーとも呼ぶ)を検出し、暗号文ブロックを出力せずに破棄する。 A ciphertext block is input from the data scramble unit 17 to the output determination unit 18 (also referred to as an output determination means), and a comparison result between the first common key and the second common key is input from the common key comparison unit 16. The output determination unit 18 determines whether or not to output the ciphertext block based on the comparison result by the common key comparison unit 16. The output determination unit 18 determines that the ciphertext block is output when the first common key and the second common key are the same. On the other hand, when the first common key and the second common key are different, the output determination unit 18 detects an abnormality (also called an error) such as a failure or tampering in the subkey, and discards the ciphertext block without outputting it. ..

以上が、暗号化装置1の構成についての説明である。次に、暗号化装置1の動作について図面を参照しながら説明する。 The above is the description of the configuration of the encryption device 1. Next, the operation of the encryption device 1 will be described with reference to the drawings.

(動作)
図2は、暗号化装置1の動作の一例について説明するためのフローチャートである。すなわち、図2は、暗号化装置1によって実行される暗号化処理の手順を示すフローチャートである。なお、以下の図2のフローチャートに沿った説明においては、暗号化装置1を動作の主体として説明する。
(motion)
FIG. 2 is a flowchart for explaining an example of the operation of the encryption device 1. That is, FIG. 2 is a flowchart showing the procedure of the encryption process executed by the encryption device 1. In the description according to the flowchart of FIG. 2 below, the encryption device 1 will be described as the main body of operation.

図2において、まず、暗号化装置1は、共通鍵が入力されると、その共通鍵(第1共通鍵とも呼ぶ)を第1共通鍵保持部11に格納する(ステップS101)。 In FIG. 2, first, when a common key is input, the encryption device 1 stores the common key (also referred to as a first common key) in the first common key holding unit 11 (step S101).

次に、暗号化装置1は、共通鍵方式のブロック暗号アルゴリズムにより鍵スケジュールを行うことによって、第1共通鍵保持部11に格納された第1共通鍵からサブ鍵を生成する(ステップS102)。 Next, the encryption device 1 generates a subkey from the first common key stored in the first common key holding unit 11 by performing a key schedule by a block encryption algorithm of a common key method (step S102).

次に、暗号化装置1は、生成されたサブ鍵をサブ鍵保持部13に格納する(ステップS103)。 Next, the encryption device 1 stores the generated subkey in the subkey holding unit 13 (step S103).

暗号化装置1は、サブ鍵保持部13に格納されたサブ鍵を用いて、入力された平文ブロックを共通鍵方式のブロック暗号アルゴリズムにより暗号化する(ステップS104)。 The encryption device 1 uses the subkey stored in the subkey holding unit 13 to encrypt the input plaintext block by the block cipher algorithm of the common key method (step S104).

また、暗号化装置1は、ステップS104の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS105)。 Further, the encryption device 1 executes a common key decryption process using the subkey stored in the subkey holding unit 13 in parallel with the encryption process in step S104, and performs a common key decryption process (also referred to as a second common key). ) Is decoded (step S105).

次に、暗号化装置1は、復号された第2共通鍵を第2共通鍵保持部15に格納する(ステップS106)。 Next, the encryption device 1 stores the decrypted second common key in the second common key holding unit 15 (step S106).

次に、暗号化装置1は、第1共通鍵保持部11に格納された第1共通鍵と、第2共通鍵保持部15に格納された第2共通鍵とを比較する(ステップS107)。 Next, the encryption device 1 compares the first common key stored in the first common key holding unit 11 with the second common key stored in the second common key holding unit 15 (step S107).

そして、暗号化装置1は、第1共通鍵と第2共通鍵とが一致した場合(ステップS108でYes)、暗号文ブロックを出力する(ステップS109)。 Then, when the first common key and the second common key match (Yes in step S108), the encryption device 1 outputs a ciphertext block (step S109).

一方、暗号化装置1は、第1共通鍵と第2共通鍵とが一致しなかった場合(ステップS108でNo)、サブ鍵に異常を検出してエラー処理を行い、暗号文ブロックを破棄する(ステップS110)。 On the other hand, when the first common key and the second common key do not match (No in step S108), the encryption device 1 detects an abnormality in the subkey, performs error processing, and discards the ciphertext block. (Step S110).

以上が、図2のフローチャートに沿った暗号化装置1の動作の一例についての説明である。 The above is an explanation of an example of the operation of the encryption device 1 according to the flowchart of FIG.

以上のように、本実施形態の暗号化装置は、データの暗号化処理と並列させて、入力された共通鍵(第1共通鍵)と、サブ鍵から復号した共通鍵(第2共通鍵)とを比較し、共通鍵やサブ鍵の異常の有無を判定する。また、本実施形態の暗号化装置は、共通鍵やサブ鍵の異常の有無に関する判定結果に基づいて暗号文ブロックを出力するか否かを判断する。本実施形態の暗号化装置は、共通鍵やサブ鍵に異常があった場合、エラー処理を行うことによって不正な暗号文ブロックを出力しない。 As described above, the encryption device of the present embodiment has the input common key (first common key) and the common key decrypted from the subkey (second common key) in parallel with the data encryption process. And, and determine whether or not there is an abnormality in the common key or subkey. Further, the encryption device of the present embodiment determines whether or not to output the ciphertext block based on the determination result regarding the presence or absence of an abnormality in the common key or the subkey. The encryption device of the present embodiment does not output an invalid ciphertext block by performing error processing when there is an abnormality in the common key or the subkey.

すなわち、本実施形態の暗号化装置によれば、処理性能に影響を与えることなく、大量のデータを安全かつ高速に暗号化できる。 That is, according to the encryption device of the present embodiment, a large amount of data can be encrypted safely and at high speed without affecting the processing performance.

(第2の実施形態)
次に、本発明の第2の実施形態に係る暗号化装置について図面を参照しながら説明する。本実施形態の暗号化装置は、入力された共通鍵に対応するサブ鍵の有無に基づいてサブ鍵を生成するか否かを判定する点で、第1の実施形態とは異なる。なお、以下の説明においては、第1の実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する場合がある。
(Second embodiment)
Next, the encryption device according to the second embodiment of the present invention will be described with reference to the drawings. The encryption device of the present embodiment is different from the first embodiment in that it determines whether or not to generate a subkey based on the presence or absence of a subkey corresponding to the input common key. In the following description, the same reference numerals may be given to the same configurations as those in the first embodiment, and detailed description may be omitted.

図3は、本実施形態の暗号化装置2の構成の一例を示すブロック図である。図3のように、暗号化装置2は、第1の実施形態の暗号化装置1にサブ鍵生成判定部21を加えた構成を有する。 FIG. 3 is a block diagram showing an example of the configuration of the encryption device 2 of the present embodiment. As shown in FIG. 3, the encryption device 2 has a configuration in which the sub-key generation determination unit 21 is added to the encryption device 1 of the first embodiment.

サブ鍵生成判定部21(サブ鍵生成判定手段とも呼ぶ)には共通鍵が入力される。サブ鍵生成判定部21は、入力された共通鍵が、第1共通鍵保持部11に保持されている第1共通鍵と等しいか否かを判定する。言い換えると、サブ鍵生成判定部21は、入力された共通鍵が現状の共通鍵と変わっているか否かを判定する。 A common key is input to the sub-key generation determination unit 21 (also referred to as a sub-key generation determination means). The sub-key generation determination unit 21 determines whether or not the input common key is equal to the first common key held in the first common key holding unit 11. In other words, the sub-key generation determination unit 21 determines whether or not the input common key is different from the current common key.

サブ鍵生成判定部21は、入力された共通鍵が変わっていない場合、鍵スケジュール部12に鍵スケジュールを実行させない。一方、サブ鍵生成判定部21は、入力された共通鍵が変わっている場合、新たな共通鍵を第1共通鍵として第1共通鍵保持部11に保持させ、鍵スケジュール部12に鍵スケジュールを実行させる。 The sub-key generation determination unit 21 does not allow the key schedule unit 12 to execute the key schedule if the input common key has not changed. On the other hand, when the input common key has changed, the sub-key generation determination unit 21 causes the first common key holding unit 11 to hold the new common key as the first common key, and the key schedule unit 12 holds the key schedule. Let it run.

鍵スケジュール部12は、サブ鍵生成判定部21の判定結果に応じて鍵スケジュールを実行する。すなわち、鍵スケジュール部12は、サブ鍵生成判定部21によって共通鍵が変わっていないと判定された場合、鍵スケジュールを実行しない。一方、鍵スケジュール部12は、サブ鍵生成判定部21によって共通鍵が変わっていると判定された場合、第1共通鍵保持部11に保持された新たな共通鍵について鍵スケジュールを実行する。 The key schedule unit 12 executes the key schedule according to the determination result of the sub key generation determination unit 21. That is, if the sub-key generation determination unit 21 determines that the common key has not changed, the key schedule unit 12 does not execute the key schedule. On the other hand, when the sub-key generation determination unit 21 determines that the common key has changed, the key schedule unit 12 executes the key schedule for the new common key held by the first common key holding unit 11.

その他の構成については、第1の実施形態の暗号化装置1と同様であるため、詳細な説明を省略する。 Since other configurations are the same as those of the encryption device 1 of the first embodiment, detailed description thereof will be omitted.

以上が、暗号化装置2の構成の一例についての説明である。次に、暗号化装置2の動作の一例についての図面を参照しながら説明する。 The above is an explanation of an example of the configuration of the encryption device 2. Next, an example of the operation of the encryption device 2 will be described with reference to the drawings.

(動作)
図4は、暗号化装置2の動作の一例について説明するためのフローチャートである。すなわち、図4は、暗号化装置2によって実行される暗号化処理の手順を示すフローチャートである。なお、以下の図4のフローチャートに沿った説明においては、暗号化装置2を動作の主体として説明する。
(motion)
FIG. 4 is a flowchart for explaining an example of the operation of the encryption device 2. That is, FIG. 4 is a flowchart showing the procedure of the encryption process executed by the encryption device 2. In the description according to the flowchart of FIG. 4 below, the encryption device 2 will be described as the main body of operation.

図4において、まず、暗号化装置2は、共通鍵が入力されると、その共通鍵のサブ鍵が生成済みであるか否かを判定する(ステップS201)。 In FIG. 4, first, when the common key is input, the encryption device 2 determines whether or not the subkey of the common key has been generated (step S201).

サブ鍵が生成済みの場合(ステップS201でYes)、ステップS205およぶステップS206に進む。一方、サブ鍵が生成済みではない場合(ステップS201でNo)、暗号化装置2は、入力された共通鍵を第1共通鍵として第1共通鍵保持部11に格納する(ステップS202)。 If the subkey has already been generated (Yes in step S201), the process proceeds to step S205 and step S206. On the other hand, when the subkey has not been generated (No in step S201), the encryption device 2 stores the input common key as the first common key in the first common key holding unit 11 (step S202).

次に、暗号化装置2は、共通鍵方式のブロック暗号アルゴリズムにより鍵スケジュールを行うことによって、第1共通鍵保持部11に格納された第1共通鍵からサブ鍵を生成する(ステップS203)。 Next, the encryption device 2 generates a subkey from the first common key stored in the first common key holding unit 11 by performing a key schedule by a block encryption algorithm of a common key method (step S203).

次に、暗号化装置2は、生成されたサブ鍵をサブ鍵保持部13に格納する(ステップS204)。 Next, the encryption device 2 stores the generated subkey in the subkey holding unit 13 (step S204).

暗号化装置2は、サブ鍵保持部13に格納されたサブ鍵を用いて、入力された平文ブロックを共通鍵方式のブロック暗号アルゴリズムにより暗号化する(ステップS205)。 The encryption device 2 uses the subkey stored in the subkey holding unit 13 to encrypt the input plaintext block by the block cipher algorithm of the common key method (step S205).

また、暗号化装置2は、ステップS205の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS206)。 Further, the encryption device 2 executes a common key decryption process using the subkey stored in the subkey holding unit 13 in parallel with the encryption process in step S205, and performs a common key decryption process (also referred to as a second common key). ) Is decoded (step S206).

次に、暗号化装置2は、第2共通鍵保持部15に第2共通鍵を格納する(ステップS207)。 Next, the encryption device 2 stores the second common key in the second common key holding unit 15 (step S207).

次に、暗号化装置2は、第1共通鍵保持部11に格納された第1共通鍵と、第2共通鍵保持部15に格納された第2共通鍵とを比較する(ステップS208)。 Next, the encryption device 2 compares the first common key stored in the first common key holding unit 11 with the second common key stored in the second common key holding unit 15 (step S208).

そして、暗号化装置2は、第1共通鍵と第2共通鍵とが一致した場合(ステップS209でYes)、暗号文ブロックを出力する(ステップS210)。 Then, when the first common key and the second common key match (Yes in step S209), the encryption device 2 outputs a ciphertext block (step S210).

一方、暗号化装置2は、第1共通鍵と第2共通鍵とが一致しなかった場合(ステップS209でNo)、サブ鍵に異常を検出してエラー処理を行い、暗号文ブロックを破棄する(ステップS211)。 On the other hand, when the first common key and the second common key do not match (No in step S209), the encryption device 2 detects an abnormality in the subkey, performs error processing, and discards the ciphertext block. (Step S211).

以上が、図4のフローチャートに沿った暗号化装置2の動作の一例についての説明である。 The above is an explanation of an example of the operation of the encryption device 2 according to the flowchart of FIG.

以上のように、本実施形態の暗号化装置は、入力された共通鍵からサブ鍵が生成済みであった場合、生成済みのサブ鍵を用いて暗号化処理を実行する。そのため、本実施形態の暗号化装置によれば、共通鍵が変わらない限り、鍵スケジュール処理を省略できる。 As described above, when the subkey has been generated from the input common key, the encryption device of the present embodiment executes the encryption process using the generated subkey. Therefore, according to the encryption device of the present embodiment, the key schedule processing can be omitted as long as the common key does not change.

(第3の実施形態)
次に、本発明の第3の実施形態に係る暗号化装置について図面を参照しながら説明する。本実施形態の暗号化装置は、共通鍵を入力するのではなく、暗号化指示に応じて共通鍵を生成する点で、第1の実施形態とは異なる。なお、以下の説明においては、第1の実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する場合がある。
(Third embodiment)
Next, the encryption device according to the third embodiment of the present invention will be described with reference to the drawings. The encryption device of the present embodiment is different from the first embodiment in that a common key is generated in response to an encryption instruction instead of inputting a common key. In the following description, the same reference numerals may be given to the same configurations as those in the first embodiment, and detailed description may be omitted.

図5は、本実施形態の暗号化装置3の構成の一例を示すブロック図である。図5のように、暗号化装置3は、第1の実施形態の暗号化装置1に疑似乱数生成部31および共通鍵生成部32を加えた構成を有する。 FIG. 5 is a block diagram showing an example of the configuration of the encryption device 3 of the present embodiment. As shown in FIG. 5, the encryption device 3 has a configuration in which a pseudo-random number generation unit 31 and a common key generation unit 32 are added to the encryption device 1 of the first embodiment.

疑似乱数生成部31(疑似乱数生成手段とも呼ぶ)には、暗号化指示が入力される。疑似乱数生成部31は、暗号化指示に応じて疑似乱数を生成する。疑似乱数生成部31は、生成した疑似乱数を共通鍵生成部32に出力する。なお、平文ブロックが入力されたタイミングで、疑似乱数生成部31によって疑似乱数が生成されるように構成してもよい。 An encryption instruction is input to the pseudo-random number generation unit 31 (also referred to as a pseudo-random number generation means). The pseudo-random number generation unit 31 generates a pseudo-random number according to the encryption instruction. The pseudo-random number generation unit 31 outputs the generated pseudo-random number to the common key generation unit 32. It should be noted that the pseudo-random number generation unit 31 may be configured to generate a pseudo-random number at the timing when the plaintext block is input.

共通鍵生成部32(共通鍵生成手段とも呼ぶ)には、疑似乱数生成部31によって生成された疑似乱数が入力される。共通鍵生成部32は、入力された疑似乱数を用いて共通鍵を生成する。共通鍵生成部32は、生成した共通鍵を第1共通鍵として第1共通鍵保持部11に格納する。 A pseudo-random number generated by the pseudo-random number generation unit 31 is input to the common key generation unit 32 (also referred to as a common key generation means). The common key generation unit 32 generates a common key using the input pseudo-random number. The common key generation unit 32 stores the generated common key as the first common key in the first common key holding unit 11.

その他の構成については、第1の実施形態の暗号化装置1と同様であるため、詳細な説明を省略する。 Since other configurations are the same as those of the encryption device 1 of the first embodiment, detailed description thereof will be omitted.

以上が、暗号化装置3の構成の一例についての説明である。次に、暗号化装置3の動作の一例についての図面を参照しながら説明する。 The above is an explanation of an example of the configuration of the encryption device 3. Next, an example of the operation of the encryption device 3 will be described with reference to the drawings.

(動作)
図6は、暗号化装置3の動作の一例について説明するためのフローチャートである。すなわち、図6は、暗号化装置3によって実行される暗号化処理の手順を示すフローチャートである。なお、以下の図6のフローチャートに沿った説明においては、暗号化装置3を動作の主体として説明する。
(motion)
FIG. 6 is a flowchart for explaining an example of the operation of the encryption device 3. That is, FIG. 6 is a flowchart showing the procedure of the encryption process executed by the encryption device 3. In the description according to the flowchart of FIG. 6 below, the encryption device 3 will be described as the main body of operation.

図6において、まず、暗号化装置3は、暗号化指示が入力されると、疑似乱数を生成する(ステップS301)。 In FIG. 6, first, the encryption device 3 generates a pseudo-random number when an encryption instruction is input (step S301).

次に、暗号化装置3は、生成した疑似乱数を用いて共通鍵を生成する(ステップS302)。 Next, the encryption device 3 generates a common key using the generated pseudo-random number (step S302).

次に、暗号化装置3は、生成した共通鍵(第1共通鍵とも呼ぶ)を第1共通鍵保持部11に格納する(ステップS303)。 Next, the encryption device 3 stores the generated common key (also referred to as the first common key) in the first common key holding unit 11 (step S303).

次に、暗号化装置3は、共通鍵方式のブロック暗号アルゴリズムにより鍵スケジュールを行うことによって、第1共通鍵保持部11に格納された第1共通鍵からサブ鍵を生成する(ステップS304)。 Next, the encryption device 3 generates a subkey from the first common key stored in the first common key holding unit 11 by performing a key schedule by a block encryption algorithm of a common key method (step S304).

次に、暗号化装置3は、生成されたサブ鍵をサブ鍵保持部13に格納する(ステップS305)。 Next, the encryption device 3 stores the generated subkey in the subkey holding unit 13 (step S305).

暗号化装置3は、サブ鍵保持部13に格納されたサブ鍵を用いて、入力された平文ブロックを共通鍵方式のブロック暗号アルゴリズムにより暗号化する(ステップS306)。 The encryption device 3 uses the subkey stored in the subkey holding unit 13 to encrypt the input plaintext block by the block cipher algorithm of the common key method (step S306).

また、暗号化装置3は、ステップS306の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS307)。 Further, the encryption device 3 executes a common key decryption process using the subkey stored in the subkey holding unit 13 in parallel with the encryption process in step S306, and performs a common key decryption process (also referred to as a second common key). ) Is decoded (step S307).

次に、暗号化装置3は、第2共通鍵保持部15に第2共通鍵を格納する(ステップS308)。 Next, the encryption device 3 stores the second common key in the second common key holding unit 15 (step S308).

次に、暗号化装置3は、第1共通鍵保持部11に格納された第1共通鍵と、第2共通鍵保持部15に格納された第2共通鍵とを比較する(ステップS309)。 Next, the encryption device 3 compares the first common key stored in the first common key holding unit 11 with the second common key stored in the second common key holding unit 15 (step S309).

そして、暗号化装置3は、第1共通鍵と第2共通鍵とが一致した場合(ステップS310でYes)、暗号文ブロックを出力する(ステップS311)。 Then, when the first common key and the second common key match (Yes in step S310), the encryption device 3 outputs a ciphertext block (step S311).

一方、暗号化装置3は、第1共通鍵と第2共通鍵とが一致しなかった場合(ステップS310でNo)、サブ鍵に異常を検出してエラー処理を行い、暗号文ブロックを破棄する(ステップS312)。 On the other hand, when the first common key and the second common key do not match (No in step S310), the encryption device 3 detects an abnormality in the subkey, performs error processing, and discards the ciphertext block. (Step S312).

以上が、図6のフローチャートに沿った暗号化装置3の動作の一例についての説明である。 The above is an explanation of an example of the operation of the encryption device 3 according to the flowchart of FIG.

以上のように、本実施形態の暗号化装置は、暗号化指示に応じて共通鍵を生成する。そのため、本実施形態の暗号化装置によれば、外部から取得した共通鍵を使用しないため、漏洩や改ざんの可能性のある共通鍵を用いて暗号化することがなくなり、暗号文ブロックの安全性や信頼性が向上する。 As described above, the encryption device of the present embodiment generates a common key in response to the encryption instruction. Therefore, according to the encryption device of the present embodiment, since the common key acquired from the outside is not used, the encryption is not performed by using the common key which may be leaked or tampered with, and the security of the ciphertext block is prevented. And reliability is improved.

(第4の実施形態)
次に、本発明の第4の実施形態に係る暗号化装置について図面を参照しながら説明する。本実施形態の暗号化装置は、共通鍵の比較結果に基づいてサブ鍵に異常が疑われた場合、第1共通鍵からサブ鍵を再作成して再暗号化する点で、第1の実施形態とは異なる。なお、以下の説明においては、第1の実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する場合がある。
(Fourth Embodiment)
Next, the encryption device according to the fourth embodiment of the present invention will be described with reference to the drawings. The first embodiment of the encryption device of the present embodiment is that when an abnormality is suspected in the subkey based on the comparison result of the common key, the subkey is recreated from the first common key and re-encrypted. It is different from the form. In the following description, the same reference numerals may be given to the same configurations as those in the first embodiment, and detailed description may be omitted.

図7は、本実施形態の暗号化装置4の構成の一例を示すブロック図である。図7のように、暗号化装置4は、第1の実施形態の暗号化装置1にリトライ判定部41を加えた構成を有する。 FIG. 7 is a block diagram showing an example of the configuration of the encryption device 4 of the present embodiment. As shown in FIG. 7, the encryption device 4 has a configuration in which a retry determination unit 41 is added to the encryption device 1 of the first embodiment.

リトライ判定部41(再試行判定手段)には、共通鍵比較部16による第1共通鍵と第2共通鍵との比較結果が入力される。リトライ判定部41は、第1共通鍵と第2共通鍵との比較結果に基づいてサブ鍵に異常があると疑われる場合、鍵スケジュール部12に対して、第1共通鍵からサブ鍵を再作成する指示を出す。 A comparison result between the first common key and the second common key by the common key comparison unit 16 is input to the retry determination unit 41 (retry determination means). When the retry determination unit 41 suspects that there is an abnormality in the subkey based on the comparison result between the first common key and the second common key, the retry determination unit 41 recycles the subkey from the first common key to the key schedule unit 12. Give instructions to create.

鍵スケジュール部12は、リトライ判定部41の指示に応じて、第1共通鍵保持部11に格納された第1共通鍵を用いて鍵スケジュールを実行して、サブ鍵を再作成する。鍵スケジュール部12は、再作成したサブ鍵をサブ鍵保持部13に記憶させる。 The key schedule unit 12 executes a key schedule using the first common key stored in the first common key holding unit 11 in response to an instruction from the retry determination unit 41, and recreates the subkey. The key schedule unit 12 stores the recreated subkey in the subkey holding unit 13.

その他の構成については、第1の実施形態の暗号化装置1と同様であるため、詳細な説明を省略する。 Since other configurations are the same as those of the encryption device 1 of the first embodiment, detailed description thereof will be omitted.

以上が、暗号化装置4の構成の一例についての説明である。次に、暗号化装置4の動作の一例についての図面を参照しながら説明する。 The above is an explanation of an example of the configuration of the encryption device 4. Next, an example of the operation of the encryption device 4 will be described with reference to the drawings.

(動作)
図8は、暗号化装置4の動作の一例について説明するためのフローチャートである。すなわち、図8は、暗号化装置4によって実行される暗号化処理の手順を示すフローチャートである。なお、以下の図8のフローチャートに沿った説明においては、暗号化装置4を動作の主体として説明する。
(motion)
FIG. 8 is a flowchart for explaining an example of the operation of the encryption device 4. That is, FIG. 8 is a flowchart showing the procedure of the encryption process executed by the encryption device 4. In the description according to the flowchart of FIG. 8 below, the encryption device 4 will be described as the main body of operation.

図8において、まず、暗号化装置4は、共通鍵が入力されると、共通鍵(第1共通鍵とも呼ぶ)を第1共通鍵保持部11に格納する(ステップS401)。 In FIG. 8, first, when the common key is input, the encryption device 4 stores the common key (also referred to as the first common key) in the first common key holding unit 11 (step S401).

次に、暗号化装置4は、共通鍵方式のブロック暗号アルゴリズムにより鍵スケジュールを行うことによって、第1共通鍵保持部11に格納された第1共通鍵からサブ鍵を生成する(ステップS402)。 Next, the encryption device 4 generates a subkey from the first common key stored in the first common key holding unit 11 by performing a key schedule by a block encryption algorithm of a common key method (step S402).

次に、暗号化装置4は、生成されたサブ鍵をサブ鍵保持部13に格納する(ステップS403)。 Next, the encryption device 4 stores the generated subkey in the subkey holding unit 13 (step S403).

暗号化装置4は、サブ鍵保持部13に格納されたサブ鍵を用いて、入力された平文ブロックを共通鍵方式のブロック暗号アルゴリズムにより暗号化する(ステップS404)。 The encryption device 4 uses the subkey stored in the subkey holding unit 13 to encrypt the input plaintext block by the block cipher algorithm of the common key method (step S404).

また、暗号化装置4は、ステップS404の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS405)。 Further, the encryption device 4 executes a common key decryption process using the subkey stored in the subkey holding unit 13 in parallel with the encryption process in step S404, and performs a common key decryption process (also referred to as a second common key). ) Is decoded (step S405).

次に、暗号化装置4は、復号された第2共通鍵を第2共通鍵保持部15に格納する(ステップS406)。 Next, the encryption device 4 stores the decrypted second common key in the second common key holding unit 15 (step S406).

次に、暗号化装置4は、第1共通鍵保持部11に格納された第1共通鍵と、第2共通鍵保持部15に格納された第2共通鍵とを比較する(ステップS407)。 Next, the encryption device 4 compares the first common key stored in the first common key holding unit 11 with the second common key stored in the second common key holding unit 15 (step S407).

そして、暗号化装置4は、第1共通鍵と第2共通鍵とが一致した場合(ステップS408でYes)、サブ鍵に異常がないと判定し、暗号文ブロックを出力する(ステップS409)。 Then, when the first common key and the second common key match (Yes in step S408), the encryption device 4 determines that there is no abnormality in the subkey and outputs a ciphertext block (step S409).

一方、暗号化装置4は、第1共通鍵と第2共通鍵とが一致しなかった場合(ステップS408でNo)、サブ鍵に異常があると判定する。このとき、ステップS402に戻り、暗号化装置4は、鍵スケジュール処理を再実行することによって、第1共通鍵保持部11に格納された第1共通鍵から新しいサブ鍵を生成する。 On the other hand, when the first common key and the second common key do not match (No in step S408), the encryption device 4 determines that the subkey has an abnormality. At this time, returning to step S402, the encryption device 4 re-executes the key schedule processing to generate a new subkey from the first common key stored in the first common key holding unit 11.

以上が、図8のフローチャートに沿った暗号化装置4の動作の一例についての説明である。 The above is an explanation of an example of the operation of the encryption device 4 according to the flowchart of FIG.

以上のように、本実施形態の暗号化装置は、サブ鍵に漏洩や改ざんの疑いがある場合、第1共通鍵保持部に格納された第1共通鍵を用いてサブ鍵を再作成する。そして、本実施形態の暗号化装置は、再作成されたサブ鍵を用いて暗号化を実行する。そのため、本実施形態の暗号化装置によれば、システムの運用を停止することなく、リカバリーすることが可能になる。 As described above, when the subkey is suspected of being leaked or tampered with, the encryption device of the present embodiment recreates the subkey using the first common key stored in the first common key holding unit. Then, the encryption device of the present embodiment performs encryption using the recreated subkey. Therefore, according to the encryption device of the present embodiment, it is possible to recover the system without stopping the operation of the system.

(第5の実施形態)
次に、本発明の第5の実施形態に係る暗号化装置について図面を参照しながら説明する。本実施形態の暗号化装置は、データスクランブル部を二重化し、データの異常についても検出する点で、第1の実施形態とは異なる。なお、以下の説明においては、第1の実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する場合がある。
(Fifth Embodiment)
Next, the encryption device according to the fifth embodiment of the present invention will be described with reference to the drawings. The encryption device of the present embodiment is different from the first embodiment in that the data scramble unit is duplicated and an abnormality in the data is also detected. In the following description, the same reference numerals may be given to the same configurations as those in the first embodiment, and detailed description may be omitted.

(構成)
図9は、本実施形態の暗号化装置5の構成の一例を示すブロック図である。図9のように、暗号化装置5は、第1の実施形態の暗号化装置1において、データスクランブル部17を第1データスクランブル部51と第2データスクランブル部52とに二重化し、暗号ブロック比較部53を加えた構成を有する。
(Constitution)
FIG. 9 is a block diagram showing an example of the configuration of the encryption device 5 of the present embodiment. As shown in FIG. 9, in the encryption device 1 of the first embodiment, the encryption device 5 duplicates the data scramble unit 17 into the first data scramble unit 51 and the second data scramble unit 52, and compares the encryption blocks. It has a configuration in which a portion 53 is added.

第1データスクランブル部51には、サブ鍵保持部13からサブ鍵が入力されるとともに、暗号化対象データを構成する平文ブロックが入力される。第1データスクランブル部51は、サブ鍵を用いて、入力された平文ブロックを暗号化する。第1データスクランブル部51は、暗号化されたデータである暗号文ブロック(第1暗号文ブロックとも呼ぶ)を暗号ブロック比較部53に出力する。 In the first data scramble unit 51, a subkey is input from the subkey holding unit 13, and a plaintext block constituting the encryption target data is input. The first data scramble unit 51 uses the subkey to encrypt the input plaintext block. The first data scramble unit 51 outputs a ciphertext block (also referred to as a first ciphertext block), which is encrypted data, to the cipherblock comparison unit 53.

第2データスクランブル部52には、サブ鍵保持部13からサブ鍵が入力されるとともに、暗号化対象データを構成する平文ブロックが入力される。第2データスクランブル部52は、サブ鍵を用いて、入力された平文ブロックを暗号化することによって暗号文ブロックを生成する。第2データスクランブル部52は、生成した暗号文ブロック(第2暗号文ブロックとも呼ぶ)を暗号ブロック比較部53に出力する。 In the second data scramble unit 52, a subkey is input from the subkey holding unit 13, and a plaintext block constituting the encryption target data is input. The second data scramble unit 52 generates a ciphertext block by encrypting the input plaintext block using the subkey. The second data scramble unit 52 outputs the generated ciphertext block (also referred to as a second ciphertext block) to the ciphertext block comparison unit 53.

暗号ブロック比較部53(暗号ブロック比較手段とも呼ぶ)には、第1データスクランブル部51から第1暗号文ブロックが入力され、第2データスクランブル部52から第2暗号文ブロックが入力される。暗号ブロック比較部53は、入力された第1暗号文ブロックと第2暗号文ブロックとを比較する。なお、暗号ブロック比較部53は、暗号文ブロックの比較に加えて、認証付き暗号利用モードを適用してもよい。 The first ciphertext block is input from the first data scramble unit 51, and the second ciphertext block is input from the second data scramble unit 52 to the cipher block comparison unit 53 (also referred to as a cipher block comparison means). The cipher block comparison unit 53 compares the input first ciphertext block and the second ciphertext block. In addition to the ciphertext block comparison, the cipher block comparison unit 53 may apply an authenticated cipher use mode.

暗号ブロック比較部53は、第1暗号文ブロックと第2暗号文ブロックとが異なる場合、第1暗号文ブロックおよび第2暗号文ブロックの少なくともいずれかに異常があると判定する。すなわち、暗号ブロック比較部53は、第1暗号文ブロックと第2暗号文ブロックとが異なる場合、暗号文ブロックまたはその暗号文ブロックに対応する平文ブロックに異常があると判定する。暗号ブロック比較部53は、暗号文ブロックまたは平文ブロックに異常があると判定すると、暗号文ブロックを出力せずに異常があることを出力判定部18に通知する。 When the first ciphertext block and the second ciphertext block are different from each other, the ciphertext comparison unit 53 determines that at least one of the first ciphertext block and the second ciphertext block is abnormal. That is, when the first ciphertext block and the second ciphertext block are different from each other, the ciphertext comparison unit 53 determines that the ciphertext block or the plaintext block corresponding to the ciphertext block has an abnormality. When the ciphertext comparison unit 53 determines that there is an abnormality in the ciphertext block or the plaintext block, it notifies the output determination unit 18 that there is an abnormality without outputting the ciphertext block.

一方、暗号ブロック比較部53は、第1暗号文ブロックと第2暗号文ブロックとが同じ場合、第1暗号文ブロックおよび第2暗号文ブロックが正常であると判定する。すなわち、暗号ブロック比較部53は、第1暗号文ブロックと第2暗号文ブロックとが同じ場合、暗号文ブロックが正常であると判定する。暗号ブロック比較部53は、暗号文ブロックが正常であると判定すると、第1暗号文ブロックおよび第2暗号文ブロックのいずれかを暗号文ブロックとして出力判定部18に出力する。 On the other hand, when the first ciphertext block and the second ciphertext block are the same, the ciphertext comparison unit 53 determines that the first ciphertext block and the second ciphertext block are normal. That is, when the first ciphertext block and the second ciphertext block are the same, the ciphertext comparison unit 53 determines that the ciphertext block is normal. When the ciphertext comparison unit 53 determines that the ciphertext block is normal, it outputs either the first ciphertext block or the second ciphertext block to the output determination unit 18 as a ciphertext block.

出力判定部18は、暗号ブロック比較部53から異常があるとの通知を受けると、暗号文ブロックの出力を停止する。例えば、出力判定部18は、異常があるとの通知を受けた際に、図示しない表示装置などに通知結果を表示させる指示を出すように構成してもよい。 When the output determination unit 18 is notified by the cipher block comparison unit 53 that there is an abnormality, the output determination unit 18 stops the output of the ciphertext block. For example, the output determination unit 18 may be configured to issue an instruction to display the notification result on a display device (not shown) or the like when the notification that there is an abnormality is received.

一方、出力判定部18は、暗号ブロック比較部53から暗号文ブロックを取得すると、取得した暗号文ブロックを出力する。 On the other hand, when the output determination unit 18 acquires the ciphertext block from the ciphertext comparison unit 53, the output determination unit 18 outputs the acquired ciphertext block.

その他の構成については、第1の実施形態の暗号化装置1と同様であるため、詳細な説明を省略する。 Since other configurations are the same as those of the encryption device 1 of the first embodiment, detailed description thereof will be omitted.

以上が、暗号化装置5の構成の一例についての説明である。次に、暗号化装置5の動作の一例についての図面を参照しながら説明する。 The above is an explanation of an example of the configuration of the encryption device 5. Next, an example of the operation of the encryption device 5 will be described with reference to the drawings.

(動作)
図10は、暗号化装置5の動作の一例について説明するためのフローチャートである。すなわち、図10は、暗号化装置5によって実行される暗号化処理の手順を示すフローチャートである。なお、以下の図10のフローチャートに沿った説明においては、暗号化装置5を動作の主体として説明する。
(motion)
FIG. 10 is a flowchart for explaining an example of the operation of the encryption device 5. That is, FIG. 10 is a flowchart showing the procedure of the encryption process executed by the encryption device 5. In the description according to the flowchart of FIG. 10 below, the encryption device 5 will be described as the main body of operation.

図10において、まず、暗号化装置5は、共通鍵が入力されると、共通鍵(第1共通鍵とも呼ぶ)を第1共通鍵保持部11に格納する(ステップS501)。 In FIG. 10, first, when the common key is input, the encryption device 5 stores the common key (also referred to as the first common key) in the first common key holding unit 11 (step S501).

次に、暗号化装置5は、共通鍵方式のブロック暗号アルゴリズムにより鍵スケジュールを行うことによって、第1共通鍵保持部11に格納された第1共通鍵からサブ鍵を生成する(ステップS502)。 Next, the encryption device 5 generates a subkey from the first common key stored in the first common key holding unit 11 by performing a key schedule by a block encryption algorithm of a common key method (step S502).

次に、暗号化装置5は、生成されたサブ鍵をサブ鍵保持部13に格納する(ステップS503)。 Next, the encryption device 5 stores the generated subkey in the subkey holding unit 13 (step S503).

暗号化装置5は、サブ鍵保持部13に格納されたサブ鍵を用いて、入力された平文ブロックを共通鍵方式のブロック暗号アルゴリズムにより二重に暗号化する(ステップS504)。すなわち、暗号化装置5は、同一の平文ブロックから二つの暗号化ブロックを生成する。 The encryption device 5 double-encrypts the input plaintext block by the block cipher algorithm of the common key method by using the sub-key stored in the sub-key holding unit 13 (step S504). That is, the encryption device 5 generates two encryption blocks from the same plaintext block.

次に、暗号化装置5は、同一の平文ブロックから生成された二つの暗号文ブロックを比較する(ステップS505)。 Next, the encryption device 5 compares two ciphertext blocks generated from the same plaintext block (step S505).

また、暗号化装置5は、ステップS504およびステップS505の処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS506)。 Further, the encryption device 5 executes a common key decryption process using the subkey stored in the subkey holding unit 13 in parallel with the processes of steps S504 and S505, and performs a common key decryption process (also known as a second common key). (Call) is decoded (step S506).

次に、暗号化装置5は、復号された第2共通鍵を第2共通鍵保持部15に格納する(ステップS507)。 Next, the encryption device 5 stores the decrypted second common key in the second common key holding unit 15 (step S507).

次に、暗号化装置5は、第1共通鍵保持部11に格納された第1共通鍵と、第2共通鍵保持部15に格納された第2共通鍵とを比較する(ステップS508)。 Next, the encryption device 5 compares the first common key stored in the first common key holding unit 11 with the second common key stored in the second common key holding unit 15 (step S508).

そして、暗号化装置5は、第1共通鍵と第2共通鍵とが一致した場合(ステップS509でYes)、暗号文ブロックを出力する(ステップS510)。 Then, when the first common key and the second common key match (Yes in step S509), the encryption device 5 outputs a ciphertext block (step S510).

一方、暗号化装置5は、第1共通鍵と第2共通鍵とが一致しなかった場合(ステップS509でNo)、サブ鍵に異常を検出してエラー処理を行い、暗号文ブロックを破棄する(ステップS511)。 On the other hand, when the first common key and the second common key do not match (No in step S509), the encryption device 5 detects an abnormality in the subkey, performs error processing, and discards the ciphertext block. (Step S511).

以上が、図10のフローチャートに沿った暗号化装置5の動作の一例についての説明である。 The above is an explanation of an example of the operation of the encryption device 5 according to the flowchart of FIG.

以上のように、本実施形態の暗号化装置は、平文ブロックを二重に暗号化して二つの暗号化ブロックを生成する。そして、本実施形態の暗号化装置は、二つの暗号化ブロックを比較することによってデータの異常を検出できる。 As described above, the encryption device of the present embodiment double-encrypts the plaintext block to generate two encrypted blocks. Then, the encryption device of the present embodiment can detect an abnormality in data by comparing two encryption blocks.

(第6の実施形態)
次に、本発明の第6の実施形態に係る復号装置について図面を参照しながら説明する。本実施形態の復号装置は、第1の実施形態の暗号化装置から出力された暗号文ブロックを復号する。なお、本実施形態の復号装置は、第2~第5の実施形態の暗号化装置から出力された暗号文ブロックを復号するように構成してもよい。
(Sixth Embodiment)
Next, the decoding device according to the sixth embodiment of the present invention will be described with reference to the drawings. The decryption device of the present embodiment decrypts the ciphertext block output from the encryption device of the first embodiment. The decryption device of the present embodiment may be configured to decrypt the ciphertext block output from the encryption device of the second to fifth embodiments.

(構成)
図11は、本実施形態に係る復号装置6の構成の一例を示すブロック図である。図11のように、復号装置6は、第1共通鍵保持部61、鍵スケジュール部62、サブ鍵保持部63、共通鍵復号部64、第2共通鍵保持部65、共通鍵比較部66、データデスクランブル部67、出力判定部68を備える。
(Constitution)
FIG. 11 is a block diagram showing an example of the configuration of the decoding device 6 according to the present embodiment. As shown in FIG. 11, the decryption device 6 includes a first common key holding unit 61, a key schedule unit 62, a sub key holding unit 63, a common key decoding unit 64, a second common key holding unit 65, and a common key comparison unit 66. A data desk rumble unit 67 and an output determination unit 68 are provided.

第1共通鍵保持部61(第1共通鍵保持手段とも呼ぶ)は、入力された共通鍵(以下、第1共通鍵とも呼び)を保持する。例えば、第1共通鍵保持部61は、レジスタやメモリによって実現される。 The first common key holding unit 61 (also referred to as a first common key holding means) holds an input common key (hereinafter, also referred to as a first common key). For example, the first common key holding unit 61 is realized by a register or a memory.

鍵スケジュール部62(サブ鍵生成手段とも呼ぶ)は、第1共通鍵保持部61に保持された第1共通鍵を取得する。鍵スケジュール部62は、取得した第1共通鍵からサブ鍵を生成する。例えば、鍵スケジュール部62は、全てのラウンドで用いられるN個のサブ鍵を第1共通鍵から生成する(Nは自然数)。鍵スケジュール部62は、生成したサブ鍵をサブ鍵保持部63に記憶させる。 The key schedule unit 62 (also referred to as a sub-key generation means) acquires the first common key held by the first common key holding unit 61. The key schedule unit 62 generates a subkey from the acquired first common key. For example, the key schedule unit 62 generates N subkeys used in all rounds from the first common key (N is a natural number). The key schedule unit 62 stores the generated subkey in the subkey holding unit 63.

サブ鍵保持部63(サブ鍵保持手段とも呼ぶ)は、鍵スケジュール部62によって生成されたサブ鍵が記憶される。例えば、サブ鍵保持部63は、レジスタやメモリによって実現される。 The sub-key holding unit 63 (also referred to as a sub-key holding means) stores the sub-key generated by the key schedule unit 62. For example, the sub-key holding unit 63 is realized by a register or a memory.

共通鍵復号部64(共通鍵復号手段とも呼ぶ)は、サブ鍵保持部63に記憶されたサブ鍵から共通鍵(以下、第2共通鍵とも呼ぶ)を復号する。例えば、共通鍵復号部64は、サブ鍵保持部63に格納されたN個のサブ鍵から第2共通鍵を復号する(Nは自然数)。共通鍵復号部64は、復号された第2共通鍵を第2共通鍵保持部65に保持させる。 The common key decryption unit 64 (also referred to as a common key decryption means) decodes a common key (hereinafter, also referred to as a second common key) from the subkey stored in the subkey holding unit 63. For example, the common key decryption unit 64 decodes the second common key from the N subkeys stored in the subkey holding unit 63 (N is a natural number). The common key decryption unit 64 causes the second common key holding unit 65 to hold the decrypted second common key.

第2共通鍵保持部65(第2共通鍵保持手段とも呼ぶ)は、共通鍵復号部64によって復号された第2共通鍵を保持する。例えば、第2共通鍵保持部65は、レジスタやメモリによって実現される。 The second common key holding unit 65 (also referred to as a second common key holding means) holds the second common key decrypted by the common key decoding unit 64. For example, the second common key holding unit 65 is realized by a register or a memory.

共通鍵比較部66(共通鍵比較手段とも呼ぶ)は、第1共通鍵保持部61に保持された第1共通鍵と、第2共通鍵保持部65に保持された第2共通鍵とを比較する。共通鍵比較部66は、第1共通鍵と第2共通鍵の比較結果を出力判定部68に出力する。 The common key comparison unit 66 (also referred to as a common key comparison means) compares the first common key held in the first common key holding unit 61 with the second common key held in the second common key holding unit 65. do. The common key comparison unit 66 outputs the comparison result of the first common key and the second common key to the output determination unit 68.

データデスクランブル部67(復号手段とも呼ぶ)には、サブ鍵保持部63からサブ鍵が入力されるとともに、暗号化ブロックが入力される。データデスクランブル部67は、サブ鍵を用いて、入力された暗号化ブロックを復号する。データデスクランブル部67は、復号された平文ブロックを出力判定部68に出力する。 A subkey is input from the subkey holding unit 63 and an encryption block is input to the data descramble unit 67 (also referred to as a decryption means). The data scramble unit 67 decrypts the input encryption block by using the subkey. The data scramble unit 67 outputs the decoded plaintext block to the output determination unit 68.

出力判定部68(出力判定手段とも呼ぶ)には、データデスクランブル部67から平文ブロックが入力されるとともに、共通鍵比較部66から第1共通鍵と第2共通鍵との比較結果が入力される。出力判定部68は、共通鍵比較部66による比較結果に基づいて、平文ブロックを出力するか否か判定する。出力判定部68は、第1共通鍵と第2共通鍵とが同じ場合、平文ブロックを出力すると判定する。一方、出力判定部68は、第1共通鍵と第2共通鍵とが異なる場合、サブ鍵に故障や改ざんなどの異常(エラーとも呼ぶ)を検出し、平文ブロックを出力せずに破棄する。 A plaintext block is input from the data descramble unit 67 to the output determination unit 68 (also referred to as an output determination means), and a comparison result between the first common key and the second common key is input from the common key comparison unit 66. To. The output determination unit 68 determines whether or not to output the plaintext block based on the comparison result by the common key comparison unit 66. The output determination unit 68 determines that the plaintext block is output when the first common key and the second common key are the same. On the other hand, when the first common key and the second common key are different from each other, the output determination unit 68 detects an abnormality (also referred to as an error) such as a failure or tampering in the subkey, and discards the plaintext block without outputting it.

以上が、復号装置6の構成についての説明である。なお、復号装置6の動作は、第1の実施形態の暗号化装置の暗号化処理(ステップS104)を復号処理に置換すればよいので詳細な説明を省略する。 The above is the description of the configuration of the decoding device 6. As for the operation of the decryption device 6, since the encryption process (step S104) of the encryption device of the first embodiment may be replaced with the decryption process, detailed description thereof will be omitted.

以上のように、本実施形態の復号装置によれば、処理性能に影響を与えることなく、安全かつ高速に大量のデータを復号できる。 As described above, according to the decoding device of the present embodiment, a large amount of data can be decoded safely and at high speed without affecting the processing performance.

(第7の実施形態)
次に、本発明の第7の実施形態に係る回線暗号システムについて図面を参照しながら説明する。図12は、本実施形態の回線暗号システム7の構成の一例を示すブロック図である。図12のように、回線暗号システム7は、少なくとも一つの暗号化装置71と、少なくとも一つの復号装置72とを備える。
(7th Embodiment)
Next, the line encryption system according to the seventh embodiment of the present invention will be described with reference to the drawings. FIG. 12 is a block diagram showing an example of the configuration of the line encryption system 7 of the present embodiment. As shown in FIG. 12, the line encryption system 7 includes at least one encryption device 71 and at least one decryption device 72.

暗号化装置71は、第1~第5の実施形態の暗号化装置1~5のいずれかに相当する。例えば、暗号化装置71と復号装置72とは、有線回線および無線回線の少なくともいずれかによって接続される。暗号化装置71は、入力される平文ブロックを暗号化することによって生成される暗号化ブロックを復号装置72に向けて送信する。 The encryption device 71 corresponds to any of the encryption devices 1 to 5 of the first to fifth embodiments. For example, the encryption device 71 and the decryption device 72 are connected by at least one of a wired line and a wireless line. The encryption device 71 transmits the encryption block generated by encrypting the input plaintext block to the decryption device 72.

復号装置72は、第6の実施形態の復号装置6に相当する。復号装置72は、暗号化装置71から暗号化ブロックを受信する。復号装置72は、共通鍵を用いて、受信した暗号化ブロックから平文ブロックを復号する。 The decoding device 72 corresponds to the decoding device 6 of the sixth embodiment. The decryption device 72 receives the encryption block from the encryption device 71. The decryption device 72 decrypts the plaintext block from the received encrypted block by using the common key.

以上のように、本実施形態の回線暗号システムによれば、処理性能に影響を与えることなく、大量のデータを安全かつ高速に送受信できる通信システムを構築できる。 As described above, according to the line encryption system of the present embodiment, it is possible to construct a communication system capable of transmitting and receiving a large amount of data safely and at high speed without affecting the processing performance.

(ハードウェア)
ここで、本発明の各実施形態に係る暗号化装置または復号装置を実現するハードウェア構成について、図13のコンピュータ90を一例として挙げて説明する。なお、図13のコンピュータ90は、各実施形態の暗号化装置または復号装置を実現するための構成例であって、本発明の範囲を限定するものではない。
(hardware)
Here, the hardware configuration for realizing the encryption device or the decryption device according to each embodiment of the present invention will be described by taking the computer 90 of FIG. 13 as an example. The computer 90 in FIG. 13 is a configuration example for realizing the encryption device or the decryption device of each embodiment, and does not limit the scope of the present invention.

図13のように、コンピュータ90は、プロセッサ91、主記憶装置92、補助記憶装置93、入出力インターフェース95および通信インターフェース96を備える。図13においては、インターフェースをI/F(Interface)と略して表記する。プロセッサ91、主記憶装置92、補助記憶装置93、入出力インターフェース95および通信インターフェース96は、バス99を介して互いにデータ通信可能に接続される。また、プロセッサ91、主記憶装置92、補助記憶装置93および入出力インターフェース95は、通信インターフェース96を介して、インターネットやイントラネットなどのネットワークに接続される。 As shown in FIG. 13, the computer 90 includes a processor 91, a main storage device 92, an auxiliary storage device 93, an input / output interface 95, and a communication interface 96. In FIG. 13, the interface is abbreviated as I / F (Interface). The processor 91, the main storage device 92, the auxiliary storage device 93, the input / output interface 95, and the communication interface 96 are connected to each other via a bus 99 so as to be capable of data communication. Further, the processor 91, the main storage device 92, the auxiliary storage device 93, and the input / output interface 95 are connected to a network such as the Internet or an intranet via the communication interface 96.

プロセッサ91は、補助記憶装置93等に格納されたプログラムを主記憶装置92に展開し、展開されたプログラムを実行する。本実施形態においては、コンピュータ90にインストールされたソフトウェアプログラムを用いる構成とすればよい。プロセッサ91は、本実施形態に係る暗号化装置または復号装置による処理を実行する。 The processor 91 expands the program stored in the auxiliary storage device 93 or the like to the main storage device 92, and executes the expanded program. In the present embodiment, the software program installed in the computer 90 may be used. The processor 91 executes the process by the encryption device or the decryption device according to the present embodiment.

主記憶装置92は、プログラムが展開される領域を有する。主記憶装置92は、例えばDRAM(Dynamic Random Access Memory)などの揮発性メモリとすればよい。また、MRAM(Magnetoresistive Random Access Memory)などの不揮発性メモリを主記憶装置92として構成・追加してもよい。 The main storage device 92 has an area in which the program is developed. The main storage device 92 may be a volatile memory such as a DRAM (Dynamic Random Access Memory). Further, a non-volatile memory such as MRAM (Magnetoresistive Random Access Memory) may be configured / added as the main storage device 92.

補助記憶装置93は、種々なデータを記憶する。例えば、補助記憶装置93は、ハードディスクやフラッシュメモリなどのローカルディスクによって構成される。なお、種々のデータを主記憶装置92に記憶させる構成とし、補助記憶装置93を省略することも可能である。 The auxiliary storage device 93 stores various data. For example, the auxiliary storage device 93 is composed of a local disk such as a hard disk or a flash memory. It is also possible to store various data in the main storage device 92 and omit the auxiliary storage device 93.

入出力インターフェース95は、コンピュータ90と周辺機器とを接続するためのインターフェースである。通信インターフェース96は、規格や仕様に基づいて、インターネットやイントラネットなどのネットワークを通じて、外部のシステムや装置に接続するためのインターフェースである。入出力インターフェース95および通信インターフェース96は、外部機器と接続するインターフェースとして共通化してもよい。 The input / output interface 95 is an interface for connecting the computer 90 and peripheral devices. The communication interface 96 is an interface for connecting to an external system or device through a network such as the Internet or an intranet based on a standard or a specification. The input / output interface 95 and the communication interface 96 may be shared as an interface for connecting to an external device.

コンピュータ90には、必要に応じて、キーボードやマウス、タッチパネルなどの入力機器を接続するように構成してもよい。それらの入力機器は、情報や設定の入力に使用される。なお、タッチパネルを入力機器として用いる場合は、表示機器の表示画面が入力機器のインターフェースを兼ねる構成とすればよい。プロセッサ91と入力機器との間のデータ通信は、入出力インターフェース95に仲介させればよい。 The computer 90 may be configured to connect an input device such as a keyboard, a mouse, or a touch panel, if necessary. These input devices are used to input information and settings. When the touch panel is used as an input device, the display screen of the display device may also serve as the interface of the input device. Data communication between the processor 91 and the input device may be mediated by the input / output interface 95.

また、コンピュータ90には、情報を表示するための表示機器を備え付けてもよい。表示機器を備え付ける場合、コンピュータ90には、表示機器の表示を制御するための表示制御装置(図示しない)が備えられていることが好ましい。表示機器は、入出力インターフェース95を介してコンピュータ90に接続すればよい。 Further, the computer 90 may be equipped with a display device for displaying information. When a display device is provided, it is preferable that the computer 90 is provided with a display control device (not shown) for controlling the display of the display device. The display device may be connected to the computer 90 via the input / output interface 95.

また、コンピュータ90には、必要に応じて、ディスクドライブを備え付けてもよい。ディスクドライブは、バス99に接続される。ディスクドライブは、プロセッサ91と図示しない記録媒体(プログラム記録媒体)との間で、記録媒体からのデータ・プログラムの読み出し、コンピュータ90の処理結果の記録媒体への書き込みなどを仲介する。記録媒体は、例えば、CD(Compact Disc)やDVD(Digital Versatile Disc)などの光学記録媒体で実現できる。また、記録媒体は、USB(Universal Serial Bus)メモリやSD(Secure Digital)カードなどの半導体記録媒体や、フレキシブルディスクなどの磁気記録媒体、その他の記録媒体によって実現してもよい。 Further, the computer 90 may be equipped with a disk drive, if necessary. The disk drive is connected to bus 99. The disk drive mediates between the processor 91 and a recording medium (program recording medium) (not shown), reading a data program from the recording medium, writing the processing result of the computer 90 to the recording medium, and the like. The recording medium can be realized by, for example, an optical recording medium such as a CD (Compact Disc) or a DVD (Digital Versatile Disc). Further, the recording medium may be realized by a semiconductor recording medium such as a USB (Universal Serial Bus) memory or an SD (Secure Digital) card, a magnetic recording medium such as a flexible disk, or another recording medium.

以上が、本発明の各実施形態に係る暗号化装置または復号装置を可能とするためのハードウェア構成の一例である。なお、図13のハードウェア構成は、各実施形態に係る暗号化装置または復号装置の演算処理を実行するためのハードウェア構成の一例であって、本発明の範囲を限定するものではない。また、各実施形態に係る暗号化装置または復号装置に関する処理をコンピュータに実行させるプログラムも本発明の範囲に含まれる。さらに、各実施形態に係るプログラムを記録したプログラム記録媒体も本発明の範囲に含まれる。 The above is an example of a hardware configuration for enabling an encryption device or a decryption device according to each embodiment of the present invention. The hardware configuration of FIG. 13 is an example of a hardware configuration for executing arithmetic processing of the encryption device or the decryption device according to each embodiment, and does not limit the scope of the present invention. Further, a program for causing a computer to execute a process related to an encryption device or a decryption device according to each embodiment is also included in the scope of the present invention. Further, a program recording medium on which a program according to each embodiment is recorded is also included in the scope of the present invention.

各実施形態の暗号化装置または復号装置の構成要素は、任意に組み合わせることができる。また、各実施形態の暗号化装置または復号装置の構成要素は、ソフトウェアによって実現してもよいし、回路によって実現してもよい。 The components of the encryption device or decryption device of each embodiment can be arbitrarily combined. Further, the components of the encryption device or the decryption device of each embodiment may be realized by software or may be realized by a circuit.

以上、実施形態を参照して本発明を説明してきたが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
〔付記〕
上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
第1共通鍵を保持する第1共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成手段と、
前記サブ鍵生成手段によって生成される前記サブ鍵を保持するサブ鍵保持手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を取得して第2共通鍵を復号する共通鍵復号手段と、
前記共通鍵復号手段によって復号される前記第2共通鍵を保持する第2共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する共通鍵比較手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する暗号化手段と、
共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果と、前記暗号化手段によって生成された前記暗号文ブロックとが入力され、前記共通鍵比較手段による比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する出力判定手段とを備える暗号化装置。
(付記2)
前記出力判定手段は、
前記第1共通鍵と前記第2共通鍵とが同じ場合に前記暗号文ブロックを出力し、
前記第1共通鍵と前記第2共通鍵とが異なる場合に前記暗号文ブロックを破棄する付記1に記載の暗号化装置。
(付記3)
入力された共通鍵と、前記第1共通鍵保持手段に保持された前記第1共通鍵とを比較し、前記サブ鍵を生成するか否かを判定するサブ鍵判定手段を備え、
前記サブ鍵判定手段は、
入力された前記共通鍵と前記第1共通鍵とが異なる場合、入力された前記共通鍵を前記第1共通鍵として前記第1共通鍵保持手段に保持させ、前記第1共通鍵保持手段に新たに保持させた前記第1共通鍵から前記サブ鍵を生成することを前記サブ鍵生成手段に指示し、
前記入力された共通鍵と前記第1共通鍵とが等しい場合、前記サブ鍵を生成することを前記サブ鍵生成手段に指示しない付記1または2に記載の暗号化装置。
(付記4)
暗号化指示に応じて疑似乱数を生成させる疑似乱数発生手段と、
前記疑似乱数発生手段によって生成された前記疑似乱数を用いて共通鍵を生成し、生成した前記共通鍵を前記第1共通鍵として前記第1共通鍵保持手段に保持させる共通鍵生成手段とを備える付記1または2に記載の暗号化装置。
(付記5)
前記共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果に基づいて、前記サブ鍵に異常があると疑われるか否かを判定する再試行判定手段を備え、
前記再試行判定手段は、
前記サブ鍵に異常があると疑われる場合、前記サブ鍵を再生成することを前記サブ鍵生成手段に指示し、
前記サブ鍵に異常があると疑われない場合、前記共通鍵比較手段による比較結果を前記出力判定手段に出力する付記1乃至4のいずれか一項に記載の暗号化装置。
(付記6)
前記暗号化手段が二重化され、
二重化された前記暗号化手段によって同一の前記平文ブロックから生成される少なくとも二つの前記暗号文ブロックが入力され、入力された少なくとも二つの前記暗号文ブロックを比較する暗号ブロック比較手段を備え、
前記暗号ブロック比較手段は、
入力された少なくとも二つの前記暗号文ブロックが異なる場合は異常があると判定して前記出力判定手段に前記暗号文ブロックを出力せず、
入力された少なくとも二つの前記暗号文ブロックが等しい場合は正常であると判定して前記出力判定手段に前記暗号文ブロックを出力する付記1乃至5のいずれか一項に記載の暗号化装置。
(付記7)
第1共通鍵を保持する第1共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成手段と、
前記サブ鍵生成手段によって生成される前記サブ鍵を保持するサブ鍵保持手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を取得して第2共通鍵を復号する共通鍵復号手段と、
前記共通鍵復号手段によって復号される前記第2共通鍵を保持する第2共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する共通鍵比較手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて暗号文ブロックから平文ブロックを復号する復号手段と、
共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果と、前記復号手段によって復号された前記平文ブロックとが入力され、前記共通鍵比較手段による比較結果に基づいて前記平文ブロックを出力するか否かを判定する出力判定手段とを備える復号装置。
(付記8)
第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成するとともに、生成された前記サブ鍵を用いて第2共通鍵を復号して、前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する暗号化装置と、
前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成された前記サブ鍵を用いて前記暗号文ブロックから前記平文ブロックを復号するとともに、生成された前記サブ鍵を用いて前記第2共通鍵を復号して、前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記平文ブロックを出力するか否かを判定する復号装置とを備え、
前記暗号化装置は、
前記平文ブロックを暗号化した前記暗号文ブロックを前記復号装置に送信し、
前記復号装置は、
前記暗号化装置から受信した前記暗号文ブロックから前記平文ブロックを復号する回線暗号システム。
(付記9)
第1共通鍵を第1共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、
生成された前記サブ鍵をサブ鍵保持手段に保持し、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号し、
復号された前記第2共通鍵を第2共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較し、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成し、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する暗号化方法。
(付記10)
第1共通鍵を第1共通鍵保持手段に保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成する処理と、
生成された前記サブ鍵をサブ鍵保持手段に保持する処理と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号する処理と、
復号された前記第2共通鍵を第2共通鍵保持手段に保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する処理と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する処理と、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する処理とをコンピュータに実行させるプログラム。
(付記11)
第1共通鍵を第1共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、
生成された前記サブ鍵をサブ鍵保持手段に保持し、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号し、
復号された前記第2共通鍵を第2共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較し、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて暗号文ブロックから平文データを復号し、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記平文データを出力するか否かを判定する暗号化方法。
(付記12)
第1共通鍵を第1共通鍵保持手段に保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成する処理と、
生成された前記サブ鍵をサブ鍵保持手段に保持する処理と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号する処理と、
復号された前記第2共通鍵を保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する処理と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて暗号文ブロックから平文データを復号する処理と、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記平文データを出力するか否かを判定する処理とをコンピュータに実行させるプログラム。
Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above embodiments. Various modifications that can be understood by those skilled in the art can be made to the structure and details of the present invention within the scope of the present invention.
[Additional Notes]
Some or all of the above embodiments may also be described, but not limited to:
(Appendix 1)
The first common key holding means for holding the first common key,
A subkey generation means for generating at least one subkey from the first common key held by the first common key holding means by a key schedule, and a subkey generating means.
A subkey holding means for holding the subkey generated by the subkey generating means, and a subkey holding means.
A common key decryption means for acquiring the subkey held by the subkey holding means and decrypting the second common key,
A second common key holding means for holding the second common key decrypted by the common key decrypting means, and a second common key holding means.
A common key comparison means for comparing the first common key held by the first common key holding means with the second common key held by the second common key holding means.
An encryption means that encrypts a plaintext block using the subkey held by the subkey holding means to generate a ciphertext block, and
The comparison result between the first common key and the second common key by the common key comparison means and the ciphertext block generated by the encryption means are input, and based on the comparison result by the common key comparison means. An encryption device including an output determination means for determining whether or not to output the ciphertext block.
(Appendix 2)
The output determination means is
When the first common key and the second common key are the same, the ciphertext block is output.
The encryption device according to Appendix 1, which discards the ciphertext block when the first common key and the second common key are different.
(Appendix 3)
A subkey determining means for comparing the input common key with the first common key held by the first common key holding means and determining whether or not to generate the subkey is provided.
The sub-key determination means is
When the input common key and the first common key are different, the input common key is held by the first common key holding means as the first common key, and the first common key holding means is newly used. Instructed the sub-key generation means to generate the sub-key from the first common key held in the key.
The encryption device according to Appendix 1 or 2, wherein when the input common key and the first common key are equal, the subkey generation means is not instructed to generate the subkey.
(Appendix 4)
Pseudo-random number generation means that generates pseudo-random numbers according to encryption instructions,
A common key generation means for generating a common key using the pseudo-random number generated by the pseudo-random number generation means and holding the generated common key as the first common key in the first common key holding means is provided. The encryption device according to Appendix 1 or 2.
(Appendix 5)
A retry determination means for determining whether or not an abnormality is suspected in the subkey is provided based on the comparison result between the first common key and the second common key by the common key comparison means.
The retry determination means is
If it is suspected that the subkey is abnormal, the subkey generation means is instructed to regenerate the subkey.
The encryption device according to any one of Supplementary note 1 to 4, wherein when it is not suspected that the subkey has an abnormality, the comparison result by the common key comparison means is output to the output determination means.
(Appendix 6)
The encryption means is duplicated,
A cipherblock comparison means is provided in which at least two ciphertext blocks generated from the same plaintext block by the duplicated cryptographic means are input and the input at least two ciphertext blocks are compared.
The cipher block comparison means is
If at least two input ciphertext blocks are different, it is determined that there is an abnormality, and the ciphertext block is not output to the output determination means.
The encryption device according to any one of Supplementary note 1 to 5, wherein if at least two input ciphertext blocks are equal, it is determined that the ciphertext block is normal, and the ciphertext block is output to the output determination means.
(Appendix 7)
The first common key holding means for holding the first common key,
A subkey generation means for generating at least one subkey from the first common key held by the first common key holding means by a key schedule, and a subkey generating means.
A subkey holding means for holding the subkey generated by the subkey generating means, and a subkey holding means.
A common key decryption means for acquiring the subkey held by the subkey holding means and decrypting the second common key,
A second common key holding means for holding the second common key decrypted by the common key decrypting means, and a second common key holding means.
A common key comparison means for comparing the first common key held by the first common key holding means with the second common key held by the second common key holding means.
A decryption means for decrypting a plaintext block from a ciphertext block using the subkey held in the subkey holding means,
The comparison result between the first common key and the second common key by the common key comparison means and the plaintext block decoded by the decoding means are input, and the plaintext is based on the comparison result by the common key comparison means. A decoding device including an output determination means for determining whether or not to output a block.
(Appendix 8)
At least one subkey is generated from the first common key in a key schedule, the plain text block is encrypted using the generated subkey to generate a ciphertext block, and the generated subkey is used for the first. 2. An encryption device that decrypts the common key and determines whether or not to output the ciphertext block based on the comparison result between the first common key and the second common key.
At least one subkey is generated from the first common key by a key schedule, the plaintext block is decrypted from the ciphertext block using the generated subkey, and the generated subkey is used to decode the plaintext block. It is provided with a decoding device that decodes the second common key and determines whether or not to output the plaintext block based on the comparison result between the first common key and the second common key.
The encryption device is
The ciphertext block obtained by encrypting the plaintext block is transmitted to the decryption device, and the ciphertext block is transmitted to the decryption device.
The decoding device is
A line encryption system that decrypts the plaintext block from the ciphertext block received from the encryption device.
(Appendix 9)
Hold the first common key in the first common key holding means,
At least one subkey is generated from the first common key held by the first common key holding means by a key schedule.
The generated sub-key is held in the sub-key holding means, and the generated sub-key is held in the sub-key holding means.
The second common key is decrypted using the subkey held by the subkey holding means, and the second common key is decrypted.
The decrypted second common key is held in the second common key holding means, and the decrypted second common key is held in the second common key holding means.
The first common key held by the first common key holding means and the second common key held by the second common key holding means are compared.
The plaintext block is encrypted using the subkey held by the subkey holding means to generate a ciphertext block.
An encryption method for determining whether or not to output the ciphertext block based on a comparison result between the first common key and the second common key.
(Appendix 10)
The process of holding the first common key in the first common key holding means,
A process of generating at least one subkey from the first common key held by the first common key holding means by a key schedule, and
The process of holding the generated subkey in the subkey holding means,
The process of decrypting the second common key using the subkey held by the subkey holding means, and
The process of holding the decrypted second common key in the second common key holding means,
A process of comparing the first common key held by the first common key holding means with the second common key held by the second common key holding means.
A process of encrypting a plaintext block using the subkey held by the subkey holding means to generate a ciphertext block, and
A program that causes a computer to execute a process of determining whether or not to output the ciphertext block based on a comparison result between the first common key and the second common key.
(Appendix 11)
Hold the first common key in the first common key holding means,
At least one subkey is generated from the first common key held by the first common key holding means by a key schedule.
The generated sub-key is held in the sub-key holding means, and the generated sub-key is held in the sub-key holding means.
The second common key is decrypted using the subkey held by the subkey holding means, and the second common key is decrypted.
The decrypted second common key is held in the second common key holding means, and the decrypted second common key is held in the second common key holding means.
The first common key held by the first common key holding means and the second common key held by the second common key holding means are compared.
The plaintext data is decrypted from the ciphertext block using the subkey held in the subkey holding means, and the plaintext data is decrypted.
An encryption method for determining whether or not to output the plaintext data based on a comparison result between the first common key and the second common key.
(Appendix 12)
The process of holding the first common key in the first common key holding means,
A process of generating at least one subkey from the first common key held by the first common key holding means by a key schedule, and
The process of holding the generated subkey in the subkey holding means,
The process of decrypting the second common key using the subkey held by the subkey holding means, and
The process of holding the decrypted second common key and
A process of comparing the first common key held by the first common key holding means with the second common key held by the second common key holding means.
A process of decrypting plaintext data from a ciphertext block using the subkey held in the subkey holding means, and
A program that causes a computer to execute a process of determining whether or not to output the plaintext data based on a comparison result between the first common key and the second common key.

1、2、3、4、5 暗号化装置
6 復号装置
7 回線暗号システム
11 第1共通鍵保持部
12 鍵スケジュール部
13 サブ鍵保持部
14 共通鍵復号部
15 第2共通鍵保持部
16 共通鍵比較部
17 データスクランブル部
18 出力判定部
21 サブ鍵生成判定部
31 疑似乱数生成部
32 共通鍵生成部
41 リトライ判定部
51 第1データスクランブル部
52 第2データスクランブル部
53 暗号ブロック比較部
67 データデスクランブル部
71 暗号化装置
72 復号装置
1, 2, 3, 4, 5 Encryption device 6 Decryption device 7 Line encryption system 11 1st common key holding unit 12 Key schedule unit 13 Sub key holding unit 14 Common key decryption unit 15 2nd common key holding unit 16 Common key Comparison part 17 Data scramble part 18 Output judgment part 21 Subkey generation judgment part 31 Pseudo-random key generation part 32 Common key generation part 41 Retry judgment part 51 First data scramble part 52 Second data scramble part 53 Cryptographic block comparison part 67 Data Scramble part 71 Encryption device 72 Decryption device

Claims (7)

第1共通鍵を保持する第1共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成手段と、
前記サブ鍵生成手段によって生成される前記サブ鍵を保持するサブ鍵保持手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を取得して第2共通鍵を復号する共通鍵復号手段と、
前記共通鍵復号手段によって復号され前記第2共通鍵を保持する第2共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する共通鍵比較手段と、
前記第2共通鍵の復号と並行して、前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する暗号化手段と、
前記共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果に基づいて、前記サブ鍵に異常があると疑われるか否かを判定する再試行判定手段と、
前記共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果と、前記暗号化手段によって生成された前記暗号文ブロックとが入力され、前記共通鍵比較手段による比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する出力判定手段とを備え、
前記サブ鍵に異常があると疑われる場合、前記再試行判定手段は、前記サブ鍵を再生成することを前記サブ鍵生成手段に指示し、
前記サブ鍵に異常があると疑われない場合、前記出力判定手段は、前記暗号文ブロックを出力する暗号化装置。
The first common key holding means for holding the first common key,
A subkey generation means for generating at least one subkey from the first common key held by the first common key holding means by a key schedule, and a subkey generating means.
A subkey holding means for holding the subkey generated by the subkey generating means, and a subkey holding means.
A common key decryption means for acquiring the subkey held by the subkey holding means and decrypting the second common key,
A second common key holding means for holding the second common key decrypted by the common key decrypting means, and a second common key holding means.
A common key comparison means for comparing the first common key held by the first common key holding means with the second common key held by the second common key holding means.
An encryption means for generating a ciphertext block by encrypting a plaintext block using the subkey held by the subkey holding means in parallel with decryption of the second common key .
A retry determination means for determining whether or not an abnormality is suspected in the subkey based on the comparison result between the first common key and the second common key by the common key comparison means.
The comparison result between the first common key and the second common key by the common key comparison means and the ciphertext block generated by the encryption means are input, and based on the comparison result by the common key comparison means. It is provided with an output determination means for determining whether or not to output the ciphertext block.
If it is suspected that the subkey is abnormal, the retry determination means instructs the subkey generation means to regenerate the subkey.
If it is not suspected that the subkey has an abnormality, the output determination means is an encryption device that outputs the ciphertext block .
前記出力判定手段は、
前記第1共通鍵と前記第2共通鍵とが同じ場合に前記暗号文ブロックを出力し、
前記第1共通鍵と前記第2共通鍵とが異なる場合に前記暗号文ブロックを破棄する請求項1に記載の暗号化装置。
The output determination means is
When the first common key and the second common key are the same, the ciphertext block is output.
The encryption device according to claim 1, wherein when the first common key and the second common key are different, the ciphertext block is destroyed.
入力された共通鍵と、前記第1共通鍵保持手段に保持された前記第1共通鍵とを比較し、前記サブ鍵を生成するか否かを判定するサブ鍵判定手段を備え、
前記サブ鍵判定手段は、
入力された前記共通鍵と前記第1共通鍵とが異なる場合、入力された前記共通鍵を前記第1共通鍵として前記第1共通鍵保持手段に保持させ、前記第1共通鍵保持手段に新たに保持させた前記第1共通鍵から前記サブ鍵を生成することを前記サブ鍵生成手段に指示し、
力された前記共通鍵と前記第1共通鍵とが等しい場合、前記サブ鍵を生成することを前記サブ鍵生成手段に指示しない請求項1または2に記載の暗号化装置。
A subkey determining means for comparing the input common key with the first common key held by the first common key holding means and determining whether or not to generate the subkey is provided.
The sub-key determination means is
When the input common key and the first common key are different, the input common key is held by the first common key holding means as the first common key, and the first common key holding means is newly used. Instructed the sub-key generation means to generate the sub-key from the first common key held in the key.
The encryption device according to claim 1 or 2, wherein when the input common key and the first common key are equal, the subkey generation means is not instructed to generate the subkey.
暗号化指示に応じて疑似乱数を生成させる疑似乱数発生手段と、
前記疑似乱数発生手段によって生成された前記疑似乱数を用いて共通鍵を生成し、生成した前記共通鍵を前記第1共通鍵として前記第1共通鍵保持手段に保持させる共通鍵生成手段とを備える請求項1または2に記載の暗号化装置。
Pseudo-random number generation means that generates pseudo-random numbers according to encryption instructions,
A common key generation means for generating a common key using the pseudo-random number generated by the pseudo-random number generation means and holding the generated common key as the first common key in the first common key holding means is provided. The encryption device according to claim 1 or 2.
前記暗号化手段が二重化され、
二重化された前記暗号化手段によって同一の前記平文ブロックから生成される少なくとも二つの前記暗号文ブロックが入力され、入力された少なくとも二つの前記暗号文ブロックを比較する暗号ブロック比較手段を備え、
前記暗号ブロック比較手段は、
入力された少なくとも二つの前記暗号文ブロックが異なる場合は異常があると判定して前記出力判定手段に前記暗号文ブロックを出力せず、
入力された少なくとも二つの前記暗号文ブロックが等しい場合は正常であると判定して前記出力判定手段に前記暗号文ブロックを出力する請求項1乃至のいずれか一項に記載の暗号化装置。
The encryption means is duplicated,
A cipherblock comparison means is provided in which at least two ciphertext blocks generated from the same plaintext block by the duplicated cryptographic means are input and the input at least two ciphertext blocks are compared.
The cipher block comparison means is
If at least two input ciphertext blocks are different, it is determined that there is an abnormality, and the ciphertext block is not output to the output determination means.
The encryption device according to any one of claims 1 to 4 , wherein when at least two input ciphertext blocks are equal, it is determined that the ciphertext block is normal and the ciphertext block is output to the output determination means.
第1共通鍵を第1共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、
生成された前記サブ鍵をサブ鍵保持手段に保持し、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号し、
復号された前記第2共通鍵を第2共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較し、
前記第2共通鍵の復号と並行して、前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成し、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて、前記サブ鍵に異常があると疑われるか否かを判定し、
前記サブ鍵に異常があると疑われる場合、前記サブ鍵を再生成することを指示し、
前記サブ鍵に異常があると疑われない場合、前記暗号文ブロックを出力する暗号化方法。
Hold the first common key in the first common key holding means,
At least one subkey is generated from the first common key held by the first common key holding means by a key schedule.
The generated sub-key is held in the sub-key holding means, and the generated sub-key is held in the sub-key holding means.
The second common key is decrypted using the subkey held by the subkey holding means, and the second common key is decrypted.
The decrypted second common key is held in the second common key holding means, and the decrypted second common key is held in the second common key holding means.
The first common key held by the first common key holding means and the second common key held by the second common key holding means are compared.
In parallel with the decryption of the second common key, the plaintext block is encrypted using the subkey held by the subkey holding means to generate a ciphertext block.
Based on the comparison result between the first common key and the second common key, it is determined whether or not the subkey is suspected to be abnormal.
If it is suspected that the subkey is abnormal, the subkey is instructed to be regenerated, and the subkey is instructed to be regenerated.
An encryption method that outputs the ciphertext block when it is not suspected that the subkey has an abnormality .
第1共通鍵を第1共通鍵保持手段に保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成する処理と、
生成された前記サブ鍵をサブ鍵保持手段に保持する処理と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号する処理と、
復号された前記第2共通鍵を第2共通鍵保持手段に保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する処理と、
前記第2共通鍵を復号する処理と並行して、前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する処理と、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて、前記サブ鍵に異常があると疑われるか否かを判定する処理と、
前記サブ鍵に異常があると疑われる場合、前記サブ鍵を再生成することを指示し、前記サブ鍵に異常があると疑われない場合、前記暗号文ブロックを出力する処理とをコンピュータに実行させるプログラム。
The process of holding the first common key in the first common key holding means,
A process of generating at least one subkey from the first common key held by the first common key holding means by a key schedule, and
The process of holding the generated subkey in the subkey holding means,
The process of decrypting the second common key using the subkey held by the subkey holding means, and
The process of holding the decrypted second common key in the second common key holding means,
A process of comparing the first common key held by the first common key holding means with the second common key held by the second common key holding means.
In parallel with the process of decrypting the second common key, a process of encrypting a plaintext block using the subkey held by the subkey holding means to generate a ciphertext block, and a process of generating a ciphertext block.
Based on the comparison result between the first common key and the second common key , a process of determining whether or not the subkey is suspected to be abnormal, and a process of determining whether or not the subkey is suspected to be abnormal.
If it is suspected that there is an abnormality in the subkey, it is instructed to regenerate the subkey, and if it is not suspected that there is an abnormality in the subkey, the process of outputting the ciphertext block is performed by the computer. Program to be executed by.
JP2018002875A 2018-01-11 2018-01-11 Cryptographic devices, encryption methods and programs Active JP7063628B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018002875A JP7063628B2 (en) 2018-01-11 2018-01-11 Cryptographic devices, encryption methods and programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018002875A JP7063628B2 (en) 2018-01-11 2018-01-11 Cryptographic devices, encryption methods and programs

Publications (2)

Publication Number Publication Date
JP2019124713A JP2019124713A (en) 2019-07-25
JP7063628B2 true JP7063628B2 (en) 2022-05-09

Family

ID=67398561

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018002875A Active JP7063628B2 (en) 2018-01-11 2018-01-11 Cryptographic devices, encryption methods and programs

Country Status (1)

Country Link
JP (1) JP7063628B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3503638B1 (en) 2002-09-26 2004-03-08 日本電気株式会社 Cryptographic device and cryptographic program
JP2005134478A (en) 2003-10-28 2005-05-26 Sony Corp Encryption processing device, encryption processing method, and computer program
JP2005522912A (en) 2002-04-08 2005-07-28 オベルトゥル カード システムズ ソシエテ アノニム How to secure an electronic entity using encrypted access
JP2008145791A (en) 2006-12-11 2008-06-26 Sony Corp Encryption processing device, encryption processing method and computer program
JP2010021637A (en) 2008-07-08 2010-01-28 Renesas Technology Corp Data processor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10154976A (en) * 1996-11-22 1998-06-09 Toshiba Corp Tamper-free system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005522912A (en) 2002-04-08 2005-07-28 オベルトゥル カード システムズ ソシエテ アノニム How to secure an electronic entity using encrypted access
JP3503638B1 (en) 2002-09-26 2004-03-08 日本電気株式会社 Cryptographic device and cryptographic program
JP2005134478A (en) 2003-10-28 2005-05-26 Sony Corp Encryption processing device, encryption processing method, and computer program
JP2008145791A (en) 2006-12-11 2008-06-26 Sony Corp Encryption processing device, encryption processing method and computer program
JP2010021637A (en) 2008-07-08 2010-01-28 Renesas Technology Corp Data processor

Also Published As

Publication number Publication date
JP2019124713A (en) 2019-07-25

Similar Documents

Publication Publication Date Title
EP2016525B1 (en) Encryption apparatus and method for providing an encrypted file system
US8634549B2 (en) Ciphertext key chaining
JP2006277411A (en) Processor, memory, computer system and data transfer method
JP2009163284A (en) Processor apparatus
JP4758904B2 (en) Confidential information processing method
US8804953B2 (en) Extensive ciphertext feedback
US8041033B2 (en) Cipher feedback with variable block chaining
JP2008306395A (en) Information processor, information processing method
WO2006118101A1 (en) Confidential information processing host device and confidential information processing method
JP2007336446A (en) Data encryption apparatus
JP7063628B2 (en) Cryptographic devices, encryption methods and programs
JP6203387B2 (en) Encryption device, storage system, decryption device, encryption method, decryption method, encryption program, and decryption program
KR20060110383A (en) Multi-mode ciphering apparatus for network security processor
JP7310938B2 (en) Encryption system, encryption method, decryption method and program
JP2011123229A (en) Program code encryption device and program
JP4941192B2 (en) Encryption processing system
JP2006279488A (en) Cipher text generation device, cipher text deciphering device, cipher text generation program, and cipher text deciphering program
JP2002082732A (en) System and method for prevention against illegal alternation of program code and recording medium with recorded control program thereof
JP6521499B2 (en) Cryptographic processing apparatus, semiconductor memory and memory system
JP2008252290A (en) Image processor and program processing method of same
JP2009075474A (en) Cryptography processor
JP2007158967A (en) Information processing apparatus, tamper resistant device, encryption processing method and computer program
JP2006313505A (en) Encryption and decryption system, apparatuses and methods for encryption and decryption, and program
JP2001024631A (en) Portable recording medium, ciphering device and ciphering system
JP2020145656A (en) Information processing device, information processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210811

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210817

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211013

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20211110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220111

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220308

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220421

R150 Certificate of patent or registration of utility model

Ref document number: 7063628

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150