JP2019124713A - Encryption device, decryption device, channel coding system, encryption method and its program - Google Patents

Encryption device, decryption device, channel coding system, encryption method and its program Download PDF

Info

Publication number
JP2019124713A
JP2019124713A JP2018002875A JP2018002875A JP2019124713A JP 2019124713 A JP2019124713 A JP 2019124713A JP 2018002875 A JP2018002875 A JP 2018002875A JP 2018002875 A JP2018002875 A JP 2018002875A JP 2019124713 A JP2019124713 A JP 2019124713A
Authority
JP
Japan
Prior art keywords
common key
key
subkey
unit
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018002875A
Other languages
Japanese (ja)
Other versions
JP7063628B2 (en
Inventor
由利 樋口
Yuri Higuchi
由利 樋口
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

Abstract

To provide an encryption device which enables a safe and fast encryption of big data without affecting its processing capacity.SOLUTION: An encryption device 1 comprises: a key schedule part 12 which generates at least one sub-key from a first common key input from outside by using a key schedule; a common key decoding part 14 which obtains the sub-key and decodes a second common key; a common key comparison part 16 which compares the first common key with the second common key; a data scramble part 17 which encrypts a plaintext block input from outside into a ciphertext block by using the sub-key; and an output determination part 18 which determines whether or not the ciphertext block should be output according to the result of comparison performed by the common key comparison part 16.EFFECT: The comparison of the first common key and the second common key decoded by the sub-key is done in parallel with the process of data encryption, and therefore processing errors of abnormal common keys and sub-keys can be done without affecting data encryption performance.SELECTED DRAWING: Figure 1

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, a decryption device, a line encryption system, an encryption method, and a program using a block cipher.

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

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

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

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

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

特開2008−058831号公報JP 2008-058831 A

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

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

また、サブ鍵の生成回数を限定する手法によれば、大量のデータを高速に暗号化できる。しかしながら、この手法の場合、共通鍵に加えて、鍵スケジュールにより生成したサブ鍵も記憶部に格納するため、鍵の漏洩や改ざんなどのリスクが高まるという問題点があった。   Also, according to the method of limiting the number of times of sub key 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, since the subkey generated by the key schedule is also stored in the storage unit, there is a problem that the risk of leakage or tampering of the key is increased.

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

本発明の一態様の暗号化装置は、第1共通鍵を保持する第1共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成部と、サブ鍵生成部によって生成されるサブ鍵を保持するサブ鍵保持部と、サブ鍵保持部に保持されたサブ鍵を取得して第2共通鍵を復号する共通鍵復号部と、共通鍵復号部によって復号される第2共通鍵を保持する第2共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵と、第2共通鍵保持部に保持された第2共通鍵とを比較する共通鍵比較部と、サブ鍵保持部に保持されたサブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する暗号化部と、共通鍵比較部による第1共通鍵と第2共通鍵との比較結果と、暗号化部によって生成された暗号文ブロックとが入力され、共通鍵比較部による比較結果に基づいて暗号文ブロックを出力するか否かを判定する出力判定部とを備える。   The encryption apparatus according to one aspect of the present invention uses a key schedule from the first common key holding unit holding the first common key, and at least one subkey from the first common key held in the first common key holding unit. A subkey generation unit to be generated, a subkey holding unit holding a subkey generated by the subkey generation unit, and a common key for acquiring a subkey held in the subkey holding unit and decrypting a second common key A decryption unit, a second common key holding unit holding a second common key decrypted by the common key decryption unit, a first common key held by the first common key holding unit, and a second common key holding unit A common key comparison unit for comparing the held second common key, an encryption unit for generating a ciphertext block by encrypting a plaintext block using the subkey held in the subkey holding unit, and a common key comparison Generated by the encryption unit and the comparison result between the first common key and the second common key by the Is entered and the ciphertext block, and an output determining unit that determines whether to output the ciphertext block based on a comparison result by the common key comparing unit.

本発明の一態様の復号装置は、第1共通鍵を保持する第1共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成部と、サブ鍵生成部によって生成されるサブ鍵を保持するサブ鍵保持部と、サブ鍵保持部に保持されたサブ鍵を取得して第2共通鍵を復号する共通鍵復号部と、共通鍵復号部によって復号される第2共通鍵を保持する第2共通鍵保持部と、第1共通鍵保持部に保持された第1共通鍵と、第2共通鍵保持部に保持された第2共通鍵とを比較する共通鍵比較部と、サブ鍵保持部に保持されたサブ鍵を用いて暗号文ブロックから平文ブロックを復号する復号部と、共通鍵比較部による第1共通鍵と第2共通鍵との比較結果と、復号部によって復号された平文ブロックとが入力され、共通鍵比較部による比較結果に基づいて平文ブロックを出力するか否かを判定する出力判定部とを備える。   The decryption apparatus according to 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 by the first common key holding unit using a key schedule. Subkey generation unit, a subkey holding unit for holding the subkey generated by the subkey generation unit, and common key decryption for obtaining the subkey held in the subkey holding unit and decrypting the second common key , The second common key holding unit holding the second common key decrypted by the common key decryption unit, the first common key held in the first common key holding unit, and the second common key holding unit A common key comparison unit that compares the received second common key, a decryption unit that decrypts a plaintext block from the ciphertext block using the subkey held in the subkey holding unit, and a first common by the common key comparison unit The comparison result between the key and the second common key, and the plaintext block decrypted by the decryption unit Click and is input, and an output determining unit that determines whether to output the plaintext block based on the comparison result by the common key comparing unit.

本発明の一態様の回線暗号システムは、第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成されたサブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成するとともに、生成されたサブ鍵を用いて第2共通鍵を復号して、第1共通鍵と第2共通鍵との比較結果に基づいて暗号文ブロックを出力するか否かを判定する暗号化装置と、第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成されたサブ鍵を用いて暗号文ブロックから平文ブロックを復号するとともに、生成されたサブ鍵を用いて第2共通鍵を復号して、第1共通鍵と第2共通鍵との比較結果に基づいて平文ブロックを出力するか否かを判定する復号装置とを備え、暗号化装置は、平文ブロックを暗号化した暗号文ブロックを復号装置に送信し、復号装置は、暗号化装置から受信した暗号文ブロックから平文ブロックを復号する。   The line encryption system according to one aspect of the present invention generates at least one subkey from the first common key with a key schedule and encrypts a plaintext block using the generated subkey to generate a ciphertext 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 according to the key schedule, the plaintext block is decrypted from the ciphertext block using the generated subkey, and the second common key is decrypted using the generated subkey And a decryption apparatus that determines whether to output a plaintext block based on the comparison result of the first common key and the second common key, the encryption apparatus comprising: a ciphertext block obtained by encrypting the plaintext block Decoding Transmitted to the decoding device decodes the plaintext 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 according to 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 a key schedule. And the generated subkey is held in the subkey holding unit, and the second common key is decrypted using the subkey held in the subkey holding unit, and the decrypted second common key is used as the second common key. 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 A plaintext block is encrypted using the subkey to generate a ciphertext block, and it is determined whether to output a ciphertext 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共通鍵との比較結果に基づいて暗号文ブロックを出力するか否かを判定する処理とをコンピュータに実行させるプログラム。   The program according to one aspect of the present invention includes a process of holding the first common key 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 using a key schedule. A process of generating, a process of holding the generated subkey in the subkey holding unit, a process of decoding the second common key using the subkey held in the subkey holding unit, and a second common decrypted A process of holding the key in the second common key holding unit, a process of comparing the first common key held in the first common key holding unit, and the second common key held in the second common key holding unit Outputting a ciphertext block based on a result of processing of generating a ciphertext block by encrypting a plaintext block using the subkey held in the subkey holding unit and a comparison result of the first common key and the second common key A program that causes a computer to execute a process of determining whether to

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

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

以下に、本発明を実施するための形態について図面を用いて説明する。ただし、以下に述べる実施形態には、本発明を実施するために技術的に好ましい限定がされているが、発明の範囲を以下に限定するものではない。また、以下の実施形態の説明に用いる全図においては、特に理由がない限り、同様箇所には同一符号を付す。また、以下の実施形態において、同様の構成・動作に関しては繰り返しの説明を省略する場合がある。また、図面中の矢印の向きは、一例を示すものであり、信号の向きを限定するものではない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the embodiments described below are technically preferable limitations for carrying out the present invention, but the scope of the invention is not limited to the following. Further, in all the drawings used in the description of the embodiments below, the same reference numerals are given to the same parts unless there is a particular reason. In the following embodiments, the same configuration and operation may not be repeatedly described. In addition, 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, an encryption apparatus according to a first embodiment of the present invention will be described with reference to the drawings. At least one plaintext block constituting encryption target data (also referred to as target data) and a common key for encrypting the plaintext block are input to the encryption apparatus of the present embodiment. The encryption apparatus of the present embodiment generates a subkey from the common key, and generates a ciphertext block by encrypting the plaintext block using the generated subkey. The encryption apparatus of the present embodiment may be configured to encrypt a plaintext block into an encrypted 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 scheduling 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 unit) holds the 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 unit) acquires the first common key held in the first common key holding unit 11. The key scheduling unit 12 generates a sub key from the acquired first common key. For example, the key scheduling unit 12 generates N subkeys used in all rounds from the first common key (N is a natural number). The key scheduling 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 scheduling unit 12 performs key scheduling using a common key block encryption algorithm such as AES (Advanced Encryption Standard). The key scheduling unit 12 may perform key scheduling using a block encryption algorithm such as DES (Data Encryption Standard) or triple DES. The key scheduling unit 12 may also perform key scheduling using a block encryption algorithm such as MISTY 1 (Mitsubishi Improved Security Technology) or Camelia. However, the key schedule by the key schedule part 12 is not limited to the method mentioned here.

