JP4920297B2 - Encryption / decryption method and apparatus - Google Patents

Encryption / decryption method and apparatus Download PDF

Info

Publication number
JP4920297B2
JP4920297B2 JP2006123969A JP2006123969A JP4920297B2 JP 4920297 B2 JP4920297 B2 JP 4920297B2 JP 2006123969 A JP2006123969 A JP 2006123969A JP 2006123969 A JP2006123969 A JP 2006123969A JP 4920297 B2 JP4920297 B2 JP 4920297B2
Authority
JP
Japan
Prior art keywords
encryption
decryption
circuit configuration
circuit
processing
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.)
Expired - Fee Related
Application number
JP2006123969A
Other languages
Japanese (ja)
Other versions
JP2007300175A (en
Inventor
紀之 小宮
吉秋 小泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2006123969A priority Critical patent/JP4920297B2/en
Publication of JP2007300175A publication Critical patent/JP2007300175A/en
Application granted granted Critical
Publication of JP4920297B2 publication Critical patent/JP4920297B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、各種アルゴリズムに容易に対応可能で、かつアルゴリズムの切り替えが高速な暗号化・復号化方法およびその装置に関するものである。   The present invention relates to an encryption / decryption method and apparatus that can easily cope with various algorithms and that can switch algorithms at high speed.

暗号化・復号化処理は一般に高負荷のかかる処理であるため、暗号通信に用いられる機器には、処理の高速化を目的としてハードウェアの暗号処理部を搭載することが広く行われているが、そのため、従来は、予め定められたアルゴリズムのみに対応可能であり、種々のアルゴリズムに対応することは困難であった。   Since the encryption / decryption process is generally a heavy load process, it is widely practiced to install a hardware encryption processing unit in equipment used for encrypted communication for the purpose of speeding up the process. Therefore, conventionally, only a predetermined algorithm can be handled, and it is difficult to deal with various algorithms.

このような課題を解決するために、パケット送信時の宛先や、パケット受信時の送信元の情報に応じて暗号アルゴリズムを決定し、リコンフィギャラブル回路を構成することによって各種暗号アルゴリズムに対応する試みや、暗号アルゴリズムに対応する回路構成データを送受信して、そのデータをリコンフィギャラブル回路に設定することによって各種アルゴリズムへの対応を行う試み(例えば特許文献1参照)などがなされている。
特開2003−198530号公報
In order to solve such a problem, an encryption algorithm is determined according to information on the destination at the time of packet transmission and the transmission source at the time of packet reception, and an attempt to support various encryption algorithms by configuring a reconfigurable circuit In addition, attempts have been made to cope with various algorithms by transmitting / receiving circuit configuration data corresponding to an encryption algorithm and setting the data in a reconfigurable circuit (see, for example, Patent Document 1).
JP 2003-198530 A

従来の暗号化・復号化方法やその装置においては、送受信パケットから得られる情報により暗号アルゴリズムを決定し、その時点からリコンフィギャラブル回路の再構成を行ったり、回路構成データそのものを送受信して得、そのデータを設定することによって回路の再構成を行ったりするので、アルゴリズムの切り替えに時間がかかるという課題があった。
また、リコンフィギャラブル回路を複数搭載して、未実行中の回路を予め再構成し、必要になった時点で実行するように切り替える構成とすれば、異なるアルゴリズムへの切り替え時間の短縮をはかることが可能となるが、リコンフィギャラブル回路が複数必要となるため、コスト高となるという課題があった。
In conventional encryption / decryption methods and devices, the encryption algorithm is determined based on the information obtained from the transmission / reception packet, and the reconfigurable circuit is reconfigured from that point, or the circuit configuration data itself is transmitted / received. Since the circuit is reconfigured by setting the data, there is a problem that it takes time to switch the algorithm.
In addition, if multiple reconfigurable circuits are installed, the circuit that has not been executed is reconfigured in advance, and the switch is made so that it is executed when necessary, the time required for switching to a different algorithm can be shortened. However, since a plurality of reconfigurable circuits are required, there is a problem that the cost is increased.

本発明は、上記のような課題を解決するためになされたものであり、各種アルゴリズムに容易に対応可能で、かつ暗号化・復号化処理のアルゴリズムの切り替えが高速な、安価な暗号化・復号化方法およびその装置を得ることを目的としている。   The present invention has been made in order to solve the above-described problems, and can be easily applied to various algorithms, and can perform encryption / decryption processing algorithm switching at high speed and at low cost. It is an object of the present invention to obtain a method and an apparatus therefor.

本発明に係る暗号化・復号化方法は、
回路構成を動的に変更可能な回路デバイスを用いて、所定の処理毎に異なる回路構成で暗号化・復号化を行う方法において、
第1の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを用いて前記回路デバイスの回路を構成するステップと、
第2の処理の開始タイミングを、ハンドシェイク処理の命令パターンがハンドシェイク処理の終了処理であるか否かに基づいて予測する予測ステップと、
前記予測ステップの結果に基づき、前記第2の処理が開始すると予測されるタイミングに先立ち、前記第2の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを用いて、前記回路デバイスの回路を構成する回路構成ステップと、
を有することを特徴とする。
The encryption / decryption method according to the present invention includes:
In a method of performing encryption / decryption with a different circuit configuration for each predetermined process using a circuit device capable of dynamically changing a circuit configuration,
Configuring the circuit of the circuit device using circuit configuration data for performing encryption / decryption processing used when performing the first processing;
A prediction step of predicting a start timing of the second process based on whether or not the instruction pattern of the handshake process is an end process of the handshake process ;
Based on the result of the prediction step, prior to the timing at which the second process is predicted to start, using circuit configuration data for performing the encryption / decryption process used when performing the second process, A circuit configuration step for configuring a circuit of the circuit device;
It is characterized by having.

また、本発明に係る暗号化・復号化装置は、
制御手段と、
回路構成を動的に変更可能な回路デバイスを備え、前記制御手段の指示に基づき、前記回路デバイスを用いて、前記制御手段が実行する所定の処理毎に異なる回路構成で暗号化・復号化処理を行う暗号化・復号化手段と、
複数種類の前記回路構成データを格納する記憶手段と、
を有し、
前記制御手段は、
前記記憶手段より、第1の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを読み込んで前記回路デバイスの回路を構成し、
第2の処理の開始タイミングを、ハンドシェイク処理の命令パターンがハンドシェイク処理の終了処理であるか否かに基づいて予測し、
前記予測結果に基づき、
前記第2の処理が開始すると予測されるタイミングに先立ち、前記記憶手段より、前記第2の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを読み込んで、前記回路デバイスの回路を構成することを特徴とする。
Further, the encryption / decryption device according to the present invention includes:
Control means;
A circuit device capable of dynamically changing a circuit configuration is provided, and an encryption / decryption process is performed with a different circuit configuration for each predetermined process executed by the control unit using the circuit device based on an instruction from the control unit Encryption / decryption means for performing
Storage means for storing a plurality of types of circuit configuration data;
Have
The control means includes
Read the circuit configuration data for performing encryption / decryption processing used when performing the first processing from the storage means, and configure the circuit of the circuit device,
Predicting the start timing of the second process based on whether the instruction pattern of the handshake process is the end process of the handshake process ;
Based on the prediction result,
Prior to the timing at which the second process is predicted to start, the circuit device reads circuit configuration data for performing the encryption / decryption process used when performing the second process from the storage unit. The circuit is configured as follows.

本発明に係る暗号化・復号化方法およびその装置によれば、
今後の処理内容とその処理が実行されるタイミングとを予測して、その予測結果に基づいて制御手段によって暗号化・復号化実行部の回路構成データを書き換えるので、処理の進行に応じた最適な回路構成データがタイミングよく設定され、アルゴリズムの切り替え処理の高速化をはかることができる。
また、回路構成データを書き換え可能な暗号化・復号化手段を複数持つ必要が無いので、安価な構成とすることができる。
According to the encryption / decryption method and apparatus according to the present invention,
Predict the future processing contents and the timing when the processing is executed, and rewrite the circuit configuration data of the encryption / decryption execution unit by the control means based on the prediction result. Circuit configuration data is set in a timely manner, and the algorithm switching process can be speeded up.
In addition, since it is not necessary to have a plurality of encryption / decryption means capable of rewriting circuit configuration data, an inexpensive configuration can be achieved.

実施の形態1.
図1は、本発明の実施の形態1に係る暗号化・復号化方法を実現する暗号化・復号化装置の全体構成図である。
図1において、実線枠はハードウェアを、破線枠はソフトウェアまたはデータを示している。一点鎖線は暗号化・復号化装置全体を示す。
暗号化・復号化装置100は、マイコン101、暗号化・復号化実行部102、メモリB103を有する。
暗号化・復号化実行部102には、回路構成データを格納するメモリA110及びメモリC108と、メモリC108が格納している回路構成データを元に回路を構成する演算処理部112とがハードウェアとして内包されている。
メモリC108には、暗号化・復号化実行部102の現在の動作を行うための回路構成データ109が格納されている。
メモリA110には、暗号化・復号化実行部102が第1の動作を行うための回路構成データA111が格納されている。
演算処理部112は、回路構成を動的に変更可能な回路デバイスであり、例えばCPLD(Complex Programmable Logic Device)等の回路デバイスで実現することができる。
メモリB103には、暗号化・復号化実行部102が第2の動作を行うための回路構成データB104と、ソフトウェアM105とが格納されている。
ソフトウェアM105は、マイコン101の動作を規定するものであり、マイコン101によって読み込まれ、その処理内容が実行される。ソフトウェアM105には、処理予測モジュール106、制御モジュール107が含まれる。
マイコン101とメモリC108とは、制御線113で接続されている。
マイコン101とメモリB103とは、制御線114で接続されている。
マイコン101と演算処理部112とは、制御線115で接続されている。
メモリA110とメモリC108とは、制御線116で接続されている。
演算処理部112とメモリC108とは、制御線117で接続されている。
演算処理部112とメモリA110とは、制御線118で接続されている。
また、暗号化・復号化装置100の外部には、外部機器200が存在し、両者は通信路201で接続されている。
Embodiment 1 FIG.
FIG. 1 is an overall configuration diagram of an encryption / decryption device that realizes an encryption / decryption method according to Embodiment 1 of the present invention.
In FIG. 1, a solid line frame indicates hardware, and a broken line frame indicates software or data. An alternate long and short dash line indicates the entire encryption / decryption device.
The encryption / decryption device 100 includes a microcomputer 101, an encryption / decryption execution unit 102, and a memory B103.
The encryption / decryption execution unit 102 includes, as hardware, a memory A 110 and a memory C 108 that store circuit configuration data, and an arithmetic processing unit 112 that configures a circuit based on the circuit configuration data stored in the memory C 108. It is included.
The memory C108 stores circuit configuration data 109 for performing the current operation of the encryption / decryption execution unit 102.
The memory A110 stores circuit configuration data A111 for the encryption / decryption execution unit 102 to perform the first operation.
The arithmetic processing unit 112 is a circuit device whose circuit configuration can be dynamically changed, and can be realized by a circuit device such as a CPLD (Complex Programmable Logic Device), for example.
The memory B103 stores circuit configuration data B104 for the encryption / decryption execution unit 102 to perform the second operation, and software M105.
The software M105 defines the operation of the microcomputer 101, and is read by the microcomputer 101 and the processing content is executed. The software M105 includes a process prediction module 106 and a control module 107.
The microcomputer 101 and the memory C108 are connected by a control line 113.
The microcomputer 101 and the memory B103 are connected by a control line 114.
The microcomputer 101 and the arithmetic processing unit 112 are connected by a control line 115.
The memory A110 and the memory C108 are connected by a control line 116.
The arithmetic processing unit 112 and the memory C108 are connected by a control line 117.
The arithmetic processing unit 112 and the memory A 110 are connected by a control line 118.
An external device 200 exists outside the encryption / decryption device 100, and both are connected by a communication path 201.

本発明における「制御手段」は、図1のマイコン101に相当する。
また、「記憶手段」は、図1のメモリA110、メモリC108、メモリB103に相当する。
「暗号化・復号化手段」は、図1の暗号化・復号化実行部102に相当する。
The “control means” in the present invention corresponds to the microcomputer 101 in FIG.
The “storage means” corresponds to the memory A110, the memory C108, and the memory B103 in FIG.
The “encryption / decryption means” corresponds to the encryption / decryption execution unit 102 in FIG.

暗号化・復号化実行部102の動作は、メモリC108に設定された回路構成データC109の内容によって規定される。すなわち、回路構成データC109の内容を変更することによって再構成され、動作が変化する。
これは、演算処理部112が、メモリC108に設定された回路構成データC109の内容を基にして、回路構成を動的に変更するためである。
The operation of the encryption / decryption execution unit 102 is defined by the contents of the circuit configuration data C109 set in the memory C108. That is, it is reconfigured by changing the contents of the circuit configuration data C109, and the operation changes.
This is because the arithmetic processing unit 112 dynamically changes the circuit configuration based on the contents of the circuit configuration data C109 set in the memory C108.

図2は、マイコン101の処理内容に応じて、メモリC108に格納されている回路構成データが変更される様子を説明するものである。
(1)
初期状態では、メモリB103、メモリC108、メモリA110には、図1に示すような回路構成データが格納されている。
(2)
マイコン101は、ある処理(以後、第1の処理と呼び、請求項1の「第1の処理」に相当)を行う際には、これに対応した暗号化・復号化処理を暗号化・復号化実行部102に実行させる。
このとき、マイコン101は、ソフトウェアM105に含まれる制御モジュール107を読み込み、制御線115を利用して暗号化・復号化実行部102の演算処理部112に回路構成データA111をメモリC108にロードするための制御信号を送信する。
前記制御信号を受けた演算処理部112は、メモリA110に格納されている回路構成データA111をメモリC108にロードし、回路構成データC109を回路構成データA111と置き換える。
その後、演算処理部112はメモリC108に設定された回路構成データに従って動作する。
このようにして、暗号化・復号化実行部102は、マイコン101の第1の処理に対応した暗号化・復号化処理を行うようになる。
(3)
次に、マイコン101が、第1の処理に続いて別の処理(以後、第2の処理と呼び、請求項1の「第2の処理」に相当)を行う際には、これに対応した暗号化・復号化処理を暗号化・復号化実行部102に実行させる。
このとき、マイコン101は、ソフトウェアM105に含まれる制御モジュール107を読み込み、メモリB103に格納された回路構成データB104を、マイコン101を介して暗号化・復号化実行部102のメモリC108にロードし、回路構成データC109を回路構成データB104に置き換える。
その後、演算処理部112はメモリC108に設定された回路構成データB104に従って動作する。
このようにして、暗号化・復号化実行部102は、マイコン101の第2の処理に対応した暗号化・復号化処理を行なうようになる。
FIG. 2 illustrates how the circuit configuration data stored in the memory C108 is changed in accordance with the processing contents of the microcomputer 101.
(1)
In the initial state, circuit configuration data as shown in FIG. 1 is stored in the memory B103, the memory C108, and the memory A110.
(2)
When the microcomputer 101 performs a certain process (hereinafter referred to as a “first process” and corresponds to the “first process” in claim 1), the microcomputer 101 performs an encryption / decryption process corresponding to this process. Execution is performed by the conversion execution unit 102.
At this time, the microcomputer 101 reads the control module 107 included in the software M105, and loads the circuit configuration data A111 into the memory C108 to the arithmetic processing unit 112 of the encryption / decryption execution unit 102 using the control line 115. The control signal is transmitted.
Upon receiving the control signal, the arithmetic processing unit 112 loads the circuit configuration data A111 stored in the memory A110 into the memory C108, and replaces the circuit configuration data C109 with the circuit configuration data A111.
Thereafter, the arithmetic processing unit 112 operates according to the circuit configuration data set in the memory C108.
In this way, the encryption / decryption execution unit 102 performs encryption / decryption processing corresponding to the first processing of the microcomputer 101.
(3)
Next, when the microcomputer 101 performs another process (hereinafter referred to as a second process, which corresponds to the “second process” in claim 1) following the first process, it corresponds to this. The encryption / decryption processing unit 102 is caused to execute encryption / decryption processing.
At this time, the microcomputer 101 reads the control module 107 included in the software M105, loads the circuit configuration data B104 stored in the memory B103 into the memory C108 of the encryption / decryption execution unit 102 via the microcomputer 101, The circuit configuration data C109 is replaced with circuit configuration data B104.
Thereafter, the arithmetic processing unit 112 operates in accordance with the circuit configuration data B104 set in the memory C108.
In this way, the encryption / decryption execution unit 102 performs encryption / decryption processing corresponding to the second processing of the microcomputer 101.

図3は、演算処理部112の回路構成を動的に変更する必要がある場合の具体例として、暗号化通信を例に説明するものである。
一般に、暗号化通信により通信内容の秘匿性を保ちたい場合には、より強度な暗号方式を用いて通信内容を暗号化することが望ましい。例えば、公開鍵暗号方式を用いて通信内容を暗号化すれば、秘密鍵暗号方式を用いる場合よりも、暗号の強度が増す。
しかし、公開鍵暗号方式を用いて暗号化・復号化処理を行うには、比較的大きな演算能力を必要とするため、演算装置の処理能力に限りがあるような場合には、両者を組み合わせた方式を用いることがある。
(1)
まず、通信内容の送信側では、秘密鍵を公開鍵暗号方式により暗号化し、暗号化された秘密鍵を受信側に予め送信しておく。
図3の上図において、公開鍵暗号回路301は、暗号化前の秘密暗号鍵P1、公開鍵e及び法mを入力として受け取り、暗号化後の秘密暗号鍵c1を出力する。
秘密暗号鍵c1は、通信内容の受信側に予め送信され(図示せず)、受信側では秘密暗号鍵c1を復号しておく。
(2)
次に、通信内容を送信する際には、ステップ(1)で受信側に送信した秘密鍵に対応する秘密鍵を用いて、通信内容を暗号化した後に、受信側に送信する。
図3の下図において、秘密鍵暗号回路302は、暗号化前の送信文P2を入力として受け取り、暗号化後の送信文c2を出力する。
受信側では、ステップ(1)で受け取った秘密暗号鍵c1を利用して、通信内容を復号化する。
FIG. 3 illustrates encrypted communication as a specific example when it is necessary to dynamically change the circuit configuration of the arithmetic processing unit 112.
In general, when the confidentiality of communication contents is desired to be maintained by encrypted communication, it is desirable to encrypt the communication contents using a stronger encryption method. For example, if the communication content is encrypted using a public key cryptosystem, the strength of the encryption is increased as compared with the case where a secret key cryptosystem is used.
However, in order to perform encryption / decryption processing using a public key cryptosystem, a relatively large calculation capability is required. Therefore, when the processing capability of the calculation device is limited, the two are combined. A method may be used.
(1)
First, on the communication content transmission side, the secret key is encrypted by a public key cryptosystem, and the encrypted secret key is transmitted to the reception side in advance.
In the upper diagram of FIG. 3, the public key encryption circuit 301 receives the private encryption key P1 before encryption, the public key e, and the modulus m as inputs, and outputs the encrypted private encryption key c1.
The secret encryption key c1 is transmitted in advance to the communication content receiving side (not shown), and the receiving side decrypts the secret encryption key c1.
(2)
Next, when transmitting the communication content, the communication content is encrypted using the secret key corresponding to the secret key transmitted to the receiving side in step (1), and then transmitted to the receiving side.
In the lower part of FIG. 3, the secret key encryption circuit 302 receives the transmission text P2 before encryption as an input, and outputs the transmission text c2 after encryption.
On the receiving side, the communication contents are decrypted using the secret encryption key c1 received in step (1).

このように、1の通信処理において、異なる暗号化方式を用いることがあり、これは通信に限ったものではなく、暗号化を行う種々の処理においても同様のケースが存在する。
図3に示すように、それぞれの暗号化方式で異なる回路を用いると、コスト等の面で不利であるため、単一の回路で双方の暗号化方式に対応できることが望ましい。
また、単に双方の暗号化・復号化アルゴリズムを実装した回路を用いると、回路デバイスのゲート数制限等により、デバイスサイズが大きくなってしまう場合がある。
そこで、本発明に係る暗号化・復号化装置は、暗号方式の切換えが必要となるタイミングを先読みして回路構成をあらかじめ切換えておくことにより、単一の回路デバイスで、回路構成の切換え待ち時間を発生させずに、複数の暗号化方式をサポートするものである。
As described above, different encryption methods may be used in one communication process. This is not limited to communication, and similar cases exist in various processes for performing encryption.
As shown in FIG. 3, if different circuits are used for each encryption method, it is disadvantageous in terms of cost and the like, and it is desirable that a single circuit can handle both encryption methods.
In addition, when a circuit in which both encryption / decryption algorithms are simply used is used, the device size may increase due to the limitation on the number of gates of the circuit device.
Therefore, the encryption / decryption device according to the present invention pre-reads the timing at which the encryption method must be switched and switches the circuit configuration in advance, so that the circuit configuration switching waiting time can be achieved with a single circuit device. A plurality of encryption schemes are supported without causing any problems.

次に、図1の暗号化・復号化装置100が、通信路201を介して外部機器200と暗号化通信を行う場合の動作について説明する。
暗号化・復号化装置100は暗号通信を行う相手である外部機器200と通信路201によって接続されている。この通信路201は論理的な通信路であり、有線、無線いずれの形態であるかは問わない。
また、暗号化・復号化装置100の内部には外部機器との通信に供する外部機器通信部を備える(図示せず)。外部機器通信部はマイコンとは別の部品として構成されていてもよいし、マイコンに内蔵されていてもよい。
なおここでは、暗号化・復号化実行部102の第1の動作を行うための回路構成データA111を、通信のハンドシェイクプロトコル用の暗号化・復号化動作を行うための回路構成データとする。
また、第2の動作を行うための回路構成データB104を、通信のアプリケーションデータ用の暗号化・復号化動作を行うための回路構成データとする。
通信の手順は必ず通信相手との通信路の確立のためにハンドシェイクを行ってからアプリケーションデータの送受信を行うものとし、ハンドシェイク、アプリケーションデータの送受信、それぞれのフェーズで異なる暗号アルゴリズムが使用されるものとする。
Next, an operation when the encryption / decryption device 100 in FIG. 1 performs encrypted communication with the external device 200 via the communication path 201 will be described.
The encryption / decryption device 100 is connected to an external device 200 that is a counterpart of encrypted communication via a communication path 201. This communication path 201 is a logical communication path, and it does not matter whether it is wired or wireless.
Further, the encryption / decryption device 100 includes an external device communication unit (not shown) for communication with an external device. The external device communication unit may be configured as a component separate from the microcomputer, or may be incorporated in the microcomputer.
Here, it is assumed that the circuit configuration data A111 for performing the first operation of the encryption / decryption executing unit 102 is circuit configuration data for performing the encryption / decryption operation for the communication handshake protocol.
Further, the circuit configuration data B104 for performing the second operation is set as circuit configuration data for performing the encryption / decryption operation for communication application data.
As for the communication procedure, it is assumed that application data is transmitted / received after handshaking to establish a communication path with the communication partner, and different encryption algorithms are used in each phase of handshaking, transmission / reception of application data. Shall.

図4は、図1の暗号化・復号化装置100が、通信路201を介して外部機器200と暗号化通信を行う場合の動作フローチャートを説明するものである。以下、各ステップについて説明する。   FIG. 4 illustrates an operation flowchart when the encryption / decryption device 100 of FIG. 1 performs encrypted communication with the external device 200 via the communication path 201. Hereinafter, each step will be described.

(S401)
通信を行うにあたっては、必ず最初にハンドシェイクが行われることから、暗号化・復号化実行部102はまず最初にハンドシェイクプロトコル用の暗号アルゴリズムが動作するようになっている必要がある。
そのため、まず最初にはハンドシェイクプロトコル用の動作を行う回路構成データをメモリC108にセットする。すなわち、マイコン101は、制御モジュール107の指示内容に基づき、回路構成データA111をメモリC108にロードする。
(S402)
通信が開始され、ハンドシェイクが開始されると、マイコン101は、処理予測モジュール106の指示内容に基づき、マイコンの実行ソフトウェアM105の次の処理ブロックを先読みし、その命令パターンを一時記憶する。
(S403)
マイコン101は、予め記憶されたハンドシェイク完了時の命令パターンと、一時記憶された先読みした命令パターンとの比較により、先読みした命令パターンがハンドシェイク完了パターンか否かを判定する。これは、ハンドシェイク処理の終了が近づいているか否かを判断することを意味している。
(S404)
マイコン101は、ステップS402で先読みした命令パターンが、ハンドシェイク完了パターンではない場合には、さらに通信のハンドシェイク処理の進行に伴ってソフトウェアM105の処理の先読みを継続する。
ハンドシェイク完了パターンであると判定された場合には、その時点からの経過時間の計時を開始する。
(S405)
マイコン101は、アルゴリズム切替開始予測時間が経過するのを待つ。
ここで、アルゴリズム切替開始予測時間は、「ハンドシェイク完了の命令パターンを先読みしてから実際のハンドシェイク処理の完了までの標準時間」−「アルゴリズム切替に要する時間(=回路構成データB104をメモリC108にロードするのに要する時間)」によって求めた値とする。
(S406)
マイコン101は、アルゴリズム切替開始予測時間の経過を確認したらアプリケーションデータ用の動作を行う回路構成データをメモリC108にセットする。すなわち、マイコン101は、制御モジュール107の指示内容に基づき、回路構成データB104をメモリC108にロードする。
この後は、アプリケーションデータ用の暗号アルゴリズムが動作する暗号化・復号化実行部102を用いて、アプリケーションデータの暗号通信を行うこととなる。
(S401)
When performing communication, the handshake is always performed first, and therefore the encryption / decryption execution unit 102 needs to operate the encryption algorithm for the handshake protocol first.
Therefore, first, circuit configuration data for performing an operation for the handshake protocol is set in the memory C108. That is, the microcomputer 101 loads the circuit configuration data A111 into the memory C108 based on the instruction content of the control module 107.
(S402)
When communication is started and handshake is started, the microcomputer 101 prefetches the next processing block of the execution software M105 of the microcomputer based on the instruction content of the processing prediction module 106, and temporarily stores the instruction pattern.
(S403)
The microcomputer 101 determines whether or not the prefetched instruction pattern is the handshake completion pattern by comparing the prestored instruction pattern when the handshake is completed with the temporarily stored prefetched instruction pattern. This means that it is determined whether or not the end of the handshake process is approaching.
(S404)
If the instruction pattern prefetched in step S402 is not a handshake completion pattern, the microcomputer 101 continues prefetching of the process of the software M105 as the communication handshake process proceeds.
If it is determined that the handshake completion pattern is reached, the elapsed time from that point is started.
(S405)
The microcomputer 101 waits for the algorithm switching start prediction time to elapse.
Here, the predicted algorithm switching start time is “standard time from prefetching a handshake completion command pattern to completion of actual handshake processing” − “time required for algorithm switching (= circuit configuration data B104 is stored in memory C108) The time required for loading to “)”.
(S406)
When the microcomputer 101 confirms that the algorithm switching start prediction time has elapsed, it sets circuit configuration data for performing the operation for application data in the memory C108. That is, the microcomputer 101 loads the circuit configuration data B104 into the memory C108 based on the instruction content of the control module 107.
Thereafter, application data encryption communication is performed using the encryption / decryption execution unit 102 on which the encryption algorithm for application data operates.

