JP2004320533A - Data securing device, data communication device, and data securing method - Google Patents

Data securing device, data communication device, and data securing method Download PDF

Info

Publication number
JP2004320533A
JP2004320533A JP2003112992A JP2003112992A JP2004320533A JP 2004320533 A JP2004320533 A JP 2004320533A JP 2003112992 A JP2003112992 A JP 2003112992A JP 2003112992 A JP2003112992 A JP 2003112992A JP 2004320533 A JP2004320533 A JP 2004320533A
Authority
JP
Japan
Prior art keywords
data
processing
circuit
bus
control circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003112992A
Other languages
Japanese (ja)
Other versions
JP4408648B2 (en
Inventor
Machiko Soejima
真智子 副島
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003112992A priority Critical patent/JP4408648B2/en
Priority to US10/790,176 priority patent/US20040193763A1/en
Publication of JP2004320533A publication Critical patent/JP2004320533A/en
Priority to US12/580,993 priority patent/US8832460B2/en
Application granted granted Critical
Publication of JP4408648B2 publication Critical patent/JP4408648B2/en
Priority to US14/297,200 priority patent/US9378165B2/en
Priority to US15/181,201 priority patent/US9942207B2/en
Priority to US15/897,867 priority patent/US10609005B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To implement high speed encryption processing regardless of processing the performance of a CPU. <P>SOLUTION: A data acquiring circuit 1b acquires data 2 to be processed. An encryption processing circuit 1c conducts encryption processing for inputted data. A data input/output control circuit 1e is connected to the data acquiring circuit 1b through a first bus 1g, and connected to the encryption processing circuit 1c through a second bus 1h. The data input/output control circuit 1e acquires the data 2 of a processing subject acquired by the data acquiring circuit 1b to store them in its built-in memory. Then, the data input/output control circuit 1e inputs the data 2 of the processing subject into the encryption processing circuit 1c via the second bus 1h, and acquires data 3 of the processing result after the execution of encryption processing from the encryption processing circuit 1c through the second bus 1h. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明はセキュアな通信を行うためのデータ保障装置、データ通信装置、およびデータ保障方法に関し、特にハードウェア回路により暗号処理を行うことができるデータ保障装置、データ通信装置、およびデータ保障方法に関する。
【0002】
【従来の技術】
インターネットの普及により、インターネットを経由した様々なデータ通信が行われる。このデータ通信には、個人情報や企業機密に該当するデータも含まれる。このような重要なデータは、暗号化等によって第三者による不正取得行為から守られる。
【0003】
暗号処理(暗号化や復号処理)は、解読の困難性を高めるほど暗号化のアルゴリズムが複雑になる。そのため、暗号処理や認証処理をソフトウェアで実行するシステムでは、CPUにかかる処理負担が過大となっていた。その結果、暗号処理や認証処理がシステム全体の処理能力に大きな影響を及ぼしていた。
【0004】
特に次世代インターネットプロトコルIPv6(Internet Protocol version 6)では、IPv4(Internet Protocol version 4)においてオプション機能であったIPsecを必携機能と定めている。IPsecは、TCP/IP(Transmission Control Protocol/Internet Protocol)にセキュリティ機能を加えたプロトコルである。IPsecを適用すれば、LAN(Local Area Network)、私的もしくは公共のWAN(Wide Area Network)、さらにはインターネット越しの通信の安全性を確保することができる。
【0005】
IPsecは大きく分けてIKE(Internet Key Exchange)、ESP(Encapsulating Security Payload)、AH(Authentication Header)という3つのプロトコルからなり、それら全てに暗号処理が適用される。
【0006】
IPsecによる暗号化通信は、まず鍵交換を含めたSA(Security Association)の合意をとることから始まる。IPsecでは、自動でSAの合意をとることが可能な鍵交換プロトコルとして、「IKE」を規定している。IKEを使うことで、SAの合意を自動的に行うことが可能になる。なお、鍵交換プロトコルとしてはほかにもいくつか存在するが、IPsecでは「ISAKMP/Oakley」という鍵交換プロトコルをもとにして作られたIKEが標準となっている。
【0007】
ところで、この鍵交換の段階で通信データの内容が第三者に漏れた場合、以後のIPsecによる暗号化通信は何ら意味をなさなくなる。またIPsecによる暗号化は、鍵交換が終了して初めて有効になるので、IKE自体にIPsecを使うわけにはいかない。そこでIKEはそれ自体で暗号化通信をサポートしている。
【0008】
IKE自体の暗号化通信のためにさらにIKE用の鍵交換手順が定められており、このためIKEは全体で2つの段階から構成されている。まずフェーズ1では、フェーズ2の段階で利用する暗号化アルゴリズムを決定するとともに、暗号鍵を生成する。暗号鍵が共有できた後は、これを使ってフェーズ2に進み、IKE限定の暗号化通信が可能になる。続いて、IPsecによる暗号化通信のためのネゴシエーションを始める。
【0009】
暗号化通信のためのネゴシエーションでは、順次、暗号化アルゴリズムの決定、暗号鍵の交換などIPsecによる通信に必要な各種情報がやり取りされる。その後、データの暗号化通信が行えるようになる。
【0010】
データの転送に利用するプロトコル「ESP」ネゴシエーションが終了した後、当事者同士で暗号化されたパケットによる通信が開始される。IPsecではパケットごとに暗号化がなされ、「ESP」と呼ばれる入れ物にパックされ送信される。IPsecでは、暗号化する対象部分によって、「トランスポートモード」と「トンネルモード」という2つの方法が提供されている。
【0011】
トランスポートモードでは、IPパケットで運ぶデータ部分のみを暗号化し、これにあて先などを指定したIPヘッダをつけて送信をする。一方、トンネルモードでは、ほかのホストからいったん受信したIPヘッダとデータ部分を合わせたものをまとめて暗号化したうえで、新たにIPヘッダを再度つけ直して送信を行う。
【0012】
また、通信データの改竄を防止する技術として、認証処理がある。認証処理では、通信データの内容が正しいことを証明するために、認証データが生成される。
【0013】
認証データは、「完全性の確保」と「認証」の機能を担うものである。この中身は、「MAC(Message Authentication Code)」といわれるデータが入れられる。MACは、通信内容とパスワードを合わせたものに対して、ハッシュ関数と呼ばれる計算方法による演算を施した計算結果である。ハッシュ関数により、任意の大きさのデータから、数十ビットから数百ビットの固定長データが生成される。ハッシュ関数は暗号処理に似た処理であり、多くの場合、暗号処理内の一機能として、ハッシュ関数の認証処理が含まれる。
【0014】
上記暗号処理、認証処理アルゴリズムの代表的なものにDES−CBC、3DES−CBC、MD5、SHA1、HMAC−MD5,HMAC−SHA1が挙げられる。
送信側では、データとパスワードを合わせたものをメッセージ・ダイジェストにより処理したのち、結果をESPの中の認証データとしてパケットに付け加える。データが無事に受信側に届いたら、受信側ではデータと自分の側でとっておいたパスワードを合わせたものを送信時と同じメッセージ・ダイジェストによって計算をする。得られた結果と受信データを比較して、この2つの間で相違がなければ、データが途中で改竄されることなく届いていることになる。
【0015】
完全性と認証のためのプロトコル「AH」は、「完全性の保証」と「認証」のための仕組みである。AHではデータの暗号化は行わず、SPI、シーケンス番号、そして認証データのみをパックして通常のIPパケットの中に加えるようになっている。ESPだけで認証機能も果たすが、AHが定められている理由は、暗号化通信が使えないというケースのために、最低限「完全性の保証」と「認証」を行うために提供されている。なお、データの認証方式の有名なものには、ハッシュ関数アルゴリズムであるSHA1(Secure Hash Algorithm 1)などがある(非特許文献1参照)。
【0016】
現在のIPsecの主な用途に、インターネットを使った「VPN(Virtual Private Network)」がある。これは従来、専用線により実現されていた企業での本支店間の接続、あるいはLAN間接続といったものをインターネット経由で行うためのものである。インターネットでは不特定多数に通信内容がさらされることになるため、送信するデータを守る仕組みが必要になる。そこで、VPNにIPsecを使用する。すると、利用料金は専用線と比較してはるかに安価でありながら、専用線と同じような通信の秘匿性を実現することができる。
【0017】
現時点で主たるIPsec採用製品もこうしたVPNを対象とするものが多い。製品の形態としては専用の暗号化装置、ルータやファイアウォール製品の付加機能といったものである。こうした製品を各拠点でのインターネットのアクセス回線の入口に設置し、前述のトンネルモードのIPsecを利用することで、拠点間のすべての通信を暗号化することが可能になる。また、最近では、市販のOS(Operating System)が標準でIPsecをサポートしたこともあり、SOHO(Small Office/Home Office)同士や家庭とオフィス間での暗号化通信も利用可能になりつつある。今後、インターネットが社会インフラとして定着するにつれ、セキュリティは個人や企業といったユーザとしての立場を問わず必要不可欠な技術となっている。そのため、IPsecは大変将来性のある技術である。
【0018】
暗号処理、ハッシュ関数による処理全般や、ある特定のハッシュ関数を使用してHMAC(Keyed−Hashing for Message Authentication Code)メッセージ認証関数を構成する一般的な方法としてCPUによるソフトウェア処理がある。この場合、暗号処理は積和演算、ビット転置変換、排他的論理輪処理、ビットシフトを多用するために、CPUにとって演算負荷が重く、低パフォーマンスのCPUでは処理に時間がかかり過ぎて正常なプロトコル処理を保障することも難しい。一方、高パフォーマンスのCPUでは充分速い速度で処理できるが、価格、消費電力も高く、またシステムとして安定動作し難い。また、高いパフォーマンスを持つCPUは高価であり、低いパフォーマンスのCPUしか組み込むことのできない安価な製品には使うことができない。
【0019】
ソフトウェアによる暗号処理の速度はCPU占有率とCPUの処理能力に完全に依存する。そのため、速度も十分ではない上に他の処理と組み合わせた時の状況下ではより一層の処理速度の低下と処理の困難性が高まる。たとえば、IPsecを行う場合、低パフォーマンスのCPUでは処理に時間がかかり過ぎて正常なプロトコル処理を保障することも難しい。なお、高パフォーマンスのCPUでは充分速い速度で処理できるが、価格、消費電力も高く、またシステムとして安定動作し難い。そのため、特に高いパフォーマンスを持たないCPUを持つ組み込み向け製品にとってIPsec導入において実用的なパフォーマンスと価格に対して実現が難航していた。
【0020】
このように、従来の技術では暗号処理に時間がかかり、ストリーミング処理をユーザに快適な速度で実現できない。IPsecの鍵交換の中で用いられる暗号処理、認証処理、IPパケットの暗号化、認証のような大きなデータの処理には膨大な時間がかかっていた。
【0021】
また、高速化のために暗号処理専用LSI(Large Scale Integration)チップを使用することもできる。暗号処理回路と同様に、ハッシュ関数処理に関しても回路で実現できる(たとえば、特許文献1、特許文献2参照)。また、IPsecに使用するストリーム暗号装置も考えられている(たとえば、特許文献3参照)。
【0022】
このような専用回路をシステムに組み込むことで、ソフトウェアを用いた処理と比較するとパフォーマンスやコスト、消費電力は改善される。また、ソフトウェア演算のようなメモリコピーでメモリを余計に使用することも無い。
【0023】
【特許文献1】
特表平11−500241号公報
【特許文献2】
特開2001−175605号公報
【特許文献3】
特開2003−32244号公報
【非特許文献1】
Bruce Schneier ”Applied Cryptography (Second Edition) ”, 1996, John Wiely & Sons,Inc P265〜P278,P429〜P459
【0024】
【発明が解決しようとする課題】
しかし、従来の技術では専用回路へのデータ入出力にはCPUが介在する。すなわち、このような専用回路は処理ブロック数毎にCPUが専用回路内部レジスタにライト、リード動作を行わなくてはいけない。そのため、レジスタリードライトにCPUが煩わされることとなる。処理量が大きくなるにつれ、この点のパフォーマンスの悪さはより大きくなる。
【0025】
また、従来の回路は内部に制御レジスタを設け、暗号化/復号化対象データのレジスタライトを終了した後に暗号演算開始ビットをONにして処理を開始させるものである。そのため、ストリーミング処理に向かない。
【0026】
このように、CPUが介在する処理が多いことにより、処理速度はCPU占有率とCPUの処理能力に完全に依存する。そのため、専用回路の能力を充分に発揮できない上に、他の処理と組み合わせた時の状況下ではより一層の処理速度の低下や処理の困難性が高まると考えられる。
【0027】
以上の理由により、安価に製造可能な回路で快適な通信速度を実現可能な専用回路とシステムを実現する必要がある。
本発明はこのような点に鑑みてなされたものであり、CPUの処理性能に拘わらず暗号処理を高速に行うことができるデータ保障装置、データ通信装置、およびデータ保障方法を提供することを目的とする。
【0028】
【課題を解決するための手段】
本発明では上記課題を解決するために、図1に示すようなデータ保障装置1が提供される。本発明に係るデータ保障装置1は、データを保障するための処理を行う。データ保障装置1は、少なくとも、データ取得回路1b、暗号処理回路1cおよびデータ入出力制御回路1eを有する。データ取得回路1bは、処理対象データ2を取得する。暗号処理回路1cは、入力されたデータの暗号処理を行う。データ入出力制御回路1eは、データ取得回路1bに第1のバス1gを介して接続されると共に暗号処理回路1cに対して第2のバス1hを介して接続されており、データ取得回路1bが取得した処理対象データ2を第1のバス1g経由で取得して内蔵メモリに格納し、処理対象データ2を第2のバス1h経由で暗号処理回路1cに入力し、暗号処理回路1cから第2のバス1h経由で暗号処理実行後の処理結果データ3を取得する。
【0029】
このようなデータ保障装置1によれば、処理対象データ2が第1のバス1g経由でデータ入出力制御回路1eで取得され、一旦内蔵メモリに格納される。その後、データ入出力制御回路1eにより処理対象データ2が第2のバス1h経由で暗号処理回路1cに入力される。処理結果データ3は、第2のバス1h経由でデータ入出力制御回路1eが取得する。
【0030】
また、本発明では上記課題を解決するために、保障されたデータをネットワークを介して送受信するデータ通信装置において、送信データを生成するメインCPUと、入力されたデータを暗号化する暗号処理回路と、入力されたデータを前記ネットワークを介して送信する通信回路と、前記メインCPUと前記通信回路に第1のバスを介して接続されると共に前記暗号処理回路に対して第2のバスを介して接続されており、前記メインCPUが取得した前記送信データを前記第1のバス経由で取得して内蔵メモリに格納し、前記送信データを前記第2のバス経由で前記暗号処理回路に入力し、前記暗号処理回路から前記第2のバス経由で暗号化後の暗号データを取得し、前記通信回路に対して入力するデータ入出力制御回路と、を有することを特徴とするデータ通信装置が提供される。
【0031】
このようなデータ通信装置によれば、メインCPUで生成された送信データが第1のバス経由でデータ入出力制御回路で取得され、データ入出力制御回路により送信データが第2のバス経由で暗号処理回路に入力される。送信データは、第2のバス経由でデータ入出力制御回路が取得し、その送信データは、データ入出力制御回路により第1のバスを介して通信回路に渡される。
【0032】
また、上記課題を解決するために、データを保障するためのデータ保障方法において、データ取得回路で取得した処理対象データを、データ入出力制御回路が第1のバス経由で取得して内蔵メモリに格納し、前記データ入出力制御回路が、前記処理対象データを第2のバス経由で暗号処理回路に入力し、前記暗号処理回路が前記処理対象データの暗号処理を行い、暗号処理実行後の処理結果データを、前記暗号処理回路から前記データ入出力制御回路に渡す、ことを特徴とするデータ保障方法が提供される。
【0033】
このようなデータ保障方法によれば、データ取得回路で取得した処理対象データが、データ入出力制御回路により第1のバス経由で取得される。次に、データ入出力制御回路により、処理対象データが第2のバス経由で暗号処理回路に入力される。そして、暗号処理回路により処理対象データの暗号処理が行われ、暗号処理実行後の処理結果データが、暗号処理回路からデータ入出力制御回路にされる。
【0034】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。
まず、実施の形態に適用される発明の概要について説明し、その後、実施の形態の具体的な内容を説明する。
【0035】
図1は、実施の形態に適用される発明の概念図である。データ保障装置1は、CPU(Central Processing Unit)1a、データ取得回路1b、暗号処理回路1c、認証処理回路1d、データ入出力制御回路1e、およびデータ出力回路1fを有している。CPU1a、データ取得回路1b、データ入出力制御回路1e、およびデータ出力回路1fは、互いに第1のバス1gで接続されている。暗号処理回路1cとデータ入出力制御回路1eとは、第2のバス1hで接続されている。認証処理回路1dとデータ入出力制御回路1eとは、第3のバス1iで接続されている。
【0036】
CPU1aは、データ保障装置1全体を制御する。データ取得回路1bは、処理対象データ2を取得する。たとえば、ネットワーク経由で入力されるデータを受信する。また、CPU1aは、認証処理回路1dから認証データを受け取った際には、処理対象データ2の認証や処理結果データ3への認証データの付与等の処理を行う。
【0037】
暗号処理回路1cは、入力されたデータの暗号処理を行う。暗号処理とは、データの暗号化処理または復号処理である。たとえば、インターネット等の広域ネットワークを介して送信すべきデータに対しては、暗号化処理が行われる。また、暗号化されたデータを受信した場合には、復号処理が行われる。
【0038】
認証処理回路1dは、データの認証処理を行う。認証処理とは、たとえば、ハッシュ関数に基づくハッシュ値等の認証データの生成処理である。生成された認証データは、たとえば、CPU1aに渡される。
【0039】
データ入出力制御回路1eは、暗号処理回路1cや認証処理回路1dへのデータの入出力を制御する。具体的には、データ入出力制御回路1eは、データ取得回路1bが取得した処理対象データ2を第1のバス1g経由で取得し、内蔵メモリに格納する。暗号処理が必要な場合は、データ入出力制御回路1eは、処理対象データ2を第2のバス経由1hで暗号処理回路1cに入力する。その後、データ入出力制御回路1eは、暗号処理回路1cから第2のバス1h経由で暗号処理実行後の処理結果データ3を取得する。また、認証処理が必要な場合は、データ入出力制御回路1eは、処理対象データ2を第3のバス1i経由で暗号処理回路1cに入力する。データ入出力制御回路1eは、処理結果データ3を、データ出力回路1fに渡す。
【0040】
なお、データ入出力制御回路1eにDMA(Direct Memory Access)コントローラを内蔵させることで、第1のバス1gを介したデータの受け渡しをDMAによって行うことができる。
【0041】
データ出力回路1fは、受け取った処理結果データ3を出力する。処理結果データ3が暗号化されたデータの場合、その処理結果データ3にはCPU1a等の制御に従ってハッシュ値等の認証データが付加される。
【0042】
このような構成のデータ保障装置1において、以下の様な処理が行われる。なお、データ保障装置1で行う処理には、平文のデータを暗号化等により安全性を高めて出力する処理と、暗号データの復号等により内容を参照可能なデータ形式に変換して出力する処理とがある。
【0043】
まず、平文のデータを暗号化して出力する場合の処理を説明する。平文の処理対象データ2がデータ取得回路1bで受け取られると、その処理対象データ2をデータ入出力制御回路1eが取得し、内蔵メモリに格納する。そして、データ入出力制御回路1eにより、内蔵メモリに格納された処理対象データ2が暗号処理回路1cに入力される。すると、暗号処理回路1cにより処理対象データ2が暗号化されデータ入出力制御回路1eに渡される。
【0044】
暗号化された処理結果データ3は、データ入出力制御回路1eにより認証処理回路1dに渡される。すると、認証処理回路1dにより、認証処理が行われる。たとえば、ハッシュ値等の認証データが生成される。処理結果データ3には、データ入出力制御回路1eによってデータ出力回路1fに渡される。そして、CPU1aのデータ処理等により処理結果データ3に認証データが付与されデータ出力回路1fから出力される。
【0045】
次に、暗号データを復号して出力する場合の処理について説明する。暗号化された処理対象データ2(認証データが付与されているものとする)がデータ取得回路1bで受け取られると、その処理対象データ2をデータ入出力制御回路1eが取得し、内蔵メモリに格納する。そして、データ入出力制御回路1eにより、内蔵メモリに格納された処理対象データ2が認証処理回路1dに入力される。すると、認証処理回路1dにより、認証処理が行われる。たとえば、ハッシュ値等の認証データが生成される。生成された認証データは、処理対象データ2に付与されていた認証データと比較される。比較処理は、たとえばCPU1aによって行われる。
【0046】
比較の結果、正しいデータであることが認証されると、データ入出力制御回路1eにより、内蔵メモリに格納された処理対象データ2が暗号処理回路1cに入力される。すると、暗号処理回路1cにより処理対象データ2が復号されデータ入出力制御回路1eに渡される。平文に復号された処理結果データ3は、データ入出力制御回路1eによってデータ出力回路1fに渡される。そして処理結果データ3がデータ出力回路1fから出力される。
【0047】
このように、暗号処理や認証処理を行う際、一旦処理対象データをデータ入出力制御回路1eの内蔵メモリに格納してしまえば、CPU1aが接続された第1のバス1gとは別の第2のバス1hや第3のバス1iを介して、暗号処理回路1cや認証処理回路1dに対するデータの入出力を行うことができる。その結果、暗号処理回路1cや認証処理回路1dに対するデータの入出力を、CPU1aが管理する必要が無くなり、CPU1aの処理負荷が軽減される。
【0048】
しかも、データ入出力制御回路1eにDMAコントローラを内蔵することで、第1のバス1g経由で行われる処理対象データ2の取得や処理結果データ3の受け渡しを、データ入出力制御回路1eの制御下で行うことができる。たとえば、処理対象データ2が大容量の場合、処理対象データ2を予め他のメモリに格納し、データ入出力制御回路1eはそのメモリからDMA転送により処理対象データ2を取得することができる。また、データ入出力制御回路1eは、処理結果データ3についても、DMA転送により他のメモリに転送することができる。その結果、CPU1aの処理負荷が更に軽減される。
【0049】
なお、データ取得回路1bとデータ出力回路1fとの機能を併せ持つ通信インタフェースをデータ保障装置1に含めることで、データの保障機能を有するデータ通信装置が構成される。このようなデータ通信装置はVPN装置と同等の機能を実現している。以下、VPN機能を有するデータ保障装置1をセキュリティネットワークコントローラと呼ぶこととする。
【0050】
セキュリティネットワークコントローラを各種電子機器に実装すれば、その電子機器は、安全なデータ通信を容易に行うことができる。たとえば、本発明を適用したセキュリティネットワークコントローラをカメラシステム(ディジタル画像の撮像機能と撮像された画像データを処理する機能とを有するコンピュータシステム)に実装することで、インターネットを介したオンラインの動画配信を、所定の利用者(たとえば、予め登録された会員)に対して行うことができる。また、遠隔地からのカメラの制御を、安全に行うことも可能となる。
【0051】
なお、IPsecの機能を利用すれば、予め決められた利用者以外の一般の利用者との間でセキュアな通信を行うことができる。すなわち、IPsecでは、ISAKMP(Internet Security Association Key Management Protocol)を利用することで、安全に相手の認証や鍵の交換ができる。そのため、最初にISAKMPによる鍵交換を行えば、任意の装置間でセキュアな通信が可能となる。
【0052】
以下、本発明を適用したセキュリティネットワークコントローラをカメラに実装した場合を例に採り、本発明の実施の形態について詳細に説明する。なお、以下の実施の形態では暗号アルゴリズムにDES(Data Encryption Standard)、ハッシュ関数アルゴリズムにHMAC−SHA1を用いるものとする。
【0053】
[第1の実施の形態]
図2は、第1の実施の形態に係るシステム構成例を示す図である。図2に示すように、セキュリティネットワークコントローラを実装したカメラシステム10がインターネット20を介して端末装置30に接続されている。端末装置30は、たとえばVPN機能を有するコンピュータである。ここで、端末装置30にもセキュリティネットワークコントローラを実装することで、インターネット20を介した暗号通信が容易となる。
【0054】
図3は、カメラ内部の回路構成を示す図である。カメラシステム10には、セキュリティネットワークコントローラ100、メインCPU11、周辺の回路12,13およびカメラ機構部14が設けられている。セキュリティネットワークコントローラ100は、VPN機能を有しており、ハードウェア的に暗号化/復号等の処理を行うことができる。
【0055】
なお、セキュリティネットワークコントローラ100は、LSIチップ上に構成することができる。LSIチップでセキュリティネットワークコントローラ100を実現することで、各種電子機器への組み込みが容易となる。
【0056】
また、セキュリティネットワークコントローラ100は、1つのモジュール(たとえば、PCMCIA(Personal Computer Memory Card International Association)等のカードモジュール)内に構成することができる。これにより、所定の通信インタフェースを介してカメラシステム10や他の機器に容易に実装することができる。
【0057】
メインCPU11は、周辺の回路12,13やカメラ機構部14を制御することでカメラシステム10全体を制御している。回路12,13は、カメラの焦点制御回路や、画像データの圧縮回路等である。また、メインCPU11は、カメラシステム10で撮影したディジタルの画像をセキュリティネットワークコントローラ100に転送する。
【0058】
セキュリティネットワークコントローラ100は、CPU101、メモリコントローラ102、メモリ103、外部接続インタフェース104、通信インタフェース105、IPsec制御回路110、暗号処理回路120、およびハッシュ関数処理回路130を有している。これらの各要素は、内部のバス等で互いに接続されている。
【0059】
CPU101は、セキュリティネットワークコントローラ100全体を制御する。
メモリコントローラ102は、メモリ103へのデータの入出力を制御する。メモリ103は、データを記憶する。なお、図3では、メモリ103をセキュリティネットワークコントローラ100内部に示しているが、外部に接続することもできる。その場合、メモリコントローラ102に外部接続用のコネクタが設けられ、そのコネクタにメモリ103を接続することで、メモリ103がセキュリティネットワークコントローラ100に繋がる。メモリ103としては、SRAM(Static Random Access Memory)やフラッシュメモリ等の半導体メモリを使用することができる。メモリコントローラ102は、メモリ103に対して受信データを書き込んだり、メモリ103内のデータを読み出したりする。メモリ103は、処理対象データの蓄積や、演算時のワークメモリとしても使用される。
【0060】
外部接続インタフェース104は、メインCPU11に接続されており、メインCPU11とCPU101の間の通信データを中継する。外部接続インタフェース104は、基本的にはレジスタとデータで構成され、双方向のデータの受け渡しを行う。
【0061】
通信インタフェース105は、インターネット20に接続されており、インターネット20を介した通信データを中継する。ここで、通信インタフェース105は、MAC(Media Access Control)とも呼ばれ、イーサネット(登録商標)などの物理層を介したネットワーク接続を実現させる機能を有する。
【0062】
IPsec制御回路110は、暗号処理回路120とハッシュ関数処理回路130へのデータの入出力を制御する。暗号処理回路120は、データの暗号化または復号処理を行う。ハッシュ関数処理回路130は、通信されるデータに基づいてハッシュ値を生成する。
【0063】
このようなシステム構成において、メインCPU11が、制御対象となるカメラを制御する。その際、メインCPU11は、インターネット20を介してセキュアに通信を行うことで、遠隔地からの指示に従った制御を行ったり、カメラで撮影した画像をインターネット20を介して配信したりする。セキュアな通信には、IPsecが用いられる。なお、セキュリティネットワークコントローラ100は、カメラに限らず、電化製品、家電、AV機器等に実装して、それらを制御することができる。
【0064】
通信インタフェース105あるいはIPsec制御回路110は、IPsec処理におけるCPU101の負荷を軽減する機能を有する。その機能により、パケット単位で暗号及び認証処理がCPU101の代わりに実現される。
【0065】
たとえば、データを送信する際には、以下の処理が行われる。
メインCPU11からインターネット20上へ配信すべきデータは、外部接続インタフェース104を介して、メモリ103に転送される。そして、暗号化対象データのDMA転送の指示がCPU101からIPsec制御回路110に出され、IPsec制御回路110が暗号化対象データをDMA転送で取得し、暗号処理回路120に渡す。暗号処理回路120が、IPsecプロトコルに従って暗号化処理を行う。暗号化されたデータは、IPsec制御回路110によりメモリ103へDMA転送される。続けて、認証用データのDMA転送の指示がCPU101からIPsec制御回路110に出される。すると、IPsec制御回路110が認証用データをDMA転送で取得し、ハッシュ関数処理回路130に渡す。ハッシュ関数処理回路130がIPsecプロトコルに従ってハッシュ値を生成する。そして、CPU101により、暗号化されたデータと、生成されたハッシュ値とを含むパケットが生成され、通信インタフェース105を介してインターネット20上へ送信される。
【0066】
このような手順で画像を配信すれば、所定の端末装置(たとえば、会員登録をしたユーザの端末装置)でのみ再生可能な映像ストリームを配信できる。
また、メインCPU11への制御データがインターネットを介してIPsec処理されたパケットによって送られてくると、以下の処理が行われる。
【0067】
送られてきたパケットを通信インタフェース105が受信する。そのパケットは、CPU101の制御によりメモリ103に書き込まれる。そして、パケット内の認証データのDMA転送の指示がCPU101からIPsec制御回路110に出される。すると、IPsec制御回路110が認証データをDMA転送で取得し、ハッシュ関数処理回路130に渡す。ハッシュ関数処理回路130がIPsecプロトコルに従ってハッシュ値を生成する。CPU101は、ハッシュ値に基づいて、受信したデータを認証する。
【0068】
生成されたハッシュ値により正しく認証されれば、パケット内の暗号データのDMA転送の指示がCPU101からIPsec制御回路110に出される。すると、IPsec制御回路110が暗号データをDMA転送で取得し、暗号処理回路120に渡す。暗号処理回路120が、IPsecプロトコルに従って復号処理を行う。復号された平文のデータは、IPsec制御回路110によりメモリ103へDMA転送される。その後、復号されたデータは、外部接続インタフェース104を介してメインCPU11に送られ、メインCPU11で処理される。
【0069】
このような手順で、カメラの制御指示等をメインCPU11に渡せば、遠隔地からのカメラ制御を安全に行うことができる。
以下に、データの送信および受信の手順を、フローチャートを参照して説明する。
【0070】
図4は、データ送信の手順を示すフローチャートである。以下、図4に示す処理をステップ番号に沿って説明する。
[ステップS11]メインCPU11が映像取得等のアプリケーションを実行し、データを生成する。セキュリティネットワークコントローラ100に渡す。
【0071】
[ステップS12]CPU101の制御により、データをメモリ103に格納する。
[ステップS13]CPU101がカプセル化を行う。カプセル化とは、データをヘッダやトレーラで包み込むことである。
【0072】
[ステップS14]IPsec制御回路110によりデータが暗号処理回路120に渡される。そして、暗号処理回路120がデータの暗号化を行う。暗号化されたデータは、IPsec制御回路110によりメモリ103に戻される。
【0073】
[ステップS15]IPsec制御回路110により暗号化されたデータがハッシュ関数処理回路130に渡される。そして、ハッシュ関数処理回路130がハッシュ値を生成する。生成したハッシュ値は、CPU101に渡される。
【0074】
[ステップS16]CPU101が送信用のフレームを生成する。
[ステップS17]CPU101は、フレームを出力バッファ(通信インタフェース105内のバッファ)に書き込む。
【0075】
[ステップS18]通信インタフェース105がフレームをインターネット20上へ送信する。
以下に、動画データを配信する際のデータの流れを、図5〜図12を参照して説明する。
【0076】
図5は、データ配信の第1のステップを示す図である。まず、カメラシステム10が撮影した画像のデータ41は、メインCPU11からセキュリティネットワークコントローラ100に入力される。データ41は、外部接続インタフェース104で受け取られ、メモリコントローラ102に転送される。そして、データ41は、メモリコントローラ102によってメモリ103に書き込まれる。
【0077】
図6は、データ配信の第2のステップを示す図である。IPsec制御回路110は、DMA転送により、メモリ103からデータ41を取得する。
図7は、データ配信の第3のステップを示す図である。IPsec制御回路110は、取得したデータ41を暗号処理回路120に渡す。暗号処理回路120は、データ41を暗号化する。そして、暗号処理回路120は、暗号化されたデータ42を、IPsec制御回路110に渡す。この間、メインのバスが解放されているため、後続のデータ43をメインCPU11から受け取り、メモリ103に転送することができる。
【0078】
図8は、データ配信の第4のステップを示す図である。IPsec制御回路110は、暗号化されたデータ42を、DMA転送により、メモリコントローラ102に渡す。メモリコントローラ102は、受け取ったデータ42をメモリ103に格納する。
【0079】
図9は、データ配信の第5のステップを示す図である。IPsec制御回路110は、DMA転送により、メモリ103から暗号化されたデータ42を取得する。
【0080】
図10は、データ配信の第6のステップを示す図である。IPsec制御回路110は、暗号化されたデータ42をハッシュ関数処理回路130に渡す。ハッシュ関数処理回路130は、データ42に対してハッシュ関数を適用し、ハッシュ値を生成する。この間、メインのバスが解放されているため、後続のデータ44をメインCPU11から受け取り、メモリ103に転送することができる。
【0081】
図11は、データ配信の第7のステップを示す図である。ハッシュ関数処理回路130は、生成したハッシュ値45をCPU101に渡す。CPU101は、メモリ103に格納されている暗号化後のデータ42にハッシュ値45を付加する。
【0082】
図12は、データ配信の第8のステップを示す図である。CPU101は、メモリ103に格納されている暗号化後のデータ42とハッシュ値45とから通信用のパケット46を生成し、通信インタフェース105を介して、インターネット20に接続された端末装置30へ配信する。
【0083】
このように、メモリ103とIPsec制御回路110との間のデータの受け渡しは、IPsec制御回路110が有するDMA機能によって行われるため、CPU101の負荷が少なくて済む。また、IPsec制御回路110と暗号処理回路120との間が専用のバスで接続され、暗号化処理のためのデータの受け渡しが専用のバスを介して行われるため、その間メインのバスを他のデータ転送に利用できる。同様に、IPsec制御回路110とハッシュ関数処理回路130との間が専用のバスで接続され、ハッシュ処理のためのデータの受け渡しが専用のバスを介して行われるため、その間メインのバスを他のデータ転送に利用できる。その結果、処理効率が向上する。
【0084】
図13は、データの受信手順を示すフローチャートである。以下、図13に示す処理をステップ番号に沿って説明する。
[ステップS21]通信インタフェース105が、インターネット20を経由して送られたフレームを受信する。
【0085】
[ステップS22]受信したフレームに含まれるパケットが通信インタフェース105内部の入力バッファに格納される。
[ステップS23]CPU101により、パケットのヘッダ処理が行われる。
【0086】
[ステップS24]IPsec制御回路110によりデータが暗号処理回路120に渡される。そして、ハッシュ関数処理回路130がハッシュ値を生成する。認証処理が行われる。CPU101は、ハッシュ関数処理回路130で生成されたハッシュ値と受信したデータに付加されていたハッシュ値とを比較し、データの認証を行う。
【0087】
[ステップS25]認証されたら、IPsec制御回路110によりデータが暗号処理回路120に渡される。そして、暗号処理回路120が復号処理を行う。
【0088】
[ステップS26]CPU101は、カプセル化されたデータを解析する(ヘッダやトレーラを取り除く)。
[ステップS27]CPU101は、データをメモリ103に格納する。
【0089】
[ステップS28]CPU101は、データを外部接続インタフェース104を介してメインCPU11に渡す。メインCPU11は、アプリケーションプログラムに従ってデータを処理する。
【0090】
なお、データ受信の場合のデータの流れについては、図5〜図12に示したデータ送信の場合の逆の手順である。
このように、データを受信した場合でも、暗号処理回路120およびハッシュ関数処理回路130へのデータの入出力は、IPsec制御回路110が行う。また、IPsec制御回路110と他の回路との間のデータの受け渡しは、DMA転送によって行われる。
【0091】
次に、IPsec制御回路110とその周辺の回路との接続関係および機能について詳細に説明する。
図14は、セキュリティネットワークコントローラの内部構成例を示す図である。セキュリティネットワークコントローラ100は、CPU101、バスセレクタ107、暗号処理回路120、データインセレクタ106、IPsec制御回路110、ハッシュ関数処理回路130、メモリコントローラ102、およびメモリ103を有している。
【0092】
CPU101は、バス181を介してバスセレクタ107に接続されている。CPU101は、バスセレクタ107を経由して他の構成要素との間で情報の交換を行い、セキュリティネットワークコントローラ100全体を制御する。また、CPU101には、暗号処理回路120、IPsec制御回路110、および、ハッシュ関数処理回路130から外部割込み信号190が入力される。さらに、CPU101には、IPsec制御回路110から外部バス開放要求受付信号191が入力される。CPU101からIPsec制御回路110とバスセレクタ107には、外部バス開放要求信号192が入力される。
【0093】
バスセレクタ107は、バス182を介して、暗号処理回路120、IPsec制御回路110、ハッシュ関数処理回路130、およびメモリコントローラ102に接続されている。さらに、バスセレクタ107は、専用のバス183でIPsec制御回路110に接続されている。バスセレクタ107は、CPU101からの制御に従って、バス182に接続された各要素に対してCPU101からのデータを送信したり、各要素から送られたデータをCPU101へ転送したりする。
【0094】
具体的には、バスセレクタ107は、CPU101とIPsec制御回路110とのうちバスマスタになっている方から出力される制御信号等を選択し、他の回路に対して出力する。出力される制御信号等は、たとえば、他の回路に対するアドレス、制御信号、ライトデータである。
【0095】
暗号処理回路120は、データの暗号化および復号を行う回路である。第1の実施の形態では、DESによる暗号化/復号を行う。暗号処理回路120は、専用のバス184で、IPsec制御回路110に接続されている。また、暗号処理回路120は、専用のバス185で、データインセレクタ106に接続されている。暗号処理回路120は、バス184を介してIPsec制御回路110から暗号化または復号対象のデータを取得する。そして、取得したデータの暗号化または復号を行いIPsec制御回路110に渡す。
【0096】
なお、第1の実施の形態では、暗号処理回路120は、64ビットブロック暗号処理を行う。暗号処理回路120は、64ビットデータがライトされると内部処理ステートマシンのスタートビットが、自動的にオンされる。これにより、処理対処のデータの書き込み後、すぐに暗号化または復号処理を開始することができる。
【0097】
また、暗号処理回路120の行う暗号化または復号の処理は、16ラウンド処理である。そのため、内部カウンタにより16が数えられると内部ステートマシンの終了信号がオンとなる。この終了信号がIPsec制御回路110に出力される。
【0098】
なお、暗号処理回路120は、IPsec制御回路110を介さずにデータの暗号化や復号処理を行うことができる。その場合、暗号処理回路120は、終了信号のオンに替えて、外部割込み信号190をCPU101へ出力する。
【0099】
データインセレクタ106は、既に説明した接続関係以外に、IPsec制御回路110に接続されている。また、データインセレクタ106は、バス187を介してハッシュ関数処理回路130に接続されている。さらに、データインセレクタ106は、バス188を介してCPU101、メモリコントローラ102、およびIPsec制御回路110に接続されている。データインセレクタ106は、暗号処理回路120、IPsec制御回路110およびハッシュ関数処理回路130からのバス185,186,187を介して入力される信号の1つを選択して、バス188を介してCPU101、メモリコントローラ102、およびIPsec制御回路110に対して出力する。
【0100】
IPsec制御回路110は、前述のようにバス184を介して暗号処理回路120に接続されており、更に、バス189を介してハッシュ関数処理回路130に接続されている。IPsec制御回路110は、256バイトの内蔵RAMを有しており、暗号化/復号対象のデータや、ハッシュ処理対象のデータを保持することができる。
【0101】
また、IPsec制御回路110は、DMAC(ダイレクトメモリアクセスコントローラ)によるバスアービター機能を内蔵しており、CPU101とのバス・アービトレーションを行い、バスマスタとなることができる。バスマスタとなることで、IPsec制御回路110は、DMA転送用の受信先アドレス、送信先アドレス、転送量、モードの設定を行うことができる。
【0102】
IPsec制御回路110は、基本的に、バスマスタになると処理前のデータを受信先より取り込み、処理後のデータを送信先に書き込む動作を行う。そして、IPsec制御回路110は、データ転送完了後CPU101にバス権を返還する。このように、IPsec制御回路110は、DMACの機能を用いて、暗号化/復号の対象となるデータまたはハッシュ関数による認証処理の対象となるデータを、DMA機能を用いてメモリ103から取得する。
【0103】
暗号化/復号の処理対象となるデータを取得した場合、IPsec制御回路110は、そのデータを暗号処理回路120に渡す。その後、IPsec制御回路110は、暗号化または復号処理が行われたデータを受け取り、DMA処理によりメモリ103に転送する。また、認証の対象となるデータを取得した場合、IPsec制御回路110は、そのデータをハッシュ関数処理回路130に渡す。なお、IPsec制御回路110は、データの取り込み及び書き出し処理を、暗号処理回路120による暗号化/復号処理や、ハッシュ関数処理回路130による認証処理と並行化して実行する。
【0104】
また、IPsec制御回路110は、内部に処理対象データ長を格納するレジスタを持ち、処理ごとに処理終了分の長さを減算し、処理対象データの残り分を管理する。そして、IPsec制御回路110は、全ての処理が終わった際に処理終了割り込み信号をCPU101へ出力する。
【0105】
ハッシュ関数処理回路130は、ハッシュ関数を用いてハッシュ値を生成する回路である。具体的には、ハッシュ関数処理回路130は、IPsec制御回路110から受け取ったデータに基づいてハッシュ値を生成し、CPU101に渡す。
【0106】
なお、第1の実施の形態では、ハッシュ関数処理回路130は、512ビットブロック処理を行う。そのため、512ビットのデータがライトされると、内部処理ステートマシンのスタートビットがオンされる。これにより、ハッシュ値の生成処理が開始される。
【0107】
また、ハッシュ関数処理回路130は、80ラウンドの処理を行う。そこで、ハッシュ関数処理回路130は、内部カウンタにより80が数えられると内部ステートマシンの終了信号をオンにする。オンにされた終了信号は、IPsec制御回路110に出力される。
【0108】
なお、ハッシュ関数処理回路130は、IPsec制御回路110を介さずにデータの暗号化や復号処理を行うことができる。その場合、終了信号に替えて、外部割込み信号190がCPU101へ出力される。
【0109】
メモリコントローラ102は、メモリ103に対するデータの書き込みやデータの読み出しを行う。
メモリ103は、メモリコントローラ102に接続されている。メモリ103は、SRAMやフラッシュメモリなどの読み出しと書き込みとが可能な半導体の記録媒体である。
【0110】
このような構成において、IPsec制御回路110と暗号処理回路120とを組み合わせて複合的に動作させる時には、以下のような処理が行われる。
まず、IPsec制御回路110が外部バス開放要求信号192をCPU101へ出力する。その後、CPU101が外部バス開放要求受付信号191を出力し、バス権がIPsec制御回路110へ開放される。これにより、CPU101を介在させない、暗号化または復号処理が開始される。
【0111】
IPsec制御回路110は、メモリ103内からDMA転送によってデータを取得する。取得したデータは、IPsec制御回路110内のメモリに格納される。なお、IPsec制御回路110内のメモリは、2面構成となっている。1つの面には暗号化または復号処理前のデータが格納され、他方の面には、暗号化または復号処理後のデータが格納される。
【0112】
第1の実施の形態では、暗号処理回路120においてDES処理が行われる。DES処理は、64ビット単位で実行される。したがって、IPsec制御回路110がメモリ103からデータを取得する場合、64ビットの整数倍のデータ長のDMA転送を行う。第1の実施の形態では、64バイト(DES処理8回分)のデータを一度に取得するものとする。
【0113】
図15は、IPsec制御回路の内蔵RAMのDES処理時の構成を示す図である。図15に示すように、IPsec制御回路110の内蔵RAM111には、A面111aとB面111bとがある。A面111aとB面111bとには、それぞれDES処理16回分の処理対象データ(128バイト)が格納できる。A面111aは演算対象データの格納領域であり、B面111bは演算結果データの格納領域である。
【0114】
メモリ103からDMA転送によって取得されたDES処理前のデータは、A面111aに格納される。たとえば、64バイトのデータがDMA転送でA面111aの領域「A0」に格納される。領域「A0」に格納された64バイトのデータが先に暗号処理回路120に渡されDES処理が行われる。
【0115】
領域「A0」に格納されたデータに対するDES処理が行われている間に、領域「A1」に後続の64バイトのデータがDMA転送で格納される。DES処理が施されたデータが暗号処理回路120から出力されると、B面111bの64バイトの領域「B0」に格納される。
【0116】
続けて、A面111aの64バイトの領域「A1」に格納されたデータが暗号処理回路120に渡されDES処理が行われる。DES処理が施されたデータが暗号処理回路120から出力されると、B面111bの64バイトの領域「B1」に格納される。
【0117】
B面111bの「B0」と「B1」との一方の領域に処理済みのデータが格納されると、B面111b内のデータがIPsec制御回路110によりメモリ103にDMA転送される。
【0118】
IPsec制御回路110がデータを受信する場合、IPsec制御回路110から外部バス開放要求信号192が出力される。IPsec制御回路110は、データの取り込みが終了したらバス権をCPU101へ返還する。それと同時に暗号処理回路120とIPsec制御回路110が専用バスと専用制御信号を用いてCPU101を介在せずに処理を開始する。この際、内蔵RAM111のアドレスはインクリメント構造を取っている。暗号処理されたデータはIPsec制御回路110の128バイトの内蔵RAM111のB面111bに貯められる。この際、格納先を指し示す内蔵RAM111のアドレスは、インクリメント構造を取っている。すなわち、前回格納時のアドレスに所定の値(64バイト分)を加算したアドレスが指定される。
【0119】
64バイト処理が終了するごとに、IPsec制御回路110は外部バス開放要求信号192をCPU101へ出力する。IPsec制御回路110は、バス権獲得後にメモリ103へ演算処理結果を書き出す。書き出しが終了するとバス権をCPU101へ返還する。
【0120】
なお、暗号処理回路120による演算中も演算対象データを格納している内蔵RAM111の中の64バイト処理が終了するごとに外部バス開放要求信号192が出力される。バス権がIPsec制御回路110へ開放されてからメモリ103から、暗号対象データを取り込む。暗号化対象データの取り込みが終了するとバス権がCPU101へ返還される。
【0121】
また、暗号処理回路120による演算中も演算終了データを格納するためのB面111bの中に64バイトが格納されるごとに、外部バス開放要求信号192が出力される。バス権がIPsec制御回路110へ開放されてから、メモリ103へ演算処理結果が書き出される。書き出しが終了するとバス権をCPU101へ返還する。
【0122】
一方、IPsec制御回路110とハッシュ関数処理回路130とを組み合わせて複合的に処理を行う際には、内蔵RAM111を128バイトの2面構成として使用する。この場合、2面とも全て書き込み用として使用される。演算終了データとして得られるハッシュ値は、ハッシュ関数処理回路130内部の160ビットのハッシュ値格納レジスタに格納される。そして、演算終了後に、ハッシュ値格納レジスタからCPU101にハッシュ値が渡される。なお、第1の実施の形態では、ハッシュ処理として、SHA1処理を行う。
【0123】
図16は、IPsec制御回路の内蔵RAMのSHA1処理時の構成を示す図である。図16に示すように、内蔵RAM111のA面111aとB面111bとが、それぞれ128バイトの1つの領域として扱われる。
【0124】
IPsec制御回路110は、内蔵RAM111にメモリ103から、ハッシュ関数による処理対象データをDMA転送により取り込む。この際128バイト連続で書き込んでからバス権をCPU103に返還する。その後、CPU103を介在させず、IPsec制御回路110とハッシュ関数処理回路130とでハッシュ処理を開始する。
【0125】
IPsec制御回路110は、演算中、片面128バイトが空であれば、すぐにメモリ103から、ハッシュ関数による処理対象データを取り込む。この際128バイト連続で書き込んでからバス権を返還する。なお、内蔵RAM111のアドレスはインクリメント構造を取っている。
【0126】
IPsec制御回路110、暗号処理回路120、ハッシュ関数処理回路130などから出力されるリードデータは、データインセレクタ106を通ってCPU101、IPsec制御回路110に出力されるか、メモリコントローラ102を通ってメモリ103に出力される。
【0127】
次に、IPsec制御回路110と暗号処理回路120、ハッシュ関数処理回路130の動作について詳しく説明する。
図17は、IPsec制御回路の内部構成を示す図である。図17に示すように、IPsec制御回路110には、内蔵RAM111、内蔵RAMインタフェース112、レジスタ群113、スレーブバスインタフェース114、マスタバスインタフェース115、およびマクロインタフェース116を有している。
【0128】
内蔵RAM111は、図13、図14に示した通りであり、処理対象データや処理結果データが格納される。内蔵RAMインタフェース112は、内蔵RAM111へのデータの格納や読み出しを行うインタフェースである。レジスタ群113は、制御データ等を格納するための複数の汎用レジスタである。スレーブバスインタフェース114は、バス182上でスレーブとして動作するためのインタフェースである。マスタバスインタフェース115は、バス182上でバスマスタとして動作するためのインタフェースである。マスタバスインタフェース115により、バス182を介したDMA転送が行われる。マクロインタフェース116は、暗号処理回路120やハッシュ関数処理回路130と通信するためのインタフェースである。
【0129】
IPsec制御回路110と暗号処理回路120とは、ライト要求信号(DREQ_WR)、リード要求信号(DREQ_RD)、ライトストローブ信号(IP_WRX[0])、リードストローブ信号(IP_RDX)、アドレス信号(IP_A)、リードデータバス(IP_RD[31:0])、ライトデータバス(IP_WD[31:0])で接続されている。また、IPsec制御回路110とハッシュ関数処理回路130とは、ライトデータバス(IP_WD[31:0])、ライトストローブ信号(IP_WRX[1])、ライト要求信号(DREQ_WR)で接続されている。
【0130】
ライト要求信号(DREQ_WR)は、暗号処理回路120からIPsec制御回路110へ32ビットのデータライトを要求する信号である。
リード要求信号(DREQ_RD)は、暗号処理回路120からIPsec制御回路110へ32ビットのデータリードを要求する信号である。
【0131】
ライトストローブ信号(IP_WRX[0])は、IPsec制御回路110から暗号処理回路120へデータのライトを通知する信号である。
リードストローブ信号(IP_RDX)は、IPsec制御回路110から暗号処理回路120へ、暗号処理回路120内のデータのリードを通知するための信号である。
【0132】
アドレス信号(IP_A)は、IPsec制御回路110から暗号処理回路120へデータのアクセス先のアドレスを指定するための信号である。
リードデータバス(IP_RD[31:0])は、32ビットの暗号処理回路120からのリードデータをIPsec制御回路110に渡す専用バスである。
【0133】
ライトデータバス(IP_WD[31:0])は、IPsec制御回路110から暗号処理回路120またはハッシュ関数処理回路130へ、32ビットのライトデータを渡す専用バスである。
【0134】
ライトストローブ信号(IP_WRX[1])は、IPsec制御回路110からハッシュ関数処理回路130へ、データのライトを通知するための信号である。
ライト要求信号(DREQ_WR)は、ハッシュ関数処理回路130からIPsec制御回路110へ、データライトを行うように要求するための信号である。
【0135】
図18は、暗号処理回路の内部構成を示す図である。暗号処理回路120には、鍵レジスタ121、16進カウンタ122、演算部123、64ビットデータレジスタ群124、2進カウンタ125が設けられている。
【0136】
暗号処理回路120にはクロック信号、アドレス信号(IP_A)、ライトデータバス(IP_WD[31:0])、ライトストローブ信号(IP_WRX[0])が入力されている。暗号処理回路120は、クロック信号に同期して動作する。アドレス信号(IP_A)は、鍵レジスタ121、演算部123、および64ビットデータレジスタ群124に入力される。ライトデータバス(IP_WD[31:0])は、鍵レジスタ121と64ビットデータレジスタ群124に入力される。ライトストローブ信号(IP_WRX[0])は、鍵レジスタ121、演算部123、64ビットデータレジスタ群124および2進カウンタ125に入力される。
【0137】
鍵レジスタ121は、暗号化または復号の際に使用する鍵データ(暗号鍵または復号鍵)を格納するためのレジスタである。鍵レジスタ121に格納されたデータは、演算部123に入力される。
【0138】
16進カウンタ122は、演算部123から入力される演算イネーブル信号に基づいて、演算回数をカウントする。演算回数が16未満の間、演算中を示す演算ステータスが演算部123に入力される。また、16進カウンタ122で16までカウントすると、演算終了信号が出力される。
【0139】
演算部123は、暗号化または復号の演算を行う。具体的には、演算部123は、2進カウンタ125からの演算開始信号の入力を受けて、演算を開始する。演算部123は、演算を行う場合、まず、演算データを64ビットデータレジスタ群124から取得する。そして、演算部123は、鍵レジスタ121から入力される鍵データを用いて、演算データの暗号化または復号を行う。演算終了後、演算部123は演算結果を64ビットデータレジスタ群124内のレジスタに格納する。なお、演算結果は、演算データが格納されていたレジスタへ上書きで格納される。
【0140】
64ビットデータレジスタ群124は、演算データや演算結果を格納するためのレジスタ群である。具体的には、64ビットデータレジスタ群124は、2つの32ビットレジスタで構成される。64ビットデータレジスタ群124には、32ビットのライトデータバスを介して演算データが入力され、一方のレジスタに格納される。また、64ビットデータレジスタ群124に演算結果が格納されるとリードデータバス(IP_RD[31:0])として出力される。
【0141】
2進カウンタ125は、ライトストローブ信号の入力回数をカウントするカウンタである。2進カウンタ125は、ライトストローブ信号が2回入力されると、演算開始信号を演算部123に対して出力する。すなわち、ライトデータバスのバス幅が32ビットであるため、2回の書き込みで64ビットデータレジスタ群124への演算データの格納が完了する。そこで、ライトストローブ信号が2回入力されることで、64ビット単位のDES処理が開始可能となる。
【0142】
このような暗号処理回路120でDES処理を行う場合、まず、鍵レジスタ121に鍵データが格納される。次に、ライトデータバスを介して、64ビットデータレジスタ群124に演算データが2回に分けて書き込まれる。2回の書き込みが行われたことが2進カウンタ125で検出され、演算開始信号が出力される。
【0143】
演算開始信号に応じて、演算部123が演算データに対するDES処理を行い、演算結果を64ビットデータレジスタ群124に書き戻す。演算結果は、64ビットデータレジスタ群124からリードデータとして出力される。また、演算部123によってDES処理が行われる毎に、16進カウンタ122に対してイネーブル信号が出力され、16進カウンタの値がカウントアップされる。そして、16進カウンタ122の値が16に達すると、演算終了信号が出力される。
【0144】
このように、第1の実施の形態に係る暗号処理回路120では、データライト数(32ビット単位)で数えており、データライト終了と共に演算開始を自動認識し、演算を開始することができる。すなわち、2進カウンタ125がデータライトカウンタとして機能しており、このデータライトカウンタが処理開始を検知する。また、16進カウンタ122が演算ラウンドカウンタとして機能しており、所定回数の演算ラウンドの終了により演算終了を認識し、演算終了信号を出力する。なお、暗号化または復号の演算結果は、64ビットデータレジスタ群124(32ビット×2)に上書きされる。
【0145】
次に、ハッシュ関数処理回路130の内部構成について説明する。
図19は、ハッシュ関数処理回路の内部構成を示す図である。ハッシュ関数処理回路130は、ハッシュ値格納レジスタ131、80進カウンタ132、演算部133、512ビットデータレジスタ群134、および16進カウンタ135を有している。
【0146】
ハッシュ関数処理回路130には、クロック信号、アドレス信号、ライトデータ、およびライトストローブ信号が入力されている。ハッシュ関数処理回路130は、クロック信号に同期して動作する。アドレス信号は、演算部133と512ビットデータレジスタ群134とに入力される。ライトデータは、演算部133と512ビットデータレジスタ群134とに入力される。ライトストローブ信号は、演算部133、512ビットデータレジスタ群134および16進カウンタ135に入力される。
【0147】
ハッシュ値格納レジスタ131は、ハッシュ関数処理により生成されたハッシュ値を格納するレジスタ群である。第1の実施の形態では、5個の32ビットレジスタで構成されており、全体で160ビットのデータが格納できる。
【0148】
80進カウンタ132は、演算部133から入力される演算イネーブル信号に基づいて、演算回数をカウントする。演算回数が80未満の間、演算中を示す演算ステータスが演算部133に入力される。また、80進カウンタ132で80までカウントすると、演算終了信号が出力される。
【0149】
演算部133は、ハッシュ関数に基づくハッシュ値の算出処理を行う。具体的には、演算部133は、16進カウンタ135からの演算開始信号の入力を受けて、演算を開始する。演算部133は、演算を行う場合、まず、演算データを512ビットデータレジスタ群134から取得する。そして、演算部133は、演算データに基づいてハッシュ値を生成する。演算終了後、演算部133は演算結果を512ビットデータレジスタ群124内のレジスタに格納する。なお、演算結果は、演算データが格納されていたレジスタへ上書きで格納される。
【0150】
512ビットデータレジスタ群134は、演算データや演算結果を格納するためのレジスタ群である。具体的には512ビットデータレジスタ群134は、16個の32ビットレジスタで構成される。512ビットデータレジスタ群134には、32ビットのライトデータバスを介して演算データが入力され、順次各レジスタに格納される。
【0151】
16進カウンタ135は、ライトストローブ信号の入力回数をカウントするカウンタである。16進カウンタ135は、ライトストローブ信号が16回入力されると、演算開始信号を演算部133に対して出力する。すなわち、ライトデータバスのバス幅が32ビットであるため、16回の書き込みで512ビットデータレジスタ群134への演算データの格納が完了する。そこで、ライトストローブ信号が16回入力されることで、512ビット単位のハッシュ関数処理が開始可能となる。
【0152】
このようなハッシュ関数処理回路130において、ハッシュ関数に基づいてハッシュ値を生成する場合、まず、512ビットデータレジスタ群134に、処理対象のデータが32ビットずつ格納される。書き込み回数は、16進カウンタ135によってカウントされており、データの書き込みが16回に達すると16進カウンタ135から演算開始信号が出力される。演算開始信号に応答して、演算部133がハッシュ関数に従った演算を開始する。具体的には、演算部133は、512ビットデータレジスタ群134から処理対象のデータを取得し、ハッシュ関数に従った処理を行う。演算部133による処理が80回繰り返されることでハッシュ値が生成され、ハッシュ値格納レジスタ131にハッシュ値が格納される。ハッシュ値格納レジスタ131内のデータは、リードデータとして出力される。このとき、演算が80回に達したことを80進カウンタ132が検出し、演算終了信号を出力する。
【0153】
以上のようにして、ハッシュ関数処理回路130において、ハッシュ値が生成される。
ここで、CPU101、IPsec制御回路110、暗号処理回路120、およびハッシュ関数処理回路130は、それぞれ個別の回路であり、並行してデータを処理することができる。以下に、CPU101、IPsec制御回路110、暗号処理回路120、およびハッシュ関数処理回路130のそれぞれの処理手順を説明する。
【0154】
図20は、データ暗号化時の各回路の動作を時系列で示す第1の図である。以下、図20に示す処理をステップ番号に沿って説明する。なお、第1の実施の形態では、暗号処理回路120はDES処理を行いハッシュ関数処理回路130は、SHA1処理を行う。
【0155】
[ステップS31]各回路が初期値を設定する。暗号処理回路120は、アルゴリズム(DES)と鍵を設定する。このときライト要求信号(DREQ_WR[0])はアサート中である。ハッシュ関数処理回路130は、アルゴリズム(SHA1)を設定する。このときライト要求信号(DREQ_WR[1])はアサート中である。IPsec制御回路110は、処理対象データ(ターゲット)の取得を待機(スタンバイ)している。このとき、CPU101がメインのバスのバスマスタとなっている。
【0156】
[ステップS32]IPsec制御回路110は、DMA転送に必要なパラメータとして、ソースアドレス、ディスティネーションアドレス、データレングスを設定する。また、暗号処理回路120は、スタンバイ状態となる。
【0157】
[ステップS33]IPsec制御回路110は、コントロール/モードレジスタ[1:0]内の動作開始制御ビットをオン(値を「1」)にする。
[ステップS34]IPsec制御回路110は、外部バス解放要求信号(BRQ)をアサートする。
【0158】
[ステップS35]CPU101は、外部バス開放要求受付信号(BGNT)をアサートし、バスマスタではなくなる。IPsec制御回路110は、バスマスタとなり、DMA転送によりメモリ103から内蔵RAM111へ64バイトデータを取り込む。
【0159】
[ステップS36]IPsec制御回路110は、データ取り込みを終了し、外部バス解放要求信号(BRQ)をディアサートする。CPU101は、外部バス開放要求受付信号(BGNT)をディアサートし、バスマスタとなる。
【0160】
[ステップS37]IPsec制御回路110は、暗号処理回路120へ64ビットのデータを2回に分けて書き込み、書き込みを終了する。このとき、IPsec制御回路110は、データレングスレジスタから8バイト分差し引く。暗号処理回路120は、IPsec制御回路110からのデータ書き込み終了と同時に、暗号処理(暗号化または復号)を開始する。このとき、暗号処理回路120は、ライト要求信号(DREQ_WR[0])をディアサートする。この間、CPU101は、内部バスを使用して他の処理(パケット受信やプロトコルの処理)を実行する。
【0161】
[ステップS38]暗号処理回路120は、暗号処理を実行する。IPsec制御回路110は、外部バス解放要求信号(BRQ)をアサートする。この時点では、CPU101が継続してバスマスタである。
【0162】
[ステップS39]CPU101は、外部バス開放要求受付信号(BGNT)をアサートし、バスマスタではなくなる。IPsec制御回路110は、バスマスタとなり、DMA転送によりメモリ103から内蔵RAM111へ64バイトデータを取り込む。
【0163】
図21は、データ暗号化時の各回路の動作を時系列で示す第2の図である。以下、図21に示す処理をステップ番号に沿って説明する。
[ステップS40]IPsec制御回路110は、データ取り込みを終了し、外部バス解放要求信号(BRQ)をディアサートする。CPU101は、外部バス開放要求受付信号(BGNT)をディアサートし、バスマスタとなる。この間に暗号処理回路120における暗号処理が終了し、暗号処理回路120によりリード要求信号(DREQ_RD)がアサートされる。
【0164】
[ステップS41]IPsec制御回路110は、暗号処理回路120からのデータ転送開始を認識し、64ビットのデータを2回に分けて取り込む。この間、CPU101は、内部バスを使用して他の処理(パケット受信やプロトコルの処理)を実行する。
【0165】
[ステップS42]IPsec制御回路110は、外部バス解放要求信号(BRQ)をアサートする。
[ステップS43]CPU101は、外部バス開放要求受付信号(BGNT)をアサートし、バスマスタではなくなる。IPsec制御回路110は、バスマスタとなり、DMA転送により内蔵RAM111からメモリ103へ64バイトデータを書き出す。
【0166】
[ステップS44]IPsec制御回路110は、データ書き出しを終了し、外部バス解放要求信号(BRQ)をディアサートする。CPU101は、外部バス開放要求受付信号(BGNT)をディアサートし、バスマスタとなる。暗号処理回路120は、リード要求信号(DREQ_RD)をディアサートすると共にライト要求信号(DREQ_WR[0])をアサートし、スタンバイ状態となる。
【0167】
[ステップS45]上記ステップS34〜ステップS44の処理を、データレングスレジスタが0になるまで繰り返し実行する。データレングスレジスタが0になると、ステップS46の処理に進められる。
【0168】
[ステップS46]IPsec制御回路110は、処理終了割り込み信号が出力される。CPU101は、メモリ103にデータレングス長分の暗号処理結果を格納する。
【0169】
次に、ハッシュ関数に基づくハッシュ値生成処理について説明する。
図22は、ハッシュ値生成処理時の各回路の動作を時系列で示す図である。以下、図22に示す処理をステップ番号に沿って説明する。
【0170】
[ステップS51]各回路が初期値を設定する。暗号処理回路120は、アルゴリズム(DES)と鍵を設定する。このときライト要求信号(DREQ_WR[0])はアサート中である。ハッシュ関数処理回路130は、アルゴリズム(SHA1)を設定する。このときライト要求信号(DREQ_WR[1])はアサート中である。IPsec制御回路110は、処理対象データ(ターゲット)の取得を待機(スタンバイ)している。このとき、CPU101がメインのバスのバスマスタとなっている。
【0171】
[ステップS52]IPsec制御回路110は、DMA転送に必要なパラメータとして、ソースアドレス、ディスティネーションアドレス、データレングスを設定する。
【0172】
[ステップS53]IPsec制御回路110は、コントロール/モードレジスタ[1:0]内の動作開始制御ビットをオン(値を「1」)にする。
[ステップS54]IPsec制御回路110は、外部バス解放要求信号(BRQ)をアサートする。
【0173】
[ステップS55]CPU101は、外部バス開放要求受付信号(BGNT)をアサートし、バスマスタではなくなる。IPsec制御回路110は、バスマスタとなり、DMA転送によりメモリ103から内蔵RAM111へ128バイトデータを取り込む。
【0174】
[ステップS56]IPsec制御回路110は、データ取り込みを終了し、外部バス解放要求信号(BRQ)をディアサートする。CPU101は、外部バス開放要求受付信号(BGNT)をディアサートし、バスマスタとなる。
【0175】
[ステップS57]IPsec制御回路110は、ハッシュ関数処理回路130へ128ビットのデータを16回に分けて書き込み、書き込みを終了する。このとき、IPsec制御回路110は、データレングスレジスタから64バイト分差し引く。ハッシュ関数処理回路130は、IPsec制御回路110からのデータ書き込み終了と同時に、ハッシュ関数処理を開始する。このとき、ハッシュ関数処理回路130は、ライト要求信号(DREQ_WR[1])をディアサートする。この間、CPU101は、内部バスを使用して他の処理(パケット受信やプロトコルの処理)を実行する。
【0176】
[ステップS58]上記ステップS54〜ステップS57の処理を、データレングスレジスタが0になるまで繰り返し実行する。データレングスレジスタが0になると、ステップS59の処理に進められる。
【0177】
[ステップS59]IPsec制御回路110は、処理終了割り込み信号が出力される。CPU101は、生成されたハッシュ値を読み取る。
次に、暗号処理およびハッシュ関数処理を行うときの動作波形を、タイミングチャートを参照して説明する。
【0178】
図23は、IPsec制御回路と暗号処理回路との間のバスの動作波形を示す第1のタイミングチャートである。図23では、上段にIPsec制御回路110側の端子における信号が示されており、下段に暗号処理回路120側の端子における信号および暗号処理回路120の内部データが示されている。
【0179】
IPsec制御回路110の信号としては、アドレス信号(IP_A)、ライトストローブ信号(IP_WRX[0])、リードストローブ信号(IP_RDX)、ライトデータバス(IP_WD[31:0])、リードデータバス(IP_RD[31:0])、ライト要求信号(DREQ_WR)、およびリード要求信号(DREQ_RD)が示されている。
【0180】
暗号処理回路120側の信号は、アドレス信号(IP_A)、ライトストローブ信号(IP_WRX[0])、リードストローブ信号(IP_RDX)、ライトデータバス(IP_WD[31:0])、リードデータバス(IP_RD[31:0])、第1データレジスタ値(DESDR_U)、第2データレジスタ値(DESDR_L)、演算開始信号(des_start)、演算ステータス(DSTA)、ライト要求信号(DREQ_WR)、およびリード要求信号(DREQ_RD)が示されている。第1データレジスタ値(DESDR_U)は、64ビットデータレジスタ群124内の一方のデータレジスタ(第1データレジスタ)の値である。第2データレジスタ値(DESDR_L)は、64ビットデータレジスタ群124内の他方のデータレジスタ(第2データレジスタ)の値である。
【0181】
なお、図23に示す各信号は、ローアクティブの信号である。
ライト信号でIPsec制御回路110からのデータが第1データレジスタと第2データレジスタに32ビットずつ書き込まれる。レジスタにデータが書き込まれると、演算開始信号(des_start)がアサートされる。このとき、演算中ステータス(DSTA)もオンとなる。演算終了は16進カウンタ122で終了回数を示すときに制御信号が出され、演算中ステータス(DSTA)がオフとなる。
【0182】
アドレス信号(IP_A)は、第1データレジスタと第2データレジスタとを認識するためのアドレスの役割をする1ビットの信号で、第1データレジスタに書き込む場合にはアドレス信号(IP_A)は「0」(ローレベル)、第2データレジスタに書き込む場合にはアドレス信号(IP_A)は「1」(ハイレベル)を示す。
【0183】
ライト要求信号(DREQ_WR)は、暗号処理回路120からIPsec制御回路110にデータリクエストを示す信号で演算中でない、演算結果リード待ち状態でもないときにアサートされる。まず演算前にライト要求信号(DREQ_WR)がアサートされていて、64ビットデータレジスタ群124へのデータ書き込み終了後にディアサートされる。演算終了後、リード要求信号(DREQ_RD)がアサートされる。リード要求信号(DREQ_RD)は、データリードリクエスト信号であり、64ビットデータレジスタ群124に演算結果が上書きされた状態で、そのデータがリードされるのを待っていることを示している。IPsec制御回路110がリードを行った後に、リード要求信号(DREQ_RD)はディアサートされ、ライト要求信号(DREQ_WR)が再びアサートされる。また、暗号回路の場合はIPsec制御回路110が演算対象データ書き込み、読み出し両方を行うため、IPsec制御回路110から暗号回路へライトデータを運ぶライトデータバス(IP_WD[31:0])と、暗号回路からIPsec制御回路110へリードデータを運ぶリードデータバス(IP_RD[31:0])とが設けられている。
【0184】
以下に、図23に示す信号の変化を時系列で詳細に説明する。
時刻t1にライト要求信号(DREQ_WR)がアサートされる。
時刻t2(時刻t1の1周期後)に、ライトストローブ信号(IP_WRX[0])がアサートされる。同時に、ライトデータバス(IP_WD[31:0])に対して、IPsec制御回路110から処理対象データ(32ビット)が出力される。
【0185】
時刻t3(時刻t2の1周期後)に、処理対象データが暗号処理回路120内の第1データレジスタ値(DESDR_U)に格納される。
時刻t4(時刻t3の1周期後)に、ライトデータバス(IP_WD[31:0])への処理対象データの出力が停止され、ライトストローブ信号(IP_WRX[0])がディアサートされる。同時に、IPsec制御回路110によりアドレス信号(IP_A)が「1」に設定される。すなわち、第2データレジスタのアドレスが指定される。
【0186】
時刻t5(時刻t4の1周期後)に、ライトストローブ信号(IP_WRX[0])がアサートされる。同時に、ライトデータバス(IP_WD[31:0])に対して、IPsec制御回路110から処理対象データ(32ビット)が出力される。
【0187】
時刻t6(時刻t5の1周期後)に、処理対象データが暗号処理回路120内の第2データレジスタ値(DESDR_L)に格納される。
時刻t7(時刻t6の1周期後)に、IPsec制御回路110によりアドレス信号(IP_A)が「0」に設定され、ライトストローブ信号(IP_WRX[0])がディアサートされる。同時に、ライトデータバス(IP_WD[31:0])へのデータ出力も停止する。また、暗号処理回路120内部では、演算開始信号(des_start)がアサートされる。
【0188】
時刻t8(時刻t7の1周期後)に、演算中ステータス(DSTA)がオンとなり、演算開始信号(des_start)がディアサートされる。
時刻t9(時刻t8の1周期後)に、ライト要求信号(DREQ_WR)がネゲートされる。その後、暗号処理回路120内でDES処理が実行される。
【0189】
図24は、IPsec制御回路と暗号処理回路との間のバスの動作波形を示す第2のタイミングチャートである。図24は、DES処理完了後の動作波形を示している。
【0190】
DES処理が完了した時刻t11に、演算中ステータス(DSTA)がオフとなる。
時刻t12(時刻t11の1周期後)に、暗号処理回路120によりリード要求信号(DREQ_RD)がアサートされる。
【0191】
時刻t13(時刻t12の1周期後)に、リードストローブ信号(IP_RDX)がアサートされる。
時刻t14(時刻t13の1周期後)に、リードデータバス(IP_RD[31:0])に対して、暗号処理回路120から処理結果データ(32ビット)が出力され、IPsec制御回路110で読み込まれる。このとき、アドレス信号(IP_A)が「0」であるため、リードデータバス(IP_RD[31:0])には、第1データレジスタ内のデータが出力される。
【0192】
時刻t15(時刻t14の1周期後)に、リードストローブ信号(IP_RDX)がディアサートされ、IPsec制御回路110によりアドレス信号(IP_A)が「1」に設定される。
【0193】
時刻t16(時刻t15の1周期後)に、リードストローブ信号(IP_RDX)がアサートされる。同時に、リードデータバス(IP_RD[31:0])へのデータ出力が一旦停止する。
【0194】
時刻t17(時刻t16の1周期後)に、リードデータバス(IP_RD[31:0])に対して、暗号処理回路120から処理結果データ(32ビット)が出力され、IPsec制御回路110で読み込まれる。このとき、アドレス信号(IP_A)が「1」であるため、リードデータバス(IP_RD[31:0])には、第2データレジスタ内のデータが出力される。
【0195】
時刻t18(時刻t17の1周期後)に、リードストローブ信号(IP_RDX)がディアサートされ、IPsec制御回路110によりアドレス信号(IP_A)が「1」に設定される。
【0196】
時刻t19(時刻t18の1周期後)に、リード要求信号(DREQ_RD)がディアサートされる。同時に、リードデータバス(IP_RD[31:0])へのデータ出力が停止する。
【0197】
時刻t20(時刻t19の1周期後)に、ライト要求信号(DREQ_WR)がアサートされ、続くデータのDES処理が行われる。
図25は、IPsec制御回路と暗号処理回路との間のバスの動作波形を示すタイミングチャートである。図25では、上段にIPsec制御回路110側の端子における信号が示されており、下段に暗号処理回路120側の端子における信号および暗号処理回路120の内部データが示されている。なお、この例は、ハッシュ関数処理回路130によるSHA1処理に関する動作波形である。
【0198】
IPsec制御回路110の信号としては、ライトストローブ信号(IP_WRX[1])、ライトデータバス(IP_WD[31:0])、およびライト要求信号(DREQ_WR)が示されている。
【0199】
ハッシュ関数処理回路130の信号としては、ライトストローブ信号(IP_WRX[1])、ライトデータバス(IP_WD[31:0])、第1データレジスタ値(WO[31:0])、第16データレジスタ値(W15[31:0])、演算開始信号(hash_start)、演算中ステータス(HSTA)、およびライト要求信号(DREQ_WR)が示されている。
【0200】
ライトストローブ信号(IP_WRX[1])に応じて、IPsec制御回路110からのデータが512ビットデータレジスタ群134を構成する16個のデータレジスタに書き込まれる。全16個のデータレジスタにデータが書き込まれると、データセット完了と認識され、演算開始信号(hash_start)がアサートされ、演算中ステータス(HSTA)がオンに設定される。演算終了時は、80進カウンタ132で終了回数を示したとき演算終了信号が出力され、演算中ステータス(HSTA)がオフとなる。
【0201】
なお、512ビットデータレジスタ群134を構成する各データレジスタはシフトレジスタで構成されている。すなわち、毎回、第1データレジスタに書き込みが行われ、ライトストローブ信号が入力される毎に各データレジスタの値がそれぞれ次の段のデータレジスタにシフトされる。そのため、512ビットデータレジスタ群134内の任意のデータレジスタのアドレスを識別するための信号は不要となる。
【0202】
なお、ハッシュ関数処理回路130からIPsec制御回路110へのデータリクエストを示すデータ要求信号(DREQ_WR)は、ハッシュ関数処理回路130が演算中でないときにアサートされる。具体的には、まず演算前にデータ要求信号(DREQ_WR)がアサートされている。そして、512ビットデータレジスタへのデータ書き込み終了後にディアサートされる。演算が終了すると、再びデータ要求信号(DREQ_WR)がアサートされる。
【0203】
ところで、ハッシュ関数処理回路130内部には、図17に示すように演算結果格納用のハッシュ値格納レジスタ131と、ハッシュ演算用の512ビットデータレジスタ群134とが存在する。ハッシュ関数はアルゴリズムの構成上、処理単位を512ビット倍数にパディングし、必ず処理単位は最低一回以上の何回かのハッシュ関数処理を重ねて終了する。
【0204】
最初はアルゴリズム固有の定数をハッシュ値として演算に使用し、二回目以降前の演算結果を演算途中結果と加算して演算結果となり、ハッシュ関数処理回路内部レジスタに格納される。パケット認証の場合、1パケット分の処理が終わればハッシュ処理は終了で、最後にハッシュ関数内部のハッシュ値格納レジスタをリードすればよい。IPsec制御回路110は演算対象データ書き込みのみを行うため、IPsec制御回路110からハッシュ関数処理回路130へライトデータを運ぶ専用のライトデータバス(IP_WD[31:0])が設けられている。
【0205】
以下に、図25に示す信号の変化を時系列で詳細に説明する。
まず、時刻t31にデータ要求信号(DREQ_WR)がディアサートされる。
時刻t32(時刻t31の1周期後)に、ライトストローブ信号(IP_WRX[0])がアサートされると共に、IPsec制御回路110によりライトデータバス(IP_WD[31:0])に処理対象データが出力される。
【0206】
時刻t33(時刻t32の1周期後)に、ライトデータバス(IP_WD[31:0])を介して出力された処理対象データが第1データレジスタ(WO[31:0])に設定される。
【0207】
時刻t34(時刻t33の1周期後)に、ライトストローブ信号(IP_WRX[0])がディアサートされると共に、ライトデータバス(IP_WD[31:0])への処理対象データの出力が停止する。
【0208】
その後、データが繰り返し転送される。16回のデータ転送が行われる。
16回目のデータ転送開始の時刻t41に、ライトストローブ信号(IP_WRX[0])がアサートされると共に、IPsec制御回路110によりライトデータバス(IP_WD[31:0])に処理対象データが出力される。
【0209】
時刻t42(時刻t41の1周期後)に、ライトデータバス(IP_WD[31:0])を介して出力された処理対象データが第1データレジスタ(W0[31:0])に設定される。同時に、512ビットデータレジスタ群134内のデータが順次シフトされ、第16データレジスタ値(W15[31:0])に、最初に転送された32ビットのデータが格納される。
【0210】
時刻t43(時刻t42の1周期後)に、ライトストローブ信号(IP_WRX[1])がディアサートされると共に、ライトデータバス(IP_WD[31:0])への処理対象データの出力が停止する。このとき、16回のデータ書き込み完了が認識され、演算開始信号(hash_start)がアサートされる。
【0211】
時刻t44(時刻t43の1周期後)に、演算ステータス(HSTA)がオンに設定され、演算開始信号(hash_start)がディアサートされる。
時刻t45(時刻t44の1周期後)に、データ要求信号(DREQ_WR)がアサートされ、ハッシュ関数処理が実行される。
【0212】
演算回数が80回に達するとハッシュ関数処理完了と判断され、その時刻t51に演算ステータス(HSTA)がオフに設定される。
時刻t52(時刻t51の1周期後)に、データ要求信号(DREQ_WR)がディアサートされる。
【0213】
以上のように、セキュリティネットワークコントローラ100によれば、IPsec制御回路110が暗号処理回路120やハッシュ関数処理回路130へのデータの入出力を行うため、CPU101の処理負荷が減少する。
【0214】
なお、通信データの暗号化の範囲や認証範囲は、通信プロトコルによって異なる。
図26は、トランスポートモードESPの暗号化範囲と認証範囲とを示す図である。図26(A)はIPv4のパケットを示し、図26(B)はIPv6のパケットを示す。
【0215】
IPv4のパケット50は、IPヘッダ51、ESPヘッダ52、TCPヘッダ53、データ54、ESPトレーラ55、ESP認証ヘッダ56で構成される。そのうち、TCPヘッダ53、データ54、ESPトレーラ55が暗号化範囲である。また、ESPヘッダ52、TCPヘッダ53、データ54、ESPトレーラ55が認証範囲である。
【0216】
IPv6のパケット60は、IPv6ヘッダ61、経路制御ヘッダ62、ESPヘッダ63、終点オプションヘッダ64、TCPヘッダ65、データ66、ESPトレーラ67、ESP認証ヘッダ68で構成される。そのうち、終点オプションヘッダ64、TCPヘッダ65、データ66、ESPトレーラ67が暗号化範囲である。また、ESPヘッダ63、終点オプションヘッダ64、TCPヘッダ65、データ66、ESPトレーラ67が認証範囲である。
【0217】
たとえばトランスポートモードESPを用いる際のパケット生成時には、範囲の情報に関して、鍵付きハッシュ関数(HMAC−SHA1,HMAC−MD5)を用いた認証処理が行われる。
【0218】
図27は、AHの認証範囲を示す図である。AHのパケット70の構成は、IPv4、IPv6、共に同じである。AHのパケット70は、IPヘッダ71、AHヘッダ72、TCPヘッダ73、データ74で構成される。AHのパケット70では、全てが認証範囲となる。すなわち、パケット全体の鍵付きハッシュ関数(HMAC−SHA1,HMAC−MD5)を用いた認証処理が必要となる。
【0219】
また、最大パケットサイズはネットワークの接続媒体によって決定される。たとえば、ネットワークの接続物理媒体としてイーサネット(登録商標)と呼ばれるネットワーク(IEEE802.3)を用いた場合のIPパケットのサイズを説明する。
【0220】
なお、IEEE802.3のネットワークの一例として、1パケットの認証処理を例に発明の作用を説明する。認証処理においては、最初と最後にHMAC処理を行うため機能的には、CPUにて設定(HMAC処理かどうか、MD5/SHA1かどうかなどのモード設定)を行った後、シームレスにハードウェア処理が行われる。これにより、CPU負荷を軽減し、またハードウェアの持つパフォーマンス値を引き出すことが可能となる。また、DMAC(Direct Memory Access Controller)を用いてCPUにおいて処理を行う認証処理を独立して実行することもできる。
【0221】
図28は、IPパケットサイズを示す図である。図28に示すように、IPパケット80は、IPv6ヘッダ81、経路制御ヘッダ82、終点オプションヘッダ83、TCPヘッダ84、データ85で構成される。このような構成のIEEE802.3に従ったネットワークの最大IPパケットサイズは、約1500バイト(IPv6ヘッダ40バイト、その他1460バイト以下)である。
【0222】
認証アルゴリズムであるハッシュ関数のMD5とSHA1は、64バイト(512ビット)ブロック関数である。従って、1パケットの処理でさえ、最大約20回を超えるハッシュ処理が行われる。また、鍵管理においてもハッシュ関数が使用される。
【0223】
図29は、IKEメインモードを使用したフェーズ1を示す図である。フェーズ1は、鍵交換プロトコルの前半である。図29には、送信者(Intiator)と受信者(Responder)との間で交換されるメッセージが示されている。第1のメッセージ(Message#1)において、ISAKMP−SA(Source Address)のネゴシエーションが開始される。第2のメッセージ(Message#2)において、基本SAが承認される。第3のメッセージ(Message#3)と第4のメッセージ(Message#4)とにより、互いの鍵が交換される。第5のメッセージ(Message#5)で、送信者の身元が受信者に確認される。第6のメッセージ(Message#6)で、受信者の身元が送信者に確認される。なお、第5のメッセージ(Message#5)と第6のメッセージ(Message#6)とは、ペイロードが暗号化されている。
【0224】
IPv6で必携機能となるIPsecは、ネットワークを介して送りたいパケットを暗号・認証処理終了後、IPパケットを含むMACフレームに生成する。その後、通信インタフェースを経由して送信する。
【0225】
受信時には認証処理、復号化処理を行う。暗号処理、認証処理の範囲は、図26に示した通りであり、暗号化処理範囲は受信時には復号化処理範囲となる。認証とは、図に示した認証範囲データをハッシュ関数処理を施し、パケットの一番最後に付け加える処理である。
【0226】
IPパケットサイズの最大はネットワークの物理層としてIEEE802.3で規定されたイーサネット(登録商標)を用いる場合は、最大パケットサイズは約1500バイトである。つまり。ハッシュ関数による認証は最大約20回の処理を行い、暗号化に関しては、暗号アルゴリズムにDESや3DESを用いる場合、最大約180回の暗号処理を行う。
【0227】
また、図29に示した鍵交換プロトコルの前半であるフェーズ1の処理は、第1のメッセージから第6のメッセージまでの各メッセージの送受信で暗号処理が行われる。また、その後のフェーズ2でもSAを確立するためのセッションで多くの暗号処理、ハッシュ関数処理が行われる。たとえば、第3のメッセージと第4のメッセージでは、鍵生成のための値を交換するが、どちらも鍵生成に必要な交換値をハッシュ関数や、暗号アルゴリズムを用いて作成する。
【0228】
以上のように、暗号処理、ハッシュ関数処理は実にIPSecについて多用される。そのため、第1の実施の形態に示すようにCPUを介さないで、暗号処理やハッシュ処理(認証処理)の高速処理を実現できるようにすることによる装置全体への処理能力の向上効果が高くなる。しかも、セキュリティネットワークコントローラへのIPsec制御回路の実装は、CPUの高速化に比べ安価に実現することができ、快適な通信速度を市場ニーズに合った価格で提供することが可能となる。
【0229】
図30は、従来技術と第1の実施の形態とにおける暗号処理の性能評価結果を示す図である。これは1496バイトデータの3DES−CBC暗号処理を行った場合の例である。図30の例では、ソフトウェア的に実行した場合(暗号化手順を記述したプログラムをCPUが実行する)、CPUと暗号処理回路との組み合わせで実行した場合(CPUがデータの入出力等を制御する)、およびIPsec制御回路と暗号処理回路との組み合わせで実行した場合(第1の実施の形態に係る構成)を比較している。
【0230】
なお、ソフトウェア的な処理は、具体的には、処理手順をC言語でコード化し、フラッシュメモリに記憶させ、CPUに実行させている。また、IPsec制御回路+暗号処理回路の構成は、PLD(Programmable Logic Device)で実現したものである。
【0231】
ソフトウェア的に実行した場合、暗号化に264917μ秒、復号に264919μ秒を要している。CPU+暗号処理回路で実行した場合、暗号化に2977μ秒、復号に2979μ秒を要している。IPsec制御回路+暗号処理回路で実行した場合、暗号化に579μ秒、復号に581μ秒を要している。
【0232】
図31は、従来技術と第1の実施の形態とにおけるハッシュ関数処理の性能評価結果を示す図である。これは1500バイトデータのHMAC−SHA1ハッシュ関数処理を行った場合の例である。図31の例では、ソフトウェア的に実行した場合、CPUと暗号処理回路との組み合わせで実行した場合、およびIPsec制御回路と暗号処理回路との組み合わせで実行した場合を比較している。なお、IPsec制御回路+暗号処理回路の構成は、PLD(Programmable Logic Device)で実現したものである。
【0233】
ソフトウェア的に実行した場合、ハッシュ関数処理における暗号化に41309μ秒を要している。CPU+ハッシュ処理回路で実行した場合、ハッシュ関数処理における暗号化に2258μ秒を要している。IPsec制御回路+ハッシュ処理回路で実行した場合、ハッシュ関数処理における暗号化に297μ秒を要している。
【0234】
このように、実装評価として3DES−CBC暗号処理と、HMAC−SHA1処理とに関する処理性能を評価した。その結果、3DES−CBC暗号処理では、第1の実施の形態を適用することで従来技術であるソフトウェアによる処理の約457倍の高速化が達成されている。また、第1の実施の形態を適用することで、専用暗号回路とCPUとで処理を行わせた場合の約5倍の高速化が達成されている。
【0235】
また、HMAC−SHA1ハッシュ関数処理では、第1の実施の形態を適用することで、ソフトウェアによる処理の約139倍の高速化が達成されている。また、第1の実施の形態を適用することで、専用ハッシュ関数処理回路とCPUとにより処理を行わせた場合の約8倍の高速化が達成されている。
【0236】
このように、第1の実施の形態によれば、安全なデータ通信を非常に高速に行うことができる。したがって、動画データをストリーミング配信する場合であっても、セキュアなデータを安定して送受信することができる。
【0237】
しかも、暗号処理回路120とハッシュ関数処理回路130とは、入力されたデータの量を監視しており、所定量のデータの書き込みが行われると暗号処理や認証処理を自動的に開始するため、CPU等に負荷をかけずに処理を開始することができる。これは、ストリーミングのように処理対象のデータが連続して入力される場合に特に有効である。
【0238】
さらに、暗号処理回路120やハッシュ関数処理回路130はハードウェアマクロの処理開始タイミングを自動認識し、IPsec制御回路110は暗号処理及び認証処理対象のデータをCPU101の代わりに専用のバスを介して間隔をあけずに供給する。これにより、暗号処理や認証処理がシームレスに実現され、暗号処理回路120とハッシュ関数処理回路130との処理能力を最大限に引き出すことができる。
【0239】
その結果、低パフォーマンス(たとえば、動作周波数が低い)のCPUを用いる場合でも、ストリーミングが考慮された高速処理を実現できる。低速のCPUを用いれば、低消費電力化や、低コストでの製造が容易となる。
【0240】
また、CPU101のワークメモリ領域を大量に占有しないため、CPU101による他の処理の処理効率が向上する。また、暗号処理や認証処理のためのCPU占有率が軽減されるため、システムとして機能させる際にも確実なパフォーマンスを保障することができる。また、IPsecを使用した快適な通信速度を持つネットワークサービスが可能となる。
【0241】
[第2の実施の形態]
第2の実施の形態は、暗号処理とハッシュ関数処理との並列処理を可能としたものである。
【0242】
図32は、第2の実施の形態のシステム構成例を示す図である。第2の実施の形態にかかるセキュリティネットワークコントローラ200は、CPU201,通信インタフェース202,メモリコントローラ203、外部接続インタフェース204、複数のIPsec制御回路211〜214、複数の暗号処理回路221〜224、および複数のハッシュ関数処理回路231〜234を有しており、これらの要素がバス209を介して接続されている。
【0243】
IPsec制御回路211は、暗号処理回路221とハッシュ関数処理回路231とに、それぞれ専用のバスで接続されている。IPsec制御回路212は、暗号処理回路222とハッシュ関数処理回路232とに、それぞれ専用のバスで接続されている。IPsec制御回路213は、暗号処理回路223とハッシュ関数処理回路233とに、それぞれ専用のバスで接続されている。IPsec制御回路214は、暗号処理回路224とハッシュ関数処理回路234とに、それぞれ専用のバスで接続されている。
【0244】
通信インタフェース202は、インターネット91を介して端末装置92に接続されている。メモリコントローラ203は、メモリ205に接続されている。外部接続インタフェース204は、カメラシステム240内のメインCPU241に接続されている。メインCPU241は、カメラシステム240内の他の回路242,243やカメラ機構部245を制御する。
【0245】
このように、第2の実施の形態では、暗号処理および認証処理を行うための回路が多重化されている。図32の例では、それぞれの回路が4個ずつ設けられている。
【0246】
処理対象のデータは、複数のIPsec制御回路211〜214に分配される。各IPsec制御回路211〜214は、分配されたデータの暗号処理またはハッシュ関数処理を制御する。
【0247】
このように回路を多重化することで、暗号処理やハッシュ関数処理対象のデータが大量である場合に、高速に処理することができる。また、転送速度の非常に高い性能が要求される場合(プリンタ画像転送など、500〜1000Mbpsなど)にも、回路を多重化させることで、所望の処理速度を得ることができる。なお、CPU201の処理性能を向上させれば処理性能は向上するが、CPU201の高速化は非常に高度な製造技術が必要となり、高価な回路になってしまう。図32のように、暗号処理やハッシュ関数処理の回路を多重化すれば、高いパフォーマンスを持たないCPUでも暗号処理やハッシュ関数処理を並行に行うことができ、1パケット分の処理が高速化される。概算すると、多重化しない回路よりも4倍速くなる。
【0248】
なお、上記の各実施の形態では、カメラシステム10,240にセキュリティネットワークコントローラ100,200を実装した場合の例を示しているが、端末装置30,92側にも同様のセキュリティネットワークコントローラを実装することができる。
【0249】
また、カメラシステム10等の制御対象機器に対してセキュリティネットワークコントローラ100が外部接続されていてもよい。このようなシステムによって、入力手段を持たなくても、インターネット20を介したカメラシステム10の制御が可能となる。しかも、既存の回路を変更せずに、上記実施の形態に係るセキュリティネットワークコントローラを組み込むだけで、快適な通信速度で、安全にインターネットを介して様々な機器とネットワーク接続、IPsec機能を用いたセキュアで便利なサービスが実現できる。
【0250】
また、上記の実施の形態は、送受信するデータに関し、暗号処理(暗号化または復号)および認証処理(たとえば、ハッシュ関数処理)を行う場合の例であるが、暗号処理と認証処理との何れか一方の処理のみを行うセキュリティネットワークコントローラであってもよい。暗号処理のみを行うセキュリティネットワークコントローラにおいては、ハッシュ関数処理回路は不要となる。また、認証処理のみを行うセキュリティネットワークコントローラにおいては、暗号処理回路は不要となる。
【0251】
また、上記の実施の形態では、処理対象のデータを一旦メモリに格納し、そのメモリからDMA転送によりIPsec制御回路110がデータを取得しているが、IPsec制御回路110内に十分な容量の内蔵メモリが有る場合、処理対象のデータを通信インタフェース105等から直接IPsec制御回路110に格納することもできる。
【0252】
(付記1) データを保障するための処理を行うデータ保障装置において、
処理対象データを取得するデータ取得回路と、
入力されたデータの暗号処理を行う暗号処理回路と、
前記データ取得回路に第1のバスを介して接続されると共に前記暗号処理回路に対して第2のバスを介して接続されており、前記データ取得回路が取得した前記処理対象データを前記第1のバス経由で取得して内蔵メモリに格納し、前記処理対象データを前記第2のバス経由で前記暗号処理回路に入力し、前記暗号処理回路から前記第2のバス経由で暗号処理実行後の処理結果データを取得するデータ入出力制御回路と、
を有することを特徴とするデータ保障装置。
【0253】
(付記2) 前記データ入出力制御回路は、前記第1のバスのダイレクトメモリアクセスコントローラを有しており、前記処理対象データを前記データ取得回路からダイレクトメモリアクセス転送によって取得することを特徴とする付記1記載のデータ保障装置。
【0254】
(付記3) 前記第1のバスに接続され、前記データ取得回路が取得した前記処理対象データを記憶する記憶装置をさらに有し、
前記データ入出力制御回路は、前記記憶装置から前記処理対象データを取得することを特徴とする付記1記載のデータ保障装置。
【0255】
(付記4) 前記処理対象データを前記内蔵メモリに格納した後、前記処理対象データを前記暗号処理の処理単位となる単位データ長に分割して、前記暗号処理回路に入力することを特徴とする付記1記載のデータ保障装置。
【0256】
(付記5) 前記内部記憶装置は少なくとも2つの領域に分けられており、第1の領域に格納された前記処理対象データが前記暗号処理回路で処理されている間に、第2の領域に後続の前記処理対象データを格納することを特徴とする付記4記載のデータ保障装置。
【0257】
(付記6) 前記内蔵メモリは、暗号処理の前記単位データ長に相当する記憶容量単位の領域に分割されていることを特徴とする付記5記載のデータ保障装置。
【0258】
(付記7) 前記データ入出力制御回路は、ストリーミングで順次提供される前記処理対象データを、取得順に前記暗号処理回路に入力し、暗号処理が行われた処理結果データを取得する毎に出力することを特徴とする付記1記載のデータ保障装置。
【0259】
(付記8) 前記暗号処理回路は、入力された処理対象データの容量を検知し、所定の容量に達したときに前記処理対処データに対する暗号処理を実行することを特徴とする付記1記載のデータ保障装置。
【0260】
(付記9) 前記暗号処理回路が複数設けられ、複数の前記データ入出力制御回路が各前記暗号処理回路に個別に対応づけて接続されており、複数の前記データ入出力制御回路が前記処理対象データを分割して取得し、対応する前記暗号処理回路に対して並列に入力することを特徴とする付記1記載のデータ保障装置。
【0261】
(付記10) 入力されたデータの認証処理を行う認証処理回路を更に有し、前記データ入出力制御回路は前記認証処理回路に対して第3のバスを介して接続されており、暗号化対象である前記処理対象データを前記暗号処理に入力し、認証対象である前記処理対象データを前記認証処理回路に入力することを特徴とする付記1記載のデータ保障装置。
【0262】
(付記11) データを保障するための処理を行うデータ保障装置において、
処理対象データを取得するデータ取得回路と、
入力されたデータの認証処理を行う認証処理回路と、
前記データ取得回路に第1のバスを介して接続されると共に前記認証処理回路に対して第2のバスを介して接続されており、前記データ取得回路が取得した前記処理対象データを前記第1のバス経由で取得して内蔵メモリに格納し、前記処理対象データを前記第2のバス経由で前記認証処理回路に入力するデータ入出力制御回路と、
を有することを特徴とするデータ保障装置。
【0263】
(付記12) 保障されたデータをネットワークを介して送受信するデータ通信装置において、
送信データを生成するメインCPUと、
入力されたデータを暗号化する暗号処理回路と、
入力されたデータを前記ネットワークを介して送信する通信回路と、
前記メインCPUと前記通信回路に第1のバスを介して接続されると共に前記暗号処理回路に対して第2のバスを介して接続されており、前記メインCPUが取得した前記送信データを前記第1のバス経由で取得して内蔵メモリに格納し、前記送信データを前記第2のバス経由で前記暗号処理回路に入力し、前記暗号処理回路から前記第2のバス経由で暗号化後の暗号データを取得し、前記通信回路に対して入力するデータ入出力制御回路と、
を有することを特徴とするデータ通信装置。
【0264】
(付記13) 保障されたデータをネットワークを介して送受信するデータ通信装置において、
受信データを処理するメインCPUと、
入力されたデータを復号する暗号処理回路と、
前記ネットワークを介して送られた受信データを取得する通信回路と、
前記メインCPUと前記通信回路に第1のバスを介して接続されると共に前記暗号処理回路に対して第2のバスを介して接続されており、前記通信回路が取得した前記受信データを前記第1のバス経由で取得して内蔵メモリに格納し、前記受信データを前記第2のバス経由で前記暗号処理回路に入力し、前記暗号処理回路から前記第2のバス経由で復号後の平文データを取得し、前記メインCPUに対して入力するデータ入出力制御回路と、
を有することを特徴とするデータ通信装置。
【0265】
(付記14) データを保障するためのデータ保障方法において、
データ取得回路で取得した処理対象データを、データ入出力制御回路が第1のバス経由で取得して内蔵メモリに格納し、
前記データ入出力制御回路が、前記処理対象データを第2のバス経由で暗号処理回路に入力し、
前記暗号処理回路が前記処理対象データの暗号処理を行い、
暗号処理実行後の処理結果データを、前記暗号処理回路から前記データ入出力制御回路に渡す、
ことを特徴とするデータ保障方法。
【0266】
(付記15) データを保障するためのデータ保障方法において、
データ取得回路で取得した処理対象データを、データ入出力制御回路が第1のバス経由で取得して内蔵メモリに格納し、
前記データ入出力制御回路が、前記処理対象データを第2のバス経由で認証処理回路に入力し、
前記認証処理回路が前記処理対象データの認証処理を行う、
ことを特徴とするデータ保障方法。
【0267】
【発明の効果】
以上説明したように本発明では、処理対象データを第1のバスを介して取得してデータ入出力制御回路の内蔵メモリに格納し、その処理対象データを、第2のバスを介して暗号処理回路に入力するようにしたため、一旦処理対象データをデータ入出力制御回路の内蔵メモリに格納した後は、CPUや第1のバスを介さずに暗号処理を行うことができ、システムを管理するCPUの処理負荷が軽減される。
【図面の簡単な説明】
【図1】実施の形態に適用される発明の概念図である。
【図2】第1の実施の形態に係るシステム構成例を示す図である。
【図3】カメラ内部の回路構成を示す図である。
【図4】データ送信の手順を示すフローチャートである。
【図5】データ配信の第1のステップを示す図である。
【図6】データ配信の第2のステップを示す図である。
【図7】データ配信の第3のステップを示す図である。
【図8】データ配信の第4のステップを示す図である。
【図9】データ配信の第5のステップを示す図である。
【図10】データ配信の第6のステップを示す図である。
【図11】データ配信の第7のステップを示す図である。
【図12】データ配信の第8のステップを示す図である。
【図13】データの受信手順を示すフローチャートである。
【図14】セキュリティネットワークコントローラの内部構成例を示す図である。
【図15】IPsec制御回路の内蔵RAMのDES処理時の構成を示す図である。
【図16】IPsec制御回路の内蔵RAMのSHA1処理時の構成を示す図である。
【図17】IPsec制御回路の内部構成を示す図である。
【図18】暗号処理回路の内部構成を示す図である。
【図19】ハッシュ関数処理回路の内部構成を示す図である。
【図20】データ暗号化時の各回路の動作を時系列で示す第1の図である。
【図21】データ暗号化時の各回路の動作を時系列で示す第2の図である。
【図22】ハッシュ値生成処理時の各回路の動作を時系列で示す図である。
【図23】IPsec制御回路と暗号処理回路との間のバスの動作波形を示す第1のタイミングチャートである。
【図24】IPsec制御回路と暗号処理回路との間のバスの動作波形を示す第2のタイミングチャートである。
【図25】IPsec制御回路と暗号処理回路との間のバスの動作波形を示すタイミングチャートである。
【図26】トランスポートモードESPの暗号化範囲と認証範囲とを示す図である。図26(A)はIPv4のパケットを示し、図26(B)はIPv6のパケットを示す。
【図27】AHの認証範囲を示す図である。
【図28】IPパケットサイズを示す図である。
【図29】IKEメインモードを使用したフェーズ1を示す図である。
【図30】従来技術と第1の実施の形態とにおける暗号処理の性能評価結果を示す図である。
【図31】従来技術と第1の実施の形態とにおけるハッシュ関数処理の性能評価結果を示す図である。
【図32】第2の実施の形態のシステム構成例を示す図である。
【符号の説明】
1 データ保障装置
1a CPU
1b データ取得回路
1c 暗号処理回路
1d 認証処理回路
1e データ入出力制御回路
1f データ出力回路
1g 第1のバス
1h 第2のバス
1i 第3のバス
2 処理対象データ
3 処理結果データ
[0001]
Field of the Invention
The present invention relates to a data security device, data communication device, and data security method for performing secure communication, and more particularly to a data security device, data communication device, and data security method capable of performing cryptographic processing by a hardware circuit.
[0002]
[Prior Art]
With the spread of the Internet, various data communications are performed via the Internet. This data communication also includes data corresponding to personal information and company secrets. Such important data is protected from unauthorized acquisition by a third party by encryption or the like.
[0003]
In encryption processing (encryption and decryption processing), the more difficult the decryption is, the more complicated the encryption algorithm. Therefore, in a system where software performs encryption processing and authentication processing, the processing load on the CPU is excessive. As a result, cryptographic processing and authentication processing greatly affected the processing power of the entire system.
[0004]
In particular, in the next-generation Internet protocol IPv6 (Internet Protocol version 6), IPsec, which is an optional function in IPv4 (Internet Protocol version 4), is defined as a must-have function. IPsec is a protocol obtained by adding a security function to TCP / IP (Transmission Control Protocol / Internet Protocol). By applying IPsec, security of communication over LAN (Local Area Network), private or public WAN (Wide Area Network), and even over the Internet can be secured.
[0005]
IPsec is roughly divided into three protocols of Internet Key Exchange (IKE), Encapsulating Security Payload (ESP), and Authentication Header (AH), and encryption processing is applied to all of them.
[0006]
Encrypted communication by IPsec starts with obtaining an agreement of Security Association (SA) including key exchange. In IPsec, "IKE" is defined as a key exchange protocol capable of automatically obtaining SA agreement. By using IKE, it is possible to make an agreement of SA automatically. There are several other key exchange protocols, but in IPsec, IKE created based on the key exchange protocol "ISAKMP / Oakley" has become the standard.
[0007]
By the way, if the content of communication data leaks to a third party at the stage of this key exchange, the encrypted communication by IPsec thereafter does not make any sense. Also, since IPsec encryption is effective only after key exchange is complete, IKE itself can not afford to use IPsec. So IKE itself supports encrypted communication.
[0008]
A key exchange procedure for IKE is also defined for IKE's own encrypted communication, so IKE consists of two stages in total. First, in phase 1, an encryption algorithm to be used in phase 2 is determined, and an encryption key is generated. After sharing the encryption key, it can be used to advance to phase 2 and enable IKE-limited encrypted communication. Subsequently, the negotiation for encrypted communication by IPsec is started.
[0009]
In the negotiation for encrypted communication, various information necessary for communication by IPsec such as determination of an encryption algorithm and exchange of an encryption key are sequentially exchanged. Thereafter, encrypted communication of data can be performed.
[0010]
After the protocol "ESP" negotiation used for data transfer is completed, the parties begin communication with the encrypted packet. In IPsec, encryption is performed for each packet, and is packed and transmitted in a container called "ESP". In IPsec, two methods of “transport mode” and “tunnel mode” are provided depending on the portion to be encrypted.
[0011]
In transport mode, only the data part carried by IP packet is encrypted, and it is sent with an IP header specifying the destination etc. On the other hand, in the tunnel mode, the combination of the IP header and the data portion received once from other hosts is collectively encrypted, and then the IP header is newly added and transmission is performed.
[0012]
In addition, there is an authentication process as a technology for preventing falsification of communication data. In the authentication process, authentication data is generated to prove that the content of the communication data is correct.
[0013]
Authentication data is responsible for the functions of "ensure integrity" and "authentication". This content contains data called "MAC (Message Authentication Code)". The MAC is a calculation result obtained by performing an operation according to a calculation method called a hash function on a combination of communication contents and a password. The hash function generates tens to hundreds of fixed-length data from data of an arbitrary size. The hash function is a process similar to cryptographic process, and in many cases, as one of the functions in the cryptographic process, the authentication process of the hash function is included.
[0014]
Representative examples of the above encryption processing and authentication processing algorithm include DES-CBC, 3DES-CBC, MD5, SHA1, HMAC-MD5, and HMAC-SHA1.
On the transmitting side, the combined data and password are processed by the message digest, and the result is added to the packet as authentication data in the ESP. If the data is successfully delivered to the receiver, the receiver will calculate the data and the password saved on the user side according to the same message digest as the transmission. The result is compared with the received data, and if there is no difference between the two, the data arrives without being tampered with on the way.
[0015]
The protocol "AH" for integrity and authentication is the mechanism for "assurance integrity" and "authentication". In AH, data encryption is not performed, and only SPI, sequence number, and authentication data are packed and added in a normal IP packet. The ESP alone performs the authentication function, but the reason why AH is defined is provided at least for the guarantee of completeness and the authentication for the case that encrypted communication can not be used. . A famous data authentication method is SHA1 (Secure Hash Algorithm 1) which is a hash function algorithm (see Non-Patent Document 1).
[0016]
One of the main applications of the current IPsec is the "VPN (Virtual Private Network)" using the Internet. This is for performing connection between main branches and branches in a company conventionally realized by a dedicated line or connection between LANs via the Internet. Since communication content is exposed to an unspecified number on the Internet, a mechanism for protecting data to be transmitted is required. Therefore, we use IPsec for VPN. Then, while the usage charge is much cheaper than the dedicated line, it is possible to realize the confidentiality of communication similar to the dedicated line.
[0017]
At present, there are many products that use IPsec mainly for VPN. The form of the product may be a dedicated encryption device or an additional function of a router or firewall product. By installing such a product at the entrance of the Internet access line at each site and using IPsec in the tunnel mode described above, it becomes possible to encrypt all communication between sites. In addition, recently, since a commercially available operating system (OS) has supported IPsec as a standard, encrypted communication between SOHOs (Small Office / Home Office) or between home and office is becoming available. In the future, as the Internet becomes established as a social infrastructure, security has become an indispensable technology regardless of the position as a user such as an individual or a company. Therefore, IPsec is a very promising technology.
[0018]
Software processing by a CPU is known as a general method of configuring a keyed-hashing for message authentication code (HMAC) message authentication function using a specific hash function, and encryption processing, processing by a hash function in general, and software processing by a CPU. In this case, the cryptographic processing is heavy computational load for the CPU, and the low-performance CPU takes too much time for processing because the process of product-sum operation, bit transposition conversion, exclusive logical ring processing, and bit shift are frequently used. It is also difficult to guarantee the treatment. On the other hand, high-performance CPUs can process at a sufficiently high speed, but the price and power consumption are high, and stable operation as a system is difficult. Also, high performance CPUs are expensive and can not be used for inexpensive products that can only incorporate low performance CPUs.
[0019]
The speed of software encryption is completely dependent on CPU occupancy and CPU processing power. As a result, the speed is not sufficient, and the processing speed is further reduced and the processing becomes more difficult under the situation where it is combined with other processing. For example, when performing IPsec, a low-performance CPU takes too much time to process, and it is also difficult to guarantee normal protocol processing. A high-performance CPU can process at a sufficiently high speed, but the price and power consumption are high, and the system does not operate stably. As a result, the implementation of IPsec has been difficult for practical performance and price, especially for embedded products with CPUs that do not have high performance.
[0020]
As described above, according to the conventional technology, encryption processing takes time, and streaming processing can not be realized at a speed comfortable for the user. Processing of large data such as cryptographic processing, authentication processing, IP packet encryption, and authentication used in IPsec key exchange has taken a huge amount of time.
[0021]
In addition, an LSI (Large Scale Integration) chip dedicated to cryptographic processing can also be used for speeding up. Similar to the cryptographic processing circuit, the hash function processing can also be realized by the circuit (for example, see Patent Document 1 and Patent Document 2). Further, a stream encryption device used for IPsec is also considered (see, for example, Patent Document 3).
[0022]
By incorporating such a dedicated circuit in the system, performance, cost, and power consumption can be improved as compared with processing using software. Also, there is no need to use extra memory for memory copy such as software operation.
[0023]
[Patent Document 1]
Japanese Patent Application Publication No. 11-500241
[Patent Document 2]
JP 2001-175605 A
[Patent Document 3]
Japanese Patent Application Publication No. 2003-32244
[Non-patent document 1]
Bruce Schneier "Applied Cryptography (Second Edition)", 1996, John Wiely & Sons, Inc. P265-P278, P429-P459
[0024]
[Problems to be solved by the invention]
However, in the prior art, the CPU intervenes in data input / output to the dedicated circuit. That is, in such a dedicated circuit, the CPU must write and read the dedicated circuit internal register for each number of processing blocks. Therefore, the CPU is bothered by the register read / write. The worse the performance at this point, the greater the throughput.
[0025]
Further, the conventional circuit is provided with a control register inside, and after the register write of the data to be encrypted / decrypted is finished, the encryption operation start bit is turned ON to start processing. Therefore, it is not suitable for streaming processing.
[0026]
As described above, the processing speed depends completely on the CPU occupancy rate and the processing capacity of the CPU due to the large number of processes involving the CPU. Therefore, it is considered that the capability of the dedicated circuit can not be fully exhibited, and that the processing speed is further reduced and the processing difficulty is further increased under the situation where it is combined with other processing.
[0027]
For the above reasons, it is necessary to realize dedicated circuits and systems that can realize comfortable communication speed with circuits that can be manufactured inexpensively.
The present invention has been made in view of these points, and it is an object of the present invention to provide a data security device, a data communication device, and a data security method that can perform cryptographic processing at high speed regardless of CPU processing performance. I assume.
[0028]
[Means for Solving the Problems]
In the present invention, in order to solve the above problems, a data security apparatus 1 as shown in FIG. 1 is provided. The data security apparatus 1 according to the present invention performs processing for securing data. The data security device 1 at least includes a data acquisition circuit 1b, an encryption processing circuit 1c, and a data input / output control circuit 1e. The data acquisition circuit 1 b acquires the processing target data 2. The cryptographic processing circuit 1 c performs cryptographic processing of the input data. The data input / output control circuit 1e is connected to the data acquisition circuit 1b via the first bus 1g and to the encryption processing circuit 1c via the second bus 1h, and the data acquisition circuit 1b is The acquired processing object data 2 is acquired via the first bus 1g and stored in the built-in memory, and the processing object data 2 is input to the encryption processing circuit 1c via the second bus 1h, and the encryption processing circuit 1c transmits the second processing information The processing result data 3 after the execution of the encryption processing is acquired via the bus 1h.
[0029]
According to such a data security device 1, the processing target data 2 is acquired by the data input / output control circuit 1e via the first bus 1g and temporarily stored in the built-in memory. Thereafter, the data to be processed 2 is input to the encryption processing circuit 1c through the second bus 1h by the data input / output control circuit 1e. The processing result data 3 is acquired by the data input / output control circuit 1 e via the second bus 1 h.
[0030]
Further, according to the present invention, in order to solve the above problems, in a data communication apparatus that transmits and receives guaranteed data via a network, a main CPU that generates transmission data, and an encryption processing circuit that encrypts input data. A communication circuit for transmitting input data via the network, a first bus connected to the main CPU and the communication circuit, and a second bus for the encryption processing circuit It is connected, the transmission data acquired by the main CPU is acquired via the first bus and stored in a built-in memory, and the transmission data is input to the encryption processing circuit via the second bus, And a data input / output control circuit for acquiring encrypted data after encryption from the encryption processing circuit via the second bus and inputting the encrypted data to the communication circuit. The data communication apparatus is provided, wherein.
[0031]
According to such a data communication apparatus, transmission data generated by the main CPU is acquired by the data input / output control circuit via the first bus, and transmission data is encrypted by the data input / output control circuit via the second bus It is input to the processing circuit. The transmission data is acquired by the data input / output control circuit via the second bus, and the transmission data is passed to the communication circuit via the first bus by the data input / output control circuit.
[0032]
Further, in order to solve the above problems, in the data security method for securing data, the data input / output control circuit acquires the processing target data acquired by the data acquisition circuit via the first bus and stores it in the internal memory. The data input / output control circuit inputs the data to be processed into the cryptographic processing circuit via the second bus, and the cryptographic processing circuit performs cryptographic processing on the data to be processed, and processing after execution of the cryptographic processing A data security method is provided, wherein result data is passed from the cryptographic processing circuit to the data input / output control circuit.
[0033]
According to such a data security method, the processing target data acquired by the data acquisition circuit is acquired by the data input / output control circuit via the first bus. Next, the data to be processed is input to the encryption processing circuit via the second bus by the data input / output control circuit. Then, cryptographic processing of the processing target data is performed by the cryptographic processing circuit, and processing result data after execution of the cryptographic processing is transmitted from the cryptographic processing circuit to the data input / output control circuit.
[0034]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
First, the outline of the invention applied to the embodiment will be described, and then the specific contents of the embodiment will be described.
[0035]
FIG. 1 is a conceptual view of the invention applied to the embodiment. The data security device 1 includes a central processing unit (CPU) 1a, a data acquisition circuit 1b, an encryption processing circuit 1c, an authentication processing circuit 1d, a data input / output control circuit 1e, and a data output circuit 1f. The CPU 1a, the data acquisition circuit 1b, the data input / output control circuit 1e, and the data output circuit 1f are mutually connected by a first bus 1g. The cryptographic processing circuit 1c and the data input / output control circuit 1e are connected by a second bus 1h. The authentication processing circuit 1d and the data input / output control circuit 1e are connected by a third bus 1i.
[0036]
The CPU 1a controls the entire data security device 1. The data acquisition circuit 1 b acquires the processing target data 2. For example, it receives data input via a network. When the CPU 1a receives the authentication data from the authentication processing circuit 1d, the CPU 1a performs processing such as authentication of the process target data 2 and addition of the authentication data to the process result data 3.
[0037]
The cryptographic processing circuit 1 c performs cryptographic processing of the input data. Cryptographic processing is data encryption processing or decryption processing. For example, encryption processing is performed on data to be transmitted via a wide area network such as the Internet. Also, when encrypted data is received, decryption processing is performed.
[0038]
The authentication processing circuit 1d performs data authentication processing. The authentication process is, for example, a process of generating authentication data such as a hash value based on a hash function. The generated authentication data is, for example, passed to the CPU 1a.
[0039]
The data input / output control circuit 1e controls input / output of data to the encryption processing circuit 1c and the authentication processing circuit 1d. Specifically, the data input / output control circuit 1e acquires the processing target data 2 acquired by the data acquisition circuit 1b via the first bus 1g, and stores it in the built-in memory. When the cryptographic processing is necessary, the data input / output control circuit 1e inputs the processing target data 2 to the cryptographic processing circuit 1c via the second bus 1h. Thereafter, the data input / output control circuit 1e acquires the processing result data 3 after the execution of the cryptographic processing from the cryptographic processing circuit 1c via the second bus 1h. When the authentication process is required, the data input / output control circuit 1e inputs the data to be processed 2 to the encryption processing circuit 1c via the third bus 1i. Data input / output control circuit 1 e passes processing result data 3 to data output circuit 1 f.
[0040]
Note that, by incorporating a DMA (Direct Memory Access) controller in the data input / output control circuit 1e, data can be delivered via the first bus 1g by DMA.
[0041]
The data output circuit 1 f outputs the received processing result data 3. When the processing result data 3 is encrypted data, authentication data such as a hash value is added to the processing result data 3 under the control of the CPU 1a or the like.
[0042]
In the data security device 1 having such a configuration, the following processing is performed. In the process performed by the data security device 1, a process of enhancing the security of plaintext data by encryption etc. and outputting it, and a process of converting contents into a data format that can be referred to by decryption of encrypted data etc There is.
[0043]
First, the process of encrypting and outputting plaintext data will be described. When the processing object data 2 in plaintext is received by the data acquisition circuit 1b, the data input / output control circuit 1e acquires the processing object data 2 and stores it in the built-in memory. Then, the data to be processed 2 stored in the built-in memory is input to the encryption processing circuit 1c by the data input / output control circuit 1e. Then, the processing object data 2 is encrypted by the encryption processing circuit 1c and is passed to the data input / output control circuit 1e.
[0044]
The encrypted processing result data 3 is passed to the authentication processing circuit 1d by the data input / output control circuit 1e. Then, authentication processing is performed by the authentication processing circuit 1d. For example, authentication data such as a hash value is generated. The processing result data 3 is passed to the data output circuit 1 f by the data input / output control circuit 1 e. Then, the authentication data is added to the processing result data 3 by the data processing of the CPU 1a and the like, and is output from the data output circuit 1f.
[0045]
Next, processing in the case of decrypting and outputting encrypted data will be described. When the encrypted data to be processed 2 (assuming authentication data is attached) is received by the data acquisition circuit 1b, the data input / output control circuit 1e acquires the data to be processed 2 and stores it in the built-in memory. Do. Then, the data to be processed 2 stored in the built-in memory is input to the authentication processing circuit 1 d by the data input / output control circuit 1 e. Then, authentication processing is performed by the authentication processing circuit 1d. For example, authentication data such as a hash value is generated. The generated authentication data is compared with the authentication data assigned to the process target data 2. The comparison process is performed by, for example, the CPU 1a.
[0046]
As a result of comparison, when it is verified that the data is correct, the data input / output control circuit 1e inputs the processing object data 2 stored in the built-in memory to the encryption processing circuit 1c. Then, the data to be processed 2 is decrypted by the cryptographic processing circuit 1c and passed to the data input / output control circuit 1e. The processing result data 3 decrypted into the plaintext is passed to the data output circuit 1 f by the data input / output control circuit 1 e. Then, the processing result data 3 is output from the data output circuit 1 f.
[0047]
As described above, when the processing target data is once stored in the built-in memory of the data input / output control circuit 1e when performing the encryption processing and the authentication processing, the second bus different from the first bus 1g to which the CPU 1a is connected is used. Data can be input / output to / from the encryption processing circuit 1c and the authentication processing circuit 1d via the bus 1h and the third bus 1i. As a result, it is not necessary for the CPU 1a to manage data input / output with respect to the cryptographic processing circuit 1c and the authentication processing circuit 1d, and the processing load on the CPU 1a is reduced.
[0048]
Moreover, by incorporating the DMA controller in the data input / output control circuit 1e, acquisition of the processing target data 2 performed via the first bus 1g and delivery of the processing result data 3 are under the control of the data input / output control circuit 1e. Can be done with For example, when the processing target data 2 has a large capacity, the processing target data 2 can be stored in advance in another memory, and the data input / output control circuit 1e can acquire the processing target data 2 from the memory by DMA transfer. The data input / output control circuit 1e can also transfer the processing result data 3 to another memory by DMA transfer. As a result, the processing load on the CPU 1a is further reduced.
[0049]
A data communication device having a data security function is configured by including in the data security device 1 a communication interface having the functions of the data acquisition circuit 1b and the data output circuit 1f. Such a data communication device implements the same function as a VPN device. Hereinafter, the data security device 1 having the VPN function is referred to as a security network controller.
[0050]
When the security network controller is mounted on various electronic devices, the electronic device can easily perform secure data communication. For example, by implementing a security network controller to which the present invention is applied to a camera system (a computer system having a digital image pickup function and a function to process picked up image data), online video distribution via the Internet can be realized. , For a predetermined user (for example, a member registered in advance). In addition, it becomes possible to control the camera from a remote place safely.
[0051]
In addition, if the function of IPsec is used, secure communication can be performed with general users other than a predetermined user. That is, in IPsec, using the Internet Security Association Key Management Protocol (ISAKMP), it is possible to securely authenticate the other party and exchange keys. Therefore, if key exchange is performed by ISAKMP first, secure communication can be performed between arbitrary devices.
[0052]
Hereinafter, the embodiment of the present invention will be described in detail, taking as an example a case where a security network controller to which the present invention is applied is mounted on a camera. In the following embodiment, DES (Data Encryption Standard) is used as the encryption algorithm, and HMAC-SHA1 is used as the hash function algorithm.
[0053]
First Embodiment
FIG. 2 is a diagram showing an example of a system configuration according to the first embodiment. As shown in FIG. 2, a camera system 10 mounting a security network controller is connected to a terminal device 30 via the Internet 20. The terminal device 30 is, for example, a computer having a VPN function. Here, by mounting the security network controller in the terminal device 30 as well, encrypted communication via the Internet 20 is facilitated.
[0054]
FIG. 3 is a diagram showing a circuit configuration inside the camera. In the camera system 10, a security network controller 100, a main CPU 11, peripheral circuits 12 and 13, and a camera mechanism unit 14 are provided. The security network controller 100 has a VPN function, and can perform processing such as encryption / decryption in hardware.
[0055]
The security network controller 100 can be configured on an LSI chip. Implementing the security network controller 100 with an LSI chip facilitates incorporation into various electronic devices.
[0056]
Also, the security network controller 100 can be configured in one module (for example, a card module such as Personal Computer Memory Card International Association (PCMCIA)). Thereby, the camera system 10 and other devices can be easily mounted via a predetermined communication interface.
[0057]
The main CPU 11 controls the entire camera system 10 by controlling the peripheral circuits 12 and 13 and the camera mechanism unit 14. The circuits 12 and 13 are a focus control circuit of a camera, a compression circuit of image data, and the like. Further, the main CPU 11 transfers the digital image captured by the camera system 10 to the security network controller 100.
[0058]
The security network controller 100 includes a CPU 101, a memory controller 102, a memory 103, an external connection interface 104, a communication interface 105, an IPsec control circuit 110, an encryption processing circuit 120, and a hash function processing circuit 130. These elements are connected to one another by an internal bus or the like.
[0059]
The CPU 101 controls the entire security network controller 100.
The memory controller 102 controls input / output of data to the memory 103. The memory 103 stores data. Although FIG. 3 shows the memory 103 inside the security network controller 100, it can also be connected externally. In that case, the memory controller 102 is provided with a connector for external connection, and the memory 103 is connected to the security network controller 100 by connecting the memory 103 to the connector. As the memory 103, a semiconductor memory such as a static random access memory (SRAM) or a flash memory can be used. The memory controller 102 writes received data to the memory 103 and reads data in the memory 103. The memory 103 is also used as accumulation of processing target data and as a work memory at the time of operation.
[0060]
The external connection interface 104 is connected to the main CPU 11, and relays communication data between the main CPU 11 and the CPU 101. The external connection interface 104 basically includes a register and data, and exchanges data in both directions.
[0061]
The communication interface 105 is connected to the Internet 20 and relays communication data via the Internet 20. Here, the communication interface 105 is also referred to as MAC (Media Access Control), and has a function of realizing network connection via a physical layer such as Ethernet (registered trademark).
[0062]
The IPsec control circuit 110 controls input / output of data to the cryptographic processing circuit 120 and the hash function processing circuit 130. The cryptographic processing circuit 120 performs data encryption or decryption processing. The hash function processing circuit 130 generates a hash value based on the data to be communicated.
[0063]
In such a system configuration, the main CPU 11 controls a camera to be controlled. At that time, the main CPU 11 performs communication in a secure manner via the Internet 20 to perform control according to an instruction from a remote place or distribute an image taken by a camera via the Internet 20. IPsec is used for secure communication. The security network controller 100 can be mounted on not only a camera but also an electric appliance, a home appliance, an AV device or the like to control them.
[0064]
The communication interface 105 or the IPsec control circuit 110 has a function of reducing the load on the CPU 101 in the IPsec process. By this function, encryption and authentication processing are realized in place of the CPU 101 on a packet basis.
[0065]
For example, when transmitting data, the following processing is performed.
Data to be distributed from the main CPU 11 onto the Internet 20 is transferred to the memory 103 via the external connection interface 104. Then, an instruction for DMA transfer of the data to be encrypted is output from the CPU 101 to the IPsec control circuit 110, and the IPsec control circuit 110 acquires the data to be encrypted by DMA transfer, and passes it to the encryption processing circuit 120. The encryption processing circuit 120 performs encryption processing according to the IPsec protocol. The encrypted data is DMA-transferred to the memory 103 by the IPsec control circuit 110. Subsequently, the CPU 101 issues an instruction for DMA transfer of authentication data to the IPsec control circuit 110. Then, the IPsec control circuit 110 acquires authentication data by DMA transfer, and passes it to the hash function processing circuit 130. The hash function processing circuit 130 generates a hash value according to the IPsec protocol. Then, the CPU 101 generates a packet including the encrypted data and the generated hash value, and transmits the packet to the Internet 20 via the communication interface 105.
[0066]
If the image is distributed according to such a procedure, it is possible to distribute a video stream that can be reproduced only by a predetermined terminal device (for example, a terminal device of a user who has registered as a member).
Further, when the control data to the main CPU 11 is sent by the packet subjected to the IPsec processing via the Internet, the following processing is performed.
[0067]
The communication interface 105 receives the sent packet. The packet is written to the memory 103 under the control of the CPU 101. Then, an instruction for DMA transfer of authentication data in the packet is output from the CPU 101 to the IPsec control circuit 110. Then, the IPsec control circuit 110 acquires authentication data by DMA transfer, and passes it to the hash function processing circuit 130. The hash function processing circuit 130 generates a hash value according to the IPsec protocol. The CPU 101 authenticates the received data based on the hash value.
[0068]
If the authentication is correctly performed by the generated hash value, an instruction of DMA transfer of the encrypted data in the packet is output from the CPU 101 to the IPsec control circuit 110. Then, the IPsec control circuit 110 acquires encrypted data by DMA transfer, and passes it to the encryption processing circuit 120. The cryptographic processing circuit 120 performs decryption processing according to the IPsec protocol. The decrypted plaintext data is DMA transferred to the memory 103 by the IPsec control circuit 110. Thereafter, the decrypted data is sent to the main CPU 11 via the external connection interface 104 and processed by the main CPU 11.
[0069]
By passing control instructions of the camera to the main CPU 11 in such a procedure, camera control from a remote place can be performed safely.
Below, the procedure of data transmission and reception will be described with reference to the flowchart.
[0070]
FIG. 4 is a flowchart showing the procedure of data transmission. The process shown in FIG. 4 will be described below in the order of step numbers.
[Step S11] The main CPU 11 executes an application such as image acquisition to generate data. Pass to the security network controller 100.
[0071]
[Step S12] The data is stored in the memory 103 under the control of the CPU 101.
[Step S13] The CPU 101 performs encapsulation. Encapsulation is the wrapping of data in a header or trailer.
[0072]
[Step S14] The IPsec control circuit 110 passes the data to the encryption processing circuit 120. Then, the encryption processing circuit 120 encrypts the data. The encrypted data is returned to the memory 103 by the IPsec control circuit 110.
[0073]
[Step S15] The data encrypted by the IPsec control circuit 110 is passed to the hash function processing circuit 130. Then, the hash function processing circuit 130 generates a hash value. The generated hash value is passed to the CPU 101.
[0074]
[Step S16] The CPU 101 generates a frame for transmission.
[Step S17] The CPU 101 writes the frame to the output buffer (buffer in the communication interface 105).
[0075]
[Step S18] The communication interface 105 transmits the frame onto the Internet 20.
Hereinafter, the flow of data at the time of distributing moving image data will be described with reference to FIGS.
[0076]
FIG. 5 is a diagram showing a first step of data distribution. First, data 41 of an image captured by the camera system 10 is input from the main CPU 11 to the security network controller 100. Data 41 is received by the external connection interface 104 and transferred to the memory controller 102. Then, the data 41 is written to the memory 103 by the memory controller 102.
[0077]
FIG. 6 is a diagram showing a second step of data distribution. The IPsec control circuit 110 acquires data 41 from the memory 103 by DMA transfer.
FIG. 7 shows the third step of data distribution. The IPsec control circuit 110 passes the acquired data 41 to the cryptographic processing circuit 120. The cryptographic processing circuit 120 encrypts the data 41. Then, the cryptographic processing circuit 120 passes the encrypted data 42 to the IPsec control circuit 110. During this time, since the main bus is released, the subsequent data 43 can be received from the main CPU 11 and transferred to the memory 103.
[0078]
FIG. 8 is a diagram illustrating a fourth step of data distribution. The IPsec control circuit 110 passes the encrypted data 42 to the memory controller 102 by DMA transfer. The memory controller 102 stores the received data 42 in the memory 103.
[0079]
FIG. 9 is a diagram showing a fifth step of data distribution. The IPsec control circuit 110 acquires encrypted data 42 from the memory 103 by DMA transfer.
[0080]
FIG. 10 shows a sixth step of data distribution. The IPsec control circuit 110 passes the encrypted data 42 to the hash function processing circuit 130. The hash function processing circuit 130 applies a hash function to the data 42 to generate a hash value. During this time, since the main bus is released, the subsequent data 44 can be received from the main CPU 11 and transferred to the memory 103.
[0081]
FIG. 11 is a diagram illustrating a seventh step of data distribution. The hash function processing circuit 130 passes the generated hash value 45 to the CPU 101. The CPU 101 adds a hash value 45 to the encrypted data 42 stored in the memory 103.
[0082]
FIG. 12 is a diagram illustrating an eighth step of data distribution. The CPU 101 generates a communication packet 46 from the encrypted data 42 and the hash value 45 stored in the memory 103 and distributes the packet 46 to the terminal device 30 connected to the Internet 20 via the communication interface 105. .
[0083]
As described above, since the transfer of data between the memory 103 and the IPsec control circuit 110 is performed by the DMA function of the IPsec control circuit 110, the load on the CPU 101 can be reduced. In addition, since the IPsec control circuit 110 and the encryption processing circuit 120 are connected by a dedicated bus, and data transfer for encryption processing is performed via the dedicated bus, the main bus is divided into other data during that time. Available for transfer. Similarly, since the IPsec control circuit 110 and the hash function processing circuit 130 are connected by a dedicated bus, and data transfer for hash processing is performed via the dedicated bus, the main bus is It can be used for data transfer. As a result, processing efficiency is improved.
[0084]
FIG. 13 is a flowchart showing a data reception procedure. The process shown in FIG. 13 will be described below in order of step number.
[Step S21] The communication interface 105 receives the frame sent via the Internet 20.
[0085]
[Step S22] The packet included in the received frame is stored in the input buffer in the communication interface 105.
[Step S23] The CPU 101 performs packet header processing.
[0086]
[Step S24] The IPsec control circuit 110 passes the data to the encryption processing circuit 120. Then, the hash function processing circuit 130 generates a hash value. An authentication process is performed. The CPU 101 compares the hash value generated by the hash function processing circuit 130 with the hash value added to the received data to perform data authentication.
[0087]
[Step S25] Once authenticated, the IPsec control circuit 110 passes the data to the encryption processing circuit 120. Then, the cryptographic processing circuit 120 performs decryption processing.
[0088]
[Step S26] The CPU 101 analyzes the encapsulated data (removes the header and the trailer).
[Step S27] The CPU 101 stores data in the memory 103.
[0089]
[Step S28] The CPU 101 transfers data to the main CPU 11 via the external connection interface 104. The main CPU 11 processes data in accordance with an application program.
[0090]
The flow of data in the case of data reception is the reverse procedure of the case of data transmission shown in FIGS.
Thus, even when data is received, the IPsec control circuit 110 performs input / output of data to the cryptographic processing circuit 120 and the hash function processing circuit 130. Further, data transfer between the IPsec control circuit 110 and other circuits is performed by DMA transfer.
[0091]
Next, the connection relation and functions of the IPsec control circuit 110 and the peripheral circuits will be described in detail.
FIG. 14 is a diagram showing an example of the internal configuration of the security network controller. The security network controller 100 includes a CPU 101, a bus selector 107, an encryption processing circuit 120, a data in selector 106, an IPsec control circuit 110, a hash function processing circuit 130, a memory controller 102, and a memory 103.
[0092]
The CPU 101 is connected to the bus selector 107 via the bus 181. The CPU 101 exchanges information with other components via the bus selector 107, and controls the entire security network controller 100. Further, an external interrupt signal 190 is input to the CPU 101 from the encryption processing circuit 120, the IPsec control circuit 110, and the hash function processing circuit 130. Further, the external bus open request acceptance signal 191 is input from the IPsec control circuit 110 to the CPU 101. An external bus open request signal 192 is input from the CPU 101 to the IPsec control circuit 110 and the bus selector 107.
[0093]
The bus selector 107 is connected to the encryption processing circuit 120, the IPsec control circuit 110, the hash function processing circuit 130, and the memory controller 102 via the bus 182. Furthermore, the bus selector 107 is connected to the IPsec control circuit 110 by a dedicated bus 183. The bus selector 107 transmits data from the CPU 101 to each element connected to the bus 182 and transfers data transmitted from each element to the CPU 101 according to control from the CPU 101.
[0094]
Specifically, the bus selector 107 selects a control signal or the like output from one of the CPU 101 and the IPsec control circuit 110 that is the bus master, and outputs the control signal to another circuit. The control signal or the like to be output is, for example, an address to another circuit, a control signal, or write data.
[0095]
The cryptographic processing circuit 120 is a circuit that encrypts and decrypts data. In the first embodiment, DES encryption / decryption is performed. The cryptographic processing circuit 120 is connected to the IPsec control circuit 110 by a dedicated bus 184. Also, the cryptographic processing circuit 120 is connected to the data in selector 106 by a dedicated bus 185. The cryptographic processing circuit 120 acquires data to be encrypted or decrypted from the IPsec control circuit 110 via the bus 184. Then, it encrypts or decrypts the acquired data and passes it to the IPsec control circuit 110.
[0096]
In the first embodiment, the encryption processing circuit 120 performs 64-bit block encryption processing. When 64-bit data is written to the cryptographic processing circuit 120, the start bit of the internal processing state machine is automatically turned on. By this, it is possible to start the encryption or decryption processing immediately after writing the processing response data.
[0097]
The encryption or decryption process performed by the cryptographic processing circuit 120 is a 16-round process. Therefore, when 16 is counted by the internal counter, the end signal of the internal state machine is turned on. This end signal is output to the IPsec control circuit 110.
[0098]
The encryption processing circuit 120 can perform data encryption and decryption processing without the intervention of the IPsec control circuit 110. In that case, the encryption processing circuit 120 outputs an external interrupt signal 190 to the CPU 101 instead of turning on the end signal.
[0099]
The data in selector 106 is connected to the IPsec control circuit 110 in addition to the connection described above. Also, the data in selector 106 is connected to the hash function processing circuit 130 via the bus 187. Furthermore, the data-in selector 106 is connected to the CPU 101, the memory controller 102, and the IPsec control circuit 110 via the bus 188. The data in selector 106 selects one of the signals input from the cryptographic processing circuit 120, the IPsec control circuit 110 and the hash function processing circuit 130 via the buses 185, 186 and 187, and transmits the CPU 101 via the bus 188. , The memory controller 102, and the IPsec control circuit 110.
[0100]
The IPsec control circuit 110 is connected to the cryptographic processing circuit 120 via the bus 184 as described above, and is further connected to the hash function processing circuit 130 via the bus 189. The IPsec control circuit 110 has a 256-byte internal RAM, and can hold data to be encrypted / decrypted and data to be hashed.
[0101]
Further, the IPsec control circuit 110 incorporates a bus arbiter function by a DMAC (Direct Memory Access Controller), performs bus arbitration with the CPU 101, and can be a bus master. By becoming a bus master, the IPsec control circuit 110 can set the reception destination address for DMA transfer, the transmission destination address, the transfer amount, and the mode.
[0102]
Basically, when the bus master becomes the bus master, the IPsec control circuit 110 takes in the data before processing from the reception destination, and performs the operation of writing the data after processing in the transmission destination. Then, the IPsec control circuit 110 returns the bus right to the CPU 101 after the data transfer is completed. As described above, the IPsec control circuit 110 acquires data to be encrypted / decrypted or data to be authenticated by the hash function from the memory 103 using the DMA function using the DMAC function.
[0103]
When the data to be processed for encryption / decryption is acquired, the IPsec control circuit 110 passes the data to the encryption processing circuit 120. Thereafter, the IPsec control circuit 110 receives the data subjected to the encryption or decryption processing, and transfers the data to the memory 103 by DMA processing. When the data to be authenticated is acquired, the IPsec control circuit 110 passes the data to the hash function processing circuit 130. The IPsec control circuit 110 executes data import and export processing in parallel with the encryption / decryption processing by the encryption processing circuit 120 and the authentication processing by the hash function processing circuit 130.
[0104]
Further, the IPsec control circuit 110 has a register for storing the data length to be processed inside, subtracts the length for the end of the process for each process, and manages the remainder of the data to be processed. Then, the IPsec control circuit 110 outputs a process end interrupt signal to the CPU 101 when all the processes are completed.
[0105]
The hash function processing circuit 130 is a circuit that generates a hash value using a hash function. Specifically, the hash function processing circuit 130 generates a hash value based on the data received from the IPsec control circuit 110 and passes it to the CPU 101.
[0106]
In the first embodiment, the hash function processing circuit 130 performs 512 bit block processing. Therefore, when 512-bit data is written, the start bit of the internal processing state machine is turned on. This starts the process of generating hash values.
[0107]
In addition, the hash function processing circuit 130 performs 80 rounds of processing. Therefore, the hash function processing circuit 130 turns on the end signal of the internal state machine when 80 is counted by the internal counter. The end signal turned on is output to the IPsec control circuit 110.
[0108]
The hash function processing circuit 130 can perform data encryption and decryption processing without the intervention of the IPsec control circuit 110. In that case, an external interrupt signal 190 is output to the CPU 101 instead of the end signal.
[0109]
The memory controller 102 writes data to the memory 103 and reads data.
The memory 103 is connected to the memory controller 102. The memory 103 is a semiconductor recording medium capable of reading and writing such as SRAM and flash memory.
[0110]
In such a configuration, when the IPsec control circuit 110 and the cryptographic processing circuit 120 are combined and operated in combination, the following processing is performed.
First, the IPsec control circuit 110 outputs an external bus open request signal 192 to the CPU 101. Thereafter, the CPU 101 outputs the external bus open request acceptance signal 191, and the bus right is released to the IPsec control circuit 110. Thus, the encryption or decryption processing is started without the intervention of the CPU 101.
[0111]
The IPsec control circuit 110 acquires data from the memory 103 by DMA transfer. The acquired data is stored in the memory in the IPsec control circuit 110. The memory in the IPsec control circuit 110 has a two-sided configuration. One side stores data before encryption or decryption processing, and the other side stores data after encryption or decryption processing.
[0112]
In the first embodiment, the DES processing is performed in the encryption processing circuit 120. DES processing is performed in 64-bit units. Therefore, when the IPsec control circuit 110 acquires data from the memory 103, the DMA transfer of a data length of an integral multiple of 64 bits is performed. In the first embodiment, data of 64 bytes (for eight DES processing) is acquired at one time.
[0113]
FIG. 15 is a diagram showing a configuration at the time of DES processing of the built-in RAM of the IPsec control circuit. As shown in FIG. 15, the built-in RAM 111 of the IPsec control circuit 110 includes an A-side 111a and a B-side 111b. Processing target data (128 bytes) for 16 times of DES processing can be stored in each of the A surface 111a and the B surface 111b. The A-plane 111a is a storage area of calculation target data, and the B-plane 111b is a storage area of calculation result data.
[0114]
The data before DES processing acquired from the memory 103 by DMA transfer is stored in the A-plane 111a. For example, 64-byte data is stored in area “A0” of A-side 111 a by DMA transfer. The 64-byte data stored in the area “A0” is first passed to the cryptographic processing circuit 120 and DES processing is performed.
[0115]
While DES processing is performed on the data stored in the area "A0", the subsequent 64-byte data is stored by DMA transfer in the area "A1". When the data subjected to the DES processing is output from the cryptographic processing circuit 120, it is stored in the 64-byte area "B0" of the B surface 111b.
[0116]
Subsequently, the data stored in the 64-byte area “A1” of the A-plane 111a is transferred to the encryption processing circuit 120 and DES processing is performed. When the data subjected to the DES processing is output from the cryptographic processing circuit 120, the data is stored in the 64-byte area "B1" of the B surface 111b.
[0117]
When the processed data is stored in one of the areas “B0” and “B1” of the B surface 111 b, the data in the B surface 111 b is DMA-transferred to the memory 103 by the IPsec control circuit 110.
[0118]
When the IPsec control circuit 110 receives data, the external bus open request signal 192 is output from the IPsec control circuit 110. The IPsec control circuit 110 returns the bus right to the CPU 101 when the data acquisition is completed. At the same time, the cryptographic processing circuit 120 and the IPsec control circuit 110 start processing without intervention of the CPU 101 using the dedicated bus and the dedicated control signal. At this time, the address of the built-in RAM 111 has an increment structure. The cryptographically processed data is stored in the B side 111 b of the 128-byte internal RAM 111 of the IPsec control circuit 110. At this time, the address of the built-in RAM 111 indicating the storage destination has an increment structure. That is, an address obtained by adding a predetermined value (64 bytes) to the address at the time of the previous storage is designated.
[0119]
Every time 64-byte processing is completed, the IPsec control circuit 110 outputs an external bus open request signal 192 to the CPU 101. The IPsec control circuit 110 writes the operation processing result to the memory 103 after acquiring the bus right. When the writing is completed, the bus right is returned to the CPU 101.
[0120]
Note that the external bus open request signal 192 is output each time the 64-byte processing in the built-in RAM 111 storing the data to be calculated is completed even during the calculation by the encryption processing circuit 120. After the bus right is released to the IPsec control circuit 110, the encryption target data is fetched from the memory 103. When the acquisition of the data to be encrypted is completed, the bus right is returned to the CPU 101.
[0121]
Further, the external bus open request signal 192 is output each time 64 bytes are stored in the B surface 111 b for storing the operation end data even during the operation by the encryption processing circuit 120. After the bus right is released to the IPsec control circuit 110, the operation processing result is written to the memory 103. When the writing is completed, the bus right is returned to the CPU 101.
[0122]
On the other hand, when the IPsec control circuit 110 and the hash function processing circuit 130 are combined to perform complex processing, the built-in RAM 111 is used as a 128-byte two-sided configuration. In this case, both sides are used for writing. The hash value obtained as the operation completion data is stored in the 160-bit hash value storage register in the hash function processing circuit 130. Then, after the computation is completed, the hash value is passed from the hash value storage register to the CPU 101. In the first embodiment, SHA1 processing is performed as hash processing.
[0123]
FIG. 16 is a diagram showing a configuration at the time of SHA1 processing of the built-in RAM of the IPsec control circuit. As shown in FIG. 16, the A-side 111a and the B-side 111b of the built-in RAM 111 are each treated as one 128-byte area.
[0124]
The IPsec control circuit 110 fetches data to be processed by the hash function from the memory 103 into the built-in RAM 111 by DMA transfer. At this time, after 128 bytes of continuous writing, the bus right is returned to the CPU 103. After that, hash processing is started by the IPsec control circuit 110 and the hash function processing circuit 130 without intervention of the CPU 103.
[0125]
The IPsec control circuit 110 immediately takes in data to be processed by the hash function from the memory 103 if one side 128 bytes are empty during operation. At this time, after 128 bytes of continuous writing, the bus right is returned. The address of the built-in RAM 111 has an increment structure.
[0126]
Read data output from the IPsec control circuit 110, the encryption processing circuit 120, the hash function processing circuit 130, etc. is output to the CPU 101 or the IPsec control circuit 110 through the data-in selector 106, or through the memory controller 102. It is output to 103.
[0127]
Next, the operations of the IPsec control circuit 110, the encryption processing circuit 120, and the hash function processing circuit 130 will be described in detail.
FIG. 17 is a diagram showing an internal configuration of the IPsec control circuit. As shown in FIG. 17, the IPsec control circuit 110 has a built-in RAM 111, a built-in RAM interface 112, a register group 113, a slave bus interface 114, a master bus interface 115, and a macro interface 116.
[0128]
The built-in RAM 111 is as shown in FIG. 13 and FIG. 14, and stores processing target data and processing result data. The built-in RAM interface 112 is an interface for storing and reading data in the built-in RAM 111. The register group 113 is a plurality of general purpose registers for storing control data and the like. The slave bus interface 114 is an interface for operating as a slave on the bus 182. The master bus interface 115 is an interface for operating as a bus master on the bus 182. The master bus interface 115 performs DMA transfer via the bus 182. The macro interface 116 is an interface for communicating with the cryptographic processing circuit 120 and the hash function processing circuit 130.
[0129]
The IPsec control circuit 110 and the encryption processing circuit 120 read a write request signal (DREQ_WR), a read request signal (DREQ_RD), a write strobe signal (IP_WRX [0]), a read strobe signal (IP_RDX), an address signal (IP_A), and a read The data bus (IP_RD [31: 0]) and the write data bus (IP_WD [31: 0]) are connected. The IPsec control circuit 110 and the hash function processing circuit 130 are connected by a write data bus (IP_WD [31: 0]), a write strobe signal (IP_WRX [1]), and a write request signal (DREQ_WR).
[0130]
The write request signal (DREQ_WR) is a signal for requesting the IPsec control circuit 110 to write 32-bit data from the cryptographic processing circuit 120.
The read request signal (DREQ_RD) is a signal for requesting the IPsec control circuit 110 to read 32-bit data from the cryptographic processing circuit 120.
[0131]
The write strobe signal (IP_WRX [0]) is a signal for notifying the encryption processing circuit 120 of the writing of data from the IPsec control circuit 110.
The read strobe signal (IP_RDX) is a signal for notifying the encryption processing circuit 120 of reading of data in the encryption processing circuit 120 from the IPsec control circuit 110.
[0132]
The address signal (IP_A) is a signal for designating an access destination address of data from the IPsec control circuit 110 to the encryption processing circuit 120.
The read data bus (IP_RD [31: 0]) is a dedicated bus for passing read data from the 32-bit encryption processing circuit 120 to the IPsec control circuit 110.
[0133]
The write data bus (IP_WD [31: 0]) is a dedicated bus for passing 32-bit write data from the IPsec control circuit 110 to the encryption processing circuit 120 or the hash function processing circuit 130.
[0134]
The write strobe signal (IP_WRX [1]) is a signal for notifying the writing of data from the IPsec control circuit 110 to the hash function processing circuit 130.
The write request signal (DREQ_WR) is a signal for requesting the data writing to be performed from the hash function processing circuit 130 to the IPsec control circuit 110.
[0135]
FIG. 18 is a diagram showing an internal configuration of the encryption processing circuit. The encryption processing circuit 120 is provided with a key register 121, a hexadecimal counter 122, an operation unit 123, a 64-bit data register group 124, and a binary counter 125.
[0136]
A clock signal, an address signal (IP_A), a write data bus (IP_WD [31: 0]), and a write strobe signal (IP_WRX [0]) are input to the cryptographic processing circuit 120. The cryptographic processing circuit 120 operates in synchronization with the clock signal. The address signal (IP_A) is input to the key register 121, the operation unit 123, and the 64-bit data register group 124. The write data bus (IP_WD [31: 0]) is input to the key register 121 and the 64-bit data register group 124. The write strobe signal (IP_WRX [0]) is input to the key register 121, the operation unit 123, the 64-bit data register group 124, and the binary counter 125.
[0137]
The key register 121 is a register for storing key data (encryption key or decryption key) used at the time of encryption or decryption. The data stored in the key register 121 is input to the calculation unit 123.
[0138]
The hexadecimal counter 122 counts the number of operations based on the operation enable signal input from the operation unit 123. While the number of calculations is less than 16, a calculation status indicating that calculation is in progress is input to the calculation unit 123. In addition, when the hexadecimal counter 122 counts up to 16, an operation end signal is output.
[0139]
The operation unit 123 performs an operation of encryption or decryption. Specifically, operation unit 123 receives the input of the operation start signal from binary counter 125 and starts the operation. When performing an operation, the operation unit 123 first obtains operation data from the 64-bit data register group 124. Then, the operation unit 123 encrypts or decrypts operation data using key data input from the key register 121. After completion of the operation, the operation unit 123 stores the operation result in the register in the 64-bit data register group 124. The calculation result is stored by overwriting in the register in which the calculation data was stored.
[0140]
The 64-bit data register group 124 is a register group for storing operation data and operation results. Specifically, the 64-bit data register group 124 is configured of two 32-bit registers. Operation data is input to the 64-bit data register group 124 via the 32-bit write data bus, and stored in one of the registers. Also, when the operation result is stored in the 64-bit data register group 124, it is output as the read data bus (IP_RD [31: 0]).
[0141]
The binary counter 125 is a counter that counts the number of times the write strobe signal is input. The binary counter 125 outputs an operation start signal to the operation unit 123 when the write strobe signal is input twice. That is, since the bus width of the write data bus is 32 bits, the storage of operation data in the 64-bit data register group 124 is completed by two writings. Therefore, DES processing can be started in units of 64 bits by inputting the write strobe signal twice.
[0142]
When the DES processing is performed by such an encryption processing circuit 120, key data is stored in the key register 121 first. Next, operation data is written twice in 64-bit data register group 124 through the write data bus. The fact that the writing has been performed twice is detected by the binary counter 125, and an operation start signal is output.
[0143]
In response to the operation start signal, the operation unit 123 performs DES processing on the operation data, and writes the operation result back to the 64-bit data register group 124. The operation result is output from the 64-bit data register group 124 as read data. In addition, every time DES processing is performed by the operation unit 123, an enable signal is output to the hexadecimal counter 122, and the value of the hexadecimal counter is counted up. Then, when the value of the hexadecimal counter 122 reaches 16, an operation end signal is output.
[0144]
As described above, the cryptographic processing circuit 120 according to the first embodiment is counted by the number of data writes (in 32-bit units), and can automatically recognize the start of the operation and start the operation as the data write ends. That is, the binary counter 125 functions as a data write counter, and the data write counter detects the start of processing. The hexadecimal counter 122 functions as an operation round counter, recognizes the end of operation at the end of a predetermined number of operation rounds, and outputs an operation end signal. The result of the encryption or decryption operation is overwritten on the 64-bit data register group 124 (32 bits × 2).
[0145]
Next, the internal configuration of the hash function processing circuit 130 will be described.
FIG. 19 shows an internal configuration of the hash function processing circuit. The hash function processing circuit 130 has a hash value storage register 131, an 80-ary counter 132, an operation unit 133, a 512-bit data register group 134, and a hexadecimal counter 135.
[0146]
A clock signal, an address signal, write data, and a write strobe signal are input to the hash function processing circuit 130. The hash function processing circuit 130 operates in synchronization with the clock signal. The address signal is input to the operation unit 133 and the 512-bit data register group 134. The write data is input to the operation unit 133 and the 512-bit data register group 134. The write strobe signal is input to operation unit 133, 512-bit data register group 134 and hexadecimal counter 135.
[0147]
The hash value storage register 131 is a group of registers for storing the hash value generated by the hash function process. In the first embodiment, five 32-bit registers are provided, and a total of 160 bits of data can be stored.
[0148]
The 80-ary counter 132 counts the number of operations based on the operation enable signal input from the operation unit 133. While the number of calculations is less than 80, a calculation status indicating that calculation is in progress is input to the calculation unit 133. Further, when the 80-ary counter 132 counts up to 80, an operation end signal is output.
[0149]
The operation unit 133 performs a process of calculating a hash value based on the hash function. Specifically, operation unit 133 receives an operation start signal from hexadecimal counter 135 and starts operation. When performing an operation, the operation unit 133 first obtains operation data from the 512-bit data register group 134. Then, the operation unit 133 generates a hash value based on the operation data. After completion of the operation, the operation unit 133 stores the operation result in the register in the 512-bit data register group 124. The calculation result is stored by overwriting in the register in which the calculation data was stored.
[0150]
The 512-bit data register group 134 is a register group for storing operation data and operation results. Specifically, the 512-bit data register group 134 is configured of sixteen 32-bit registers. Operation data is input to the 512-bit data register group 134 via the 32-bit write data bus, and sequentially stored in each register.
[0151]
The hexadecimal counter 135 is a counter that counts the number of times the write strobe signal is input. The hexadecimal counter 135 outputs an operation start signal to the operation unit 133 when the write strobe signal is input 16 times. That is, since the bus width of the write data bus is 32 bits, the storage of operation data in the 512-bit data register group 134 is completed in 16 writings. Therefore, by inputting the write strobe signal 16 times, hash function processing in units of 512 bits can be started.
[0152]
When the hash value is generated based on the hash function in such a hash function processing circuit 130, first, 32-bit data to be processed is stored in the 512-bit data register group 134. The number of times of writing is counted by the hexadecimal counter 135, and when the data writing reaches 16 times, the hexadecimal counter 135 outputs an operation start signal. In response to the operation start signal, the operation unit 133 starts operation according to the hash function. Specifically, the operation unit 133 acquires data to be processed from the 512-bit data register group 134, and performs processing in accordance with the hash function. A hash value is generated by repeating the processing by the arithmetic unit 133 80 times, and the hash value is stored in the hash value storage register 131. The data in the hash value storage register 131 is output as read data. At this time, the 80-ary counter 132 detects that the operation has reached 80 times, and outputs an operation end signal.
[0153]
As described above, the hash function processing circuit 130 generates a hash value.
Here, the CPU 101, the IPsec control circuit 110, the encryption processing circuit 120, and the hash function processing circuit 130 are individual circuits, and can process data in parallel. The processing procedures of the CPU 101, the IPsec control circuit 110, the encryption processing circuit 120, and the hash function processing circuit 130 will be described below.
[0154]
FIG. 20 is a first diagram showing the operation of each circuit at the time of data encryption in time series. Hereinafter, the process shown in FIG. 20 will be described in order of step number. In the first embodiment, the cryptographic processing circuit 120 performs DES processing, and the hash function processing circuit 130 performs SHA1 processing.
[0155]
[Step S31] Each circuit sets an initial value. The cryptographic processing circuit 120 sets an algorithm (DES) and a key. At this time, the write request signal (DREQ_WR [0]) is being asserted. The hash function processing circuit 130 sets an algorithm (SHA1). At this time, the write request signal (DREQ_WR [1]) is being asserted. The IPsec control circuit 110 stands by for acquisition of processing target data (target). At this time, the CPU 101 is a bus master of the main bus.
[0156]
[Step S32] The IPsec control circuit 110 sets a source address, a destination address, and a data length as parameters necessary for DMA transfer. Also, the cryptographic processing circuit 120 is in the standby state.
[0157]
[Step S33] The IPsec control circuit 110 turns on the operation start control bit in the control / mode register [1: 0] (the value is “1”).
[Step S34] The IPsec control circuit 110 asserts an external bus release request signal (BRQ).
[0158]
[Step S35] The CPU 101 asserts the external bus open request acceptance signal (BGNT), and is not a bus master. The IPsec control circuit 110 becomes a bus master and takes in 64-byte data from the memory 103 to the built-in RAM 111 by DMA transfer.
[0159]
[Step S36] The IPsec control circuit 110 ends data acquisition, and deasserts the external bus release request signal (BRQ). The CPU 101 deasserts the external bus open request acceptance signal (BGNT) to become a bus master.
[0160]
[Step S37] The IPsec control circuit 110 writes the 64-bit data to the encryption processing circuit 120 in two divided steps, and finishes the writing. At this time, the IPsec control circuit 110 subtracts 8 bytes from the data length register. The encryption processing circuit 120 starts encryption processing (encryption or decryption) simultaneously with completion of data writing from the IPsec control circuit 110. At this time, the cryptographic processing circuit 120 deasserts the write request signal (DREQ_WR [0]). During this time, the CPU 101 executes other processing (packet reception and protocol processing) using the internal bus.
[0161]
[Step S38] The cryptographic processing circuit 120 executes cryptographic processing. The IPsec control circuit 110 asserts an external bus release request signal (BRQ). At this time, the CPU 101 continues to be the bus master.
[0162]
[Step S39] The CPU 101 asserts the external bus open request acceptance signal (BGNT), and is not a bus master. The IPsec control circuit 110 becomes a bus master and takes in 64-byte data from the memory 103 to the built-in RAM 111 by DMA transfer.
[0163]
FIG. 21 is a second diagram showing the operation of each circuit at the time of data encryption in time series. Hereinafter, the process shown in FIG. 21 will be described in order of step number.
[Step S40] The IPsec control circuit 110 ends data acquisition and deasserts the external bus release request signal (BRQ). The CPU 101 deasserts the external bus open request acceptance signal (BGNT) to become a bus master. During this time, cryptographic processing in the cryptographic processing circuit 120 is completed, and the cryptographic processing circuit 120 asserts a read request signal (DREQ_RD).
[0164]
[Step S41] The IPsec control circuit 110 recognizes the start of data transfer from the cryptographic processing circuit 120, and divides 64-bit data in two divided steps. During this time, the CPU 101 executes other processing (packet reception and protocol processing) using the internal bus.
[0165]
[Step S42] The IPsec control circuit 110 asserts an external bus release request signal (BRQ).
[Step S43] The CPU 101 asserts the external bus open request acceptance signal (BGNT) and is not a bus master. The IPsec control circuit 110 becomes a bus master and writes 64-byte data from the built-in RAM 111 to the memory 103 by DMA transfer.
[0166]
[Step S44] The IPsec control circuit 110 ends data writing, and deasserts the external bus release request signal (BRQ). The CPU 101 deasserts the external bus open request acceptance signal (BGNT) to become a bus master. The cryptographic processing circuit 120 deasserts the read request signal (DREQ_RD) and asserts the write request signal (DREQ_WR [0]) to enter the standby state.
[0167]
[Step S45] The processing of steps S34 to S44 is repeated until the data length register becomes zero. When the data length register becomes 0, the process proceeds to step S46.
[0168]
[Step S46] The IPsec control circuit 110 outputs a process end interrupt signal. The CPU 101 stores in the memory 103 the encryption processing result for the data length.
[0169]
Next, hash value generation processing based on a hash function will be described.
FIG. 22 is a diagram showing the operation of each circuit at the time of hash value generation processing in time series. Hereinafter, the process shown in FIG. 22 will be described in order of step number.
[0170]
[Step S51] Each circuit sets an initial value. The cryptographic processing circuit 120 sets an algorithm (DES) and a key. At this time, the write request signal (DREQ_WR [0]) is being asserted. The hash function processing circuit 130 sets an algorithm (SHA1). At this time, the write request signal (DREQ_WR [1]) is being asserted. The IPsec control circuit 110 stands by for acquisition of processing target data (target). At this time, the CPU 101 is a bus master of the main bus.
[0171]
[Step S52] The IPsec control circuit 110 sets a source address, a destination address, and a data length as parameters necessary for DMA transfer.
[0172]
[Step S53] The IPsec control circuit 110 turns on the operation start control bit in the control / mode register [1: 0] (the value is “1”).
[Step S54] The IPsec control circuit 110 asserts an external bus release request signal (BRQ).
[0173]
[Step S55] The CPU 101 asserts the external bus open request acceptance signal (BGNT) and is not a bus master. The IPsec control circuit 110 becomes a bus master and takes 128 bytes of data from the memory 103 into the built-in RAM 111 by DMA transfer.
[0174]
[Step S56] The IPsec control circuit 110 ends data acquisition and deasserts the external bus release request signal (BRQ). The CPU 101 deasserts the external bus open request acceptance signal (BGNT) to become a bus master.
[0175]
[Step S57] The IPsec control circuit 110 writes 128-bit data to the hash function processing circuit 130 in 16 divisions, and finishes writing. At this time, the IPsec control circuit 110 subtracts 64 bytes from the data length register. The hash function processing circuit 130 starts hash function processing simultaneously with the end of data writing from the IPsec control circuit 110. At this time, the hash function processing circuit 130 deasserts the write request signal (DREQ_WR [1]). During this time, the CPU 101 executes other processing (packet reception and protocol processing) using the internal bus.
[0176]
[Step S58] The processing of steps S54 to S57 is repeated until the data length register becomes zero. When the data length register becomes 0, the process proceeds to step S59.
[0177]
[Step S59] The IPsec control circuit 110 outputs a process end interrupt signal. The CPU 101 reads the generated hash value.
Next, operation waveforms when performing encryption processing and hash function processing will be described with reference to a timing chart.
[0178]
FIG. 23 is a first timing chart showing operation waveforms of a bus between the IPsec control circuit and the encryption processing circuit. In FIG. 23, the signal in the terminal on the side of the IPsec control circuit 110 is shown in the upper part, and the signal in the terminal on the side of the cryptographic processing circuit 120 and the internal data of the cryptographic processing circuit 120 are shown in the lower part.
[0179]
As signals of the IPsec control circuit 110, an address signal (IP_A), a write strobe signal (IP_WRX [0]), a read strobe signal (IP_RDX), a write data bus (IP_WD [31: 0]), a read data bus (IP_RD [ 31: 0]), a write request signal (DREQ_WR), and a read request signal (DREQ_RD) are shown.
[0180]
The signal on the side of the encryption processing circuit 120 includes an address signal (IP_A), a write strobe signal (IP_WRX [0]), a read strobe signal (IP_RDX), a write data bus (IP_WD [31: 0]), and a read data bus (IP_RD [ 31: 0]), first data register value (DESDR_U), second data register value (DESDR_L), operation start signal (des_start), operation status (DSTA), write request signal (DREQ_WR), and read request signal (DREQ_RD) )It is shown. The first data register value (DESDR_U) is a value of one data register (first data register) in the 64-bit data register group 124. The second data register value (DESDR_L) is the value of the other data register (second data register) in the 64-bit data register group 124.
[0181]
Each signal shown in FIG. 23 is a low active signal.
Data from the IPsec control circuit 110 is written to the first data register and the second data register by 32 bits by the write signal. When data is written to the register, an operation start signal (des_start) is asserted. At this time, the in-operation status (DSTA) is also turned on. The end of the operation is issued when the hexadecimal counter 122 indicates the number of ends, and the control signal is issued, and the status during operation (DSTA) is turned off.
[0182]
The address signal (IP_A) is a 1-bit signal that serves as an address for recognizing the first data register and the second data register. When writing to the first data register, the address signal (IP_A) (Low level), when writing to the second data register, the address signal (IP_A) indicates "1" (high level).
[0183]
The write request signal (DREQ_WR) is asserted when a signal indicating a data request from the cryptographic processing circuit 120 to the IPsec control circuit 110 is not being calculated, nor is it in a calculation result read waiting state. First, the write request signal (DREQ_WR) is asserted before the operation and is deasserted after the data write to the 64-bit data register group 124 is completed. After completion of the operation, the read request signal (DREQ_RD) is asserted. The read request signal (DREQ_RD) is a data read request signal, and indicates that the 64-bit data register group 124 is waiting for its data to be read in a state where the operation result is overwritten. After the IPsec control circuit 110 performs a read, the read request signal (DREQ_RD) is deasserted, and the write request signal (DREQ_WR) is reasserted. In the case of the encryption circuit, since the IPsec control circuit 110 performs both writing and reading of the operation target data, the write data bus (IP_WD [31: 0]) carrying the write data from the IPsec control circuit 110 to the encryption circuit and the encryption circuit And a read data bus (IP_RD [31: 0]) that carries read data from the IP address control circuit 110 to the IPsec control circuit 110.
[0184]
The changes in the signals shown in FIG. 23 will be described in detail in time series below.
At time t1, the write request signal (DREQ_WR) is asserted.
At time t2 (one cycle of time t1), the write strobe signal (IP_WRX [0]) is asserted. At the same time, data to be processed (32 bits) is output from the IPsec control circuit 110 to the write data bus (IP_WD [31: 0]).
[0185]
At time t3 (after one cycle of time t2), the processing target data is stored in the first data register value (DESDR_U) in the cryptographic processing circuit 120.
At time t4 (after one cycle of time t3), the output of the process target data to the write data bus (IP_WD [31: 0]) is stopped, and the write strobe signal (IP_WRX [0]) is deasserted. At the same time, the IPsec control circuit 110 sets the address signal (IP_A) to “1”. That is, the address of the second data register is designated.
[0186]
At time t5 (one cycle of time t4), the write strobe signal (IP_WRX [0]) is asserted. At the same time, data to be processed (32 bits) is output from the IPsec control circuit 110 to the write data bus (IP_WD [31: 0]).
[0187]
At time t6 (after one cycle of time t5), the data to be processed is stored in the second data register value (DESDR_L) in the cryptographic processing circuit 120.
At time t7 (one cycle of time t6), the IPsec control circuit 110 sets the address signal (IP_A) to “0”, and the write strobe signal (IP_WRX [0]) is deasserted. At the same time, data output to the write data bus (IP_WD [31: 0]) is also stopped. Further, within the cryptographic processing circuit 120, the operation start signal (des_start) is asserted.
[0188]
At time t8 (one cycle of time t7), the in-operation status (DSTA) is turned on, and the operation start signal (des_start) is deasserted.
At time t9 (after one cycle of time t8), the write request signal (DREQ_WR) is negated. Thereafter, DES processing is performed in the cryptographic processing circuit 120.
[0189]
FIG. 24 is a second timing chart showing operation waveforms of a bus between the IPsec control circuit and the encryption processing circuit. FIG. 24 shows an operation waveform after completion of the DES processing.
[0190]
At time t11 when the DES processing is completed, the in-operation status (DSTA) is turned off.
At time t12 (after one cycle of time t11), the encryption processing circuit 120 asserts the read request signal (DREQ_RD).
[0191]
At time t13 (one cycle of time t12), the read strobe signal (IP_RDX) is asserted.
At time t14 (after one cycle of time t13), processing result data (32 bits) is output from the encryption processing circuit 120 to the read data bus (IP_RD [31: 0]) and read by the IPsec control circuit 110. . At this time, since the address signal (IP_A) is “0”, the data in the first data register is output to the read data bus (IP_RD [31: 0]).
[0192]
At time t15 (one cycle of time t14), the read strobe signal (IP_RDX) is deasserted, and the IPsec control circuit 110 sets the address signal (IP_A) to “1”.
[0193]
At time t16 (one cycle of time t15), the read strobe signal (IP_RDX) is asserted. At the same time, data output to the read data bus (IP_RD [31: 0]) is temporarily stopped.
[0194]
At time t17 (after one cycle of time t16), processing result data (32 bits) is output from the encryption processing circuit 120 to the read data bus (IP_RD [31: 0]) and read by the IPsec control circuit 110. . At this time, since the address signal (IP_A) is “1”, the data in the second data register is output to the read data bus (IP_RD [31: 0]).
[0195]
At time t18 (after one cycle of time t17), the read strobe signal (IP_RDX) is deasserted, and the IPsec control circuit 110 sets the address signal (IP_A) to “1”.
[0196]
At time t19 (one cycle of time t18), the read request signal (DREQ_RD) is deasserted. At the same time, data output to the read data bus (IP_RD [31: 0]) is stopped.
[0197]
At time t20 (after one cycle of time t19), the write request signal (DREQ_WR) is asserted, and DES processing of subsequent data is performed.
FIG. 25 is a timing chart showing operation waveforms of a bus between the IPsec control circuit and the encryption processing circuit. In FIG. 25, the signal in the terminal on the side of the IPsec control circuit 110 is shown in the upper part, and the signal in the terminal on the side of the cryptographic processing circuit 120 and the internal data of the cryptographic processing circuit 120 are shown in the lower part. This example is an operation waveform relating to the SHA1 process by the hash function processing circuit 130.
[0198]
As signals of the IPsec control circuit 110, a write strobe signal (IP_WRX [1]), a write data bus (IP_WD [31: 0]), and a write request signal (DREQ_WR) are shown.
[0199]
As a signal of the hash function processing circuit 130, a write strobe signal (IP_WRX [1]), a write data bus (IP_WD [31: 0]), a first data register value (WO [31: 0]), a sixteenth data register Values (W15 [31: 0]), operation start signal (hash_start), operation in progress status (HSTA), and write request signal (DREQ_WR) are shown.
[0200]
In response to the write strobe signal (IP_WRX [1]), data from the IPsec control circuit 110 is written to 16 data registers constituting the 512-bit data register group 134. When data is written to all 16 data registers, it is recognized as data set completion, the operation start signal (hash_start) is asserted, and the operation in progress (HSTA) is set to on. At the end of the operation, when the number of ends is indicated by the 80-ary counter 132, an operation end signal is output, and the in-operation status (HSTA) turns off.
[0201]
Each data register constituting the 512-bit data register group 134 is constituted by a shift register. That is, the first data register is written each time, and each time the write strobe signal is input, the value of each data register is shifted to the data register of the next stage. Therefore, a signal for identifying the address of any data register in the 512-bit data register group 134 is not necessary.
[0202]
A data request signal (DREQ_WR) indicating a data request from the hash function processing circuit 130 to the IPsec control circuit 110 is asserted when the hash function processing circuit 130 is not in operation. Specifically, first, the data request signal (DREQ_WR) is asserted before the operation. Then, it is deasserted after completion of data writing to the 512-bit data register. When the operation is completed, the data request signal (DREQ_WR) is asserted again.
[0203]
By the way, as shown in FIG. 17, the hash value storage register 131 for storing operation results and the 512-bit data register group 134 for hash operation exist inside the hash function processing circuit 130. Because of the construction of the algorithm, the hash function pads the processing unit to a multiple of 512 bits, and the processing unit always terminates at least one or more of several hash function processings.
[0204]
At first, a constant specific to the algorithm is used as a hash value for the calculation, and the calculation results of the second and subsequent times are added to the calculation middle result to obtain the calculation result, which is stored in the hash function processing circuit internal register. In the case of packet authentication, when processing for one packet is completed, the hash processing is completed, and finally, the hash value storage register in the hash function may be read. Since the IPsec control circuit 110 only writes operation target data, a dedicated write data bus (IP_WD [31: 0]) for carrying write data from the IPsec control circuit 110 to the hash function processing circuit 130 is provided.
[0205]
The changes of the signals shown in FIG. 25 will be described in detail in time series below.
First, at time t31, the data request signal (DREQ_WR) is deasserted.
At time t32 (after one cycle of time t31), the write strobe signal (IP_WRX [0]) is asserted, and the IPsec control circuit 110 outputs data to be processed to the write data bus (IP_WD [31: 0]). Ru.
[0206]
At time t33 (after one cycle of time t32), the processing target data output via the write data bus (IP_WD [31: 0]) is set in the first data register (WO [31: 0]).
[0207]
At time t34 (after one cycle of time t33), the write strobe signal (IP_WRX [0]) is deasserted, and the output of the processing target data to the write data bus (IP_WD [31: 0]) is stopped.
[0208]
Thereafter, data is transferred repeatedly. Sixteen data transfers are performed.
While the write strobe signal (IP_WRX [0]) is asserted at time t41 when the 16th data transfer is started, data to be processed is output to the write data bus (IP_WD [31: 0]) by the IPsec control circuit 110. .
[0209]
At time t42 (after one cycle of time t41), the processing target data output via the write data bus (IP_WD [31: 0]) is set in the first data register (W0 [31: 0]). At the same time, the data in the 512-bit data register group 134 is sequentially shifted, and the 32-bit data initially transferred is stored in the sixteenth data register value (W15 [31: 0]).
[0210]
At time t43 (after one cycle of time t42), the write strobe signal (IP_WRX [1]) is deasserted, and the output of the processing target data to the write data bus (IP_WD [31: 0]) is stopped. At this time, completion of data writing of 16 times is recognized, and an operation start signal (hash_start) is asserted.
[0211]
At time t44 (one cycle of time t43), the operation status (HSTA) is set to ON, and the operation start signal (hash_start) is deasserted.
At time t45 (one cycle of time t44), the data request signal (DREQ_WR) is asserted, and the hash function process is performed.
[0212]
When the number of operations reaches 80, it is determined that the hash function processing is completed, and the operation status (HSTA) is set to OFF at time t51.
At time t52 (after one cycle of time t51), the data request signal (DREQ_WR) is deasserted.
[0213]
As described above, according to the security network controller 100, since the IPsec control circuit 110 inputs / outputs data to / from the cryptographic processing circuit 120 and the hash function processing circuit 130, the processing load on the CPU 101 is reduced.
[0214]
Note that the range of encryption of communication data and the authentication range differ depending on the communication protocol.
FIG. 26 is a diagram showing the encryption range and the authentication range of the transport mode ESP. FIG. 26A shows an IPv4 packet, and FIG. 26B shows an IPv6 packet.
[0215]
The IPv4 packet 50 includes an IP header 51, an ESP header 52, a TCP header 53, data 54, an ESP trailer 55, and an ESP authentication header 56. Among them, the TCP header 53, the data 54, and the ESP trailer 55 are the encryption range. Also, the ESP header 52, the TCP header 53, the data 54, and the ESP trailer 55 are the authentication range.
[0216]
The IPv6 packet 60 includes an IPv6 header 61, a route control header 62, an ESP header 63, an end option header 64, a TCP header 65, data 66, an ESP trailer 67, and an ESP authentication header 68. Among them, the end point option header 64, the TCP header 65, the data 66, and the ESP trailer 67 are the encryption range. Also, the ESP header 63, the end option header 64, the TCP header 65, the data 66, and the ESP trailer 67 are the authentication range.
[0217]
For example, at the time of packet generation when using transport mode ESP, an authentication process using a keyed hash function (HMAC-SHA1, HMAC-MD5) is performed on the range information.
[0218]
FIG. 27 is a diagram showing an authentication range of AH. The configuration of the AH packet 70 is the same for both IPv4 and IPv6. The AH packet 70 includes an IP header 71, an AH header 72, a TCP header 73, and data 74. In the AH packet 70, everything is in the authentication range. That is, an authentication process using a keyed hash function (HMAC-SHA1, HMAC-MD5) of the entire packet is required.
[0219]
Also, the maximum packet size is determined by the connection medium of the network. For example, the size of an IP packet when using a network (IEEE 802.3) called Ethernet (registered trademark) as a connection physical medium of the network will be described.
[0220]
The operation of the invention will be described by taking an authentication process of one packet as an example of the IEEE 802.3 network. In the authentication process, since HMAC processing is performed first and last, functionally, hardware processing is performed seamlessly after setting (mode setting such as whether it is HMAC processing or MD5 / SHA1) in the CPU. To be done. This makes it possible to reduce the CPU load and to extract the performance value of the hardware. In addition, it is possible to independently execute authentication processing that performs processing in the CPU using a DMAC (Direct Memory Access Controller).
[0221]
FIG. 28 is a diagram showing an IP packet size. As shown in FIG. 28, the IP packet 80 is composed of an IPv6 header 81, a route control header 82, an end option header 83, a TCP header 84, and data 85. The maximum IP packet size of the network according to IEEE 802.3 of such a configuration is about 1500 bytes (40 bytes of IPv6 header, 1460 bytes or less of others).
[0222]
The authentication algorithms MD5 and SHA1 of the hash function are 64-byte (512 bit) block functions. Thus, even with one packet of processing, up to about twenty times more hashing is performed. Also, a hash function is used in key management.
[0223]
FIG. 29 is a diagram showing phase 1 using the IKE main mode. Phase 1 is the first half of the key exchange protocol. FIG. 29 shows messages exchanged between a sender (Intiator) and a recipient (Responder). In the first message (Message # 1), negotiation of ISAKMP-SA (Source Address) is started. In the second message (Message # 2), the basic SA is approved. The third message (Message # 3) and the fourth message (Message # 4) exchange each other's keys. In the fifth message (Message # 5), the sender's identity is confirmed with the receiver. In the sixth message (Message # 6), the identity of the recipient is confirmed with the sender. The payloads of the fifth message (Message # 5) and the sixth message (Message # 6) are encrypted.
[0224]
IPsec, which is a must-have function in IPv6, generates a packet to be sent via a network into a MAC frame including an IP packet after completion of encryption and authentication processing. Then, it transmits via a communication interface.
[0225]
At the time of reception, authentication processing and decryption processing are performed. The ranges of the encryption process and the authentication process are as shown in FIG. 26, and the encryption process range becomes the decryption process range at the time of reception. The authentication is a process of applying the hash function process to the authentication range data shown in the figure and adding it to the end of the packet.
[0226]
The maximum packet size is about 1500 bytes when Ethernet (registered trademark) specified by IEEE 802.3 is used as the physical layer of the network. In other words. Authentication by the hash function performs processing up to about 20 times, and for encryption, when using DES or 3DES as the encryption algorithm, encryption processing up to about 180 times is performed.
[0227]
Further, in the processing of phase 1 which is the first half of the key exchange protocol shown in FIG. 29, encryption processing is performed in transmission and reception of each message from the first message to the sixth message. In the subsequent phase 2 as well, many cryptographic processes and hash function processes are performed in a session for establishing an SA. For example, in the third message and the fourth message, values for key generation are exchanged, and both exchange values necessary for key generation are created using a hash function or a cryptographic algorithm.
[0228]
As described above, cryptographic processing and hash function processing are often used for IPSec. Therefore, as described in the first embodiment, the effect of improving the processing power of the entire apparatus can be enhanced by enabling high-speed processing of encryption processing and hash processing (authentication processing) without intervention of a CPU as described in the first embodiment. . Moreover, the implementation of the IPsec control circuit on the security network controller can be realized at a lower cost than the CPU speed-up, and a comfortable communication speed can be provided at a price meeting the market needs.
[0229]
FIG. 30 is a diagram showing the result of performance evaluation of cryptographic processing in the related art and the first embodiment. This is an example of the case where 3DES-CBC encryption processing of 1496-byte data is performed. In the example of FIG. 30, when executed as software (the CPU executes a program describing the encryption procedure), when executed as a combination of the CPU and the encryption processing circuit (CPU controls input / output of data, etc. And the case where the combination of the IPsec control circuit and the cryptographic processing circuit is executed (the configuration according to the first embodiment) are compared.
[0230]
Specifically, in the software-like processing, the processing procedure is coded in C language, stored in a flash memory, and executed by the CPU. Further, the configuration of the IPsec control circuit + the encryption processing circuit is realized by PLD (Programmable Logic Device).
[0231]
When implemented as software, it takes 264917 microseconds for encryption and 264919 microseconds for decryption. When executed by the CPU + encryption processing circuit, it takes 2977 μsec for encryption and 2979 μsec for decryption. When executed by the IPsec control circuit + encryption processing circuit, it takes 579 μsec for encryption and 581 μsec for decryption.
[0232]
FIG. 31 is a diagram showing the result of performance evaluation of hash function processing in the related art and the first embodiment. This is an example in the case where HMAC-SHA1 hash function processing of 1500 byte data is performed. In the example of FIG. 31, when executed as software, when executed as a combination of a CPU and an encryption processing circuit, and when executed as a combination of an IPsec control circuit and an encryption processing circuit are compared. The configuration of the IPsec control circuit + the encryption processing circuit is realized by PLD (Programmable Logic Device).
[0233]
When executed as software, it takes 41309 μs to perform encryption in hash function processing. When executed by the CPU + hash processing circuit, it takes 2258 microseconds to perform encryption in the hash function processing. When executed in the IPsec control circuit + hash processing circuit, it takes 297 μsec for encryption in hash function processing.
[0234]
Thus, the processing performance regarding 3DES-CBC encryption processing and HMAC-SHA1 processing was evaluated as implementation evaluation. As a result, in the 3DES-CBC cryptographic processing, the application of the first embodiment achieves about 457 times faster processing by the software according to the prior art. In addition, by applying the first embodiment, about five times speeding up can be achieved as compared with the case where processing is performed by the dedicated encryption circuit and the CPU.
[0235]
Further, in the HMAC-SHA1 hash function processing, by applying the first embodiment, about 139 times faster processing by software is achieved. In addition, by applying the first embodiment, about eight times higher speed than when processing is performed by the dedicated hash function processing circuit and the CPU is achieved.
[0236]
Thus, according to the first embodiment, secure data communication can be performed at a very high speed. Therefore, even in the case of streaming video data, secure data can be stably transmitted and received.
[0237]
Moreover, the cryptographic processing circuit 120 and the hash function processing circuit 130 monitor the amount of input data, and automatically start cryptographic processing and authentication processing when writing of a predetermined amount of data is performed. Processing can be started without applying a load to the CPU or the like. This is particularly effective when data to be processed is continuously input, as in streaming.
[0238]
Furthermore, the cryptographic processing circuit 120 and the hash function processing circuit 130 automatically recognize the processing start timing of the hardware macro, and the IPsec control circuit 110 separates data to be subjected to cryptographic processing and authentication processing via a dedicated bus instead of the CPU 101. Supply without Thus, cryptographic processing and authentication processing can be seamlessly realized, and the processing capabilities of the cryptographic processing circuit 120 and the hash function processing circuit 130 can be maximized.
[0239]
As a result, even when using a low-performance (for example, low operating frequency) CPU, high-speed processing in which streaming is considered can be realized. The use of a low-speed CPU facilitates low power consumption and low-cost manufacturing.
[0240]
Further, since the work memory area of the CPU 101 is not occupied in a large amount, the processing efficiency of the other processing by the CPU 101 is improved. In addition, since the CPU occupancy rate for encryption processing and authentication processing is reduced, it is possible to guarantee reliable performance when functioning as a system. Also, network service with comfortable communication speed using IPsec becomes possible.
[0241]
Second Embodiment
The second embodiment enables parallel processing of cryptographic processing and hash function processing.
[0242]
FIG. 32 is a diagram showing an example of a system configuration according to the second embodiment. The security network controller 200 according to the second embodiment includes a CPU 201, a communication interface 202, a memory controller 203, an external connection interface 204, a plurality of IPsec control circuits 211 to 214, a plurality of encryption processing circuits 221 to 224, and a plurality of Hash function processing circuits 231 to 234 are provided, and these elements are connected via a bus 209.
[0243]
The IPsec control circuit 211 is connected to the encryption processing circuit 221 and the hash function processing circuit 231 through dedicated buses. The IPsec control circuit 212 is connected to the encryption processing circuit 222 and the hash function processing circuit 232 by dedicated buses. The IPsec control circuit 213 is connected to the encryption processing circuit 223 and the hash function processing circuit 233 by dedicated buses. The IPsec control circuit 214 is connected to the encryption processing circuit 224 and the hash function processing circuit 234 by dedicated buses.
[0244]
The communication interface 202 is connected to the terminal device 92 via the Internet 91. The memory controller 203 is connected to the memory 205. The external connection interface 204 is connected to the main CPU 241 in the camera system 240. The main CPU 241 controls the other circuits 242 and 243 and the camera mechanism unit 245 in the camera system 240.
[0245]
Thus, in the second embodiment, circuits for performing encryption processing and authentication processing are multiplexed. In the example of FIG. 32, four circuits are provided.
[0246]
The data to be processed is distributed to the plurality of IPsec control circuits 211 to 214. Each of the IPsec control circuits 211 to 214 controls cryptographic processing or hash function processing of distributed data.
[0247]
By multiplexing circuits in this manner, high-speed processing can be performed when a large amount of data is subjected to cryptographic processing or hash function processing. Further, even when a very high transfer rate performance is required (such as printer image transfer, 500 to 1000 Mbps, etc.), the desired processing speed can be obtained by multiplexing the circuit. Although the processing performance is improved if the processing performance of the CPU 201 is improved, the speeding up of the CPU 201 requires a very advanced manufacturing technology, resulting in an expensive circuit. As shown in FIG. 32, if encryption and hash function processing circuits are multiplexed, even a CPU without high performance can execute encryption processing and hash function processing in parallel, and processing of one packet can be accelerated. Ru. Roughly, it will be four times faster than the non-multiplexed circuit.
[0248]
In each of the above embodiments, an example in which the security network controller 100 or 200 is mounted on the camera system 10 or 240 is shown, but a similar security network controller is also mounted on the terminal device 30 or 92 side. be able to.
[0249]
Also, the security network controller 100 may be externally connected to a control target device such as the camera system 10 or the like. Such a system enables control of the camera system 10 via the Internet 20 without having an input means. Moreover, by incorporating the security network controller according to the above embodiment without changing the existing circuit, it is possible to connect various devices and networks safely via the Internet at a comfortable communication speed and secure using the IPsec function. Can provide useful services.
[0250]
The above embodiment is an example of performing encryption processing (encryption or decryption) and authentication processing (for example, hash function processing) with respect to data to be transmitted and received, either encryption processing or authentication processing It may be a security network controller that performs only one process. In a security network controller that performs only cryptographic processing, no hash function processing circuit is required. In addition, in the security network controller that performs only the authentication process, the encryption processing circuit is not necessary.
[0251]
In the above embodiment, the data to be processed is temporarily stored in the memory, and the IPsec control circuit 110 acquires the data from the memory by DMA transfer. However, the IPsec control circuit 110 incorporates a sufficient capacity. If there is a memory, data to be processed can be stored directly in the IPsec control circuit 110 from the communication interface 105 or the like.
[0252]
(Supplementary Note 1) In the data security apparatus that performs processing for securing data,
A data acquisition circuit that acquires processing target data;
An encryption processing circuit that performs encryption processing of input data;
The data acquisition circuit is connected via a first bus, and the encryption processing circuit is connected via a second bus, and the processing target data acquired by the data acquisition circuit is the first data. Acquired via the second bus and input to the cryptographic processing circuit via the second bus, and the cryptographic processing circuit performs cryptographic processing via the second bus from the cryptographic processing circuit. A data input / output control circuit that acquires processing result data;
Data security device characterized by having.
[0253]
(Supplementary Note 2) The data input / output control circuit has a direct memory access controller of the first bus, and acquires the processing target data from the data acquisition circuit by direct memory access transfer. The data security device according to appendix 1.
[0254]
(Supplementary Note 3) The information processing apparatus further includes a storage device connected to the first bus and storing the processing target data acquired by the data acquisition circuit.
The data security device according to claim 1, wherein the data input / output control circuit acquires the processing target data from the storage device.
[0255]
(Supplementary Note 4) The processing target data is stored in the built-in memory, and then the processing target data is divided into unit data lengths that are processing units of the encryption processing, and input to the encryption processing circuit. The data security device according to appendix 1.
[0256]
(Supplementary Note 5) The internal storage device is divided into at least two areas, and while the processing target data stored in the first area is being processed by the cryptographic processing circuit, the second area is followed by the second area. The data security apparatus according to claim 4, wherein the data to be processed is stored.
[0257]
(Supplementary Note 6) The data security apparatus according to Supplementary note 5, wherein the built-in memory is divided into areas of storage capacity units corresponding to the unit data length of encryption processing.
[0258]
(Supplementary Note 7) The data input / output control circuit inputs the processing target data sequentially provided by streaming to the encryption processing circuit in the order of acquisition, and outputs the processing result data acquired each time encryption processing is performed The data security device according to appendix 1, characterized in that
[0259]
(Supplementary Note 8) The data as set forth in Supplementary Note 1, wherein the encryption processing circuit detects a capacity of the input processing target data, and executes an encryption process on the processing countermeasure data when the predetermined capacity is reached. Security device.
[0260]
(Supplementary Note 9) A plurality of the cryptographic processing circuits are provided, and a plurality of the data input / output control circuits are individually connected to each of the cryptographic processing circuits, and a plurality of the data input / output control circuits are the processing targets The data security apparatus according to appendix 1, wherein data is divided and acquired and input in parallel to the corresponding cryptographic processing circuit.
[0261]
(Supplementary note 10) The apparatus further includes an authentication processing circuit that performs authentication processing of input data, and the data input / output control circuit is connected to the authentication processing circuit via a third bus, and is an encryption target The data security apparatus according to claim 1, characterized in that said processing object data is inputted to said encryption processing, and said processing object data to be authenticated is inputted to said authentication processing circuit.
[0262]
(Supplementary Note 11) In the data security apparatus that performs processing for securing data,
A data acquisition circuit that acquires processing target data;
An authentication processing circuit that performs authentication processing of input data;
The data acquisition circuit is connected via a first bus and is connected to the authentication processing circuit via a second bus, and the processing object data acquired by the data acquisition circuit is the first data. A data input / output control circuit which acquires the processing object data via the bus and stores the processing object data in the authentication processing circuit via the second bus;
Data security device characterized by having.
[0263]
(Supplementary Note 12) In a data communication apparatus for transmitting and receiving guaranteed data via a network,
The main CPU that generates transmission data,
An encryption processing circuit that encrypts input data;
A communication circuit for transmitting input data via the network;
The transmission control circuit is connected to the main CPU and the communication circuit via a first bus and is connected to the encryption processing circuit via a second bus, and the transmission data acquired by the main CPU is Acquired via the 1 bus and stored in built-in memory, the transmission data is input to the encryption processing circuit via the second bus, and the encryption after encryption is performed from the encryption processing circuit via the second bus A data input / output control circuit which acquires data and inputs it to the communication circuit;
A data communication apparatus comprising:
[0264]
(Supplementary Note 13) A data communication apparatus for transmitting and receiving guaranteed data via a network,
A main CPU that processes received data,
An encryption processing circuit that decrypts input data;
A communication circuit for acquiring received data sent via the network;
The main CPU and the communication circuit are connected via a first bus, and are connected to the encryption processing circuit via a second bus, and the reception data acquired by the communication circuit is Acquired via the 1 bus and stored in the built-in memory, input the received data to the encryption processing circuit via the second bus, and plaintext data after decryption from the encryption processing circuit via the second bus A data input / output control circuit that acquires the data and inputs it to the main CPU;
A data communication apparatus comprising:
[0265]
(Supplementary Note 14) In the data security method for securing data,
The data input / output control circuit acquires the processing target data acquired by the data acquisition circuit via the first bus and stores the acquired data in the built-in memory,
The data input / output control circuit inputs the processing target data to the encryption processing circuit via the second bus;
The cryptographic processing circuit performs cryptographic processing of the data to be processed;
Passing processing result data after execution of cryptographic processing from the cryptographic processing circuit to the data input / output control circuit;
Data security method characterized by
[0266]
(Supplementary Note 15) In the data security method for securing data,
The data input / output control circuit acquires the processing target data acquired by the data acquisition circuit via the first bus and stores the acquired data in the built-in memory,
The data input / output control circuit inputs the processing target data to the authentication processing circuit via the second bus;
The authentication processing circuit performs an authentication process on the process target data.
Data security method characterized by
[0267]
【Effect of the invention】
As described above, in the present invention, data to be processed is acquired via the first bus and stored in the built-in memory of the data input / output control circuit, and the data to be processed is encrypted via the second bus Since the data is input to the circuit, once the data to be processed is stored in the built-in memory of the data input / output control circuit, cryptographic processing can be performed without passing through the CPU or the first bus. Processing load is reduced.
Brief Description of the Drawings
FIG. 1 is a conceptual view of the invention applied to the embodiment.
FIG. 2 is a diagram showing an example of a system configuration according to the first embodiment.
FIG. 3 is a diagram showing a circuit configuration inside a camera.
FIG. 4 is a flowchart showing a procedure of data transmission.
FIG. 5 is a diagram showing a first step of data distribution.
FIG. 6 is a diagram showing a second step of data distribution.
FIG. 7 is a diagram showing a third step of data distribution.
FIG. 8 is a diagram illustrating a fourth step of data distribution.
FIG. 9 is a diagram showing a fifth step of data distribution.
FIG. 10 is a diagram showing a sixth step of data distribution.
FIG. 11 is a diagram showing a seventh step of data distribution.
FIG. 12 is a diagram showing an eighth step of data distribution.
FIG. 13 is a flowchart showing a data reception procedure.
FIG. 14 is a diagram showing an example of the internal configuration of a security network controller.
FIG. 15 is a diagram showing a configuration at the time of DES processing of the built-in RAM of the IPsec control circuit.
FIG. 16 is a diagram showing a configuration at the time of SHA1 processing of a built-in RAM of the IPsec control circuit.
FIG. 17 is a diagram showing an internal configuration of an IPsec control circuit.
FIG. 18 is a diagram showing an internal configuration of a cryptographic processing circuit.
FIG. 19 is a diagram showing an internal configuration of a hash function processing circuit.
FIG. 20 is a first diagram showing the operation of each circuit at the time of data encryption in time series;
FIG. 21 is a second diagram showing the operation of each circuit at the time of data encryption in time series;
FIG. 22 is a diagram showing the operation of each circuit at the time of hash value generation processing in time series;
FIG. 23 is a first timing chart showing operation waveforms of a bus between the IPsec control circuit and the encryption processing circuit.
FIG. 24 is a second timing chart showing operation waveforms of a bus between the IPsec control circuit and the encryption processing circuit.
FIG. 25 is a timing chart showing operation waveforms of a bus between the IPsec control circuit and the encryption processing circuit.
FIG. 26 is a diagram showing an encryption range and an authentication range of transport mode ESP. FIG. 26A shows an IPv4 packet, and FIG. 26B shows an IPv6 packet.
FIG. 27 is a diagram showing an authentication range of AH.
FIG. 28 is a diagram showing an IP packet size.
FIG. 29 shows phase 1 using the IKE main mode.
FIG. 30 is a diagram showing the result of performance evaluation of cryptographic processing in the related art and the first embodiment.
FIG. 31 is a diagram showing the result of performance evaluation of hash function processing in the related art and the first embodiment.
FIG. 32 is a diagram showing an example of a system configuration according to the second embodiment.
[Description of the code]
1 Data security device
1a CPU
1b Data acquisition circuit
1c Cryptographic processing circuit
1d authentication processing circuit
1e Data input / output control circuit
1f data output circuit
1g 1st bus
1h 2nd bus
1i 3rd bus
2 Process target data
3 Processing result data

Claims (10)

データを保障するための処理を行うデータ保障装置において、
処理対象データを取得するデータ取得回路と、
入力されたデータの暗号処理を行う暗号処理回路と、
前記データ取得回路に第1のバスを介して接続されると共に前記暗号処理回路に対して第2のバスを介して接続されており、前記データ取得回路が取得した前記処理対象データを前記第1のバス経由で取得して内蔵メモリに格納し、前記処理対象データを前記第2のバス経由で前記暗号処理回路に入力し、前記暗号処理回路から前記第2のバス経由で暗号処理実行後の処理結果データを取得するデータ入出力制御回路と、
を有することを特徴とするデータ保障装置。
In a data security device that performs processing to secure data,
A data acquisition circuit that acquires processing target data;
An encryption processing circuit that performs encryption processing of input data;
The data acquisition circuit is connected via a first bus, and the encryption processing circuit is connected via a second bus, and the processing target data acquired by the data acquisition circuit is the first data. Acquired via the second bus and input to the cryptographic processing circuit via the second bus, and the cryptographic processing circuit performs cryptographic processing via the second bus from the cryptographic processing circuit. A data input / output control circuit that acquires processing result data;
Data security device characterized by having.
前記データ入出力制御回路は、前記第1のバスのダイレクトメモリアクセスコントローラを有しており、前記処理対象データを前記データ取得回路からダイレクトメモリアクセス転送によって取得することを特徴とする請求項1記載のデータ保障装置。The data input / output control circuit has a direct memory access controller of the first bus, and acquires the processing target data from the data acquisition circuit by direct memory access transfer. Data security device. 前記暗号処理回路は、入力された処理対象データの容量を検知し、所定の容量に達したときに前記処理対処データに対する暗号処理を実行することを特徴とする請求項1記載のデータ保障装置。The data security apparatus according to claim 1, wherein the encryption processing circuit detects a capacity of the input processing target data, and executes encryption processing on the processing handling data when reaching a predetermined capacity. 前記暗号処理回路が複数設けられ、複数の前記データ入出力制御回路が各前記暗号処理回路に個別に対応づけて接続されており、複数の前記データ入出力制御回路が前記処理対象データを分割して取得し、対応する前記暗号処理回路に対して並列に入力することを特徴とする請求項1記載のデータ保障装置。A plurality of the encryption processing circuits are provided, and a plurality of the data input / output control circuits are individually connected to each of the encryption processing circuits, and a plurality of the data input / output control circuits divide the processing target data 2. A data security apparatus according to claim 1, wherein the data security apparatus acquires the data and inputs it in parallel to the corresponding cryptographic processing circuit. 入力されたデータの認証処理を行う認証処理回路を更に有し、
前記データ入出力制御回路は前記認証処理回路に対して第3のバスを介して接続されており、暗号化対象である前記処理対象データを前記暗号処理に入力し、認証対象である前記処理対象データを前記認証処理回路に入力することを特徴とする請求項1記載のデータ保障装置。
It further comprises an authentication processing circuit that performs authentication processing of input data,
The data input / output control circuit is connected to the authentication processing circuit via a third bus, inputs the processing target data to be encrypted to the encryption processing, and the processing target is to be authenticated The data security apparatus according to claim 1, wherein data is input to the authentication processing circuit.
データを保障するための処理を行うデータ保障装置において、
処理対象データを取得するデータ取得回路と、
入力されたデータの認証処理を行う認証処理回路と、
前記データ取得回路に第1のバスを介して接続されると共に前記認証処理回路に対して第2のバスを介して接続されており、前記データ取得回路が取得した前記処理対象データを前記第1のバス経由で取得して内蔵メモリに格納し、前記処理対象データを前記第2のバス経由で前記認証処理回路に入力するデータ入出力制御回路と、
を有することを特徴とするデータ保障装置。
In a data security device that performs processing to secure data,
A data acquisition circuit that acquires processing target data;
An authentication processing circuit that performs authentication processing of input data;
The data acquisition circuit is connected via a first bus and is connected to the authentication processing circuit via a second bus, and the processing object data acquired by the data acquisition circuit is the first data. A data input / output control circuit which acquires the processing object data via the bus and stores the processing object data in the authentication processing circuit via the second bus;
Data security device characterized by having.
保障されたデータをネットワークを介して送受信するデータ通信装置において、
送信データを生成するメインCPUと、
入力されたデータを暗号化する暗号処理回路と、
入力されたデータを前記ネットワークを介して送信する通信回路と、
前記メインCPUと前記通信回路に第1のバスを介して接続されると共に前記暗号処理回路に対して第2のバスを介して接続されており、前記メインCPUが取得した前記送信データを前記第1のバス経由で取得して内蔵メモリに格納し、前記送信データを前記第2のバス経由で前記暗号処理回路に入力し、前記暗号処理回路から前記第2のバス経由で暗号化後の暗号データを取得し、前記通信回路に対して入力するデータ入出力制御回路と、
を有することを特徴とするデータ通信装置。
In a data communication apparatus for transmitting and receiving guaranteed data via a network,
The main CPU that generates transmission data,
An encryption processing circuit that encrypts input data;
A communication circuit for transmitting input data via the network;
The transmission control circuit is connected to the main CPU and the communication circuit via a first bus and is connected to the encryption processing circuit via a second bus, and the transmission data acquired by the main CPU is Acquired via the 1 bus and stored in built-in memory, the transmission data is input to the encryption processing circuit via the second bus, and the encryption after encryption is performed from the encryption processing circuit via the second bus A data input / output control circuit which acquires data and inputs it to the communication circuit;
A data communication apparatus comprising:
保障されたデータをネットワークを介して送受信するデータ通信装置において、
受信データを処理するメインCPUと、
入力されたデータを復号する暗号処理回路と、
前記ネットワークを介して送られた受信データを取得する通信回路と、
前記メインCPUと前記通信回路に第1のバスを介して接続されると共に前記暗号処理回路に対して第2のバスを介して接続されており、前記通信回路が取得した前記受信データを前記第1のバス経由で取得して内蔵メモリに格納し、前記受信データを前記第2のバス経由で前記暗号処理回路に入力し、前記暗号処理回路から前記第2のバス経由で復号後の平文データを取得し、前記メインCPUに対して入力するデータ入出力制御回路と、
を有することを特徴とするデータ通信装置。
In a data communication apparatus for transmitting and receiving guaranteed data via a network,
A main CPU that processes received data,
An encryption processing circuit that decrypts input data;
A communication circuit for acquiring received data sent via the network;
The main CPU and the communication circuit are connected via a first bus, and are connected to the encryption processing circuit via a second bus, and the reception data acquired by the communication circuit is Acquired via the 1 bus and stored in the built-in memory, input the received data to the encryption processing circuit via the second bus, and plaintext data after decryption from the encryption processing circuit via the second bus A data input / output control circuit that acquires the data and inputs it to the main CPU;
A data communication apparatus comprising:
データを保障するためのデータ保障方法において、
データ取得回路で取得した処理対象データを、データ入出力制御回路が第1のバス経由で取得して内蔵メモリに格納し、
前記データ入出力制御回路が、前記処理対象データを第2のバス経由で暗号処理回路に入力し、
前記暗号処理回路が前記処理対象データの暗号処理を行い、
暗号処理実行後の処理結果データを、前記暗号処理回路から前記データ入出力制御回路に渡す、
ことを特徴とするデータ保障方法。
In the data security method for securing data,
The data input / output control circuit acquires the processing target data acquired by the data acquisition circuit via the first bus and stores the acquired data in the built-in memory,
The data input / output control circuit inputs the processing target data to the encryption processing circuit via the second bus;
The cryptographic processing circuit performs cryptographic processing of the data to be processed;
Passing processing result data after execution of cryptographic processing from the cryptographic processing circuit to the data input / output control circuit;
Data security method characterized by
データを保障するためのデータ保障方法において、
データ取得回路で取得した処理対象データを、データ入出力制御回路が第1のバス経由で取得して内蔵メモリに格納し、
前記データ入出力制御回路が、前記処理対象データを第2のバス経由で認証処理回路に入力し、
前記認証処理回路が前記処理対象データの認証処理を行う、
ことを特徴とするデータ保障方法。
In the data security method for securing data,
The data input / output control circuit acquires the processing target data acquired by the data acquisition circuit via the first bus and stores the acquired data in the built-in memory,
The data input / output control circuit inputs the processing target data to the authentication processing circuit via the second bus;
The authentication processing circuit performs an authentication process on the process target data.
Data security method characterized by
JP2003112992A 2003-03-28 2003-04-17 Encryption / authentication processing apparatus, data communication apparatus, and encryption / authentication processing method Expired - Fee Related JP4408648B2 (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP2003112992A JP4408648B2 (en) 2003-04-17 2003-04-17 Encryption / authentication processing apparatus, data communication apparatus, and encryption / authentication processing method
US10/790,176 US20040193763A1 (en) 2003-03-28 2004-03-02 Inter-bus communication interface device and data security device
US12/580,993 US8832460B2 (en) 2003-03-28 2009-10-16 Inter-bus communication interface device and data security device
US14/297,200 US9378165B2 (en) 2003-03-28 2014-06-05 Inter-bus communication interface device
US15/181,201 US9942207B2 (en) 2003-03-28 2016-06-13 Security network controller
US15/897,867 US10609005B2 (en) 2003-03-28 2018-02-15 Security network controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003112992A JP4408648B2 (en) 2003-04-17 2003-04-17 Encryption / authentication processing apparatus, data communication apparatus, and encryption / authentication processing method

Publications (2)

Publication Number Publication Date
JP2004320533A true JP2004320533A (en) 2004-11-11
JP4408648B2 JP4408648B2 (en) 2010-02-03

Family

ID=33473058

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003112992A Expired - Fee Related JP4408648B2 (en) 2003-03-28 2003-04-17 Encryption / authentication processing apparatus, data communication apparatus, and encryption / authentication processing method

Country Status (1)

Country Link
JP (1) JP4408648B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008067152A (en) * 2006-09-08 2008-03-21 Renesas Technology Corp Data processor
JP2008181465A (en) * 2007-01-26 2008-08-07 Sony Corp Data processor, method, program and recording medium
JP2008538643A (en) * 2005-03-28 2008-10-30 データレグロ,インコーポレーテッド Non-invasive encryption for relational database management systems
US7681044B2 (en) 2005-06-17 2010-03-16 Fujitsu Microelectronics Limited Secure processor and system
JP2010258993A (en) * 2009-04-28 2010-11-11 Mitsubishi Electric Corp Data processing apparatus
JP2014049845A (en) * 2012-08-30 2014-03-17 Universal Entertainment Corp Communication lsi and game machine
JP2014102856A (en) * 2014-02-14 2014-06-05 Universal Entertainment Corp Communication system and game machine
JP2014241654A (en) * 2014-10-02 2014-12-25 株式会社ユニバーサルエンターテインメント Communication system
CN114461553A (en) * 2022-04-12 2022-05-10 北京象帝先计算技术有限公司 Data processing system, electronic device, electronic apparatus, and data processing method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008538643A (en) * 2005-03-28 2008-10-30 データレグロ,インコーポレーテッド Non-invasive encryption for relational database management systems
US7681044B2 (en) 2005-06-17 2010-03-16 Fujitsu Microelectronics Limited Secure processor and system
JP2008067152A (en) * 2006-09-08 2008-03-21 Renesas Technology Corp Data processor
US8181024B2 (en) 2006-09-08 2012-05-15 Renesas Electronics Corporation Data processing apparatus
US8918646B2 (en) 2006-09-08 2014-12-23 Renesas Electronics Corporation Data processing apparatus
JP2008181465A (en) * 2007-01-26 2008-08-07 Sony Corp Data processor, method, program and recording medium
JP2010258993A (en) * 2009-04-28 2010-11-11 Mitsubishi Electric Corp Data processing apparatus
JP2014049845A (en) * 2012-08-30 2014-03-17 Universal Entertainment Corp Communication lsi and game machine
JP2014102856A (en) * 2014-02-14 2014-06-05 Universal Entertainment Corp Communication system and game machine
JP2014241654A (en) * 2014-10-02 2014-12-25 株式会社ユニバーサルエンターテインメント Communication system
CN114461553A (en) * 2022-04-12 2022-05-10 北京象帝先计算技术有限公司 Data processing system, electronic device, electronic apparatus, and data processing method
CN114461553B (en) * 2022-04-12 2022-06-17 北京象帝先计算技术有限公司 Data processing system, electronic device, electronic apparatus, and data processing method

Also Published As

Publication number Publication date
JP4408648B2 (en) 2010-02-03

Similar Documents

Publication Publication Date Title
US10609005B2 (en) Security network controller
EP3633913B1 (en) Provisioning a secure connection using a pre-shared key
US7007163B2 (en) Methods and apparatus for accelerating secure session processing
US7376826B2 (en) Methods and apparatus for performing encryption and authentication
US7360076B2 (en) Security association data cache and structure
US7266703B2 (en) Single-pass cryptographic processor and method
US7961882B2 (en) Methods and apparatus for initialization vector pressing
US8468337B2 (en) Secure data transfer over a network
US8458461B2 (en) Methods and apparatus for performing authentication and decryption
JP5815294B2 (en) Secure field programmable gate array (FPGA) architecture
JP2010157998A (en) Efficient key derivation for end-to-end network security with traffic visibility
EP3481001B1 (en) Authentication method, server, terminal, and gateway
EP3803672B1 (en) Memory-efficient hardware cryptographic engine
TW201629836A (en) Secure transactions in a memory fabric
JP4408648B2 (en) Encryption / authentication processing apparatus, data communication apparatus, and encryption / authentication processing method
JP5930619B2 (en) Cryptographic processing device
JP5500923B2 (en) Information processing device
EP2558946A1 (en) Method and system for cryptographic processing core
US20040221153A1 (en) Apparatus and method of enciphering data packet of variable width
WO2021029173A1 (en) Communication system
CN113938882A (en) Encryption and decryption method and device for wireless local area network communication system
KR20100026116A (en) Modem soc for wireless communication using block cipher and wireless modem thereof
JP2004247810A (en) Encrypting apparatus, communication apparatus, decoder, encrypting method, decoding method, encryption program, and decoding program
JPH04297155A (en) Data communication equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060202

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090623

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090915

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091009

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4408648

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121120

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20121120

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20121120

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131120

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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