サブ鍵保持部13(サブ鍵保持手段とも呼ぶ)は、鍵スケジュール部12によって生成されたサブ鍵が記憶される。例えば、サブ鍵保持部13は、レジスタやメモリによって実現される。   The sub key holding unit 13 (also referred to as a sub key holding unit) stores the sub key generated by the key scheduling 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 unit) decrypts the common key (hereinafter also referred to as a second common key) from the subkey stored in the subkey storage unit 13. For example, the common key decryption unit 14 decrypts the second common key from the N subkeys stored in the subkey storage 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 unit) holds the second common key decrypted by the common key decryption 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 unit) 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 data to be encrypted (also referred to as target data) is input to the data scramble unit 17 (also referred to as encryption unit), and a sub key is input from the sub key storage 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共通鍵とが異なる場合、サブ鍵に故障や改ざんなどの異常(エラーとも呼ぶ)を検出し、暗号文ブロックを出力せずに破棄する。   The ciphertext block is input from the data scramble unit 17 to the output determination unit 18 (also referred to as output determination means), and the 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 to output a ciphertext block based on the comparison result by the common key comparison unit 16. When the first common key and the second common key are the same, the output determination unit 18 determines to output the ciphertext block. 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 referred to as an error) such as a failure or falsification in the sub key 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を動作の主体として説明する。
(Operation)
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 performed by the encryption device 1. In the following description following the flowchart of FIG. 2, the encryption device 1 will be described as the subject of the operation.