図5は、図4の示すフローチャートと、実際の通信処理における経過時間との関係を、縦軸に経過時間軸を設定して説明するシーケンス図である。
図5の右半面に示すフローチャートは、図4のフローチャートそのものである。
マイコン101は、図1の暗号化・復号化装置100が、外部機器200と暗号化通信を行う際に、全体の動作制御を行う。以下、ステップS501〜S503と、経過時間との関係について説明する。
(S501)
マイコン101は、ステップS401において、ハンドシェイク処理用の回路構成データがメモリC108にセットされた後に、外部機器200とのハンドシェイクを開始する。
(S502)
外部機器200とのハンドシェイクが完了するまでに、ハンドシェイク完了後のアプリケーションデータ送信に用いる暗号化処理を実施できるように準備しておく必要がある。
即ち、ステップS406に要する時間を考慮して、前もって回路構成データをメモリC108にセットしておく必要がある。
(S503)
マイコン101は、ハンドシェイク完了後、アプリケーションデータを送信する処理を開始する。即ち、前処理としてのハンドシェイク完了後、通信データ本体を送信するステップに移行する。
このとき外部機器に送信されるデータは、ステップS406でメモリC108にセットされた回路構成データを用いて暗号化処理が行われた後のものとなる。
FIG. 5 is a sequence diagram for explaining the relationship between the flowchart shown in FIG. 4 and the elapsed time in actual communication processing with the elapsed time axis set on the vertical axis.
The flowchart shown in the right half of FIG. 5 is the flowchart of FIG.
The microcomputer 101 performs overall operation control when the encryption / decryption device 100 in FIG. 1 performs encrypted communication with the external device 200. Hereinafter, the relationship between steps S501 to S503 and the elapsed time will be described.
(S501)
In step S401, the microcomputer 101 starts handshaking with the external device 200 after circuit configuration data for handshaking processing is set in the memory C108.
(S502)
Before the handshake with the external device 200 is completed, it is necessary to prepare so that an encryption process used for application data transmission after the handshake is completed can be performed.
That is, it is necessary to set the circuit configuration data in the memory C108 in advance in consideration of the time required for step S406.
(S503)
The microcomputer 101 starts processing for transmitting application data after the handshake is completed. That is, after the handshake as the preprocessing is completed, the process proceeds to a step of transmitting the communication data body.
The data transmitted to the external device at this time is the data after the encryption processing is performed using the circuit configuration data set in the memory C108 in step S406.

