JP4906800B2 - COMMUNICATION DEVICE, ENCRYPTED COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM - Google Patents
COMMUNICATION DEVICE, ENCRYPTED COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM Download PDFInfo
- Publication number
- JP4906800B2 JP4906800B2 JP2008173307A JP2008173307A JP4906800B2 JP 4906800 B2 JP4906800 B2 JP 4906800B2 JP 2008173307 A JP2008173307 A JP 2008173307A JP 2008173307 A JP2008173307 A JP 2008173307A JP 4906800 B2 JP4906800 B2 JP 4906800B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- communication device
- transmission
- buffer
- blocks
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000006854 communication Effects 0.000 title claims description 435
- 238000004891 communication Methods 0.000 title claims description 430
- 238000000034 method Methods 0.000 title claims description 71
- PWPJGUXAGUPAHP-UHFFFAOYSA-N lufenuron Chemical compound C1=C(Cl)C(OC(F)(F)C(C(F)(F)F)F)=CC(Cl)=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F PWPJGUXAGUPAHP-UHFFFAOYSA-N 0.000 title 1
- 230000005540 biological transmission Effects 0.000 claims description 275
- 239000000872 buffer Substances 0.000 claims description 256
- 230000015654 memory Effects 0.000 claims description 59
- 238000012545 processing Methods 0.000 description 57
- 238000010586 diagram Methods 0.000 description 11
- 238000012546 transfer Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000004870 electrical engineering Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
Images
Landscapes
- Communication Control (AREA)
Description
本発明は、通信装置及び暗号通信システム及び通信方法及び通信プログラムに関するものである。 The present invention relates to a communication device, a cryptographic communication system, a communication method, and a communication program.
従来の装置では、入力チャネルごとに設けられた入力バッファに入力されたデータを格納し、入力データセレクタを介して、入力バッファに格納されているデータを時分割に演算回路にブロック単位で入力する。演算回路はブロック単位で暗号化(又は復号化)を行う。従来の装置では、共通鍵暗号アルゴリズムを使用することを前提としている。共通鍵暗号アルゴリズムでは、上記のように、ブロックと呼ばれる所定のレングス(例えば、8バイト)のデータを1回の演算で暗号化する。長いデータの場合、データをブロック長ごとに分割して、演算回路を分割数分動作させることで、暗号演算が行われる(例えば、特許文献1参照)。
従来の装置では、チャネルから入力される入力データは、ブロック長の整数倍に限定されている。そのため、入力バッファのレングスよりも長い平文データを暗号化する場合は、チャネルを切り替えて異なる入力バッファにデータを入力し、入力データセレクタで入力バッファを切り替えながら演算を行うことになる。この場合、入力バッファのレングスより入力データのレングスは短く、かつ、入力データのレングスはブロック長の整数倍となる。しかし、入力データのレングスで平文データが割り切れることは稀であり、大抵は端数のレングスのデータが入力データとして入力バッファに入力されることになる。つまり、端数のレングスのデータがある場合、そのレングスがどんなに短くても、ブロック長の整数倍のレングスをもつ入力データを入力バッファへ入力する処理と同じ処理が1回分必要となるという課題があった。 In the conventional apparatus, the input data input from the channel is limited to an integral multiple of the block length. Therefore, when encrypting plaintext data longer than the length of the input buffer, the data is input to a different input buffer by switching the channel, and the calculation is performed while switching the input buffer by the input data selector. In this case, the input data length is shorter than the input buffer length, and the input data length is an integral multiple of the block length. However, it is rare that the plaintext data is divisible by the length of the input data, and the fractional length of data is usually input to the input buffer as input data. In other words, if there is fractional length data, no matter how short the length is, there is a problem that the same processing as that for inputting input data having a length that is an integral multiple of the block length to the input buffer is required once. It was.
また、従来の装置では、入力バッファが複数存在するために、一時的に使用するメモリの容量が多くなるという課題もあった。メモリ量を減らすために、入力バッファを1本にすることも考えられるが、この場合、端数のレングスのデータを入力バッファへ入力する処理の影響が相対的に大きくなり、入力バッファの効率的な使用が難しいという課題が生じる。 In addition, the conventional apparatus has a problem that the capacity of the memory to be temporarily used increases because a plurality of input buffers exist. In order to reduce the amount of memory, it is conceivable to use one input buffer, but in this case, the influence of the process of inputting fractional length data to the input buffer becomes relatively large, and the efficiency of the input buffer is reduced. The problem that it is difficult to use arises.
本発明は、例えば、処理するデータのレングスが長く、複数回暗号演算を行わなければならない通信装置においても、送受信バッファの容量を抑え、かつ、通信回数の増大を抑えることを目的とする。 An object of the present invention is, for example, to suppress the capacity of a transmission / reception buffer and suppress an increase in the number of communication even in a communication apparatus in which the length of data to be processed is long and a cryptographic operation must be performed a plurality of times.
本発明の一の態様に係る通信装置は、
データを他の通信装置へ送信して、前記他の通信装置に対し、当該送信データを一定の大きさのブロックごとに分けて行う所定の処理をさせる通信装置であって、
送信バッファAと、
前記送信バッファAと前記他の通信装置が備える受信バッファBとのうち、容量の小さいバッファに格納できるブロックの数をNとし、前記送信データの先頭からN個のブロックごとに切り出したデータを前記送信バッファAへ順次入力し、前記送信データのうち、前記送信バッファAに未入力のデータがブロックN個分の大きさより大きくても前記容量の小さいバッファに格納できる大きさとなった場合、当該データを前記送信バッファAへ一度に入力する制御部と、
前記制御部から前記送信バッファAへデータが入力される度に、当該データを前記送信バッファAから前記他の通信装置へ送信する通信部とを備えることを特徴とする。
A communication apparatus according to one aspect of the present invention is provided.
A communication device that transmits data to another communication device and causes the other communication device to perform a predetermined process for dividing the transmission data into blocks of a certain size,
Send buffer A;
Of the transmission buffer A and the reception buffer B provided in the other communication device, the number of blocks that can be stored in a small-capacity buffer is N, and the data cut out every N blocks from the top of the transmission data is the data When data is sequentially input to the transmission buffer A, and the data that has not been input to the transmission buffer A is larger than the size of N blocks among the transmission data, the data can be stored in the small capacity buffer. A control unit that inputs the data to the transmission buffer A at a time;
And a communication unit that transmits the data from the transmission buffer A to the other communication device each time data is input from the control unit to the transmission buffer A.
本発明の一の態様によれば、通信装置において、制御部が、送信バッファAと他の通信装置が備える受信バッファBとのうち、容量の小さいバッファに格納できるブロックの数をNとし、送信データの先頭からN個のブロックごとに切り出したデータを送信バッファAへ順次入力し、未入力のデータがブロックN個分の大きさより大きくても容量の小さいバッファに格納できる大きさとなった場合、当該データを送信バッファAへ一度に入力することにより、送受信バッファの容量を抑え、かつ、通信回数の増大を抑えることが可能となる。 According to one aspect of the present invention, in the communication apparatus, the control unit sets N as the number of blocks that can be stored in a buffer having a small capacity among the transmission buffer A and the reception buffer B included in another communication apparatus. When data cut out every N blocks from the top of the data is sequentially input to the transmission buffer A, and the size of the uninput data is larger than the size of N blocks, the size can be stored in a small capacity buffer. By inputting the data to the transmission buffer A at a time, it is possible to suppress the capacity of the transmission / reception buffer and suppress the increase in the number of communications.
以下、本発明の実施の形態について、図を用いて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
実施の形態1.
本実施の形態について図1を参照し説明する。図1は、本実施の形態における暗号通信システム100が備える通信装置200a,200bの構成図である。以下、通信装置200aを暗号通信装置A、通信装置200bを暗号通信装置Bという。
Embodiment 1 FIG.
This embodiment will be described with reference to FIG. FIG. 1 is a configuration diagram of communication apparatuses 200a and 200b included in the cryptographic communication system 100 according to the present embodiment. Hereinafter, the communication device 200a is referred to as an encryption communication device A, and the communication device 200b is referred to as an encryption communication device B.
図1において、暗号通信装置A及び暗号通信装置Bは、共に、通信部201、制御部202、不揮発メモリ203を備えている。暗号通信装置Bは、さらに、乱数生成器204、暗号処理部205を備えている。暗号通信装置A及び暗号通信装置Bは、それぞれ1つもしくは複数のマイコン(マイクロコンピュータ)などで構成されている。
In FIG. 1, both the encryption communication device A and the encryption communication device B include a
通信部201は、暗号通信装置Aでは送信バッファA及び受信バッファAを用いて、暗号通信装置Bでは送信バッファB及び受信バッファBを用いて、通信データ101の送受信を行う。通信部201は、例えば、スマートカード用の接触式インタフェースや非接触式インタフェース、パラレルインタフェース、シリアルインタフェース、IEEE(Institute・of・Electrical・and・Electronics・Engineers)1394やUSB(Universal・Serial・Bus)などの有線インタフェース、赤外線通信、Bluetooth(登録商標)、無線LAN(ローカルエリアネットワーク)、DSRC(Dedicated・Short・Range・Communication)、携帯電話などの無線インタフェースを実装したものである。制御部202は、通信部201で受信した通信データ101を解読し、又は、送信する通信データ101(送信データ)を生成し、装置全体を制御する。制御部202は、CPU(Central・Processing・Unit)やロジック回路、シーケンスROM(Read・Only・Memory)などで構成される。不揮発メモリ203は、暗号化処理時に使用する鍵などの秘密情報を記憶する。乱数生成器204は、暗号化処理で使用する乱数を生成する。暗号処理部205は、不揮発メモリ203に記憶された鍵などの秘密情報や乱数生成器204で生成された乱数を使用して通信データ101を暗号化又は復号化する。
The
以下では、暗号機能のない通信装置200aである暗号通信装置Aが、他の通信装置200bである暗号通信装置Bにブロック暗号によるデータの暗号化を依頼する場合を想定して説明を行う。つまり、以下では、暗号通信装置Aは、データを暗号通信装置Bへ送信して、暗号通信装置Bに対し、当該送信データのブロック暗号による暗号化処理をさせるものとする。ブロック暗号による暗号化処理は、送信データを一定の大きさのブロックごとに分けて行う所定の処理の一例である。 In the following description, it is assumed that the encryption communication device A, which is a communication device 200a having no encryption function, requests encryption encryption device B, which is another communication device 200b, to encrypt data using block encryption. That is, hereinafter, it is assumed that the encryption communication device A transmits data to the encryption communication device B, and causes the encryption communication device B to perform encryption processing of the transmission data by block encryption. The encryption process using the block cipher is an example of a predetermined process in which transmission data is divided into blocks each having a certain size.
図2は、暗号通信装置Aが暗号通信装置Bにデータの暗号化を依頼して、暗号通信装置Bがデータの暗号化を行う際に、暗号通信装置A及び暗号通信装置Bにおいて、データの受け渡しを行う主なHW(ハードウェア)の構成要素を示すブロック図である。 FIG. 2 shows that when the encryption communication device A requests the encryption communication device B to encrypt the data and the encryption communication device B encrypts the data, the encryption communication device A and the encryption communication device B It is a block diagram which shows the component of main HW (hardware) which performs delivery.
図2において、送信データメモリ211、受信データメモリ212は、暗号通信装置Aの不揮発メモリ203又はその一部である。送信バッファA、受信バッファAは、前述したように、それぞれ暗号通信装置Aの通信部201の一部である。ブロック入力部213、暗号演算部214、ブロック出力部215は、それぞれ暗号通信装置Bの暗号処理部205の一部である。受信バッファB、送信バッファBは、前述したように、それぞれ暗号通信装置Bの通信部201の一部である。
In FIG. 2, a
暗号化(又は復号化)されるデータは、送信データメモリ211に格納されている。暗号化されるデータは大きいので、暗号通信装置Aの制御部202は、送信バッファAに全てのデータを移すことはできず、数回に分けてデータを移すことになる。つまり、暗号通信装置Aの制御部202は、分割したデータを送信バッファAに順番に入力していく。暗号通信装置Aの通信部201は、送信バッファAから受信バッファBにデータを送信する。暗号通信装置Bの暗号処理部205では、共通鍵暗号アルゴリズムを使用するので、ブロックという単位でしかデータを受け付けることができない。ブロック入力部213、ブロック出力部215はブロックのインタフェースである。ブロックのレングスは、受信バッファBのレングスより小さいので、暗号通信装置Bの暗号処理部205には何回かに分けてデータが送られることになる。ブロック入力部213に入力されたデータは、暗号演算部214で暗号化され、ブロック出力部215を介して、送信バッファBに格納される。受信バッファBにあるデータが全て暗号化されると、暗号通信装置Bの通信部201は、送信バッファBに格納されたデータを受信バッファAに送信する。暗号通信装置Aの制御部202は、受信バッファAのデータを受信データメモリ212に格納する。暗号通信装置Aが、データを送信バッファAに入力してから暗号化されたデータを受信バッファAで受け取るまでの処理を、データの分割数分繰り返すことで、全てのデータが暗号化されて、受信データメモリ212に格納されることになる。
Data to be encrypted (or decrypted) is stored in the
図3は、通信装置200a,200b、即ち、暗号通信装置A、暗号通信装置Bそれぞれのハードウェア構成の一例を示す図である。 FIG. 3 is a diagram illustrating an example of a hardware configuration of each of the communication devices 200a and 200b, that is, the encryption communication device A and the encryption communication device B.
図3において、暗号通信装置A、暗号通信装置Bは、主にマイコンなどのコンピュータで構成されており、LCD(液晶ディスプレイ)などの表示画面を有する表示装置901、操作キー902、操作ボタン903などのハードウェアを備え、これらはケーブルや信号線で接続されている。
In FIG. 3, the encryption communication device A and the encryption communication device B are mainly configured by a computer such as a microcomputer, and include a
暗号通信装置A、暗号通信装置Bは、プログラムを実行するCPU911を備えている。CPU911は、プロセッサの一例である。CPU911は、バス912を介してROM913、RAM914(Random・Access・Memory)、通信ボード915、表示装置901、操作キー902、操作ボタン903、磁気ディスク装置920と接続され、これらのハードウェアデバイスを制御する。磁気ディスク装置920の代わりに、フラッシュメモリ、メモリカードリーダライタなどの記憶媒体が用いられてもよい。
The encryption communication device A and the encryption communication device B include a
RAM914は、揮発メモリの一例である。ROM913、磁気ディスク装置920の記憶媒体は、不揮発メモリ203の一例である。これらは、メモリの一例である。通信ボード915、操作キー902、操作ボタン903などは、入力装置の一例である。また、通信ボード915、表示装置901などは、出力装置の一例である。
The
通信ボード915は、有線又は無線LAN、移動通信ネットワーク、DSRCネットワークなどに接続される。通信ボード915は、インターネット、あるいは、IP−VPN(Internet・Protocol・Virtual・Private・Network)、広域LAN、ATM(Asynchronous・Transfer・Mode)ネットワークなどのWAN(ワイドエリアネットワーク)などに接続されていても構わない。LAN、移動通信ネットワーク、DSRCネットワーク、インターネット、WANは、いずれもネットワークの一例である。
The
磁気ディスク装置920には、オペレーティングシステム921(OS)、ウィンドウシステム922、プログラム群923、ファイル群924が記憶されている。プログラム群923のプログラムは、CPU911、オペレーティングシステム921、ウィンドウシステム922により実行される。プログラム群923には、本実施の形態の説明において「〜部」として説明する機能を実行するプログラムが記憶されている。プログラムは、CPU911により読み出され実行される。また、ファイル群924には、本実施の形態の説明において、「〜データ」、「〜情報」、「〜ID(識別子)」、「〜フラグ」、「〜結果」として説明するデータや情報や信号値や変数値やパラメータが、「〜ファイル」や「〜データベース」や「〜テーブル」の各項目として記憶されている。「〜ファイル」や「〜データベース」や「〜テーブル」は、ディスクやメモリなどの記憶媒体に記憶される。ディスクやメモリなどの記憶媒体に記憶されたデータや情報や信号値や変数値やパラメータは、読み書き回路を介してCPU911によりメインメモリやキャッシュメモリに読み出され、抽出・検索・参照・比較・演算・計算・制御・出力・印刷・表示などのCPU911の処理(動作)に用いられる。抽出・検索・参照・比較・演算・計算・制御・出力・印刷・表示などのCPU911の処理中、データや情報や信号値や変数値やパラメータは、メインメモリやキャッシュメモリやバッファメモリに一時的に記憶される。
The
また、本実施の形態の説明において用いるブロック図やフローチャートの矢印の部分は主としてデータや信号の入出力を示し、データや信号は、RAM914、フラッシュメモリなどのメモリ、磁気ディスク装置920の磁気ディスクなどの記録媒体に記録される。また、データや信号は、バス912や信号線やケーブルその他の伝送媒体により伝送される。
In addition, the arrows in the block diagrams and flowcharts used in the description of the present embodiment mainly indicate input / output of data and signals. The data and signals are
また、本実施の形態の説明において「〜部」として説明するものは、「〜回路」、「〜装置」、「〜機器」であってもよく、また、「〜ステップ」、「〜工程」、「〜手順」、「〜処理」であってもよい。即ち、「〜部」として説明するものは、ROM913に記憶されたファームウェアで実現されていても構わない。あるいは、ソフトウェアのみ、あるいは、素子・デバイス・基板・配線などのハードウェアのみ、あるいは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実現されていても構わない。ファームウェアとソフトウェアは、プログラムとして、磁気ディスク、フラッシュメモリなどの記録媒体に記憶される。このプログラムはCPU911により読み出され、CPU911により実行される。即ち、プログラムは、本実施の形態の説明で述べる「〜部」としてコンピュータを機能させるものである。あるいは、本実施の形態の説明で述べる「〜部」の手順や方法をコンピュータに実行させるものである。
In addition, what is described as “˜unit” in the description of this embodiment may be “˜circuit”, “˜device”, “˜device”, and “˜step”, “˜process”. , “˜procedure”, and “˜processing”. That is, what is described as “˜unit” may be realized by firmware stored in the
次に、処理フローについて説明する。 Next, the processing flow will be described.
図4は本実施の形態の処理フロー(本実施の形態に係る通信方法)を示すフローチャートである。 FIG. 4 is a flowchart showing a processing flow (communication method according to the present embodiment) of the present embodiment.
図4において、ステップS101では、後述する送受信パラメータ設定処理が行われる。この処理では、効率よく送受信を行うために、暗号通信装置Aと暗号通信装置Bの送受信パラメータが設定される。ついで、ステップS102では、後述するデータ暗号化処理が行われる。この処理では、送受信パラメータに基づく通信が繰り返され、長大なデータの暗号化が行われる。 4, in step S101, a transmission / reception parameter setting process described later is performed. In this process, the transmission / reception parameters of the encryption communication device A and the encryption communication device B are set in order to perform efficient transmission / reception. In step S102, data encryption processing described later is performed. In this process, communication based on transmission / reception parameters is repeated, and long data is encrypted.
次に、前述したステップS101の送受信パラメータ設定処理の詳細について、図5を参照して説明する。 Next, details of the transmission / reception parameter setting processing in step S101 described above will be described with reference to FIG.
ステップS111で暗号通信装置Aの制御部202は、暗号通信装置Aの通信部201を介して、暗号通信装置A自身の受信バッファAのレングスを暗号通信装置Bに送る。ステップS112で暗号通信装置Bの制御部202は、暗号通信装置Bの通信部201を介して、そのレングスを受け取る。一方、ステップS113で暗号通信装置Bの制御部202は、暗号通信装置Bの通信部201を介して、暗号通信装置B自身の受信バッファBのレングスを暗号通信装置Aに送る。ステップS114で暗号通信装置Aの制御部202は、暗号通信装置Aの通信部201を介して、そのレングスを受け取る。この処理により、暗号通信装置A、暗号通信装置Bは、相互の受信バッファのレングスを不揮発メモリ203にて共有することができる。なお、暗号通信装置A、暗号通信装置Bは、自身の送信バッファ及び受信バッファのレングスを予め不揮発メモリ203に記憶しているものとする。
In step S111, the
このように、本実施の形態において、暗号通信装置Aの不揮発メモリ203は、送信バッファA及び受信バッファAの容量を予め記憶する。暗号通信装置Aの制御部202は、暗号通信装置Bから受信バッファBの容量を通知され、受信バッファBの容量も暗号通信装置Aの不揮発メモリ203に記憶される。また、暗号通信装置Bの不揮発メモリ203は、送信バッファB及び受信バッファBの容量を予め記憶する。暗号通信装置Bの制御部202は、暗号通信装置Aから受信バッファAの容量を通知され、受信バッファAの容量も暗号通信装置Bの不揮発メモリ203に記憶される。
As described above, in the present embodiment, the
ステップS115では、暗号通信装置Aの制御部202は、受信バッファBのレングス、送信バッファAのレングスのうち、最小のレングスを選択する。さらに、暗号通信装置Aの制御部202は、この最小のレングスを共通鍵アルゴリズムのブロックのレングスで割った整数部を送信ブロック数Aとする。ここで、最小のレングスは、ブロックのレングスより大きいと仮定する。同様にして、ステップS116でも、暗号通信装置Bの制御部202は、受信バッファAのレングス、送信バッファBのレングスのうち、最小のレングスを選択する。さらに、暗号通信装置Bの制御部202は、この最小のレングスを共通鍵アルゴリズムのブロックのレングスで割った整数部を送信ブロック数Bとする。ついで、ステップS117、S118において、各通信装置の制御部202は、通信部201を介して、送信ブロック数A、送信ブロック数Bを相互に送信して、そのうちの小さい方を送信ブロック数(共通)Nとして各々選択する。ステップS119では、暗号通信装置Aの制御部202は、送信ブロック数(共通)Nとブロックのレングスをかけたレングス値と、受信バッファBのレングス、送信バッファAのレングスのうち、最小のレングスとの差Saを求める。この差Saは、送信ブロック数(共通)Nのデータを暗号通信装置Bに送った際に、受信バッファB、送信バッファAのうち、小さい方で使用されないバッファのレングスに等しい。暗号通信装置Aの制御部202は、送信ブロック数(共通)Nと差Saを送受信パラメータとして設定する。ステップS120では、暗号通信装置Bの制御部202は、送信ブロック数(共通)Nとブロックのレングスをかけたレングス値と、受信バッファAのレングス、送信バッファBのレングスのうち、最小のレングスとの差Sbを求める。この差Sbは、送信ブロック数(共通)Nのデータを暗号通信装置Aに送った際に、受信バッファA、送信バッファBのうち、小さい方で使用されないバッファのレングスに等しい。暗号通信装置Bの制御部202は、送信ブロック数(共通)Nと差Sbを送受信パラメータとして設定する。
In step S115, the
このように、本実施の形態において、暗号通信装置Aの制御部202、及び、暗号通信装置Bの制御部202は、送信バッファAと受信バッファAと受信バッファBと送信バッファBとのうち、容量の最も小さいバッファに格納できるブロックの最大数をNとする(格納できるブロックの最大数より小さい数をNとしても本実施の形態は適用可能であるが、格納できるブロックの最大数をNとすることが望ましい)。例えば、送信バッファA、受信バッファA、受信バッファB、送信バッファBの容量が、順番に20バイト、40バイト、30バイト、30バイトであるとき、ブロック1個分の大きさを8バイトとすると、N=2となる(N=1としても本実施の形態は適用可能であるが、N=2とすることが望ましい)。Nを求めるために、暗号通信装置Aの制御部202は、不揮発メモリ203に記憶された送信バッファAの容量と暗号通信装置Bから通知された受信バッファBの容量とのうち、最小値をブロック1個分の大きさで除算する。このとき、商は、送信バッファAと受信バッファBとのうち、容量の小さいバッファに格納できるブロックの最大数Aに相当する。上記の例では、A=2となる(このとき、Sa=4バイトとなる)。また、暗号通信装置Bの制御部202は、不揮発メモリ203に記憶された送信バッファBの容量と暗号通信装置Aから通知された受信バッファAの容量とのうち、最小値をブロック1個分の大きさで除算する。このとき、商は、送信バッファBと受信バッファAとのうち、容量の小さいバッファに格納できるブロックの最大数Bに相当する。上記の例では、B=3となる(このとき、Sb=6バイトとなる)。本実施の形態では、このような場合、AとBとの最小値をとって、N=2としている。つまり、暗号通信装置Aが暗号通信装置Bへデータを送信する場合と暗号通信装置Aが暗号通信装置Bからデータを受信する場合とで、Nは共通する。しかしながら、2つの場合でNを別々に設定してもよい。つまり、暗号通信装置Aが暗号通信装置Bへデータを送信する場合は、N=Aとし(NをAより小さい値にしてもよいが、N=Aとすることが望ましい)、暗号通信装置Aが暗号通信装置Bからデータを受信する場合は、N=Bとしてもよい(NをBより小さい値にしてもよいが、N=Bとすることが望ましい)。このようにすることで、例えば暗号通信装置Bの暗号処理部205に入力されるデータのブロック数と当該データが暗号化されたデータのブロック数とが異なる場合に、メモリ容量をより効率的に利用することが可能となる。
Thus, in the present embodiment, the
図5の送受信パラメータ設定処理を行うことにより、暗号通信装置Aには、送信ブロック数(共通)Nと差Saが設定され、暗号通信装置Bには、送信ブロック数(共通)Nと差Sbが設定されることになる。 By performing the transmission / reception parameter setting process of FIG. 5, the number of transmission blocks (common) N and the difference Sa are set in the encryption communication device A, and the number of transmission blocks (common) N and the difference Sb are set in the encryption communication device B. Will be set.
次に、前述したステップS102のデータ暗号化処理の詳細について、図6を参照して説明する。データ暗号化処理は、主にデータの送受信と暗号演算(暗号化又は復号化)の処理からなるもので、前述した送受信パラメータ設定処理以後に行われる。 Next, details of the data encryption processing in step S102 described above will be described with reference to FIG. The data encryption processing mainly includes data transmission / reception and cryptographic computation (encryption or decryption) processing, and is performed after the above-described transmission / reception parameter setting processing.
ステップS151で、暗号通信装置Aの制御部202は、暗号通信装置Aの通信部201を介して、暗号通信装置Bに向けて暗号演算コマンドを送信する。暗号演算コマンドは、暗号演算を開始する旨の通知で、その他、使用する鍵番号や暗号アルゴリズムを指定する番号、これから送るデータのレングスなどが必要に応じて付加されている。ステップS152で暗号演算コマンドは、暗号通信装置Bの通信部201を介して、暗号通信装置Bの制御部202によって受信され、暗号通信装置Bの制御部202では、そのコマンドが指示する設定が行われる。例えば、鍵番号に対応する鍵を設定する、使用する暗号アルゴリズムを選択するなどである。
In step S151, the
ついで、暗号通信装置Aでは、ステップS153で制御部202がデータ送信を開始する。ステップS154で、暗号通信装置Aの制御部202は、図2で示した送信データメモリ211から送信バッファAにデータを分割して移す。このとき、暗号通信装置Aの制御部202は、設定されている送信ブロック数(共通)Nと差Saと未送信データレングスDの関係に従って下記(ア)〜(エ)のいずれかの手順を実行し、データを送信データメモリ211から送信バッファAに移す。なお、未送信データレングスとは、送るべきデータのレングスから、送信したデータのレングスを引いたものをいう。ステップS155では、暗号通信装置Aの通信部201は、送信バッファAの分割データを暗号通信装置Bに送る。
Next, in the encryption communication device A, the
以下では、ブロック数をM、ブロックレングス(1ブロックのレングス)をL、端数をHとする。前述したように、Nは送信ブロック数(共通)、Saは差、Dは未送信データレングスである。 In the following, the number of blocks is M, the block length (length of one block) is L, and the fraction is H. As described above, N is the number of transmission blocks (common), Sa is a difference, and D is an untransmitted data length.
(ア)D≧N・L+Saの場合
M=N、H=0とする。即ち、暗号通信装置Aの制御部202は、送信ブロック数(共通)NだけデータをステップS154で分割し、送信バッファAに移す。そして、暗号通信装置Aの通信部201は、送信バッファAに移された分割データをステップS155で送信する。
(A) When D ≧ N · L + Sa M = N and H = 0. That is, the
(イ)N・L+Sa>D≧N・Lの場合
M=N+FLOOR(Sa/L)、H=D−M・Lとする。ここで、FLOOR(X)というとき、これはXを超えない最大の整数を示す。この場合は、送信バッファAと暗号通信装置Bの受信バッファBとのうち、レングスが短いバッファの余裕(N個のブロックを格納したときの空き容量、即ち、Sa)の範囲内の未送信データであれば、暗号通信装置Aの制御部202は、送信ブロック数(共通)Nを超えても、未送信データ全てをステップS154で分割し(取り出し)、送信バッファAに移す。そして、暗号通信装置Aの通信部201は、送信バッファAに移された分割データをステップS155で送信する。
(A) When N · L + Sa> D ≧ N · L, M = N + FLOOR (Sa / L), and H = D−M · L. Here, when it is referred to as FLOOR (X), this indicates a maximum integer not exceeding X. In this case, of the transmission buffer A and the reception buffer B of the encryption communication device B, untransmitted data within the range of a short buffer (free capacity when N blocks are stored, that is, Sa) Then, even if the number of transmission blocks (common) N is exceeded, the
(ウ)N・L>D>0の場合
M=FLOOR(D/L)、H=D−M・Lとする。この場合、暗号通信装置Aの制御部202は、未送信データ全てをステップS154で分割し(取り出し)、送信バッファAに移す。そして、暗号通信装置Aの通信部201は、送信バッファAに移された分割データをステップS155で送信する。
(C) When N · L>D> 0: M = FLOOR (D / L) and H = D−M · L. In this case, the
(エ)D=0の場合
暗号通信装置Aの制御部202は、送信をやめる。
(D) When D = 0 The
暗号通信装置Bでは、通信部201がステップS156で分割データを受信すると、制御部202がステップS157で当該分割データ(受信データ)を1ブロックずつ分割する。そして、暗号処理部205がステップS158で暗号演算を行う。ステップS159の暗号演算結果は、ブロックのレングスの結果になる。即ち、1ブロックの暗号化データとなる。暗号通信装置Bの制御部202は、この暗号化データを受け取り、ステップS160で送信バッファBに格納する。暗号通信装置Bでは、ステップS157からステップS160の処理が、受信データが全て暗号演算されるまで繰り返される。図6では、この繰り返しの範囲を「繰り返し単位1」で示した。
In the encryption communication device B, when the
ここで、「繰り返し単位1」の繰り返し数について述べる前に、図7に示す本実施の形態におけるデータ送信のフォーマットについて説明する。 Here, before describing the number of repetitions of “repetition unit 1”, the format of data transmission in the present embodiment shown in FIG. 7 will be described.
図7において、ヘッダ301には、暗号演算用のデータであることを示す識別子、最初に送られるデータであることを示す識別子、最後のデータであることを示す識別子が含まれる。ブロック数302には、通常は、送信ブロック数(共通)Nが設定されるが、最後のデータでは、送信ブロック数(共通)Nより小さい値となる場合がある。端数303は、ブロックレングスに満たないデータのレングスを示す。データ304には、ブロック数302と端数303を合わせたレングスをもつデータが格納される。
In FIG. 7, a
このように、本実施の形態において、暗号通信装置Aの制御部202は、送信バッファAへ入力するデータ(図7のデータ304)のフォーマットに、当該データに含まれるブロックの数(図7のブロック数302)と当該データの大きさをブロック1個分の大きさで除算した場合の端数(図7の端数303)とを示す制御情報を含める。同様に、暗号通信装置Bの制御部202は、送信バッファBへ入力するデータ(図7のデータ304)のフォーマットに、当該データに含まれるブロックの数(図7のブロック数302)と当該データの大きさをブロック1個分の大きさで除算した場合の端数(図7の端数303)とを示す制御情報を含める。
As described above, in the present embodiment, the
上記のようなフォーマットをデータ送信用に決めているため、「繰り返し単位1」は、端数H=0の場合はブロック数M、H>0の場合はM+1となる。なお、端数Hが存在する場合、即ち、H>0の場合、「繰り返し単位1」の最後の1回は、暗号通信装置Bの暗号処理部205がブロックのレングスより小さいレングスのデータを暗号演算することになる。そのため、暗号通信装置Bの制御部202は、ブロックレングスに満たないビットにはパディング処理をステップS157で行う。
Since the format as described above is determined for data transmission, “repetition unit 1” is the number of blocks M when the fraction H = 0, and M + 1 when H> 0. When the fraction H exists, that is, when H> 0, the
このように、本実施の形態において、暗号通信装置Aの制御部202は、送信データの先頭からN個のブロックごとに切り出したデータを送信バッファAへ順次入力する(図6のステップS154)。そして、送信データのうち、送信バッファAに未入力のデータがブロックN個分の大きさより大きくても上記容量の小さいバッファに格納できる大きさとなった場合、暗号通信装置Aの制御部202は、当該データを送信バッファAへ一度に入力する(図6のステップS154)。暗号通信装置Aの通信部201は、暗号通信装置Aの制御部202から送信バッファAへデータが入力される度に、当該データを送信バッファAから暗号通信装置Bへ送信する(図6のステップS155)。
As described above, in the present embodiment, the
「繰り返し単位1」が全て終了すれば、暗号通信装置Bの送信バッファBには暗号演算が終わったデータが格納されていることになる。暗号通信装置Bの通信部201は、この送信データをステップS161で暗号通信装置Aに送り、暗号通信装置Aの通信部201は、ステップS162でデータを受信する。暗号通信装置Aの制御部202は、受信したデータをステップS163で受信データメモリ212に格納する。
When “repetition unit 1” is completed, the transmission buffer B of the encryption communication apparatus B stores the data for which the cryptographic operation has been completed. The
暗号通信システム100では、ステップS154からステップS163までの処理が、送信データメモリ211のデータがなくなるまで繰り返される。図6では、この繰り返しの範囲を「繰り返し単位2」で示した。
In the cryptographic communication system 100, the processing from step S154 to step S163 is repeated until there is no more data in the
ステップS164で暗号通信装置Aの制御部202は、「繰り返し単位2」の終了を、データ送信のフォーマットのヘッダ301で知ることができる。
In step S164, the
このように、本実施の形態において、暗号通信装置Bの通信部201は、暗号通信装置Aからデータが送信される度に、当該データを受信バッファBで受信する(図6のステップS156)。暗号通信装置Bの制御部202は、当該データを受信バッファBから出力する(図6のステップS157)。暗号通信装置Bの暗号処理部205は、暗号通信装置Bの制御部202により受信バッファBからデータが出力される度に、当該データをブロック暗号により順次暗号化する(図6のステップS158、S159)。暗号通信装置Bの制御部202は、暗号通信装置Bの暗号処理部205で暗号化されたデータを送信バッファBへ順次入力する(図6のステップS160)。暗号通信装置Bの通信部201は、暗号通信装置Bの制御部202から送信バッファBへデータが入力される度に、当該データを送信バッファBから暗号通信装置Aへ送信する(図6のステップS161)。暗号通信装置Aの通信部201は、暗号通信装置Bへ送信したデータが暗号通信装置Bで暗号化され、暗号通信装置Bから当該データが送信される度に、当該データを受信バッファAで受信する(図6のステップS162)。暗号通信装置Aの制御部202は、受信バッファAでデータが受信される度に、当該データを受信バッファAから出力し、当該データを連結して送信データの暗号化データを生成する(図6のステップS163)。
Thus, in the present embodiment, the
次に、本実施の形態の効果について説明をする。 Next, the effect of this embodiment will be described.
本実施の形態では、暗号演算を行う前に、暗号通信装置A及びB双方の受信バッファの大きさを通知し、暗号演算の単位であるブロックが最も大きくとれるように、送信ブロック数(共通)Nを設定する。このことにより、受信バッファのうち通信に使用されない領域をシステムで最小にすることができるようになる。このことは、データのレングスが長く、複数回暗号演算を行わなければならない暗号通信装置であっても、通信回数を最も小さく設定できることを示している。 In the present embodiment, before performing the cryptographic operation, the size of the reception buffer of both the cryptographic communication devices A and B is notified, and the number of transmission blocks (common) so that the block that is the unit of the cryptographic operation can be maximized. N is set. This allows the system to minimize the area of the reception buffer that is not used for communication. This indicates that the number of communication times can be set to the smallest even in the case of a cryptographic communication device having a long data length and having to perform cryptographic operations a plurality of times.
本実施の形態では、さらに、通信データのフォーマットをブロック数と端数を記述するようにし、かつ、未送信データのレングスと受信バッファ(又は送信バッファ)のうち通信に使用されない領域(前述した差Saや差Sbに相当)とを比較し、未送信データが全受信バッファを使用すれば送信可能である場合、未送信データを全て送信し、そのデータを受信先で暗号演算処理するようにしたので、通信回数をさらに1回減らすことができる。この効果を図で示したものが、図8である。図8では送信データを、送信ブロック数(共通)N=4で3回送信する例を示している。3回目のクロスハッチの送信データは、ブロック数が4でさらに端数のデータも合わせて送信しているものである。このように、受信バッファに余裕がある場合には、最後はその分データを多めに送信できるので、送信回数を1回減らすことができる。これに合わせて暗号演算の回数は、3回目のデータ送信時には、1回目、2回目と比べて、1回多くなっている。また、図8に示したように、端数のデータについてはパディングが行われる。これに対し、図9は従来の例を図8と同じデータで行った場合を示している。図9では、3回の送信では全ての送信データを送れないので、4回目の送信を行っており、本実施の形態と比べて、送信回数が増えてしまうことがわかる。 In the present embodiment, the format of communication data further describes the number of blocks and fractions, and the length of untransmitted data and the area not used for communication in the reception buffer (or transmission buffer) (the difference Sa described above) If the unsent data can be transmitted if all the receive buffers are used, all the unsent data is transmitted, and the data is subjected to cryptographic calculation processing at the receiving destination. The number of communications can be further reduced by one. This effect is illustrated in FIG. FIG. 8 shows an example in which transmission data is transmitted three times with the number of transmission blocks (common) N = 4. The transmission data of the third cross hatch is one in which the number of blocks is four and fractional data is also transmitted. As described above, when there is a margin in the reception buffer, a larger amount of data can be transmitted at the end, so the number of transmissions can be reduced by one. In accordance with this, the number of cryptographic computations is one more at the time of the third data transmission than at the first time and the second time. Also, as shown in FIG. 8, the fractional data is padded. On the other hand, FIG. 9 shows a case where the conventional example is performed with the same data as FIG. In FIG. 9, since all transmission data cannot be transmitted in three transmissions, the fourth transmission is performed, and it can be seen that the number of transmissions is increased as compared with the present embodiment.
本実施の形態では、さらに、送受信パラメータ設定処理により最大の送受信パラメータが設定されるので、送受信バッファを各々1本としても、通信回数の増大を最小限に抑えることができる。 In the present embodiment, since the maximum transmission / reception parameter is set by the transmission / reception parameter setting process, an increase in the number of communication can be minimized even if one transmission / reception buffer is used.
本実施の形態では、送受信パラメータ設定処理を行ってから、データ暗号化処理を行うとしたが、暗号通信装置の組み合わせが決まっている場合、両者の受信バッファの大きさは予めわかっているので、事前に送受信パラメータを決めておき、データ処理時は、送受信パラメータ設定処理は行わず、データ暗号化処理だけにしてもよい。 In the present embodiment, the data encryption process is performed after the transmission / reception parameter setting process is performed, but when the combination of the encryption communication devices is determined, the sizes of both reception buffers are known in advance, Transmission / reception parameters may be determined in advance, and during data processing, transmission / reception parameter setting processing may not be performed, and only data encryption processing may be performed.
また、本実施の形態では、送信データ分割を未送信データのレングスと受信バッファのうち通信に使用されない領域とを逐次考慮して決めていたが、固定長のデータを扱う場合は、送信データの分割パターンは決まっているので、事前に分割パターンを決めておき、逐次判断を行わず分割パターンに従って、データ分割を行うようにしてもよい。 In this embodiment, the transmission data division is determined by sequentially considering the length of untransmitted data and the area of the reception buffer that is not used for communication. However, when handling fixed-length data, Since the division pattern is determined, the division pattern may be determined in advance, and data division may be performed according to the division pattern without performing sequential determination.
また、本実施の形態の説明では暗号通信装置という個別の装置を例にとったが、1チップマイコンチップと暗号演算が可能なセキュアなマイコンチップとの間の通信でも構わない。 In the description of the present embodiment, an individual device called a cryptographic communication device has been taken as an example, but communication between a one-chip microcomputer chip and a secure microcomputer chip capable of cryptographic operation may be used.
以上のように、本実施の形態では、少なくとも一方の装置内で共通鍵暗号アルゴリズムを用いて暗号演算を行う暗号通信システム100が、
相互の受信バッファのレングスと送信バッファのレングスから、ブロック単位で最大の送信ブロック数(共通)と他方の受信バッファと送信ブロック数(共通)に対応するレングスとの差を送受信パラメータとして設定する送受信パラメータ設定処理と、
送信ブロック数(共通)、上記の差、未送信データのレングスから、受信先の全受信バッファを使用すれば送信できる場合は、送信ブロック数(共通)以上の未送信データを送信し、送信されたブロック数、端数に基づき暗号演算を行うデータ暗号化処理とを実行することを特徴とする。
As described above, in the present embodiment, the cryptographic communication system 100 that performs cryptographic computation using the common key cryptographic algorithm in at least one of the devices includes:
Transmission / reception that sets the difference between the maximum number of transmission blocks (common) and the length corresponding to the other reception buffer and the number of transmission blocks (common) as transmission / reception parameters based on the mutual reception buffer length and transmission buffer length Parameter setting process,
From the number of transmission blocks (common), the above difference, and the length of untransmitted data, if transmission is possible using all receiving buffers at the receiver, untransmitted data equal to or greater than the number of transmission blocks (common) is transmitted and transmitted. And a data encryption process for performing a cryptographic operation based on the number of blocks and a fraction.
また、本実施の形態の変形例では、少なくとも一方の装置内で共通鍵暗号アルゴリズムを用いて暗号演算を行う暗号通信システム100が、
相互の受信バッファのレングスと送信バッファのレングスから、ブロック単位で最大の送信ブロック数(共通)と他方の受信バッファと送信ブロック数(共通)に対応するレングスとの差を送受信パラメータとして事前に設定する送受信パラメータ設定処理と、
データ暗号化処理時は上記送受信パラメータ設定処理を行わず、送信ブロック数(共通)、上記の差、未送信データのレングスから、受信先の全受信バッファを使用すれば送信できる場合は、送信ブロック数(共通)以上の未送信データを送信し、送信されたブロック数、端数に基づき暗号演算を行うデータ暗号化処理とを実行することを特徴とする。
Further, in a modification of the present embodiment, the cryptographic communication system 100 that performs cryptographic computation using a common key cryptographic algorithm in at least one of the devices,
Based on the length of the mutual reception buffer and the length of the transmission buffer, the difference between the maximum number of transmission blocks (common) and the length corresponding to the other reception buffer and the number of transmission blocks (common) is set in advance as transmission / reception parameters. Send / receive parameter setting processing,
If the transmission / reception parameter setting process is not performed during the data encryption process, and transmission is possible using all the reception buffers of the reception destination based on the number of transmission blocks (common), the above difference, and the length of untransmitted data, the transmission block The number of (uncommon) or more untransmitted data is transmitted, and a data encryption process for performing a cryptographic operation based on the number of transmitted blocks and a fraction is executed.
また、本実施の形態の変形例では、少なくとも一方の装置内で共通鍵暗号アルゴリズムを用いて暗号演算を行う暗号通信システム100が、
相互の受信バッファのレングスと送信バッファのレングスから、ブロック単位で最大の送信ブロック数(共通)と他方の受信バッファと送信ブロック数(共通)に対応するレングスとの差を送受信パラメータとして事前に設定する送受信パラメータ設定処理と、
データ暗号化処理時は上記送受信パラメータ設定処理を行わず、暗号化処理以前に上記送受信パラメータを考慮して送信パターンを設定し、暗号化処理時は前記送信パターンに基づいてデータを送信し、送信されたブロック数、端数に基づき暗号演算を行うデータ暗号化処理とを実行することを特徴とする。
Further, in a modification of the present embodiment, the cryptographic communication system 100 that performs cryptographic computation using a common key cryptographic algorithm in at least one of the devices,
Based on the length of the mutual reception buffer and the length of the transmission buffer, the difference between the maximum number of transmission blocks (common) and the length corresponding to the other reception buffer and the number of transmission blocks (common) is set in advance as transmission / reception parameters. Send / receive parameter setting processing,
The transmission / reception parameter setting process is not performed during the data encryption process, the transmission pattern is set in consideration of the transmission / reception parameter before the encryption process, and the data is transmitted based on the transmission pattern during the encryption process. And a data encryption process for performing a cryptographic operation based on the number of blocks and a fraction.
また、本実施の形態では、暗号通信データフォーマットが、データのレングスを示す数値として、少なくともブロック数と端数を含んでいることを特徴とする。 In the present embodiment, the encrypted communication data format includes at least a block number and a fraction as a numerical value indicating the data length.
実施の形態2.
本実施の形態について、主に実施の形態1との差異を説明する。
Embodiment 2. FIG.
In the present embodiment, differences from the first embodiment will be mainly described.
本実施の形態は、図1の暗号通信装置Aが、暗号通信装置Bに対して、送信データの真偽を判定させるケースを想定したものである。例えば、暗号通信装置Aに外部からある暗号データが送られてきて、そのデータの真偽の判定を暗号通信装置Bに依頼する場合である。暗号通信装置Bには暗号データの真偽を判定するための情報が予め格納されているものとする。以下では、暗号通信装置Aは、データを暗号通信装置Bへ送信して、暗号通信装置Bに対し、当該送信データのブロック暗号による暗号化処理(復号化処理)を伴うデータ真偽判定処理(例えば、データの復号化に成功した場合、あるいは、復号化したデータの値が所定の値であった場合に、そのデータが真正なものであると判定する処理)をさせる。データ真偽判定処理は、送信データを一定の大きさのブロックごとに分けて行う所定の処理の一例である。 This embodiment assumes a case where the encryption communication device A in FIG. 1 causes the encryption communication device B to determine the authenticity of transmission data. For example, there is a case where some encrypted data is sent from the outside to the encryption communication device A and the encryption communication device B is requested to determine the authenticity of the data. It is assumed that information for determining the authenticity of the encryption data is stored in advance in the encryption communication device B. In the following, the encryption communication device A transmits data to the encryption communication device B, and the data authenticity determination processing (encryption processing (decryption processing) with block encryption of the transmission data is transmitted to the encryption communication device B ( For example, when data is successfully decrypted, or when the value of the decrypted data is a predetermined value, a process of determining that the data is authentic is performed. The data authenticity determination process is an example of a predetermined process that is performed by dividing transmission data into blocks of a certain size.
図10は、暗号通信装置Aが暗号通信装置Bにデータの真偽判定を依頼して、暗号通信装置Bがデータの真偽判定を行う際に、暗号通信装置A及び暗号通信装置Bにおいて、データの受け渡しを行う主なHW(ハードウェア)の構成要素を示すブロック図である。 FIG. 10 shows that when the encryption communication device A requests the encryption communication device B to determine the authenticity of the data, and the encryption communication device B performs the data authenticity determination, the encryption communication device A and the encryption communication device B It is a block diagram which shows the component of main HW (hardware) which delivers and receives data.
図10において、暗号通信装置Aの送信データメモリ211、送信バッファA、受信バッファAについては、実施の形態1と同様である。また、暗号通信装置Bのブロック入力部213、暗号演算部214、ブロック出力部215、受信バッファB、送信バッファBについては、実施の形態1と同様である。結果格納メモリ216、真偽レジスタ217、バッファ空レジスタ218は、それぞれ暗号通信装置Bの不揮発メモリ203又はその一部である。
In FIG. 10, the
真偽判定されるデータは、送信データメモリ211に格納されている。真偽判定されるデータは大きいので、暗号通信装置Aの制御部202は、送信バッファAに全てのデータを移すことはできず、数回に分けてデータを移すことになる。つまり、暗号通信装置Aの制御部202は、分割したデータを送信バッファAに順番に入力していく。暗号通信装置Aの通信部201は、送信バッファAから受信バッファBにデータを通信する。暗号通信装置Bの暗号処理部205では、共通鍵暗号アルゴリズムを使用するので、ブロックという単位でしかデータを受け付けることができない。ブロック入力部213、ブロック出力部215はブロックのインタフェースである。ブロックのレングスは、受信バッファBのレングスより小さいので、暗号通信装置Bの暗号処理部205には何回かに分けてデータが送られることになる。ブロック入力部213に入力されたデータは、暗号演算部214で暗号化され、ブロック出力部215を介して、結果格納メモリ216に格納される。受信バッファBにあるデータが全て暗号化(復号化)されると、バッファ空レジスタ218にフラグがたち、暗号通信装置Bの制御部202は、暗号通信装置Bの通信部201(送信バッファB)を介して、受信バッファBが空になったことを暗号通信装置Aに知らせる。暗号通信装置Aでは、未送信データがあれば、制御部202が再度送信データメモリ211からデータを送信バッファAに移し、通信部201を介してそのデータを送信して暗号通信装置Bに真偽判定を依頼する。送信データメモリ211の全てのデータが送信され、暗号演算が全て終われば、結果格納メモリ216には全ての結果が格納される。暗号通信装置Bの制御部202は、その内容を判定して、真偽レジスタ217に格納される真偽フラグを設定する。その真偽フラグは、通信部201(送信バッファB)を介して、暗号通信装置Aに送られる。
Data for which the authenticity is determined is stored in the
次に、処理フローについて説明する。 Next, the processing flow will be described.
図11は本実施の形態の処理フロー(本実施の形態に係る通信方法)を示すフローチャートである。 FIG. 11 is a flowchart showing a processing flow (communication method according to the present embodiment) of the present embodiment.
図11において、ステップS201では、後述する送信パラメータ設定処理が行われる。この処理では、効率よく送信を行うために、暗号通信装置Aの送信パラメータが設定される。ついで、ステップS202では、後述するデータ真偽判定処理が行われる。この処理では、送信パラメータに基づく通信が繰り返され、長大なデータが暗号通信装置Bに送られ、暗号通信装置B内でその真偽判定が行われる。 In FIG. 11, in step S201, a transmission parameter setting process to be described later is performed. In this process, the transmission parameters of the encryption communication device A are set in order to perform transmission efficiently. In step S202, a data authenticity determination process, which will be described later, is performed. In this process, communication based on the transmission parameter is repeated, long data is sent to the encryption communication device B, and the authenticity determination is performed in the encryption communication device B.
次に、前述したステップS201の送信パラメータ設定処理の詳細について、図12を参照して説明する。 Next, details of the transmission parameter setting process in step S201 described above will be described with reference to FIG.
ステップS211で暗号通信装置Aの制御部202は、暗号通信装置Aの通信部201を介して、バッファ長送信依頼を暗号通信装置Bに送る。ステップS112で暗号通信装置Bの制御部202は、暗号通信装置Bの通信部201を介して、その依頼を受け取る。その後、ステップS213で暗号通信装置Bの制御部202は、暗号通信装置Bの通信部201を介して、暗号通信装置B自身の受信バッファBのレングスを暗号通信装置Aに送る。ステップS214で暗号通信装置Aの制御部202は、暗号通信装置Aの通信部201を介して、そのレングスを受け取る。
In step S211, the
ステップS215では、暗号通信装置Aの制御部202は、受信バッファBのレングス、送信バッファAのレングスのうち、最小のレングスを選択する。さらに、暗号通信装置Aの制御部202は、この最小のレングスを共通鍵アルゴリズムのブロックのレングスで割った整数部を送信ブロック数Nとする。ここで、最小のレングスは、ブロックのレングスより大きいと仮定する。ステップS216では、暗号通信装置Aの制御部202は、送信ブロック数Nとブロックのレングスをかけたレングス値と、受信バッファBのレングス、送信バッファAのレングスのうち、最小のレングスとの差Sを求める。この差Sは、送信ブロック数Nのデータを暗号通信装置Bに送った際に、受信バッファB、送信バッファAのうち、小さい方で使用されないバッファのレングスに等しい。暗号通信装置Aの制御部202は、送信ブロック数Nと差Sを送信パラメータとして設定する。
In step S215, the
次に、前述したステップS202のデータ真偽判定処理の詳細について、図13を参照して説明する。データ真偽判定処理は、前述した送信パラメータ設定処理以後に行われる。 Next, details of the data authenticity determination process in step S202 described above will be described with reference to FIG. The data authenticity determination process is performed after the transmission parameter setting process described above.
ステップS251で、暗号通信装置Aの制御部202は、暗号通信装置Aの通信部201を介して、暗号通信装置Bに向けて真偽判定コマンドを送信する。真偽判定コマンドは、真偽判定を開始する旨の通知で、その他、使用する鍵番号や暗号アルゴリズムを指定する番号、これから送るデータのレングスなどが必要に応じて付加されている。ステップS252で真偽判定コマンドは、暗号通信装置Bの通信部201を介して、暗号通信装置Bの制御部202によって受信され、暗号通信装置Bの制御部202では、そのコマンドが指示する設定が行われる。例えば、鍵番号に対応する鍵を設定する、使用する暗号アルゴリズムを選択するなどである。
In step S <b> 251, the
ついで、暗号通信装置Aでは、ステップS253で制御部202がデータ送信を開始する。ステップS254で、暗号通信装置Aの制御部202は、図10で示した送信データメモリ211から送信バッファAにデータを分割して移す。このとき、暗号通信装置Aの制御部202は、設定されている送信ブロック数Nと差Sと未送信データレングスDの関係に従って下記(カ)〜(ケ)のいずれかの手順を実行し、データを送信データメモリ211から送信バッファAに移す。ステップS255では、暗号通信装置Aの通信部201は、送信バッファAの分割データを暗号通信装置Bに送る。
Next, in the encryption communication device A, the
以下では、ブロック数をM、ブロックレングス(1ブロックのレングス)をL、端数をHとする。前述したように、Nは送信ブロック数、Sは差、Dは未送信データレングスである。 In the following, the number of blocks is M, the block length (length of one block) is L, and the fraction is H. As described above, N is the number of transmission blocks, S is a difference, and D is an untransmitted data length.
(カ)D≧N・L+Saの場合
M=N、H=0とする。即ち、暗号通信装置Aの制御部202は、送信ブロック数NだけデータをステップS254で分割し、送信バッファAに移す。そして、暗号通信装置Aの通信部201は、送信バッファAに移された分割データをステップS255で送信する。
(F) When D ≧ N · L + Sa M = N and H = 0. That is, the
(キ)N・L+Sa>D≧N・Lの場合
M=N+FLOOR(S/L)、H=D−M・Lとする。この場合は、送信バッファAと暗号通信装置Bの受信バッファBとのうち、レングスが短いバッファの余裕(N個のブロックを格納したときの空き容量、即ち、Sa)の範囲内の未送信データであれば、暗号通信装置Aの制御部202は、送信ブロック数Nを超えても、未送信データ全てをステップS254で分割し(取り出し)、送信バッファAに移す。そして、暗号通信装置Aの通信部201は、送信バッファAに移された分割データをステップS255で送信する。
(G) When N · L + Sa> D ≧ N · L, M = N + FLOOR (S / L), and H = D−M · L. In this case, of the transmission buffer A and the reception buffer B of the encryption communication device B, untransmitted data within the range of a short buffer (free capacity when N blocks are stored, that is, Sa) If so, the
(ク)N・L>D>0の場合
M=FLOOR(D/L)、H=D−M・Lとする。この場合、暗号通信装置Aの制御部202は、未送信データ全てをステップS254で分割し(取り出し)、送信バッファAに移す。そして、暗号通信装置Aの通信部201は、送信バッファAに移された分割データをステップS255で送信する。
(H) When N · L>D> 0, M = FLOOR (D / L) and H = D−M · L. In this case, the
(ケ)D=0の場合
暗号通信装置Aの制御部202は、送信をやめる。
(G) When D = 0 The
暗号通信装置Bでは、通信部201がステップS256で分割データを受信すると、制御部202がステップS257で受信データを1ブロックずつ分割する。そして、暗号処理部205がステップS258で暗号演算を行う。ステップS259の暗号演算結果は、ブロックのレングスの結果になる。即ち、1ブロックの暗号化(復号化)データとなる。暗号通信装置Bの制御部202は、この暗号化データを受け取り、ステップS260で結果格納メモリ216に格納する。暗号通信装置Bでは、ステップS257からステップS260の処理が、受信データが全て暗号演算されるまで繰り返される。図13では、この繰り返しの範囲を「繰り返し単位1」で示した。
In the encryption communication device B, when the
ここで、「繰り返し単位1」の繰り返し数について述べる前に、本実施の形態におけるデータ送信のフォーマットについて説明する。本実施の形態におけるデータ送信のフォーマットは、図7に示した実施の形態1のものと同様である。 Here, before describing the number of repetitions of “repetition unit 1”, the format of data transmission in the present embodiment will be described. The format of data transmission in the present embodiment is the same as that of the first embodiment shown in FIG.
前述したようなフォーマットをデータ送信用に決めているため、「繰り返し単位1」は、端数H=0の場合はブロック数M、H>0の場合はM+1となる。なお、端数Hが存在する場合、即ち、H>0の場合、「繰り返し単位1」の最後の1回は、暗号通信装置Bの暗号処理部205がブロックのレングスより小さいレングスのデータを暗号演算することになる。そのため、暗号通信装置Bの制御部202は、実施の形態1と同様に、ブロックレングスに満たないビットにはパディング処理をステップS257で行う。
Since the format as described above is determined for data transmission, “repetition unit 1” is the number of blocks M when the fraction H = 0, and M + 1 when H> 0. When the fraction H exists, that is, when H> 0, the
このように、本実施の形態において、暗号通信装置Aの制御部202は、送信データの先頭からN個のブロックごとに切り出したデータを送信バッファAへ順次入力する(図13のステップS254)。そして、送信データのうち、送信バッファAに未入力のデータがブロックN個分の大きさより大きくても上記容量の小さいバッファに格納できる大きさとなった場合、暗号通信装置Aの制御部202は、当該データを送信バッファAへ一度に入力する(図13のステップS254)。暗号通信装置Aの通信部201は、暗号通信装置Aの制御部202から送信バッファAへデータが入力される度に、当該データを送信バッファAから暗号通信装置Bへ送信する(図13のステップS255)。
As described above, in the present embodiment, the
「繰り返し単位1」が全て終了すれば、暗号通信装置Bの結果格納メモリ216には暗号演算が終わったデータが格納されていることになる。また、受信バッファBは空になったので、バッファ空レジスタ218のバッファ空フラグがたつ。暗号通信装置Bの通信部201は、このバッファ空フラグ(バッファ空通知)をステップS261で暗号通信装置Aに送り、暗号通信装置Aの通信部201は、ステップS262でバッファ空フラグを受信する。
When “repetition unit 1” is all completed, the
暗号通信システム100では、ステップS254からステップS262までの処理が、送信データメモリ211のデータがなくなるまで繰り返される。図13では、この繰り返しの範囲を「繰り返し単位2」で示した。
In the cryptographic communication system 100, the processing from step S254 to step S262 is repeated until there is no more data in the
「繰り返し単位2」が全て終了すれば、暗号通信装置Bの結果格納メモリ216には暗号演算が終わった全てのデータが格納されていることになる。暗号通信装置Bの制御部202は、ステップS263で、その内容が真正なものか否かを判定して、真偽レジスタ217の真偽フラグを設定する。暗号通信装置Bの通信部201は、この真偽フラグ(真偽判定通知)をステップS264で暗号通信装置Aに送り、暗号通信装置Aの通信部201は、ステップS265で真偽フラグを受信する。
When the “repetition unit 2” is all completed, the
このように、本実施の形態において、暗号通信装置Bの通信部201は、暗号通信装置Aからデータが送信される度に、当該データを受信バッファBで受信する(図13のステップS256)。暗号通信装置Bの制御部202は、当該データを受信バッファBから出力する(図13のステップS257)。暗号通信装置Bの暗号処理部205は、暗号通信装置Bの制御部202により受信バッファBからデータが出力される度に、当該データをブロック暗号により順次暗号化(復号化)する(図13のステップS258、S259)。暗号通信装置Bの制御部202は、暗号通信装置Bの暗号処理部205により暗号化されたデータを検証して、送信データの真偽を判定する(図13のステップS263)。そして、暗号通信装置Bの制御部202は、当該判定結果を、暗号通信装置Bの通信部201を介して暗号通信装置Aに通知する(図13のステップS264)。
As described above, in this embodiment, the
次に、本実施の形態の効果について説明をする。 Next, the effect of this embodiment will be described.
本実施の形態では、暗号演算を行う前に、データを受け取る側である暗号通信装置Bの受信バッファBの大きさを通知し、暗号演算の単位であるブロックが最も大きくとれるように、送信ブロック数Nを設定する。このことにより、受信バッファBのうち通信に使用されない領域をシステムで最小にすることができるようになる。このことは、データのレングスが長く、複数回暗号演算を行わなければならない暗号通信装置であっても、通信回数を最も小さく設定できることを示している。 In this embodiment, before performing the cryptographic operation, the size of the reception buffer B of the cryptographic communication device B that is the data receiving side is notified, and the transmission block is set so that the block that is the unit of the cryptographic operation is the largest. Set the number N. As a result, the area of the reception buffer B that is not used for communication can be minimized by the system. This indicates that the number of communication times can be set to the smallest even in the case of a cryptographic communication device having a long data length and having to perform cryptographic operations a plurality of times.
本実施の形態では、さらに、通信データのフォーマットをブロック数と端数を記述するようにし、かつ、未送信データのレングスと受信バッファB(又は送信バッファA)のうち通信に使用されない領域(前述した差Sに相当)とを比較し、未送信データが全受信バッファBを使用すれば送信可能である場合、未送信データを全て送信し、そのデータを受信先で真偽判定処理するようにしたので、通信回数をさらに1回減らすことができる。 In the present embodiment, the communication data format further describes the number of blocks and the fraction, and the length of untransmitted data and the reception buffer B (or transmission buffer A) are not used for communication (described above). Compared with the difference S), if unsent data can be transmitted if all the reception buffers B are used, all unsent data is transmitted, and the data is subjected to true / false judgment processing at the receiving destination. Therefore, the number of communications can be further reduced by one.
本実施の形態では、送信パラメータ設定処理を行ってから、データ真偽判定処理を行うとしたが、暗号通信装置の組み合わせが決まっている場合、受信バッファBの大きさは予めわかっているので、事前に送信パラメータを決めておき、データ処理時は、送信パラメータ設定処理は行わず、データ真偽判定処理だけにしてもよい。 In this embodiment, the data authenticity determination process is performed after performing the transmission parameter setting process. However, when the combination of the encryption communication devices is determined, the size of the reception buffer B is known in advance. Transmission parameters may be determined in advance, and during data processing, transmission parameter setting processing may not be performed, and only data authenticity determination processing may be performed.
また、本実施の形態では、送信データ分割を未送信データのレングスと受信バッファBのうち通信に使用されない領域とを逐次考慮して決めていたが、固定長のデータを扱う場合は、送信データの分割パターンは決まっているので、事前に分割パターンを決めておき、逐次判断を行わず分割パターンに従って、データ分割を行うようにしてもよい。 In this embodiment, the transmission data division is determined by sequentially considering the length of untransmitted data and the area of the reception buffer B that is not used for communication. However, when handling fixed-length data, Therefore, the division pattern may be determined in advance, and data division may be performed according to the division pattern without performing sequential determination.
また、本実施の形態の説明では暗号通信装置という個別の装置を例にとったが、1チップマイコンチップと暗号演算が可能なセキュアなマイコンチップとの間の通信でも構わない。 In the description of the present embodiment, an individual device called a cryptographic communication device has been taken as an example, but communication between a one-chip microcomputer chip and a secure microcomputer chip capable of cryptographic operation may be used.
以上のように、本実施の形態では、一方の装置内で共通鍵暗号アルゴリズムを用いて暗号演算を行う暗号通信システム100が、
暗号演算を行う暗号通信装置Bの受信バッファBのレングスから、ブロック単位で最大の送信ブロックと送信ブロック数に対応するレングスとの差を送信パラメータとして設定する送信パラメータ設定処理と、
送信ブロック数、上記の差、未送信データのレングスから、受信先の全受信バッファBを使用すれば送信できる場合は、送信ブロック数以上の未送信データを送信し、送信されたブロック数、端数に基づき暗号演算を行うデータ暗号化処理(データ真偽判定処理)とを実行することを特徴とする。
As described above, in the present embodiment, the cryptographic communication system 100 that performs cryptographic computation using the common key cryptographic algorithm in one apparatus is
A transmission parameter setting process for setting, as a transmission parameter, a difference between the length of the reception buffer B of the encryption communication device B that performs the cryptographic operation and the length corresponding to the maximum transmission block in block units and the number of transmission blocks;
From the number of transmission blocks, the above difference, and the length of untransmitted data, if transmission is possible using all receiving buffers B at the receiving destination, untransmitted data equal to or greater than the number of transmitted blocks is transmitted. And performing data encryption processing (data authenticity determination processing) for performing cryptographic operations based on the above.
また、本実施の形態の変形例では、一方の装置内で共通鍵暗号アルゴリズムを用いて暗号演算を行う暗号通信システム100が、
暗号演算を行う暗号通信装置Bの受信バッファBのレングスから、ブロック単位で最大の送信ブロックと送信ブロック数に対応するレングスとの差を送信パラメータとして事前に設定する送信パラメータ設定処理と、
データ暗号化処理時は上記送受信パラメータ設定処理を行わず、送信ブロック数、上記の差、未送信データのレングスから、受信先の全受信バッファBを使用すれば送信できる場合は、送信ブロック数以上の未送信データを送信し、送信されたブロック数、端数に基づき暗号演算を行うデータ暗号化処理(データ真偽判定処理)とを実行することを特徴とする。
Further, in a modification of the present embodiment, the cryptographic communication system 100 that performs a cryptographic operation using a common key cryptographic algorithm in one apparatus includes:
A transmission parameter setting process for setting in advance, as a transmission parameter, a difference between the length of the reception buffer B of the encryption communication device B that performs the cryptographic operation and the length corresponding to the maximum transmission block in block units and the length corresponding to the number of transmission blocks;
If the transmission / reception parameter setting process is not performed at the time of data encryption processing, and transmission is possible using the total reception buffer B of the reception destination from the number of transmission blocks, the above difference, and the length of untransmitted data, the number of transmission blocks or more The data encryption processing (data authenticity determination processing) for performing cryptographic operation based on the number of transmitted blocks and the fraction is executed.
また、本実施の形態の変形例では、一方の装置内で共通鍵暗号アルゴリズムを用いて暗号演算を行う暗号通信システム100が、
暗号演算を行う暗号通信装置Bの受信バッファBのレングスから、ブロック単位で最大の送信ブロックと送信ブロック数に対応するレングスとの差を送信パラメータとして事前に設定する送信パラメータ設定処理と、
データ暗号化処理時は上記送受信パラメータ設定処理を行わず、暗号化処理以前に上記送受信パラメータを考慮して送信パターンを設定し、暗号化処理時は前記送信パターンに基づいてデータを送信し、送信されたブロック数、端数に基づき暗号演算を行うデータ暗号化処理(データ真偽判定処理)とを実行することを特徴とする。
Further, in a modification of the present embodiment, the cryptographic communication system 100 that performs a cryptographic operation using a common key cryptographic algorithm in one apparatus includes:
A transmission parameter setting process for setting in advance, as a transmission parameter, a difference between the length of the reception buffer B of the encryption communication device B that performs the cryptographic operation and the length corresponding to the maximum transmission block in block units and the length corresponding to the number of transmission blocks;
The transmission / reception parameter setting process is not performed during the data encryption process, the transmission pattern is set in consideration of the transmission / reception parameter before the encryption process, and the data is transmitted based on the transmission pattern during the encryption process. A data encryption process (data authenticity determination process) for performing a cryptographic operation on the basis of the number of blocks and a fraction is performed.
また、本実施の形態では、暗号通信データフォーマットが、データのレングスを示す数値として、少なくともブロック数と端数を含んでいることを特徴とする。 In the present embodiment, the encrypted communication data format includes at least a block number and a fraction as a numerical value indicating the data length.
以上、本発明の実施の形態について説明したが、これらのうち、2つ以上の実施の形態を組み合わせて実施しても構わない。あるいは、これらのうち、1つの実施の形態を部分的に実施しても構わない。あるいは、これらのうち、2つ以上の実施の形態を部分的に組み合わせて実施しても構わない。 As mentioned above, although embodiment of this invention was described, you may implement combining 2 or more embodiment among these. Alternatively, one of these embodiments may be partially implemented. Or you may implement combining two or more embodiment among these partially.
100 暗号通信システム、101 通信データ、200a,200b 通信装置、201 通信部、202 制御部、203 不揮発メモリ、204 乱数生成器、205 暗号処理部、211 送信データメモリ、212 受信データメモリ、213 ブロック入力部、214 暗号演算部、215 ブロック出力部、216 結果格納メモリ、217 真偽レジスタ、218 バッファ空レジスタ、301 ヘッダ、302 ブロック数、303 端数、304 データ、901 表示装置、902 操作キー、903 操作ボタン、911 CPU、912 バス、913 ROM、914 RAM、915 通信ボード、920 磁気ディスク装置、921 オペレーティングシステム、922 ウィンドウシステム、923 プログラム群、924 ファイル群。 DESCRIPTION OF SYMBOLS 100 Encryption communication system, 101 Communication data, 200a, 200b Communication apparatus, 201 Communication part, 202 Control part, 203 Non-volatile memory, 204 Random number generator, 205 Encryption processing part, 211 Transmission data memory, 212 Reception data memory, 213 Block input , 214 Cryptographic operation unit, 215 block output unit, 216 result storage memory, 217 truth / false register, 218 buffer empty register, 301 header, 302 block count, 303 fraction, 304 data, 901 display device, 902 operation key, 903 operation Button, 911 CPU, 912 bus, 913 ROM, 914 RAM, 915 communication board, 920 magnetic disk unit, 921 operating system, 922 window system, 923 program group, 924 file Yl group.
Claims (9)
送信バッファAと、
前記送信バッファAと前記他の通信装置が備える受信バッファBとのうち、容量の小さいバッファに格納できるブロックの数をNとし、前記送信データの先頭からN個のブロックごとに切り出したデータを前記送信バッファAへ順次入力し、前記送信データのうち、前記送信バッファAに未入力のデータがブロックN個分の大きさより大きくても前記容量の小さいバッファに格納できる大きさとなった場合、当該データを前記送信バッファAへ一度に入力する制御部と、
前記制御部から前記送信バッファAへデータが入力される度に、当該データを前記送信バッファAから前記他の通信装置へ送信する通信部とを備えることを特徴とする通信装置。 A communication device that transmits data to another communication device and causes the other communication device to perform a predetermined process for dividing the transmission data into blocks of a certain size,
Send buffer A;
Of the transmission buffer A and the reception buffer B provided in the other communication device, the number of blocks that can be stored in a small-capacity buffer is N, and the data cut out every N blocks from the top of the transmission data is the data When data is sequentially input to the transmission buffer A, and the data that has not been input to the transmission buffer A is larger than the size of N blocks among the transmission data, the data can be stored in the small capacity buffer. A control unit that inputs the data to the transmission buffer A at a time;
And a communication unit that transmits the data from the transmission buffer A to the other communication device each time data is input from the control unit to the transmission buffer A.
前記送信バッファAの容量を予め記憶するメモリを備え、
前記制御部は、前記他の通信装置から前記受信バッファBの容量を通知され、前記メモリに記憶された送信バッファAの容量と前記他の通信装置から通知された受信バッファBの容量とのうち、最小値をブロック1個分の大きさで除算してNを求めることを特徴とする請求項1又は2に記載の通信装置。 The communication device further includes:
A memory for storing in advance the capacity of the transmission buffer A;
The control unit is notified of the capacity of the reception buffer B from the other communication device, and the capacity of the transmission buffer A stored in the memory and the capacity of the reception buffer B notified from the other communication device The communication apparatus according to claim 1, wherein N is obtained by dividing the minimum value by the size of one block.
前記通信装置は、さらに、
受信バッファAを備え、
前記制御部は、前記送信バッファAと前記受信バッファAと前記受信バッファBと前記他の通信装置が備える送信バッファBとのうち、容量の最も小さいバッファに格納できるブロックの最大数をNとし、
前記通信部は、前記他の通信装置へ送信したデータが前記他の通信装置で暗号化され、前記他の通信装置から当該データが送信される度に、当該データを前記受信バッファAで受信し、
前記制御部は、前記受信バッファAでデータが受信される度に、当該データを前記受信バッファAから出力し、当該データを連結して前記送信データの暗号化データを生成することを特徴とする請求項1から4までのいずれかに記載の通信装置。 The predetermined process is an encryption process using a block cipher,
The communication device further includes:
A receive buffer A;
The control unit, N is the maximum number of blocks that can be stored in the buffer having the smallest capacity among the transmission buffer A, the reception buffer A, the reception buffer B, and the transmission buffer B provided in the other communication device,
The communication unit receives the data by the reception buffer A every time the data transmitted to the other communication device is encrypted by the other communication device and the data is transmitted from the other communication device. ,
The control unit outputs the data from the reception buffer A each time data is received by the reception buffer A, and generates encrypted data of the transmission data by concatenating the data. The communication apparatus according to any one of claims 1 to 4.
前記他の通信装置は、前記通信装置からデータが送信される度に、当該データを前記受信バッファBで受信し、当該データを前記受信バッファBから出力し、当該データをブロック暗号により順次暗号化し、当該データを前記通信装置へ送信することを特徴とする暗号通信システム。 An encryption communication system comprising the communication device according to any one of claims 1 to 5 and the other communication device,
Each time data is transmitted from the communication device, the other communication device receives the data by the reception buffer B, outputs the data from the reception buffer B, and sequentially encrypts the data by block cipher. And transmitting the data to the communication device.
前記他の通信装置は、前記通信装置からデータが送信される度に、当該データを前記受信バッファBで受信し、当該データを前記受信バッファBから出力し、当該データをブロック暗号により検証して、前記送信データの真偽を判定し、当該判定結果を前記通信装置へ通知することを特徴とする暗号通信システム。 An encryption communication system comprising the communication device according to any one of claims 1 to 4 and the other communication device,
Each time data is transmitted from the communication device, the other communication device receives the data by the reception buffer B, outputs the data from the reception buffer B, and verifies the data by block cipher. An encryption communication system, wherein authenticity of the transmission data is determined and the determination result is notified to the communication device.
前記通信装置が備える制御部が、前記通信装置が備える送信バッファAと前記他の通信装置が備える受信バッファBとのうち、容量の小さいバッファに格納できるブロックの数をNとし、前記送信データの先頭からN個のブロックごとに切り出したデータを前記送信バッファAへ順次入力し、前記送信データのうち、前記送信バッファAに未入力のデータがブロックN個分の大きさより大きくても前記容量の小さいバッファに格納できる大きさとなった場合、当該データを前記送信バッファAへ一度に入力する第1ステップと、
前記通信装置が備える通信部が、前記第1ステップで前記送信バッファAへデータが入力される度に、当該データを前記送信バッファAから前記他の通信装置へ送信する第2ステップとを備えることを特徴とする通信方法。 A communication method using a communication device that transmits data to another communication device and causes the other communication device to perform a predetermined process for dividing the transmission data into blocks of a certain size,
The control unit included in the communication device has N as the number of blocks that can be stored in a small-capacity buffer among the transmission buffer A included in the communication device and the reception buffer B included in the other communication device, and the transmission data Data cut out every N blocks from the beginning is sequentially input to the transmission buffer A, and the capacity of the capacity is not affected even if the data not input to the transmission buffer A is larger than the size of N blocks among the transmission data. A first step of inputting the data to the transmission buffer A at a time when the data can be stored in a small buffer;
A communication unit included in the communication device includes a second step of transmitting the data from the transmission buffer A to the other communication device each time data is input to the transmission buffer A in the first step. A communication method characterized by the above.
前記通信装置が備える送信バッファAと前記他の通信装置が備える受信バッファBとのうち、容量の小さいバッファに格納できるブロックの数をNとし、前記送信データの先頭からN個のブロックごとに切り出したデータを前記送信バッファAへ順次入力し、前記送信データのうち、前記送信バッファAに未入力のデータがブロックN個分の大きさより大きくても前記容量の小さいバッファに格納できる大きさとなった場合、当該データを前記送信バッファAへ一度に入力する制御処理と、
前記制御処理から前記送信バッファAへデータが入力される度に、当該データを前記送信バッファAから前記他の通信装置へ送信する通信処理とをコンピュータに実行させることを特徴とする通信プログラム。 A communication program executed by a communication device that transmits data to another communication device and causes the other communication device to perform a predetermined process in which the transmission data is divided into blocks of a certain size. ,
Of the transmission buffer A provided in the communication device and the reception buffer B provided in the other communication device, N is the number of blocks that can be stored in a buffer having a small capacity, and is cut out every N blocks from the head of the transmission data. The received data is sequentially input to the transmission buffer A, and the size of the transmission data that can be stored in the small buffer even if the data not yet input to the transmission buffer A is larger than the size of N blocks. A control process for inputting the data to the transmission buffer A at a time;
A communication program for causing a computer to execute a communication process for transmitting the data from the transmission buffer A to the other communication device each time data is input from the control process to the transmission buffer A.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008173307A JP4906800B2 (en) | 2008-07-02 | 2008-07-02 | COMMUNICATION DEVICE, ENCRYPTED COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008173307A JP4906800B2 (en) | 2008-07-02 | 2008-07-02 | COMMUNICATION DEVICE, ENCRYPTED COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010016526A JP2010016526A (en) | 2010-01-21 |
JP4906800B2 true JP4906800B2 (en) | 2012-03-28 |
Family
ID=41702228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008173307A Active JP4906800B2 (en) | 2008-07-02 | 2008-07-02 | COMMUNICATION DEVICE, ENCRYPTED COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4906800B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5779434B2 (en) * | 2011-07-15 | 2015-09-16 | 株式会社ソシオネクスト | Security device and security system |
JP2013141137A (en) * | 2012-01-05 | 2013-07-18 | Ricoh Co Ltd | Composite system |
JP2013143653A (en) * | 2012-01-10 | 2013-07-22 | Canon Inc | Information processing apparatus and information processing method |
CN104137508B (en) * | 2012-02-21 | 2017-07-07 | 国际商业机器公司 | Network node with the network-attached safe discharge mechanism of stateless |
JP2020009022A (en) * | 2018-07-04 | 2020-01-16 | キヤノン株式会社 | Communication device and control method thereof and communication system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0502215B1 (en) * | 1990-09-28 | 1998-07-22 | Fujitsu Limited | Message control system in a data communication system |
JP2004126323A (en) * | 2002-10-04 | 2004-04-22 | Sony Corp | Method and circuit for block ciphering, ciphering device, method and circuit for block deciphering, and deciphering device |
JP4346962B2 (en) * | 2003-06-05 | 2009-10-21 | 日本電気株式会社 | Encrypted communication control device |
JP2006041684A (en) * | 2004-07-23 | 2006-02-09 | Sony Corp | Encryption processing apparatus and encryption processing method |
-
2008
- 2008-07-02 JP JP2008173307A patent/JP4906800B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2010016526A (en) | 2010-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11784801B2 (en) | Key management method and related device | |
US9003202B2 (en) | Memory control device, semiconductor memory device, memory system, and memory control method | |
CN107294714B (en) | Key agreement method, device and equipment thereof | |
US8666064B2 (en) | Endecryptor capable of performing parallel processing and encryption/decryption method thereof | |
US8077867B2 (en) | Confidential information processing apparatus, confidential information processing device, and confidential information processing method | |
US9344278B2 (en) | Secure data transfer using random ordering and random block sizing | |
CA2212664C (en) | Secret communication and authentication scheme based on public key cryptosystem using n-adic expansion | |
EP0482371A2 (en) | Method and apparatus for controlling the use of a public key, based on the level of integrity for the key | |
JP4906800B2 (en) | COMMUNICATION DEVICE, ENCRYPTED COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM | |
CN108959978A (en) | The generation of key and acquisition methods and device in equipment | |
KR101305627B1 (en) | Cryptographic apparatus and memory system | |
US7167559B2 (en) | Information security device, exponentiation device, modular exponentiation device, and elliptic curve exponentiation device | |
JP6834771B2 (en) | Communication device and communication method | |
JP5080908B2 (en) | Confidential information processing apparatus, confidential information processing apparatus, and confidential information processing method | |
CN115208701A (en) | Data packet selective encryption method and device | |
CN116204911B (en) | Encryption and decryption system, encryption and decryption control method, computer device and storage medium | |
US6501840B1 (en) | Cryptographic processing apparatus cryptographic processing method and recording medium for recording a cryptographic processing program | |
US9979541B2 (en) | Content management system, host device and content key access method | |
CN115208570A (en) | Encryption method and device based on dynamic replacement of secret key | |
JP4912797B2 (en) | ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM | |
CN112035866A (en) | Data encryption and decryption method, device, equipment and computer readable storage medium | |
CN113381854B (en) | Data transmission method, device, equipment and storage medium | |
CN115208569B (en) | Encryption and decryption method and device for dynamic key distribution | |
JP6162556B2 (en) | Storage device and information processing system | |
JP2009044677A (en) | Secret information processor, processing apparatus, and processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110511 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111202 |
|
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: 20111213 |
|
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: 20120110 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150120 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4906800 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
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 |