図2において、まず、暗号化装置1は、共通鍵が入力されると、その共通鍵(第1共通鍵とも呼ぶ)を第1共通鍵保持部11に格納する(ステップS101)。   In FIG. 2, first, when the 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 key scheduling according to the common key block encryption algorithm (step S102).

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

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

また、暗号化装置1は、ステップS104の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS105)。   In addition, the encryption device 1 executes the common key decryption process using the subkey stored in the subkey storage unit 13 in parallel with the encryption process of step S104 and executes the common key (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 sub key, performs error processing, and discards the ciphertext block. (Step S110).

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

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

すなわち、本実施形態の暗号化装置によれば、処理性能に影響を与えることなく、大量のデータを安全かつ高速に暗号化できる。   That is, according to the encryption apparatus 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, an encryption apparatus according to a second embodiment of the present invention will be described with reference to the drawings. The encryption device of this embodiment differs from the first embodiment in that it determines whether or not to generate a subkey based on the presence / absence of a subkey corresponding to the input common key. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, 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 a sub-key generation determination unit 21 is added to the encryption device 1 of the first embodiment.

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

サブ鍵生成判定部21は、入力された共通鍵が変わっていない場合、鍵スケジュール部12に鍵スケジュールを実行させない。一方、サブ鍵生成判定部21は、入力された共通鍵が変わっている場合、新たな共通鍵を第1共通鍵として第1共通鍵保持部11に保持させ、鍵スケジュール部12に鍵スケジュールを実行させる。   If the input common key has not changed, the sub-key generation determining unit 21 does not cause the key scheduling unit 12 to execute the key schedule. On the other hand, when the input common key is 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 causes the key schedule unit 12 to set the key schedule. Run it.

鍵スケジュール部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, the key scheduling unit 12 does not execute the key schedule when the sub-key generation determining unit 21 determines that the common key has not changed. On the other hand, when the sub-key generation determination unit 21 determines that the common key is changed, the key schedule unit 12 executes the key schedule for the new common key held in the first common key holding unit 11.

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

以上が、暗号化装置2の構成の一例についての説明である。次に、暗号化装置2の動作の一例についての図面を参照しながら説明する。   The above is the description 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を動作の主体として説明する。
(Operation)
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 performed by the encryption device 2. In the following description based on the flowchart of FIG. 4, the encryption device 2 will be described as the subject of the 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 sub key has 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 sub-key from the first common key stored in the first common key holding unit 11 by performing key scheduling according to the common key block encryption algorithm (step S203).

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

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

また、暗号化装置2は、ステップS205の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS206)。   In addition, the encryption device 2 executes the common key decryption process using the subkey stored in the subkey holding unit 13 in parallel with the encryption process of step S205 and executes the common key (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 S 209), the encryption device 2 detects an abnormality in the sub key, performs error processing, and discards the ciphertext block. (Step S211).

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

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

(第3の実施形態)
次に、本発明の第3の実施形態に係る暗号化装置について図面を参照しながら説明する。本実施形態の暗号化装置は、共通鍵を入力するのではなく、暗号化指示に応じて共通鍵を生成する点で、第1の実施形態とは異なる。なお、以下の説明においては、第1の実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する場合がある。
Third Embodiment
Next, an encryption apparatus according to a third embodiment of the present invention will be described with reference to the drawings. The encryption apparatus of the present embodiment differs from the first embodiment in that the common key is not generated but the common key is generated according to the encryption instruction. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, 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 unit). 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. 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に格納する。   The 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 unit). 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 in the first common key holding unit 11 as a first common key.

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

以上が、暗号化装置3の構成の一例についての説明である。次に、暗号化装置3の動作の一例についての図面を参照しながら説明する。   The above is the description 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を動作の主体として説明する。
(Operation)
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 performed by the encryption device 3. In the following description based on the flowchart of FIG. 6, the encryption device 3 will be described as the subject of the operation.