なお、本実施の形態1においては、メモリB103はマイコンの外付けとして説明をしたが、マイコン内蔵のメモリで実現してもよい。また、メモリB103内に格納されたデータB104、ソフトウェアM105は、図1に例示したように物理的には同じメモリの、異なるアドレス範囲の領域に格納されるものであってもよいし、それぞれが物理的に異なるメモリ上に配置されていてもよい。
特に後者の構成とすると、メモリがFLASHメモリであっても、ソフトウェアM105をマイコン101で実行中でもデータB104の書き換えが可能になり、より自由に動的に暗号化・復号化実行部102の処理内容を変更することが可能となるというメリットもある。
また、メモリA110とメモリC108は、物理的に異なるメモリとして説明したが、物理的には同じメモリの、異なるアドレス範囲の領域であってもよい。
さらに、ここでは暗号化・復号化実行部102は2つの異なるアルゴリズムを切り替えて実現する形態を説明したが、3つ以上のアルゴリズムを切り替えて実現する形態であってもよい。
その際、メモリA110、メモリB103、メモリC108のそれぞれの容量や、どのメモリのどの領域にどのアルゴリズムを実現する回路構成データを格納するかは自由であり、システムに合わせて最適な設計を行えばよい。加えて、予測方法も、ここで示した方法は一例に過ぎず、他の予測方法を用いても良い。
In the first embodiment, the memory B103 is described as being externally attached to the microcomputer, but may be realized by a memory built in the microcomputer. Further, the data B104 and the software M105 stored in the memory B103 may be stored in areas of different address ranges in the same physical memory as illustrated in FIG. They may be arranged on physically different memories.
In particular, with the latter configuration, even if the memory is a FLASH memory, the data B104 can be rewritten while the software M105 is being executed by the microcomputer 101, and the processing contents of the encryption / decryption execution unit 102 can be more freely and dynamically performed. There is also a merit that it becomes possible to change.
Further, although the memory A110 and the memory C108 have been described as physically different memories, they may be physically different areas of the same memory.
Further, here, the encryption / decryption execution unit 102 has been described as being implemented by switching two different algorithms, but may be implemented by switching between three or more algorithms.
At that time, the capacity of each of the memory A110, the memory B103, and the memory C108, and the circuit configuration data that realizes which algorithm is stored in which area of which memory can be freely determined. If an optimum design is performed according to the system, Good. In addition, as for the prediction method, the method shown here is merely an example, and other prediction methods may be used.

以上のように、本実施の形態1によれば、
回路構成データを切換えるべきタイミングを予測し、必要となる回路構成データを予めメモリ中に読み込んでおくので、
処理の進行に応じた最適な回路構成データがタイミングよく設定され、アルゴリズムの切り替え処理の高速化をはかることができる。
また、再構成可能な暗号化・復号化実行部102が1つで充分な高速性能が得られるので、これを複数用意しなければならない構成と比較して安価に実現することが可能となる。
As described above, according to the first embodiment,
Predict the timing to switch the circuit configuration data, and read the necessary circuit configuration data into the memory in advance,
Optimal circuit configuration data corresponding to the progress of the process is set with good timing, and the algorithm switching process can be speeded up.
In addition, since a single reconfigurable encryption / decryption execution unit 102 can provide a sufficiently high speed performance, it can be realized at a lower cost than a configuration in which a plurality of reconfigurable encryption / decryption execution units 102 are required.

また、第1の処理のうち現在実行している処理以降の処理内容を、当該処理実行前に事前に読み込んでおき、事前に読み込んだ処理内容に、第1の処理の終了処理の内容が含まれる場合には、当該事前読み込み時点から、第1の処理終了までに要する標準時間が経過した時点が、第2の処理の開始タイミングであると予測するので、
適切なタイミングで最適な回路構成データを設定することができる。
In addition, the process contents after the process currently being executed in the first process are read in advance before the execution of the process, and the process contents read in advance include the contents of the end process of the first process. If the standard time required until the end of the first process has elapsed since the pre-reading time, it is predicted that the start timing of the second process,
Optimal circuit configuration data can be set at an appropriate timing.