図6において、まず、暗号化装置3は、暗号化指示が入力されると、疑似乱数を生成する(ステップS301)。   In FIG. 6, first, when the encryption instruction is input, the encryption device 3 generates a pseudorandom number (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 a 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 sub-key from the first common key stored in the first common key holding unit 11 by performing key scheduling according to a common key block encryption algorithm (step S304).

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

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

また、暗号化装置3は、ステップS306の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS307)。   In addition, the encryption device 3 executes a common key decryption process using the subkey stored in the subkey storage unit 13 in parallel with the encryption process of step S306 to obtain a common key (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 sub key, performs error processing, and discards the ciphertext block. (Step S312).

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

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

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

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

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

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

以上が、暗号化装置4の構成の一例についての説明である。次に、暗号化装置4の動作の一例についての図面を参照しながら説明する。   The above is the description 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を動作の主体として説明する。
(Operation)
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 performed by the encryption device 4. In the following description following the flowchart of FIG. 8, the encryption device 4 will be described as the subject of the 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 a 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 sub-key from the first common key stored in the first common key holding unit 11 by performing key scheduling according to the common key block encryption algorithm (step S402).

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

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

また、暗号化装置4は、ステップS404の暗号化処理と並行して、サブ鍵保持部13に格納されたサブ鍵を用いて共通鍵復号処理を実行して共通鍵(第2共通鍵とも呼ぶ)を復号する(ステップS405)。   In addition, the encryption device 4 executes the common key decryption process using the subkey stored in the subkey storage unit 13 in parallel with the encryption process of step S404 and calls the common key (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 sub key, 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 there is an abnormality in the sub key. At this time, the process returns to step S402, and the encryption device 4 generates a new sub key from the first common key stored in the first common key holding unit 11 by re-executing the key scheduling process.

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

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

(第5の実施形態)
次に、本発明の第5の実施形態に係る暗号化装置について図面を参照しながら説明する。本実施形態の暗号化装置は、データスクランブル部を二重化し、データの異常についても検出する点で、第1の実施形態とは異なる。なお、以下の説明においては、第1の実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する場合がある。
Fifth Embodiment
Next, an encryption apparatus according to a fifth embodiment of the present invention will be described with reference to the drawings. The encryption apparatus of this embodiment is different from the first embodiment in that the data scramble unit is duplicated and data abnormality is also detected. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, 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 encrypted blocks. It has the structure which added the part 53. FIG.

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

第2データスクランブル部52には、サブ鍵保持部13からサブ鍵が入力されるとともに、暗号化対象データを構成する平文ブロックが入力される。第2データスクランブル部52は、サブ鍵を用いて、入力された平文ブロックを暗号化することによって暗号文ブロックを生成する。第2データスクランブル部52は、生成した暗号文ブロック(第2暗号文ブロックとも呼ぶ)を暗号ブロック比較部53に出力する。   The second data scramble unit 52 receives the subkey from the subkey holding unit 13 and also receives a plaintext block constituting the data to be encrypted. The second data scramble unit 52 generates a ciphertext block by encrypting the input plaintext block using the sub key. The second data scramble unit 52 outputs the generated ciphertext block (also referred to as a second ciphertext block) to the cipher 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 cipher block comparison unit). The cryptographic block comparison unit 53 compares the input first ciphertext block with the second ciphertext block. In addition to the comparison of the ciphertext blocks, the cipher block comparison unit 53 may apply the authentication-use 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, the cipher block 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, the cipher block comparison unit 53 determines that there is an abnormality in the ciphertext block or the plaintext block corresponding to the ciphertext block. If the cipher block comparison unit 53 determines that there is an abnormality in the ciphertext block or the plaintext block, the cipher block comparison unit 53 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 cipher block 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 cipher block comparison unit 53 determines that the ciphertext block is normal. If the cipher block comparison unit 53 determines that the ciphertext block is normal, it outputs either the first ciphertext block or the second ciphertext block as a ciphertext block to the output judgment unit 18.

出力判定部18は、暗号ブロック比較部53から異常があるとの通知を受けると、暗号文ブロックの出力を停止する。例えば、出力判定部18は、異常があるとの通知を受けた際に、図示しない表示装置などに通知結果を表示させる指示を出すように構成してもよい。   When receiving the notification that there is an abnormality from the encryption block comparison unit 53, 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 receiving the notification that there is an abnormality.

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

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

以上が、暗号化装置5の構成の一例についての説明である。次に、暗号化装置5の動作の一例についての図面を参照しながら説明する。   The above is the description 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を動作の主体として説明する。
(Operation)
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 performed by the encryption device 5. In the following description based on the flowchart of FIG. 10, the encryption device 5 will be described as the subject of the 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 a 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 sub-key from the first common key stored in the first common key holding unit 11 by performing key scheduling according to the common key block encryption algorithm (step S502).

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

暗号化装置5は、サブ鍵保持部13に格納されたサブ鍵を用いて、入力された平文ブロックを共通鍵方式のブロック暗号アルゴリズムにより二重に暗号化する(ステップS504)。すなわち、暗号化装置5は、同一の平文ブロックから二つの暗号化ブロックを生成する。   The encryption device 5 double encrypts the input plaintext block according to the common key block encryption algorithm using the subkey stored in the subkey storage unit 13 (step S504). That is, the encryption device 5 generates two encrypted 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)。   In addition, the encryption device 5 executes the common key decryption process using the subkey stored in the subkey storage unit 13 in parallel with the processing in step S504 and step S505, thereby generating the common key (also the 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 sub key, performs error processing, and discards the ciphertext block. (Step S511).

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

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

(第6の実施形態)
次に、本発明の第6の実施形態に係る復号装置について図面を参照しながら説明する。本実施形態の復号装置は、第1の実施形態の暗号化装置から出力された暗号文ブロックを復号する。なお、本実施形態の復号装置は、第2〜第5の実施形態の暗号化装置から出力された暗号文ブロックを復号するように構成してもよい。
Sixth Embodiment
Next, a decoding apparatus according to a sixth embodiment of the present invention will be described with reference to the drawings. The decryption apparatus of the present embodiment decrypts the ciphertext block output from the encryption apparatus of the first embodiment. The decryption apparatus of the present embodiment may be configured to decrypt a ciphertext block output from the encryption apparatus 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 scheduling unit 62, a sub key holding unit 63, a common key decryption unit 64, a second common key holding unit 65, a common key comparison unit 66, A data descrambling unit 67 and an output determining 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 unit) holds the 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 unit) acquires the first common key held in the first common key holding unit 61. The key scheduling unit 62 generates a sub key from the acquired first common key. For example, the key scheduling 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 sub key in the sub key holding unit 63.

サブ鍵保持部63(サブ鍵保持手段とも呼ぶ)は、鍵スケジュール部62によって生成されたサブ鍵が記憶される。例えば、サブ鍵保持部63は、レジスタやメモリによって実現される。   The sub key holding unit 63 (also referred to as a sub key holding unit) stores the sub key generated by the key scheduling 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 unit) decrypts the 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 decrypts 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 unit) holds the second common key decrypted by the common key decryption 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 unit) 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に出力する。   The data descrambling unit 67 (also referred to as a decryption unit) receives the subkey from the subkey holding unit 63 and receives the encrypted block. The data descrambling unit 67 decrypts the input encrypted block using the subkey. The data descrambling unit 67 outputs the decrypted plaintext block to the output determination unit 68.