また、第2の処理が開始するものと予測したタイミングから、第2の処理を行う際に用いる回路構成に要する時間を差し引いたタイミングに、第2の処理を行う際に必要となる回路の構成を開始するので、
回路構成の切換え中に第1の処理が終了してしまい、待ち時間が発生するという事態を回避し、アルゴリズムの切換えを含む全体処理を効率的に行うことができる。
In addition, the circuit configuration required for performing the second process at a timing obtained by subtracting the time required for the circuit configuration used for performing the second process from the timing at which the second process is predicted to start. So start
It is possible to avoid the situation in which the first process ends during switching of the circuit configuration and a waiting time occurs, and the entire process including the switching of the algorithm can be performed efficiently.

実施の形態2.
図6は、本発明の実施の形態2に係る暗号化・復号化方法を実現する暗号化・復号化装置の全体構成図である。
本実施の形態2においては、マイコン101の動作を規定するソフトウェアM105に学習モジュール120を設ける。
学習モジュール120は、回路構成データの切換えタイミングをメモリに所定回数もしくは所定時間記録し、その内容に基づき、次回以降の切換えタイミングを修正する、学習処理を規定するものである。マイコン101は、学習モジュール120の指示内容に基づき、上記学習処理を行う。
その他の構成は、実施の形態1における図1と同様であるため、説明を省略する。
Embodiment 2. FIG.
FIG. 6 is an overall configuration diagram of an encryption / decryption device that realizes the encryption / decryption method according to Embodiment 2 of the present invention.
In the second embodiment, the learning module 120 is provided in the software M105 that defines the operation of the microcomputer 101.
The learning module 120 prescribes a learning process in which the switching timing of the circuit configuration data is recorded in a memory a predetermined number of times or for a predetermined time, and the switching timing after the next time is corrected based on the contents. The microcomputer 101 performs the learning process based on the instruction content of the learning module 120.
Other configurations are the same as those in FIG. 1 in the first embodiment, and a description thereof will be omitted.

次に、学習モジュール120に基づく、マイコン101の学習処理について説明する。
(1)
マイコン101は、学習モジュール120の指示内容に基づき、アルゴリズム切替開始予測時間の誤差の二乗和、すなわち、アルゴリズムの切り替えが必要になる毎の「アルゴリズム切替開始予測時間」−「実際に切替が必要になった時間」の二乗和を求める。
(2)
マイコン101は、学習モジュール120の指示内容に基づき、ある単位時間または単位回数を設けて、ステップ(1)で求めた二乗和を、その間継続して積算する。
(3)
マイコン101は、学習モジュール120の指示内容に基づき、ステップ(2)で求めた積算値が最小となるように、「ハンドシェイク完了の命令パターンを先読みしてから実際のハンドシェイク処理の完了までの標準時間」の調整を行うなどして、アルゴリズム切替開始予測時間の調整を動的に行う。
Next, the learning process of the microcomputer 101 based on the learning module 120 will be described.
(1)
Based on the instruction contents of the learning module 120, the microcomputer 101 calculates the sum of squares of the error of the algorithm switching start prediction time, that is, “algorithm switching start prediction time” − “actual switching required every time the algorithm needs to be switched”. Find the sum of squares.
(2)
The microcomputer 101 provides a certain unit time or unit number based on the instruction content of the learning module 120 and continuously accumulates the sum of squares obtained in step (1).
(3)
Based on the instruction content of the learning module 120, the microcomputer 101 determines that “from prefetching the handshake completion command pattern to completion of the actual handshake process so that the integrated value obtained in step (2) is minimized. The algorithm switching start prediction time is dynamically adjusted by adjusting the “standard time”.

マイコン101のアルゴリズム切換えタイミングの学習過程は、例えば図6におけるメモリB103に所定の記憶領域を設けて格納しておくようにすればよい。
メモリA110やメモリC108に格納してもよいが、学習処理はマイコン101に関するものであるため、ソフトウェアM105を格納しているメモリB103に格納する方が、処理上の都合がよい。
The learning process of the algorithm switching timing of the microcomputer 101 may be performed by providing a predetermined storage area in, for example, the memory B103 in FIG.
Although it may be stored in the memory A110 or the memory C108, since the learning process is related to the microcomputer 101, it is more convenient in processing to store it in the memory B103 in which the software M105 is stored.

なお、アルゴリズムの切り替え、すなわち回路構成データの書き換え開始のタイミングの誤りを可能な限り防止するため、学習開始当初は時間に余裕を持たせて書き換えを開始するようにして、学習により徐々に最適なタイミングで書き換えを開始するようにしていっても良い。
この場合、学習開始当初は、処理予測モジュール106により予測されたアルゴリズム切替開始予測時間に対し、例えばある一定の時間を加えた時間を改めてアルゴリズム切替開始予測時間とみなすようにしておき、例えばある一定の回数学習を行うなど、学習が進んだ所で学習結果を用いてアルゴリズム切替開始予測時間の調整を行うようにすることでこれを実現することが可能となる。
In order to prevent the switching of the algorithm, that is, the error in the timing of starting rewriting of the circuit configuration data as much as possible, at the beginning of the learning, the rewriting is started with a margin of time, and the learning is gradually optimized. Rewriting may be started at the timing.
In this case, at the beginning of learning, for example, a time obtained by adding a certain time to the algorithm switching start prediction time predicted by the processing prediction module 106 is regarded as the algorithm switching start prediction time, and for example, certain fixed time. This can be realized by adjusting the algorithm switching start prediction time using the learning result when the learning progresses, such as learning the number of times.

また、同様にアルゴリズムの切り替え、すなわち回路構成データの書き換え開始のタイミングの誤りを可能な限り防止するために、現在処理中のアルゴリズムの処理完了通知を暗号化・復号化実行部102からマイコン101に制御線115を通じて通知するようにして、学習開始当初は処理予測手段がその処理完了通知を受け取ることをトリガとしてアルゴリズムの切り替え、すなわち回路構成データの書き換えを開始するようにしておき、学習が進んだ所で学習結果を用いてアルゴリズム切替開始予測時間の調整を行うようにしてもよい。   Similarly, in order to prevent the switching of the algorithm, that is, the error in the timing of starting rewriting of the circuit configuration data as much as possible, the processing completion notification of the algorithm currently being processed is sent from the encryption / decryption execution unit 102 to the microcomputer 101. Notification is made through the control line 115, and at the beginning of learning, the process predicting means receives the process completion notification as a trigger to start algorithm switching, that is, rewriting of circuit configuration data, and learning progressed. The learning switching result may be used to adjust the algorithm switching start prediction time.

このように、アルゴリズムの切り替えタイミング、すなわち回路構成データの書き換え開始のタイミングを学習して動的に調整することが可能となるため、通信環境や通信相手、およびそれらの時間的変化に追随して、常に最適な回路構成データ変更タイミングを維持することが可能となる。
なお、学習手段の学習方法は、ここで示した方法は一例に過ぎず、他の学習方法を用いても良い。
In this way, it is possible to learn and dynamically adjust the algorithm switching timing, that is, the timing to start rewriting circuit configuration data, so that it follows the communication environment, the communication partner, and their temporal changes. Therefore, it is possible to always maintain the optimum circuit configuration data change timing.
Note that the learning method of the learning means is merely an example, and other learning methods may be used.

以上のように、本実施の形態2によれば、
第2の処理の開始タイミングの予測結果と、第2の処理の実際の開始タイミングとの差をメモリ中に所定数格納し、
両者のタイミングの差が小さくなるように、第2の処理の開始タイミングの次回予測結果を修正するので、
通信環境や通信相手、およびそれらの時間的変化に追随して、常に最適な回路構成データ変更タイミングを維持することが可能となる。
As described above, according to the second embodiment,
A predetermined number of differences between the prediction result of the start timing of the second process and the actual start timing of the second process are stored in the memory;
Since the next prediction result of the start timing of the second process is corrected so that the difference between the two timings becomes small,
It is possible to always keep the optimum circuit configuration data change timing following the communication environment, the communication partner, and their temporal changes.

また、第2の処理の開始タイミングを予測する際には、
メモリ中に格納された、第2の処理の開始タイミング予測結果と、実際の開始タイミングとの差の二乗和を求め、当該二乗和が最小となるように、次回予測結果を修正するので、
最小二乗法のような一般的に確立された最適化手法を用いることができ、回路構成を切換えるべきタイミングの予測精度が向上する。
When predicting the start timing of the second process,
Since the square sum of the difference between the start timing prediction result of the second process stored in the memory and the actual start timing is obtained and the next prediction result is corrected so that the square sum is minimized,
A generally established optimization method such as a least square method can be used, and the prediction accuracy of the timing for switching the circuit configuration is improved.

また、第2の処理の開始タイミングを予測する際には、所定の余裕時間を付加して次回予測結果を決定し、
次回予測結果の修正を繰り返す毎に、前記余裕時間を増減するので、
アルゴリズムの切り替え、すなわち回路構成データの書き換え開始のタイミングの誤りが発生する可能性を低減することができる。
Further, when predicting the start timing of the second process, a predetermined margin time is added to determine the next prediction result,
Each time the prediction result is corrected next time, the margin time is increased or decreased.
It is possible to reduce the possibility of an error in timing of algorithm switching, that is, rewriting start of circuit configuration data.

また、第2の処理を所定回数実行するまでは、
第2の処理の開始タイミングをスキップし、第1の処理が完了した後に、第2の処理を行う際に用いる回路の構成を開始するので、
学習の初期段階における不正確な予測タイミングを用いて、誤ったタイミングでアルゴリズムの切り替え、すなわち回路構成データの書き換えをしてしまうことを防ぐことができる。
In addition, until the second process is executed a predetermined number of times,
Since the start timing of the second process is skipped and the configuration of the circuit used when the second process is performed after the first process is completed,
Using inaccurate prediction timing in the initial stage of learning, it is possible to prevent the algorithm from being switched at the wrong timing, that is, rewriting the circuit configuration data.

実施の形態3.
図7は、本発明の実施の形態3に係る暗号化・復号化方法を実現する暗号化・復号化装置の全体構成図である。
図7の暗号化・復号化装置100は、メモリB103、メモリD119を有する。
メモリB103には、暗号化・復号化実行部102が第2の動作を行うための回路構成データB104が格納されている。
メモリD119には、マイコン101の動作を規定するソフトウェアM105が格納されている。
ソフトウェアM105には、処理予測モジュール106、制御モジュール107、通信モジュール122が含まれる。
通信モジュール122は、マイコン101が暗号化・複合化装置100の外部のデバイス、例えば図1における外部機器200等とデータの授受を行う機能を実現するソフトウェアである。
演算処理部112とメモリD119とは、制御線121で接続されている。
また、通常、外部機器との通信に供する外部機器通信部(図示せず)を備えるのは、実施の形態1と同様である。
その他の構成は、実施の形態1における図1と同様であるため、説明を省略する。
Embodiment 3 FIG.
FIG. 7 is an overall configuration diagram of an encryption / decryption device that realizes the encryption / decryption method according to Embodiment 3 of the present invention.
The encryption / decryption device 100 in FIG. 7 includes a memory B103 and a memory D119.
The memory B103 stores circuit configuration data B104 for the encryption / decryption execution unit 102 to perform the second operation.
The memory D119 stores software M105 that defines the operation of the microcomputer 101.
The software M105 includes a process prediction module 106, a control module 107, and a communication module 122.
The communication module 122 is software that realizes a function for the microcomputer 101 to exchange data with a device external to the encryption / decryption apparatus 100, such as the external device 200 in FIG.
The arithmetic processing unit 112 and the memory D119 are connected by a control line 121.
Moreover, it is the same as that of Embodiment 1 to provide the external apparatus communication part (not shown) normally used for communication with an external apparatus.
Other configurations are the same as those in FIG. 1 in the first embodiment, and a description thereof will be omitted.

マイコン101は、通信モジュール122の指示内容に従い、外部デバイスから暗号化・復号化実行部102の回路構成データを取得し、その回路構成データを、回路構成データB104をメモリC108に設定する際と同様の処理により、メモリC108に設定する。
これにより、暗号化・復号化実行部102を、現在暗号化・復号化装置100が保持していない新しいアルゴリズムで動作させることが可能となる。
なお、通信モジュール122の指示内容にしたがって外部デバイスから取得した回路構成データは、ダイレクトにメモリC108へロードしてもよいし、一旦メモリB103あるいは他のメモリ領域などに格納してもよい。
また、外部デバイスから通信を通じてコマンドを受信する等により要求を受け付け、暗号化・復号化実行部102の回路構成データの書き換えを行い、機能変更を行うことも可能である。
The microcomputer 101 acquires the circuit configuration data of the encryption / decryption execution unit 102 from the external device according to the instruction content of the communication module 122, and the circuit configuration data is the same as when the circuit configuration data B104 is set in the memory C108. Through the process, the memory C108 is set.
As a result, the encryption / decryption executing unit 102 can be operated with a new algorithm that is not currently held by the encryption / decryption device 100.
The circuit configuration data acquired from the external device in accordance with the instruction content of the communication module 122 may be directly loaded into the memory C108, or may be temporarily stored in the memory B103 or other memory area.
It is also possible to accept a request by receiving a command from an external device through communication, etc., rewrite the circuit configuration data of the encryption / decryption execution unit 102, and change the function.

なお、図7においては、図1や図6に示す構成と異なり、回路構成データB104を格納するメモリB103と、マイコン101の動作を規定するソフトウェアM105を格納するメモリD119とを分離した構成としている。
これは、メモリB103、メモリD119が、書き込み処理中には読み込み動作のできない種類のFLASHメモリのようなデバイスを利用して構成されていてもソフトウェアM105の実行中にデータB104の書き換えを可能とするための一例である。
本実施の形態3におけるメモリの構成はこれに限られるものではなく、図1と同様に物理的に同一メモリ上に格納する形態であってもよい。
7 differs from the configuration shown in FIGS. 1 and 6 in that the memory B103 that stores the circuit configuration data B104 and the memory D119 that stores the software M105 that defines the operation of the microcomputer 101 are separated. .
This is because the data B104 can be rewritten during execution of the software M105 even if the memory B103 and the memory D119 are configured using a device such as a type of FLASH memory that cannot be read during the writing process. It is an example for.
The configuration of the memory in the third embodiment is not limited to this, and it may be a form that is physically stored in the same memory as in FIG.

ここまで、全て暗号化・復号化装置を対象として説明を行ってきたが、それぞれで実現されている暗号化・復号化方法についても同様である。さらに、実施の形態1、2、3について説明したが、これらは各々単独で用いても任意の形態を組み合わせて用いてもよく、適用対象に応じて最も効果的な構成を構築すればよい。   Up to this point, the description has been made for all the encryption / decryption devices, but the same applies to the encryption / decryption methods implemented by each. Furthermore, although Embodiment 1, 2, and 3 were demonstrated, these may be used individually or may be used combining arbitrary forms, respectively, and what is necessary is just to build the most effective structure according to an application object.

以上のように、本実施の形態3によれば、
回路構成データを、ネットワークを介して取得する通信手段を有するので、
より多種のアルゴリズムに、動的に機能変更を行うことが可能となる。また、外部との通信に広域系の通信を適用すれば、遠隔地からの暗号化・復号化実行部の機能変更等も可能となる。さらには、外部から回路構成データを書き換え可能としたので、回路構成データ書き換えの柔軟性が増し、予測したタイミング以外での書き換えが可能となる。
As described above, according to the third embodiment,
Since it has a communication means for acquiring circuit configuration data via a network,
It is possible to dynamically change the function to more various algorithms. If wide-area communication is applied to communication with the outside, it is possible to change the function of the encryption / decryption execution unit from a remote location. Furthermore, since the circuit configuration data can be rewritten from the outside, the flexibility of rewriting the circuit configuration data is increased, and rewriting can be performed at times other than the predicted timing.