出力判定部68(出力判定手段とも呼ぶ)には、データデスクランブル部67から平文ブロックが入力されるとともに、共通鍵比較部66から第1共通鍵と第2共通鍵との比較結果が入力される。出力判定部68は、共通鍵比較部66による比較結果に基づいて、平文ブロックを出力するか否か判定する。出力判定部68は、第1共通鍵と第2共通鍵とが同じ場合、平文ブロックを出力すると判定する。一方、出力判定部68は、第1共通鍵と第2共通鍵とが異なる場合、サブ鍵に故障や改ざんなどの異常(エラーとも呼ぶ)を検出し、平文ブロックを出力せずに破棄する。   Output determination unit 68 (also referred to as output determination means) receives the plaintext block from data descrambling unit 67 and also receives the comparison result between the first common key and the second common key from common key comparison unit 66. Ru. Based on the comparison result by the common key comparison unit 66, the output determination unit 68 determines whether to output a plaintext block. If the first common key and the second common key are the same, the output judgment unit 68 judges to output a plaintext block. On the other hand, when the first common key and the second common key are different, the output determination unit 68 detects an abnormality (also referred to as an error) such as a failure or falsification in the sub key 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. The operation of the decrypting device 6 may replace the encryption process (step S104) of the encrypting device of the first embodiment with the decrypting process, and thus the detailed description will be omitted.

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

(第7の実施形態)
次に、本発明の第7の実施形態に係る回線暗号システムについて図面を参照しながら説明する。図12は、本実施形態の回線暗号システム7の構成の一例を示すブロック図である。図12のように、回線暗号システム7は、少なくとも一つの暗号化装置71と、少なくとも一つの復号装置72とを備える。
Seventh Embodiment
Next, a line encryption system according to a 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 encrypted 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 encrypted block from the encryption device 71. The decryption device 72 decrypts the plaintext block from the received encrypted block 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, a hardware configuration for realizing the encryption apparatus or the decryption apparatus 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 according to 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 92, an auxiliary storage 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 unit 92, the auxiliary storage unit 93, the input / output interface 95 and the communication interface 96 are communicably connected to each other via a bus 99. 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 deploys the program stored in the auxiliary storage device 93 or the like in the main storage device 92, and executes the deployed program. In the present embodiment, a software program installed in the computer 90 may be used. The processor 91 executes processing 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 a program is expanded. The main storage device 92 may be, for example, a volatile memory such as a dynamic random access memory (DRAM). In addition, a non-volatile memory such as a magnetoresistive random access memory (MRAM) may be configured and 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 configured by a local disk such as a hard disk or a flash memory. Note that various data may be stored in the main storage unit 92, and the auxiliary storage unit 93 may be omitted.

入出力インターフェース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 standards and specifications. The input / output interface 95 and the communication interface 96 may be common as an interface connected to an external device.

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

また、コンピュータ90には、情報を表示するための表示機器を備え付けてもよい。表示機器を備え付ける場合、コンピュータ90には、表示機器の表示を制御するための表示制御装置(図示しない)が備えられていることが好ましい。表示機器は、入出力インターフェース95を介してコンピュータ90に接続すればよい。   The computer 90 may also be equipped with a display device for displaying information. When the display device is provided, the computer 90 is preferably 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)カードなどの半導体記録媒体や、フレキシブルディスクなどの磁気記録媒体、その他の記録媒体によって実現してもよい。   In addition, the computer 90 may be equipped with a disk drive as needed. The disk drive is connected to the bus 99. The disk drive mediates reading of a data program from the recording medium, writing of the processing result of the computer 90 to the recording medium, and the like between the processor 91 and a recording medium (program recording medium) (not shown). 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). Also, the recording medium may be realized by a semiconductor recording medium such as a Universal Serial Bus (USB) memory or a Secure Digital (SD) card, a magnetic recording medium such as a flexible disk, or another recording medium.

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

以上、実施形態を参照して本発明を説明してきたが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
〔付記〕
上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記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 configuration and details of the present invention within the scope of the present invention.
[Supplementary Note]
Some or all of the above embodiments may be described as in the following appendices, but is not limited to the following.
(Supplementary Note 1)
First common key holding means for holding the first common key;
Sub-key generation means for generating at least one sub-key from the first common key held in the first common key holding means according to a key schedule;
A subkey holding unit that holds the subkey generated by the subkey generation unit;
Common key decryption means for obtaining the subkey held in the subkey holding means and decrypting the second common key;
Second common key holding means for holding the second common key decrypted by the common key decryption means;
Common key comparison means for comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
An encryption unit that encrypts a plaintext block using the subkey stored in the subkey storage unit to generate a ciphertext block;
The comparison result between the first common key and the second common key by the common key comparison unit and the ciphertext block generated by the encryption unit are input, and based on the comparison result by the common key comparison unit And an output determination unit that determines whether to output the ciphertext block.
(Supplementary Note 2)
The output judging means
Outputting the ciphertext block if the first common key and the second common key are the same;
The encryption device according to appendix 1, wherein the ciphertext block is discarded when the first common key and the second common key are different.
(Supplementary Note 3)
Sub-key determination means for determining whether or not to generate the sub-key by comparing the input common key with the first common key held in the first common key holding means;
The sub key judging means
When the input common key and the first common key are different, the input common key is held as the first common key in the first common key holding unit, and the first common key holding unit is newly added Instructing the sub-key generation unit to generate the sub-key from the first common key held in
The encryption device according to claim 1 or 2, wherein the sub-key generation unit is not instructed to generate the sub-key when the input common key and the first common key are equal.
(Supplementary Note 4)
Pseudo-random number generation means for generating pseudo-random numbers according to the encryption instruction;
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 in the first common key holding means as the first common key The encryption device according to Appendix 1 or 2.
(Supplementary Note 5)
The apparatus further comprises retry determination means for determining whether or not the subkey is suspected to be abnormal 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 appendices 1 to 4, wherein when it is not suspected that there is an abnormality in the sub key, the comparison result by the common key comparison means is output to the output determination means.
(Supplementary Note 6)
The encryption means is duplicated,
At least two of the ciphertext blocks generated from the same plaintext block by the duplexed encryption means are input, and provided with cipher block comparison means for comparing the at least two ciphertext blocks input.
The cipher block comparison means
If at least two of the input ciphertext blocks are different, it is determined that there is an abnormality, and the ciphertext block is not output to the output determination unit.
The encryption apparatus according to any one of appendices 1 to 5, wherein the encryption device is determined to be normal if the input at least two ciphertext blocks are equal, and the ciphertext block is output to the output determination unit.
(Appendix 7)
First common key holding means for holding the first common key;
Sub-key generation means for generating at least one sub-key from the first common key held in the first common key holding means according to a key schedule;
A subkey holding unit that holds the subkey generated by the subkey generation unit;
Common key decryption means for obtaining the subkey held in the subkey holding means and decrypting the second common key;
Second common key holding means for holding the second common key decrypted by the common key decryption means;
Common key comparison means for comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
Decryption means for decrypting a plaintext block from a ciphertext block using the subkey held in the subkey holding means;
The comparison result of the first common key and the second common key by the common key comparison unit and the plaintext block decrypted by the decryption unit are input, and the plaintext is input based on the comparison result by the common key comparison unit And a output determination unit that determines whether to output a block.
(Supplementary Note 8)
At least one subkey is generated from the first common key according to a key schedule, and a plaintext block is encrypted using the generated subkey to generate a ciphertext block, and the generated subkey is used to (2) An encryption apparatus that decrypts the common key and determines whether to output the ciphertext block based on the comparison result of the first common key and the second common key.
At least one subkey is generated from the first common key according to a key schedule, the plaintext block is decrypted from the ciphertext block using the generated subkey, and the subkey is generated using the generated subkey A decryption device that decrypts a second common key and determines whether to output the plaintext block based on a comparison result of the first common key and the second common key;
The encryption device is
Transmitting the ciphertext block obtained by encrypting the plaintext block to the decryption device;
The decoding device is
A line encryption system for decrypting the plaintext block from the ciphertext block received from the encryption device.
(Appendix 9)
Holding the first common key in the first common key holding means;
At least one sub-key is generated according to a key schedule from the first common key held in the first common key holding means,
The generated subkey is held in subkey holding means,
The second common key is decrypted using the subkey held in the subkey holding means,
Holding the decrypted second common key in second common key holding means;
Comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
The plaintext block is encrypted using the subkey held in the subkey holding means to generate a ciphertext block,
The encryption method for determining whether or not to output the ciphertext block based on the comparison result of the first common key and the second common key.
(Supplementary Note 10)
A process of holding the first common key in the first common key holding means;
A process of generating at least one sub-key from the first common key held in the first common key holding means according to a key schedule;
A process of holding the generated subkey in a subkey holding unit;
A process of decrypting a second common key using the subkey held in the subkey holding means;
A process of holding the decrypted second common key in second common key holding means;
A process of comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
A process of generating a ciphertext block by encrypting a plaintext block using the subkey held in the subkey holding means;
A program that causes a computer to execute processing of determining whether to output the ciphertext block based on the comparison result of the first common key and the second common key.
(Supplementary Note 11)
Holding the first common key in the first common key holding means;
At least one sub-key is generated according to a key schedule from the first common key held in the first common key holding means,
The generated subkey is held in subkey holding means,
The second common key is decrypted using the subkey held in the subkey holding means,
Holding the decrypted second common key in second common key holding means;
Comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
Decrypts plaintext data from a ciphertext block using the subkey held in the subkey holding means;
An encryption method for determining whether to output the plaintext data based on the comparison result of the first common key and the second common key.
(Supplementary Note 12)
A process of holding the first common key in the first common key holding means;
A process of generating at least one sub-key from the first common key held in the first common key holding means according to a key schedule;
A process of holding the generated subkey in a subkey holding unit;
A process of decrypting a second common key using the subkey held in the subkey holding means;
A process of holding the decrypted second common key;
A process of comparing the first common key held in the first common key holding means with the second common key held in 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;
A program that causes a computer to execute a process of determining whether to output the plaintext data based on the comparison result of 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 first common key holding unit 12 key schedule unit 13 sub key holding unit 14 common key decryption unit 15 second common key holding unit 16 common key Comparison unit 17 Data scramble unit 18 Output determination unit 21 Sub-key generation determination unit 31 Pseudorandom number generation unit 32 Common key generation unit 41 Retries determination unit 51 First data scramble unit 52 Second data scramble unit 53 Cipher block comparison unit 67 Data data Scrambler 71 Encryption device 72 Decryption device

Claims (10)

第1共通鍵を保持する第1共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成手段と、
前記サブ鍵生成手段によって生成される前記サブ鍵を保持するサブ鍵保持手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を取得して第2共通鍵を復号する共通鍵復号手段と、
前記共通鍵復号手段によって復号される前記第2共通鍵を保持する第2共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する共通鍵比較手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する暗号化手段と、
共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果と、前記暗号化手段によって生成された前記暗号文ブロックとが入力され、前記共通鍵比較手段による比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する出力判定手段とを備える暗号化装置。
First common key holding means for holding the first common key;
Sub-key generation means for generating at least one sub-key from the first common key held in the first common key holding means according to a key schedule;
A subkey holding unit that holds the subkey generated by the subkey generation unit;
Common key decryption means for obtaining the subkey held in the subkey holding means and decrypting the second common key;
Second common key holding means for holding the second common key decrypted by the common key decryption means;
Common key comparison means for comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
An encryption unit that encrypts a plaintext block using the subkey stored in the subkey storage unit to generate a ciphertext block;
The comparison result between the first common key and the second common key by the common key comparison unit and the ciphertext block generated by the encryption unit are input, and based on the comparison result by the common key comparison unit And an output determination unit that determines whether to output the ciphertext block.
前記出力判定手段は、
前記第1共通鍵と前記第2共通鍵とが同じ場合に前記暗号文ブロックを出力し、
前記第1共通鍵と前記第2共通鍵とが異なる場合に前記暗号文ブロックを破棄する請求項1に記載の暗号化装置。
The output judging means
Outputting the ciphertext block if the first common key and the second common key are the same;
The encryption device according to claim 1, wherein the ciphertext block is discarded when the first common key and the second common key are different.
入力された共通鍵と、前記第1共通鍵保持手段に保持された前記第1共通鍵とを比較し、前記サブ鍵を生成するか否かを判定するサブ鍵判定手段を備え、
前記サブ鍵判定手段は、
入力された前記共通鍵と前記第1共通鍵とが異なる場合、入力された前記共通鍵を前記第1共通鍵として前記第1共通鍵保持手段に保持させ、前記第1共通鍵保持手段に新たに保持させた前記第1共通鍵から前記サブ鍵を生成することを前記サブ鍵生成手段に指示し、
前記入力された共通鍵と前記第1共通鍵とが等しい場合、前記サブ鍵を生成することを前記サブ鍵生成手段に指示しない請求項1または2に記載の暗号化装置。
Sub-key determination means for determining whether or not to generate the sub-key by comparing the input common key with the first common key held in the first common key holding means;
The sub key judging means
When the input common key and the first common key are different, the input common key is held as the first common key in the first common key holding unit, and the first common key holding unit is newly added Instructing the sub-key generation unit to generate the sub-key from the first common key held in
3. The encryption device according to claim 1, wherein if the input common key and the first common key are equal, the sub-key generation unit is not instructed to generate the sub-key.
暗号化指示に応じて疑似乱数を生成させる疑似乱数発生手段と、
前記疑似乱数発生手段によって生成された前記疑似乱数を用いて共通鍵を生成し、生成した前記共通鍵を前記第1共通鍵として前記第1共通鍵保持手段に保持させる共通鍵生成手段とを備える請求項1または2に記載の暗号化装置。
Pseudo-random number generation means for generating pseudo-random numbers according to the encryption instruction;
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 in the first common key holding means as the first common key The encryption device according to claim 1.
前記共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果に基づいて、前記サブ鍵に異常があると疑われるか否かを判定する再試行判定手段を備え、
前記再試行判定手段は、
前記サブ鍵に異常があると疑われる場合、前記サブ鍵を再生成することを前記サブ鍵生成手段に指示し、
前記サブ鍵に異常があると疑われない場合、前記共通鍵比較手段による比較結果を前記出力判定手段に出力する請求項1乃至4のいずれか一項に記載の暗号化装置。
The apparatus further comprises retry determination means for determining whether or not the subkey is suspected to be abnormal 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 claims 1 to 4, wherein when it is not suspected that there is an abnormality in the sub key, the comparison result by the common key comparison means is output to the output determination means.
前記暗号化手段が二重化され、
二重化された前記暗号化手段によって同一の前記平文ブロックから生成される少なくとも二つの前記暗号文ブロックが入力され、入力された少なくとも二つの前記暗号文ブロックを比較する暗号ブロック比較手段を備え、
前記暗号ブロック比較手段は、
入力された少なくとも二つの前記暗号文ブロックが異なる場合は異常があると判定して前記出力判定手段に前記暗号文ブロックを出力せず、
入力された少なくとも二つの前記暗号文ブロックが等しい場合は正常であると判定して前記出力判定手段に前記暗号文ブロックを出力する請求項1乃至5のいずれか一項に記載の暗号化装置。
The encryption means is duplicated,
At least two of the ciphertext blocks generated from the same plaintext block by the duplexed encryption means are input, and provided with cipher block comparison means for comparing the at least two ciphertext blocks input.
The cipher block comparison means
If at least two of the input ciphertext blocks are different, it is determined that there is an abnormality, and the ciphertext block is not output to the output determination unit.
The encryption device according to any one of claims 1 to 5, wherein the encryption device is determined to be normal if the input at least two of the ciphertext blocks are equal, and the ciphertext block is output to the output determination unit.
第1共通鍵を保持する第1共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成するサブ鍵生成手段と、
前記サブ鍵生成手段によって生成される前記サブ鍵を保持するサブ鍵保持手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を取得して第2共通鍵を復号する共通鍵復号手段と、
前記共通鍵復号手段によって復号される前記第2共通鍵を保持する第2共通鍵保持手段と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する共通鍵比較手段と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて暗号文ブロックから平文ブロックを復号する復号手段と、
共通鍵比較手段による前記第1共通鍵と前記第2共通鍵との比較結果と、前記復号手段によって復号された前記平文ブロックとが入力され、前記共通鍵比較手段による比較結果に基づいて前記平文ブロックを出力するか否かを判定する出力判定手段とを備える復号装置。
First common key holding means for holding the first common key;
Sub-key generation means for generating at least one sub-key from the first common key held in the first common key holding means according to a key schedule;
A subkey holding unit that holds the subkey generated by the subkey generation unit;
Common key decryption means for obtaining the subkey held in the subkey holding means and decrypting the second common key;
Second common key holding means for holding the second common key decrypted by the common key decryption means;
Common key comparison means for comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
Decryption means for decrypting a plaintext block from a ciphertext block using the subkey held in the subkey holding means;
The comparison result of the first common key and the second common key by the common key comparison unit and the plaintext block decrypted by the decryption unit are input, and the plaintext is input based on the comparison result by the common key comparison unit And a output determination unit that determines whether to output a block.
第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成するとともに、生成された前記サブ鍵を用いて第2共通鍵を復号して、前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する暗号化装置と、
前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、生成された前記サブ鍵を用いて前記暗号文ブロックから前記平文ブロックを復号するとともに、生成された前記サブ鍵を用いて前記第2共通鍵を復号して、前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記平文ブロックを出力するか否かを判定する復号装置とを備え、
前記暗号化装置は、
前記平文ブロックを暗号化した前記暗号文ブロックを前記復号装置に送信し、
前記復号装置は、
前記暗号化装置から受信した前記暗号文ブロックから前記平文ブロックを復号する回線暗号システム。
At least one subkey is generated from the first common key according to a key schedule, and a plaintext block is encrypted using the generated subkey to generate a ciphertext block, and the generated subkey is used to (2) An encryption apparatus that decrypts the common key and determines whether to output the ciphertext block based on the comparison result of the first common key and the second common key.
At least one subkey is generated from the first common key according to a key schedule, the plaintext block is decrypted from the ciphertext block using the generated subkey, and the subkey is generated using the generated subkey A decryption device that decrypts a second common key and determines whether to output the plaintext block based on a comparison result of the first common key and the second common key;
The encryption device is
Transmitting the ciphertext block obtained by encrypting the plaintext block to the decryption device;
The decoding device is
A line encryption system for decrypting the plaintext block from the ciphertext block received from the encryption device.
第1共通鍵を第1共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成し、
生成された前記サブ鍵をサブ鍵保持手段に保持し、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号し、
復号された前記第2共通鍵を第2共通鍵保持手段に保持し、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較し、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成し、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する暗号化方法。
Holding the first common key in the first common key holding means;
At least one sub-key is generated according to a key schedule from the first common key held in the first common key holding means,
The generated subkey is held in subkey holding means,
The second common key is decrypted using the subkey held in the subkey holding means,
Holding the decrypted second common key in second common key holding means;
Comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
The plaintext block is encrypted using the subkey held in the subkey holding means to generate a ciphertext block,
The encryption method for determining whether or not to output the ciphertext block based on the comparison result of the first common key and the second common key.
第1共通鍵を第1共通鍵保持手段に保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵から少なくとも一つのサブ鍵を鍵スケジュールで生成する処理と、
生成された前記サブ鍵をサブ鍵保持手段に保持する処理と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて第2共通鍵を復号する処理と、
復号された前記第2共通鍵を第2共通鍵保持手段に保持する処理と、
前記第1共通鍵保持手段に保持された前記第1共通鍵と、前記第2共通鍵保持手段に保持された前記第2共通鍵とを比較する処理と、
前記サブ鍵保持手段に保持された前記サブ鍵を用いて平文ブロックを暗号化して暗号文ブロックを生成する処理と、
前記第1共通鍵と前記第2共通鍵との比較結果に基づいて前記暗号文ブロックを出力するか否かを判定する処理とをコンピュータに実行させるプログラム。
A process of holding the first common key in the first common key holding means;
A process of generating at least one sub-key from the first common key held in the first common key holding means according to a key schedule;
A process of holding the generated subkey in a subkey holding unit;
A process of decrypting a second common key using the subkey held in the subkey holding means;
A process of holding the decrypted second common key in second common key holding means;
A process of comparing the first common key held in the first common key holding means with the second common key held in the second common key holding means;
A process of generating a ciphertext block by encrypting a plaintext block using the subkey held in the subkey holding means;
A program that causes a computer to execute processing of determining whether to output the ciphertext block based on the comparison result of the first common key and the second common key.
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 true JP2019124713A (en) 2019-07-25
JP7063628B2 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 (6)

* 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
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

Patent Citations (6)

* 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
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
JP7063628B2 (en) 2022-05-09

Similar Documents

Publication Publication Date Title
EP2016525B1 (en) Encryption apparatus and method for providing an encrypted file system
JP5779434B2 (en) Security device and security system
JP5070005B2 (en) Arithmetic apparatus, arithmetic method and computer system
KR101600016B1 (en) method of encrypting data using Homomorphic Encryption and Computing device performing the method
JP6533553B2 (en) Encryption / decryption device and power analysis protection method therefor
JP2021114698A (en) Communication data encryption method, data communication method, and data communication system
US11431489B2 (en) Encryption processing system and encryption processing method
KR20120031123A (en) Cryptographic apparatus and memory system
JPWO2006033347A1 (en) Confidential information processing method, confidential information processing apparatus, and content data reproducing apparatus
WO2006118101A1 (en) Confidential information processing host device and confidential information processing method
JP4665159B2 (en) Electronic media communication device
US11093213B1 (en) Cryptographic computer machines with novel switching devices
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
JP2011123229A (en) Program code encryption device and program
JP7310938B2 (en) Encryption system, encryption method, decryption method and program
WO2019142260A1 (en) Secret analysis device, secret analysis system, secret analysis method, and secret analysis program
CN111294199A (en) Encryption/decryption system, encryption device, decryption device, and encryption/decryption method
JP6296589B2 (en) Cryptographic processing system
JP6949276B2 (en) Re-encrypting device, re-encrypting method, re-encrypting program and cryptosystem
JP6821092B1 (en) Data management equipment, data management system, data management method and program
WO2023135642A1 (en) Encryption device, decryption device, decryptability verification device, cipher system, encryption method, and encryption program
JP6717730B2 (en) Terminal device, key providing system, key providing method, and computer program
JP2009075474A (en) Cryptography processor
CN117992982A (en) Data processing method and device, electronic equipment and computer readable storage medium

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