実施の形態1に係る暗号化・復号化方法を実現する暗号化・復号化装置の全体構成図である。1 is an overall configuration diagram of an encryption / decryption device that realizes an encryption / decryption method according to Embodiment 1. FIG. マイコン101の処理内容に応じて、メモリC108に格納されている回路構成データが変更される様子を説明するものである。The manner in which the circuit configuration data stored in the memory C108 is changed according to the processing contents of the microcomputer 101 will be described. 演算処理部112の回路構成を動的に変更する必要がある場合の具体例として、暗号化通信を例に説明するものである。As a specific example when the circuit configuration of the arithmetic processing unit 112 needs to be dynamically changed, encrypted communication will be described as an example. 図1の暗号化・復号化装置100が、通信路201を介して外部機器200と暗号化通信を行う場合の動作フローチャートを説明するものである。An operation flowchart when the encryption / decryption apparatus 100 in FIG. 1 performs encrypted communication with the external device 200 via the communication path 201 will be described. 図4の示すフローチャートと、実際の通信処理における経過時間との関係を、縦軸に経過時間軸を設定して説明するシーケンス図である。FIG. 5 is a sequence diagram for explaining the relationship between the flowchart shown in FIG. 4 and the elapsed time in actual communication processing by setting the elapsed time axis on the vertical axis. 実施の形態2に係る暗号化・復号化方法を実現する暗号化・復号化装置の全体構成図である。FIG. 5 is an overall configuration diagram of an encryption / decryption device that realizes an encryption / decryption method according to a second embodiment. 実施の形態3に係る暗号化・復号化方法を実現する暗号化・復号化装置の全体構成図である。FIG. 9 is an overall configuration diagram of an encryption / decryption device that realizes an encryption / decryption method according to a third embodiment.

符号の説明Explanation of symbols

100 暗号化・復号化装置、101 マイコン、102 暗号化・復号化実行部、103 メモリB、104 回路構成データB、105 ソフトウェアM、106 処理予測モジュール、107 制御モジュール、108 メモリC、109 回路構成データ、110 メモリA、111 回路構成データA、112 演算処理部、113 制御線、114 制御線、115 制御線、116 制御線、117 制御線、118 制御線、119 メモリD、120 学習モジュール、121 制御線、122 通信モジュール、200 外部機器、201 通信路、301 公開鍵暗号回路、302 秘密鍵暗号回路。
DESCRIPTION OF SYMBOLS 100 Encryption / decryption apparatus, 101 Microcomputer, 102 Encryption / decryption execution part, 103 Memory B, 104 Circuit configuration data B, 105 Software M, 106 Process prediction module, 107 Control module, 108 Memory C, 109 Circuit configuration Data, 110 Memory A, 111 Circuit configuration data A, 112 Operation processing unit, 113 Control line, 114 Control line, 115 Control line, 116 Control line, 117 Control line, 118 Control line, 119 Memory D, 120 Learning module, 121 Control line, 122 communication module, 200 external device, 201 communication path, 301 public key encryption circuit, 302 secret key encryption circuit.

Claims (16)

回路構成を動的に変更可能な回路デバイスを用いて、所定の処理毎に異なる回路構成で暗号化・復号化を行う方法において、
第1の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを用いて前記回路デバイスの回路を構成するステップと、
第2の処理の開始タイミングを、ハンドシェイク処理の命令パターンがハンドシェイク処理の終了処理であるか否かに基づいて予測する予測ステップと、
前記予測ステップの結果に基づき、前記第2の処理が開始すると予測されるタイミングに先立ち、前記第2の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを用いて、前記回路デバイスの回路を構成する回路構成ステップと、
を有することを特徴とする暗号化・復号化方法。
In a method of performing encryption / decryption with a different circuit configuration for each predetermined process using a circuit device capable of dynamically changing a circuit configuration,
Configuring the circuit of the circuit device using circuit configuration data for performing encryption / decryption processing used when performing the first processing;
A prediction step of predicting a start timing of the second process based on whether or not the instruction pattern of the handshake process is an end process of the handshake process ;
Based on the result of the prediction step, prior to the timing at which the second process is predicted to start, using circuit configuration data for performing the encryption / decryption process used when performing the second process, A circuit configuration step for configuring a circuit of the circuit device;
And an encryption / decryption method.
前記予測ステップにおいては、
前記第1の処理のうち現在実行中の処理以降の処理内容を、その現在実行中の処理以降の処理実行前に事前に読み込んでおき、
事前に読み込んだ処理内容に、前記第1の処理の終了処理の内容が含まれる場合には、
当該事前読み込み時点から、前記第1の処理終了までに要する標準時間が経過した時点が、前記第2の処理の開始タイミングであると予測することを特徴とする請求項1に記載の暗号化・復号化方法。
In the prediction step,
The processing content after the currently executing process in the first process is read in advance before executing the process after the currently executing process,
When the processing content read in advance includes the content of the end processing of the first processing,
2. The encryption / decoding according to claim 1, wherein a point in time at which a standard time required for the end of the first process has elapsed since the pre-reading point is predicted to be a start timing of the second process. Decryption method.
前記予測ステップにおいて前記第2の処理が開始するものと予測したタイミングから、前記回路構成ステップに要する時間を差し引いたタイミングに、前記回路構成ステップの実行を開始することを特徴とする請求項2に記載の暗号化・復号化方法。   3. The execution of the circuit configuration step is started at a timing obtained by subtracting a time required for the circuit configuration step from a timing at which the second process is predicted to start in the prediction step. The encryption / decryption method described. 前記予測ステップにおける予測結果と、前記第2の処理の実際の開始タイミングとを所定数格納する記憶手段を設け、
両者のタイミングの差が小さくなるように、前記予測ステップの次回予測結果を修正する学習ステップを有することを特徴とする請求項1ないし請求項3のいずれかに記載の暗号化・復号化方法。
A storage means for storing a predetermined number of prediction results in the prediction step and an actual start timing of the second process;
The encryption / decryption method according to any one of claims 1 to 3, further comprising a learning step of correcting a next prediction result of the prediction step so that a difference between both timings becomes small.
前記学習ステップにおいては、
前記記憶手段に格納された、前記予測結果と前記実際の開始タイミングとの差の二乗和を求め、当該二乗和が最小となるように、前記予測ステップの次回予測結果を修正することを特徴とする請求項4に記載の暗号化・復号化方法。
In the learning step,
Finding the sum of squares of the difference between the prediction result and the actual start timing stored in the storage means, and correcting the next prediction result of the prediction step so that the square sum is minimized. The encryption / decryption method according to claim 4.
前記学習ステップにおいては、所定の余裕時間を付加して次回予測結果を決定し、
前記学習ステップを繰り返す毎に、前記余裕時間を増減することを特徴とする請求項4又は請求項5に記載の暗号化・復号化方法。
In the learning step, a predetermined margin time is added to determine the next prediction result,
6. The encryption / decryption method according to claim 4, wherein the margin time is increased or decreased each time the learning step is repeated.
前記第2の処理を所定回数実行するまでは、
前記予測ステップ及び前記学習ステップをスキップし、前記第1の処理が完了した後に前記回路構成ステップを開始することを特徴とする請求項4ないし請求項6のいずれかに記載の暗号化・復号化方法。
Until the second process is executed a predetermined number of times,
7. The encryption / decryption according to claim 4, wherein the prediction step and the learning step are skipped, and the circuit configuration step is started after the first processing is completed. Method.
前記回路構成データを、ネットワークを介して取得するステップを有することを特徴とする請求項1ないし請求項7のいずれかに記載の暗号化・復号化方法。   8. The encryption / decryption method according to claim 1, further comprising a step of acquiring the circuit configuration data via a network. 制御手段と、
回路構成を動的に変更可能な回路デバイスを備え、前記制御手段の指示に基づき、前記回路デバイスを用いて、前記制御手段が実行する所定の処理毎に異なる回路構成で暗号化・復号化処理を行う暗号化・復号化手段と、
複数種類の前記回路構成データを格納する記憶手段と、
を有し、
前記制御手段は、
前記記憶手段より、第1の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを読み込んで前記回路デバイスの回路を構成し、
第2の処理の開始タイミングを、ハンドシェイク処理の命令パターンがハンドシェイク処理の終了処理であるか否かに基づいて予測し、
前記予測結果に基づき、
前記第2の処理が開始すると予測されるタイミングに先立ち、前記記憶手段より、前記第2の処理を行う際に用いる暗号化・復号化処理を行うための回路構成データを読み込んで、前記回路デバイスの回路を構成することを特徴とする暗号化・復号化装置。
Control means;
A circuit device capable of dynamically changing a circuit configuration is provided, and an encryption / decryption process is performed with a different circuit configuration for each predetermined process executed by the control unit using the circuit device based on an instruction from the control unit Encryption / decryption means for performing
Storage means for storing a plurality of types of circuit configuration data;
Have
The control means includes
Read the circuit configuration data for performing encryption / decryption processing used when performing the first processing from the storage means, and configure the circuit of the circuit device,
Predicting the start timing of the second process based on whether the instruction pattern of the handshake process is the end process of the handshake process ;
Based on the prediction result,
Prior to the timing at which the second process is predicted to start, the circuit device reads circuit configuration data for performing the encryption / decryption process used when performing the second process from the storage unit. An encryption / decryption device comprising the circuit of
前記制御手段は、
前記第2の処理の開始タイミングを予測する際には、前記第1の処理のうち現在実行中の処理以降の処理内容を、その現在実行中の処理以降の処理実行前に事前に読み込んでおき、
事前に読み込んだ処理内容に、前記第1の処理の終了処理の内容が含まれる場合には、
当該事前読み込み時点から、前記第1の処理終了までに要する標準時間が経過した時点が、前記第2の処理の開始タイミングであると予測することを特徴とする請求項9に記載の暗号化・復号化装置。
The control means includes
When predicting the start timing of the second process, the process contents after the process currently being executed in the first process are read in advance before executing the process after the process currently being executed. ,
When the processing content read in advance includes the content of the end processing of the first processing,
10. The encryption / decoding according to claim 9, wherein a point in time at which a standard time required for the end of the first process has elapsed from the pre-reading point is predicted to be a start timing of the second process. Decryption device.
前記制御手段は、
前記第2の処理が開始するものと予測したタイミングから、前記第2の処理を行う際に用いる回路構成に要する時間を差し引いたタイミングに、
当該回路構成を開始することを特徴とする請求項10に記載の暗号化・復号化装置。
The control means includes
At a timing obtained by subtracting the time required for the circuit configuration used when performing the second processing from the timing at which the second processing is predicted to start,
11. The encryption / decryption device according to claim 10, wherein the circuit configuration is started.
前記記憶手段は、
前記第2の処理の開始タイミングの予測結果と、前記第2の処理の実際の開始タイミングとの差を所定数格納し、
前記制御手段は、
両者のタイミングの差が小さくなるように前記第2の処理の開始タイミングの、次回予測結果を修正することを特徴とする請求項9ないし請求項11のいずれかに記載の暗号化・復号化装置。
The storage means
Storing a predetermined number of differences between the prediction result of the start timing of the second process and the actual start timing of the second process;
The control means includes
12. The encryption / decryption device according to claim 9, wherein a next prediction result of a start timing of the second process is corrected so that a difference between both timings becomes small. .
前記制御手段は、
前記第2の処理の開始タイミングを予測する際には、
前記記憶手段に格納された、前記予測結果と前記実際の開始タイミングとの差の二乗和を求め、当該二乗和が最小となるように、次回予測結果を修正することを特徴とする請求項12に記載の暗号化・復号化装置。
The control means includes
When predicting the start timing of the second process,
The sum of squares of the difference between the prediction result and the actual start timing stored in the storage means is obtained, and the next prediction result is corrected so that the square sum is minimized. The encryption / decryption device described in 1.
前記制御手段は、
前記第2の処理の開始タイミングを予測する際には、所定の余裕時間を付加して次回予測結果を決定し、
次回予測結果の修正を繰り返す毎に、前記余裕時間を増減することを特徴とする請求項12又は請求項13に記載の暗号化・復号化装置。
The control means includes
When predicting the start timing of the second process, a predetermined margin time is added to determine the next prediction result,
14. The encryption / decryption device according to claim 12 or 13, wherein the margin time is increased / decreased every time correction of the next prediction result is repeated.
前記制御手段は、
前記第2の処理を所定回数実行するまでは、
前記第2の処理の開始タイミングをスキップし、前記第1の処理が完了した後に、前記第2の処理を行う際に用いる回路構成を開始することを特徴とする請求項12ないし請求項14のいずれかに記載の暗号化・復号化装置。
The control means includes
Until the second process is executed a predetermined number of times,
15. The circuit configuration used when performing the second process is started after skipping the start timing of the second process and completing the first process. The encryption / decryption device according to any one of the above.
前記回路構成データを、ネットワークを介して取得する通信手段を有することを特徴とする請求項9ないし請求項15のいずれかに記載の暗号化・復号化装置。   The encryption / decryption device according to any one of claims 9 to 15, further comprising communication means for acquiring the circuit configuration data via a network.
JP2006123969A 2006-04-27 2006-04-27 Encryption / decryption method and apparatus Expired - Fee Related JP4920297B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006123969A JP4920297B2 (en) 2006-04-27 2006-04-27 Encryption / decryption method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006123969A JP4920297B2 (en) 2006-04-27 2006-04-27 Encryption / decryption method and apparatus

Publications (2)

Publication Number Publication Date
JP2007300175A JP2007300175A (en) 2007-11-15
JP4920297B2 true JP4920297B2 (en) 2012-04-18

Family

ID=38769332

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006123969A Expired - Fee Related JP4920297B2 (en) 2006-04-27 2006-04-27 Encryption / decryption method and apparatus

Country Status (1)

Country Link
JP (1) JP4920297B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4330903B2 (en) * 2003-03-10 2009-09-16 株式会社東芝 Secret communication specification agreement system, apparatus and program
JP4102695B2 (en) * 2003-03-28 2008-06-18 株式会社日本総合研究所 Batch job management system and batch job management program
JP4405884B2 (en) * 2004-09-22 2010-01-27 キヤノン株式会社 Drawing processing circuit and image output control device

Also Published As

Publication number Publication date
JP2007300175A (en) 2007-11-15

Similar Documents

Publication Publication Date Title
US8848703B2 (en) On-chip router and multi-core system using the same
US10045095B2 (en) Communication processing device, communication method, and communication system
JP2007102387A (en) Storage system, encryption path switching method, program for switching encryption path and recording medium with its program recorded
JP6390302B2 (en) Program transmission system and program transmission apparatus
JP4626349B2 (en) Hardware configuration device
JP2016015020A (en) Microcomputer and security setting system
US8069333B2 (en) Converting logical to real number to access shared configuration information in event driven state transiting reconfigurable system
CN111142783A (en) Storage device for self-adaptive supporting multiple protocols
TW201715869A (en) Transmission apparatus and transmission method thereof
JP2017108357A (en) Arithmetic unit, arithmetic method and communication apparatus
US9319353B2 (en) Network task offload apparatus and method thereof
JP4920297B2 (en) Encryption / decryption method and apparatus
JP2009252128A (en) Memory control apparatus and method of controlling the same
CN113238789A (en) Electronic equipment, firmware upgrading method and device thereof and computer readable storage medium
JP2006235765A (en) Duplex controller system, and its controller
CN112398762B (en) Network element and communication method in network element
JP2005092520A (en) Duplication controller system and equalization method thereof
KR100420555B1 (en) Block encrypting device for fast session switching and method of operating the same
KR101805866B1 (en) Electronic apparatus for software defined radio and scheduling method therefor
US20140281053A1 (en) I/o device control system and method for controlling i/o device
CN113127901B (en) Processing method, device and chip for data encryption transmission
JP6897203B2 (en) Embedded device and control method of embedded device
JP2007329760A (en) Programmable logic device, circuit information input controller, and semiconductor device
JP4084320B2 (en) Non-instantaneous reconfiguration method and system
JP2005269187A (en) Cipher processing communication system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110531

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110721

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110906

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111101

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120201

R150 Certificate of patent or registration of utility model

Ref document number: 4920297

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150210

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees