JP2007065963A - Data transfer system - Google Patents
Data transfer system Download PDFInfo
- Publication number
- JP2007065963A JP2007065963A JP2005250853A JP2005250853A JP2007065963A JP 2007065963 A JP2007065963 A JP 2007065963A JP 2005250853 A JP2005250853 A JP 2005250853A JP 2005250853 A JP2005250853 A JP 2005250853A JP 2007065963 A JP2007065963 A JP 2007065963A
- Authority
- JP
- Japan
- Prior art keywords
- data
- dma
- transfer
- memory
- program
- 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.)
- Withdrawn
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Bus Control (AREA)
Abstract
Description
本発明は、データ転送技術に関し、例えばDMA(ダイレクト・メモリ・アクセス)転送を可能とするデータ処理装置に適用して有効な技術に関する。 The present invention relates to a data transfer technique, for example, a technique effective when applied to a data processing apparatus that enables DMA (direct memory access) transfer.
DMAコントローラは、CPU(中央処理装置)がプログラムの制御に基づいて転送するよりも高速にデータ転送を実現することから、頻繁にデータ転送を行うシステムで利用されることが多い。転送モードの異なるDMA転送をCPUの介在なしに自動的に行えるようにしてシステム動作の高速化を図った技術(例えば特許文献1参照)が知られている。 The DMA controller realizes data transfer at a higher speed than a CPU (central processing unit) transfers based on program control, and is therefore often used in a system that frequently transfers data. A technique (for example, see Patent Document 1) is known in which DMA transfer in different transfer modes can be automatically performed without intervention of a CPU so as to increase the system operation speed.
また、マルチメディア信号についての符号変換・暗号化等の処理技術(例えば特許文献2参照)が知られている。 Also, a processing technique such as code conversion / encryption for a multimedia signal (see, for example, Patent Document 2) is known.
マルチメディア信号を取り扱うシステムにおいて、ディジタル・シグナル・プロセッサ(DSP)が内蔵される場合がある。このDSPのプログラムメモリやデータメモリの容量には制約があり、できるだけ小規模にすることが望ましい。そのため、プログラムを例にとると、プログラムメモリに格納しきれないプログラムを安価で集積度を高くできるメインメモリに予め格納しておき、プログラムメモリの内容の書き換えを繰り返してDSPを動作させるのが普通である。このメインメモリはシステムのメインCPUも接続可能に構成されているものである。このような構成において悪意のある人間がメインCPUを制御してメインメモリに格納されているDSPのプログラムを読み出して解読する虞れのあることが本発明者によって明らかになった。 In systems that handle multimedia signals, a digital signal processor (DSP) may be incorporated. The capacity of the program memory and data memory of the DSP is limited, and it is desirable to make it as small as possible. Therefore, taking a program as an example, it is common to store a program that cannot be stored in the program memory in a main memory that is inexpensive and highly integrated, and to operate the DSP by repeatedly rewriting the contents of the program memory. It is. This main memory is configured so that the main CPU of the system can also be connected. The present inventor has revealed that in such a configuration, a malicious person may control the main CPU to read and decode the DSP program stored in the main memory.
本発明の目的は、セキュリティが強化されたデータ転送システムを提供することにある。 An object of the present invention is to provide a data transfer system with enhanced security.
また、本発明の別の目的は、セキュリティが強化され、しかも必要最小限の回路規模で効率よくデータ転送を行うことができるデータ転送システムを提供することにある。 Another object of the present invention is to provide a data transfer system that can enhance data security and efficiently transfer data with a minimum circuit scale.
本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。 The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。 The following is a brief description of an outline of typical inventions disclosed in the present application.
すなわち、第1プログラムに従って演算処理可能な第1データ処理部と、上記第1プログラムとは異なる第2プログラムに従って演算処理可能な第2データ処理部と、上記第1データ処理部によってアクセス可能な第1メモリと、上記第2データ処理部によってアクセス可能な第2メモリと、上記第1メモリから上記第2データ処理部へのDMA転送を可能とするDMAコントローラとを設ける。そして、上記第1メモリには、上記第1プログラムが上記第1データ処理部で実行可能な状態で格納されるとともに、上記第2プログラムが暗号化された状態で格納される。 That is, a first data processing unit that can perform arithmetic processing according to the first program, a second data processing unit that can perform arithmetic processing according to a second program different from the first program, and a first data processing unit that can be accessed by the first data processing unit. 1 memory, a second memory accessible by the second data processing unit, and a DMA controller capable of DMA transfer from the first memory to the second data processing unit are provided. The first memory stores the first program in a state that can be executed by the first data processing unit, and stores the second program in an encrypted state.
上記の手段によれば、上記第1メモリには、上記第1プログラムが上記第1データ処理部で実行可能な状態で格納されるとともに、上記第2プログラムが暗号化された状態で格納されるため、第1データ処理部から上記第2プログラムをモニタすることはできない。このことが、上記第2プログラムのセキュリティ強化を達成する。 According to the above means, the first memory stores the first program in a state executable by the first data processing unit, and stores the second program in an encrypted state. Therefore, the second program cannot be monitored from the first data processing unit. This achieves enhanced security of the second program.
このとき、上記DMAコントローラに、暗号化された上記第2プログラムを復号化する機能を内蔵することができる。この場合、転送元領域に暗号化されたデータが格納され、転送先に平文データを送信する場合、上記第2プログラムを復号化する機能を内蔵するDMAコントローラを用いれば、使用するDMAチャネルは1チャネルで済み、転送に生じるレイテンシを最小限に抑えることができる。例えばDMAチャネルを2チャネル用いた場合と比べると、その量はおよそ半分になる。平文データを暗号化し、転送先に送信する場合でも同様であり、データスループットは2倍に向上する。 At this time, the DMA controller can have a function of decrypting the encrypted second program. In this case, when the encrypted data is stored in the transfer source area and the plain text data is transmitted to the transfer destination, if a DMA controller having a function of decrypting the second program is used, the DMA channel to be used is 1 Channels are sufficient, and the latency that occurs during transfer can be minimized. For example, compared to the case where two DMA channels are used, the amount is approximately halved. The same applies when plaintext data is encrypted and transmitted to the transfer destination, and the data throughput is doubled.
上記DMAコントローラは、転送元アドレスを格納可能な第1レジスタと、転送先アドレスを格納可能な第2レジスタと、上記第1レジスタに格納された転送元アドレスで特定される領域に存在するデータの暗号化処理又は復号化処理を可能とする暗号処理回路と、を含み、上記暗号処理回路で復号化された上記第2プログラムを、上記第2レジスタに格納された転送先アドレスで特定される領域にDMA転送するように構成することができる。 The DMA controller includes a first register capable of storing a transfer source address, a second register capable of storing a transfer destination address, and data stored in an area specified by the transfer source address stored in the first register. An area specified by a transfer destination address stored in the second register, wherein the second program decrypted by the encryption processing circuit is included. DMA transfer can be configured.
上記第1データ処理部と、上記第1メモリと、上記DMAコントローラとの間のデータ転送を可能とする第1バスと、上記DMAコントローラと上記第2データ処理回路との間のデータ転送を可能とする第2バスと、を含み、上記暗号処理回路で復号化された上記第2プログラムが、上記第2バスを介して上記第2データ処理回路にDMA転送されるように構成する。このような構成にすることにより第1データ処理部が第2バスに接続することが不可能であるため、復号化された第2プログラムを読み出すことが不可能となり、システムのセキュリティを向上されることができる。 Data transfer between the first data processing unit, the first memory, the first bus enabling data transfer between the DMA controller, and the DMA controller and the second data processing circuit is possible. And the second program decrypted by the encryption processing circuit is DMA-transferred to the second data processing circuit via the second bus. With this configuration, since the first data processing unit cannot be connected to the second bus, the decrypted second program cannot be read, and the system security is improved. be able to.
入力されたメディア信号を符号化可能なメディア信号符号化装置を含み、上記DMAコントローラは、上記メディア信号符号化装置で符号化されたメディア信号を上記暗号処理回路で暗号化してから上記第1メモリへDMA転送するように構成することができる。 A media signal encoding device capable of encoding an input media signal, wherein the DMA controller encrypts the media signal encoded by the media signal encoding device by the encryption processing circuit and then the first memory; It can be configured to transfer to DMA.
また、符号化されたメディア信号を復号化可能なメディア信号復号化装置を含み、上記DMAコントローラは、上記第1メモリ内の暗号化されたメディア信号を復号化してから上記メディア信号復号化装置にDMA転送するように構成することができる。 And a media signal decoding device capable of decoding the encoded media signal, wherein the DMA controller decrypts the encrypted media signal in the first memory and then sends the encrypted media signal to the media signal decoding device. It can be configured to perform DMA transfer.
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。 The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.
すなわち、セキュリティが強化されたデータ転送システムを提供することができる。 That is, a data transfer system with enhanced security can be provided.
<実施の形態1>
図2及び図3には、本発明にかかるデータ転送システムが適用されたデータ処理装置が示される。
<Embodiment 1>
2 and 3 show a data processing apparatus to which the data transfer system according to the present invention is applied.
図2に示されるデータ処理装置は、システム全体をプログラムに基づいて制御するCPU101と、データ転送を担うDMAコントローラ102と、暗号化あるいは復号化を行う暗号処理回路103と、メインメモリ104が設けられる。また、プログラムに基づいて信号処理を行うDSP(ディジタル・シグナル・プロセッサ)105と、DSP105がフェッチして信号処理を行うためのプログラムを格納するプログラムメモリ106と、DSP105が信号処理を行う際、一時的にデータを格納するデータメモリ107と、所定の信号処理を行う周辺回路108と、バス109が設けられる。DMAコントローラ102、暗号処理回路103、メインメモリ104、DSP105、周辺回路108は、バス109によって、相互にデータのやり取りが可能となるように結合される。
The data processing apparatus shown in FIG. 2 includes a
バス109はデータバス、アドレスバスを含む。DSP105のプログラムメモリ106やデータメモリ107の容量には制約があり、できるだけ小規模にすることが望ましい。そのため、プログラムを例にとると、プログラムメモリ106に格納しきれないプログラムを安価で集積度を高くできるメインメモリ104に予め格納しておき、プログラムメモリ106の内容の書き換えを繰り返してDSP105を動作させるのが普通である。本発明の特徴点としては、メインメモリ104にはDSP105が必要とするプログラムの大部分を格納するため、セキュリティの観点からデータの暗号化を行っていることである。
The
CPU101あるいはDSP105は、バス109を通じてDMAコントローラ102を動作させるためのDMAパラメータを設定する。DMAパラメータとは、起動するDMAチャネルの転送元アドレスや転送先アドレス、転送回数等のDMA転送に必要な初期設定値である。ここでは、DMAチャネル0およびDMAチャネル1について設定すると仮定する。DMAコントローラ102は、DMAチャネル0を起動し、メインメモリ104に格納されたデータをバス109を経由して受信する。該データはDSP105のプログラムデータが暗号化されたものであり、これを復号するため、暗号処理回路103に送信する。
The
暗号処理回路103は該プログラムデータが暗号化されたものを復号化し、内部に保持する。DMAコントローラ102は、DMAチャネル1も起動し、DMAチャネル0の転送に支障がないよう、暗号処理回路103にアクセスし、該プログラムデータを受信する。該データはDSP105が特別の処理なしにフェッチ、デコードできる平文であり、DSP105を経由してプログラムメモリ106に送信される。DSP105は、プログラムメモリ106に格納されたプログラムに基づいて信号処理を行う。
The
上述のようにDMAチャネルを複数用いる方法の他に、1チャネルのみ使用する方法もある。この場合、前述のDMAチャネル1が行っていたDMA転送を、DMAチャネル0の転送が完全に終了してから実施することで実現される。DMAコントローラ102は、DMAチャネル0を起動し、メインメモリ104に格納されたデータをバス109を経由して受信する。該データはDSP105のプログラムデータが暗号化されたものであり、これを復号するため、暗号処理回路103に送信する。暗号処理回路103は該プログラムデータが暗号化されたものを復号化し、内部に保持する。この処理を所定の回数行い、暗号処理回路103のバッファに平文のプログラムが随時蓄えられていく。尚、平文のプログラムを自動的にメインメモリ104等に書き込んでゆくように構成してもよい。所定の回数の処理が終了し、DMAチャネル0の転送が終了したら、改めてDMAチャネル0に必要な値を設定し、暗号処理回路103のバッファに蓄えられた平文のプログラムをDMAコントローラ102に転送し、DSP105に転送する。このような処理を所定の回数行うことで実現できる。平文のプログラムがメインメモリ104等に蓄えられるような構成の時にはメインメモリ104からDMAコントローラ102に転送し、DSP105に転送するよう動作する。
In addition to the method using a plurality of DMA channels as described above, there is a method using only one channel. In this case, the DMA transfer performed by the DMA channel 1 is realized after the transfer of the DMA channel 0 is completely completed. The
図3には、図2におけるDMAコントローラ102の詳細な構成が示される。
FIG. 3 shows a detailed configuration of the
バス109は、アドレス信号の転送を可能とするアドレスバス209と、データの転送を可能とするデータバス210とを含む。DMAコントローラ102は、DMAチャネル毎の転送元アドレスを格納するソースアドレスレジスタ201と、DMAチャネル毎の転送先アドレスを格納するデスティネーションアドレスレジスタ202と、ソースアドレスレジスタ201およびデスティネーションアドレスレジスタ202を制御するアドレス制御回路204と、DMAチャネル毎の転送回数を格納する転送計数レジスタ203と、転送計数レジスタ203を制御する転送回数制御回路205と、転送元メモリ211から読み出したデータを一時的に格納するデータラッチ回路206と、DMA転送に関する複数の情報を格納するDMA情報レジスタ208と、DMA情報レジスタ208に格納されたDMA情報に基づいてDMA転送を制御するDMA情報制御回路207とで構成される。DMA情報制御回路207は、例えば起動するDMAチャネルを制御する。以下、DMAチャネル0が起動して、転送元メモリ211のデータを転送先メモリ212に転送する場合について説明する。尚、特に制限されないが、転送元メモリ211は上記メインメモリ104に相当し、転送先メモリ212は上記暗号処理回路103に内蔵されたメモリとされる。
The
DMA情報レジスタ208のDMA情報に基づいてDMA情報制御回路207によりDMAチャネル0が起動されると、アドレス制御回路204はソースアドレスレジスタ201からDMAチャネル0の転送元アドレス(SAR0)を選択し、アドレスバス209に出力する。転送元メモリ211は該アドレスに格納されたデータをデータバス210に出力する。該データはデータラッチ回路206に一旦格納される。アドレス制御回路204はデスティネーションアドレスレジスタ202からDMAチャネル0の転送先アドレス(DAR0)を選択した後アドレスバス209に出力し、同時にデータラッチ回路206は一旦格納したデータをデータバス210に出力する。転送先メモリ212には該アドレスで特定される領域に該データが格納される。この一連の動作を通じ、転送回数制御回路205は転送計数レジスタ203に格納されたDMAチャネル0の転送回数(TCR0)を1減算して、更新する。同様に、アドレス制御回路204はSAR0およびDAR0を所定の方法に基づいて更新する。DMAコントローラ102は、上述のような動作を繰り返し、TCR0が0になるまでDMA転送を行う。転送元や転送先等を含め、DMAチャネル0のDMA情報と異なる転送を実現するには、通常他のDMAチャネルを用いるか、TCR0が0になってから別の転送を指示し、改めてDMAチャネル0を起動する必要がある。
When DMA channel 0 is activated by the DMA
TCR0が1減算されるような一回のDMA転送に生じるレイテンシは、少なくともDMAコントローラ102が転送元メモリ211にアクセスしてからデータを受信するまでの時間と、該データをラッチし転送先メモリ212のアドレスおよびデータを各々アドレスバスおよびデータバスへ出力するのに要する時間との和になる。
The latency that occurs in one DMA transfer in which TCR0 is decremented by 1 is at least the time from when the
このように、DSP105用のプログラムを暗号化してメインメモリ104に格納することにより、セキュリティの強化を図ることができる。
As described above, by encrypting the program for the
<実施の形態2>
図1には、本発明にかかるデータ転送システムが適用されたデータ処理装置の他の構成例が示される。
<Embodiment 2>
FIG. 1 shows another configuration example of a data processing apparatus to which the data transfer system according to the present invention is applied.
図2のようなシステムでは、限られたDMAチャネルリソースの内2チャネルを使用する必要があるため、その起動プログラムは複雑になり、転送に生じるレイテンシが大きくなる。また、DMAチャネルを1チャネルのみにした場合でも、復号化を行うためのデータ転送と復号化を終えた後の平文の転送に、2回DMAコントローラを起動する必要があるため、その起動プログラムは複雑になり、転送に生じるレイテンシが大きくなる。このことは、DSPのプログラム入れ替えに代表されるように、繰り返しDMA転送を行う場合や、復号化されたデータの転送先となるメモリあるいは周辺回路が複数ある場合に、より顕著になる。又、暗号処理回路で復号した平文を所望の転送先に送信する際、平文が主要なバスを経由し、メモリに残る可能性があるため、CPU101により平文を読み取られることがある。本実施例はそのような発明者が新たに見出した問題を解決するためのものである。
In the system as shown in FIG. 2, since it is necessary to use two of the limited DMA channel resources, the activation program becomes complicated and the latency generated in the transfer increases. Even if the DMA channel is only one channel, it is necessary to start the DMA controller twice for data transfer for decryption and plaintext transfer after the decryption is completed. Complicated and increased latency in transfer. This becomes more conspicuous when performing DMA transfer repeatedly, as represented by DSP program replacement, or when there are a plurality of memories or peripheral circuits to which the decoded data is to be transferred. Further, when the plaintext decrypted by the encryption processing circuit is transmitted to a desired transfer destination, the plaintext may remain in the memory via the main bus, so that the
この装置は、暗号機能内蔵DMAコントローラ301、CPU101、メインメモリ104、DSP105、DSP105のプログラムメモリ106、DSP105のデータメモリ107、周辺回路108を含み、公知の半導体集積回路製造技術により、単結晶シリコン基板などの一つの半導体基板に形成される。上記暗号機能内蔵DMAコントローラ301、CPU101、メインメモリ104、DSP105、周辺回路108は、バス109によって互いにデータのやり取りが可能となるように結合されている。バス109はデータバス、アドレスバスを含む。ここで、上記CPU101が本発明における第1データ処理部の一例とされ、上記DSP105が本発明における第2データ処理部の一例とされる。また、上記メインメモリ104が本発明における第1メモリに対応し、上記プログラムメモリ106が本発明における第2メモリに対応する。
This apparatus includes a
CPU101は、所定のプログラムに基づいて暗号機能内蔵DMAコントローラ301を起動するためのパラメータ設定を指示したり、システム全体を制御する。プログラムメモリ106は、DSP105が信号処理を実行するためのプログラムを格納するためのメモリであり、データメモリ107は、DSP105がプログラムに基づいて処理したデータを一時的に保持するためのメモリである。メインメモリ104は、DSP105が信号処理を実行するための大容量のプログラムを格納したり、周辺回路108が必要とするデータを格納する。本例では、メインメモリ104に格納されたプログラムは、暗号処理回路103で復号できる暗号化方式で暗号化されており、プログラムメモリ106が格納できるプログラム容量以上のプログラムを格納しているものとする。
The
以下、メインメモリ104に格納され、暗号化されたDSP105のプログラムを復号し、プログラムメモリ106に転送する動作について説明し、同様の動作を繰り返すことによってプログラムメモリ106の記憶内容を入れ替える動作について説明する。
Hereinafter, the operation of decrypting the encrypted program of the
CPU101あるいはDSP105は、バス109を通じて暗号機能内蔵DMAコントローラ301を動作させるためのDMAパラメータを設定する。DMAパラメータとは、SAR201、DAR202、TCR203、DMA情報レジスタ208等のDMA転送のための初期設定値である。暗号機能内蔵DMAコントローラ301が起動すると、この暗号機能内蔵DMAコントローラ301は、バス109を経由してメインメモリ104にアクセスし、バス109を経由して暗号化されたDSP105のプログラムデータを受信する。該受信データは、後述するような暗号機能内蔵DMAコントローラ内部の暗号処理回路103に入力され、所定のアルゴリズムで復号された後、内部に保持される。後述するような暗号機能内蔵DMAコントローラ内部のDMA情報制御回路207の指示により、暗号処理回路103の内部に保持されたデータが出力され、DSP105を経由してプログラムメモリ106に格納される。DSP105は、プログラムメモリ106に格納された平文のプログラムデータをフェッチし、プログラムに基づいて所定の信号処理を行う。DSP105は所定の信号処理を行った後、暗号機能内蔵DMAコントローラを起動するためのDMA転送パラメータを設定し、DMAを起動する。尚、CPU101によってDMA転送パラメータを設定するようにしても良い。暗号機能内蔵DMAコントローラ301が起動されると、上述のような過程を経てプログラムメモリの内容が更新され、更新されたプログラムに基づいてDSP105が信号処理を再開する。以上の動作を繰り返すことにより、DSP105はプログラムメモリ106が小規模でも所定の信号処理を実施することができる。
The
図4には、上記暗号機能内蔵DMAコントローラ301の構成例が示される。
FIG. 4 shows a configuration example of the above-described encryption function-containing
図4に示される暗号機能内蔵DMAコントローラ301が図3に示されるDMAコントローラ102と大きく相違するのは、データラッチ回路206に代えて暗号処理回路103を有する点である。この暗号処理回路103は、データの暗号化処理機能、及び暗号化されたデータの復号化処理機能を有する。バス109は、アドレスバス209とデータバス210とを含む。アドレスバス209は、アドレス制御回路204に結合され、データバス210は、暗号処理回路103に結合される。
A significant difference between the
転送元メモリ211には暗号化されたデータが格納され、暗号機能内蔵DMAコントローラ301内部で復号化し、転送先メモリ212に平文データを転送する場合について説明する。尚、特に制限されないが、図4における転送元メモリ211は上記メインメモリ104に相当し、転送先メモリ212は上記DSP105もしくはその周辺に配置されたメモリとされる。
A case will be described in which encrypted data is stored in the
図3に示されるDMAコントローラ102と同様に、DMA情報レジスタ208のDMA情報に基づいてDMA情報制御回路207により例えばDMAチャネル0が起動されると、アドレス制御回路204はソースアドレスレジスタ201からDMAチャネル0の転送元アドレス(SAR0)を選択し、アドレスバス209に出力する。転送元メモリ211は該アドレスに格納されたデータをデータバス210に出力する。該データは暗号処理回路103に受信される。暗号処理回路103は、例えばDES暗号等の所定のアルゴリズムに基づいて受信データを復号し、平文データを内部に保持する。アドレス制御回路204はデスティネーションアドレスレジスタ202からDMAチャネル0の転送先アドレス(DAR0)を選択した後アドレスバス209に出力し、同時に暗号処理回路103は保持した平文データをデータバス210に出力する。転送先メモリ212には該アドレスで特定される領域に平文データが格納される。この一連の動作を通じ、転送回数制御回路205は転送計数レジスタ203に格納されたDMAチャネル0の転送回数(TCR0)を1減算して、更新する。同様に、アドレス制御回路204はSAR0およびDAR0を所定の方法に基づいて更新する。暗号機能内蔵DMAコントローラ301は、上述のような動作を繰り返し、TCR0が0になるまでDMA転送を行う。
Similar to the
このように転送元に暗号化されたデータが格納され、転送先に平文データを送信する場合において、暗号機能内蔵DMAコントローラ301を用いれば、使用するDMAチャネルは1チャネルで済む。従って、転送に生じるレイテンシは最小限に抑えられ、DMAチャネルを2チャネル用いる場合と比べると、その量はおよそ半分になる。また、図2に示される構成とは異なり、復号化した平文データを外部からの読み出しが容易な外部メモリ等に一時的に保持する必要がないため、セキュリティ強化につながる。
In this way, when encrypted data is stored in the transfer source and plaintext data is transmitted to the transfer destination, if the encryption function built-in
上記の例によれば、以下の作用効果を得ることができる。 According to the above example, the following effects can be obtained.
(1)転送元領域に暗号化されたデータが格納され、転送先に平文データを送信する場合、暗号機能内蔵DMAコントローラ301を用いれば使用するDMAチャネルは1チャネルで済むことから、転送に生じるレイテンシは最小限に抑えられ、DMAチャネルを2チャネル用いた場合と比べると、その量はおよそ半分になる。平文データを暗号化し、転送先に送信する場合でも同様であり、データスループットは2倍に向上する。
(1) When encrypted data is stored in the transfer source area and plain text data is transmitted to the transfer destination, the use of the encryption function-containing
(2)復号化した平文データを外部からの読み出しが容易な外部メモリ等に一時的に保持する必要がないため、セキュリティ強化につながる。 (2) Since it is not necessary to temporarily store the decrypted plaintext data in an external memory or the like that can be easily read from the outside, security is enhanced.
(3)メモリや周辺回路が複数存在し、各々の転送データに暗号処理が要求されるシステムでも、暗号処理回路は本発明の暗号機能内蔵DMAコントローラにのみ内蔵すればよく、必要最小限の回路規模で効率のよいデータ転送を実現できる。 (3) Even in a system in which a plurality of memories and peripheral circuits exist and encryption processing is required for each transfer data, the encryption processing circuit only needs to be incorporated in the DMA controller with built-in encryption function of the present invention, and the minimum necessary circuit Efficient data transfer can be realized on a scale.
(4)図示されないメモリや周辺回路が複数存在し、各々の転送データに暗号処理が要求された場合でも、暗号処理回路は暗号機能内蔵DMAコントローラ301にのみ内蔵すればよく、必要最小限の回路規模で効率のよいデータ転送を実現できる。
<実施の形態3>
図5には、本発明にかかるデータ転送システムが適用されたデータ処理装置の別の構成例が示される。
(4) Even when there are a plurality of memories and peripheral circuits (not shown) and encryption processing is required for each transfer data, the encryption processing circuit only needs to be incorporated in the encryption function built-in
<Embodiment 3>
FIG. 5 shows another configuration example of the data processing apparatus to which the data transfer system according to the present invention is applied.
図5に示されるデータ転送システムが、図1に示されるのと大きく相違するのは、周辺回路108に代えて、映像、画像、オーディオ、あるいは音声等のメディア信号を符号化するためのメディア信号符号化装置501が設けられている点である。
The data transfer system shown in FIG. 5 is greatly different from that shown in FIG. 1 in that a media signal for encoding a media signal such as video, image, audio, or voice is used instead of the
一般的に、メディア信号の符号化システムには、割込み処理回路や、バス制御回路、外部インタフェース等の回路を必要とするが、本例では説明の便宜上、それらを省略している。また、本例では、オーディオ信号を例にとって、メディア信号符号化装置501はオーディオPCM(Pulse Code Modulation)データを入力とし、AAC(Advanced Audio Coding)やMP3(MPEG1 Audio Layer3)等で符号化したメディア信号(オーディオストリームという)を出力する。
In general, a media signal encoding system requires circuits such as an interrupt processing circuit, a bus control circuit, and an external interface, which are omitted in this example for convenience of explanation. Also, in this example, taking an audio signal as an example, the media
以下、メディア信号符号化装置501で生成されたオーディオストリームを暗号化し、それをメインメモリ104に格納するまでの動作を説明する。オーディオストリームは、メディア信号符号化装置501内の図示されない内部メモリに格納されているものとする。
Hereinafter, an operation from encrypting an audio stream generated by the media
CPU101の指示で暗号機能内蔵DMAコントローラ301が起動すると、暗号機能内蔵DMAコントローラ301は、メディア信号符号化装置501にアクセスし、オーディオストリームを受信する。続いて暗号機能内蔵DMAコントローラ301の内部でオーディオストリームを暗号化し、内部で保持する。最後に、暗号機能内蔵DMAコントローラ301は暗号化されたオーディオストリームを出力し、メインメモリ104に格納する。このように、転送元のデータを暗号化して転送先に送信する場合も、本例のようなシステム構成にすればデータ転送にかかるレイテンシは最小限で済み、最小限の回路規模で、しかも安全で効率の良いDMA転送を実現することができる。
<実施の形態3>
図6には、本発明にかかるデータ転送システムが適用されたデータ処理装置の別の構成例が示される。
When the encryption function built-in
<Embodiment 3>
FIG. 6 shows another configuration example of the data processing apparatus to which the data transfer system according to the present invention is applied.
図6に示されるデータ転送システムが、図1に示されるのと大きく相違するのは、周辺回路108に代えて、映像、画像、オーディオ、あるいは音声等のメディア信号が符号化されたストリームを復号化して出力するメディア信号復号化装置601が設けられている点である。
The data transfer system shown in FIG. 6 differs greatly from that shown in FIG. 1 in that it decodes a stream in which a media signal such as video, image, audio, or audio is encoded instead of the
一般的に、メディア信号のストリームを復号する復号化システムには割込み処理回路やバス制御回路、外部インタフェース等の回路を必要とするが、本例では説明の便宜上、それについての説明を省略する。また、本例では、オーディオ信号を例にとって、メディア信号復号化装置601はオーディオストリームを入力とし、復号化してPCMデータを出力するものとする。
Generally, a decoding system for decoding a stream of media signals requires circuits such as an interrupt processing circuit, a bus control circuit, and an external interface. However, in this example, the description thereof is omitted for convenience of explanation. Also, in this example, taking an audio signal as an example, the media
以下、メインメモリ104に格納され、暗号化されたオーディオストリームを復号化し、メディア信号復号化装置601にオーディオストリームを送信するまでの動作を説明する。
Hereinafter, an operation from decrypting an encrypted audio stream stored in the
CPU101の指示で暗号機能内蔵DMAコントローラ301が起動すると、暗号機能内蔵DMAコントローラ301は、メインメモリ104にアクセスし、暗号化されたオーディオストリームを受信する。続いて暗号機能内蔵DMAコントローラ301の内部で該オーディオストリームを暗号について復号化し、内部で保持する。最後に、暗号機能内蔵DMAコントローラ301は該オーディオストリームを出力し、メディア信号復号化装置601に送信する。このように、暗号化された転送元のデータを復号化して転送先に送信する場合、本例のようなシステム構成にすればデータ転送にかかるレイテンシは最小限で済み、最小限の回路規模で、しかも安全で効率が良いDMA転送を実現することができる。
<実施の形態4>
図7には、本発明にかかるデータ転送システムが適用されたデータ処理装置の別の構成例が示される。
When the encryption function built-in
<Embodiment 4>
FIG. 7 shows another configuration example of the data processing apparatus to which the data transfer system according to the present invention is applied.
図1に示された構成においては、復号した平文を所望の転送先に送信する際、平文がCPU101が接続可能なバスを経由して転送されるため、平文がバスに乗るためにCPU101により平文を読み取られることがあることを発明者が新たに見出した。本実施例はそのような発明者が新たに見出した問題を解決するためのものである。
In the configuration shown in FIG. 1, when the decrypted plaintext is transmitted to a desired transfer destination, the plaintext is transferred via a bus to which the
図7に示されるデータ転送システムは、第1CPU1、メインメモリ2、ATAインタフェース(I/F)3、暗号機能内蔵DMAコントローラ6、レジスタ10、周辺回路11,12、プログラムメモリ14、データメモリ15、及び第2CPU19を含み、公知の半導体集積回路製造技術により単結晶シリコン基板などの一つの半導体基板に形成される。更にハードディスク(HDD)4を含む。上記暗号機能内蔵DMAコントローラ6は、DMA制御部7と、暗号処理回路8とを含み、基本的には、図4に示される暗号化機能内蔵DMAコントローラ301と同一構成とされる。すなわち、図7における暗号処理回路8は、図4における暗号処理回路103に対応し、図7におけるDMA制御部7は、図4に示される暗号化機能内蔵DMAコントローラ301における暗号処理回路103以外の全てのブロックに対応する。上記第1CPU1、メインメモリ2、ATAインタフェース3、暗号機能内蔵DMAコントローラ6、周辺回路11,12は、バス5によって、互いにデータのやり取りが可能に構成される。暗号機能内蔵DMAコントローラ6とレジスタ10とはDMAパラメータ制御信号線9によって結合される。暗号機能内蔵DMAコントローラ6と周辺回路11,12は、DMAバス13によって結合される。第2CPU19は、第2CPUバス16を介して暗号機能内蔵DMAコントローラ6に結合され、第2CPUバス17を介してレジスタ10に結合され、第2CPUバス18を介して周辺回路11,12に結合される。ここで、上記第1CPU1が本発明における第1データ処理部の一例とされ、上記第2CPU19が本発明における第2データ処理部の一例とされる。
7 includes a first CPU 1, a main memory 2, an ATA interface (I / F) 3, a cryptographic function built-in DMA controller 6, a
図8にはCPU2用プログラムの入れ替えフローチャートが示され、図9にはオーディオストリームを暗号化したデータの復号化フローチャートが示され、図10にはオーディオストリームの暗号化フローチャートが示される。 8 shows a flowchart for replacing the program for the CPU 2, FIG. 9 shows a flowchart for decrypting data obtained by encrypting the audio stream, and FIG. 10 shows a flowchart for encrypting the audio stream.
第2CPU用プログラムの入れ替えについて、図8のフローチャートに基づいて説明する。 The replacement of the second CPU program will be described with reference to the flowchart of FIG.
第2CPU19は、バス17を介してレジスタ10にDMA制御部7の制御パラメータを設定する(ステップ801)。具体的には、SAR0に転送元アドレスが設定され、DAR0に転送先アドレスが設定され、TCR0に転送回数が設定される(図4参照)。ステップ802でDMA転送終了条件が成立していない場合、DMA制御部7は第1CPUバス5を介してメインメモリ2に格納されている暗号化されたデータを読み出す(ステップ803)。暗号化されたデータとは、第2CPU19が動作するためのプログラムを予め暗号化したデータである。次に、暗号化されたデータをDMA制御部7の内部にラッチする(ステップ804)。続いて、暗号処理回路8は暗号化されたデータを復号する(ステップ805)。続いて、DMA制御部7は第2CPUバス16を介して第2CPU19に復号した平文を送信する(ステップ806)。ここで、第2CPUバス16は暗号機能内蔵DMAコントローラ6とCPU2を接続する外部から読み出し不可能なバスである。これらの動作により、平文はプログラムメモリ14に格納される(ステップ807)。そして所定の方法でDMA制御部7の制御パラメータSAR0、DAR0、TCR0を更新する(ステップ808)。これら一連のステップを経て、再度ステップ802で再度DMA転送終了条件が成立しているか否かを判定し、成立時はDMA転送を終了する。成立しない場合は再びステップ803から同様に動作を繰り返し、平文をプログラムメモリ14に格納する。
The
以上の動作により、メインメモリ2に予め格納した暗号化されたデータを復号し、第2CPU19が実行可能なプログラムに変換して安全にプログラムメモリ14に転送することができる。また、DMAチャネルを1チャネルのみを用いてDMA転送時に暗号化して転送することにより、目的の転送にかかるレイテンシを最小限に抑えることができる。
Through the above operation, the encrypted data stored in advance in the main memory 2 can be decrypted, converted into a program executable by the
次に、周辺回路11をオーディオデコーダとし、オーディオストリームを暗号化したデータの復号化動作について、図9の復号化フローチャートに基づいて説明する。
Next, the decoding operation of data obtained by encrypting the audio stream using the
オーディオストリームを暗号化したデータは、予めハードディスク4に格納されているものとする。ステップ901で、第1CPU1は第1CPUバス5を介してレジスタ10にDMA制御部7の制御パラメータを設定する。具体的にはSAR0に転送元アドレスが設定され、DAR0に転送先アドレスが設定され、TCR0に転送回数が設定される。
It is assumed that the data obtained by encrypting the audio stream is stored in the hard disk 4 in advance. In
次に、DMA転送終了条件が成立しているか否かを判定し(ステップ902)、成立していない場合、ステップ903でDMA制御部7はATAインタフェース3および第1CPUバス5を介してハードディスク4に格納されている暗号化されたデータを読み出す。続いて、暗号化されたデータをDMA制御部7内部にラッチする(ステップ904)。そして、暗号処理回路8は暗号化されたデータを復号化する(ステップ905)。続いて、DMA制御部7はDMAバス13を介して周辺回路11(オーディオデコーダ)に復号した平文(オーディオストリーム)を送信する(ステップ906)。ここで、DMAバス13は暗号機能内蔵DMAコントローラ6と周辺回路11および周辺回路12を接続する第1CPU1、第2CPU19及び外部から読み出し不可能なバスである。これらの動作により、オーディオストリームはオーディオデコーダで所定の方式によりデコードされる(ステップ907)。そして所定の方法でDMA制御部7の制御パラメータSAR0、DAR0、TCR0を更新する(ステップ908)。これら一連のステップを経て、再度ステップ902で再度DMA転送終了条件が成立しているか否かを判定し、成立時はDMA転送を終了する。成立しない場合は再びステップ903から同様に動作を繰り返す。
Next, it is determined whether or not the DMA transfer termination condition is satisfied (step 902). If not, the
以上の動作により、ハードディスク4に予め格納したオーディオストリームを暗号化したデータを復号し、オーディオデコーダがデコードできるオーディオストリームに変換することにより第1CPU1等から読み出されることが無く、安全にオーディオデコーダに転送することができる。また、DMAチャネルを1チャネルのみを用いてDMA転送時に復号化して転送することにより、目的の転送にかかるレイテンシを最小限に抑えることができる。 By the above operation, the encrypted data of the audio stream stored in the hard disk 4 is decrypted and converted into an audio stream that can be decoded by the audio decoder, so that it can be safely transferred to the audio decoder without being read from the first CPU 1 or the like. can do. Further, by decoding and transferring the DMA channel at the time of DMA transfer using only one channel, the latency for the target transfer can be minimized.
次に、周辺回路12をオーディオエンコーダとし、このオーディオエンコーダが生成したオーディオストリームを暗号化してハードディスク4に格納する動作について、図10のフローチャートに基づいて説明する。尚、オーディオストリームは、予め周辺回路12で生成されているものとする。
Next, the operation of encrypting the audio stream generated by the audio encoder as the
ステップ1001で、第1CPU1は第1CPUバス5を介してレジスタ10にDMA制御部7の制御パラメータ(SAR0に転送元アドレス、DAR0に転送先アドレス、TCR0に転送回数)を設定する。次に、DMA転送終了条件が成立しているか否かを判定し(ステップ1002)、成立していない場合、ステップ1003でDMA制御部7はDMAバス13を介して周辺回路12に格納されているオーディオストリーム(平文)を読み出す。DMAバス13は第1CPU1、第2CPU19及び外部から読み出し不可能なバスである。続いて、オーディオストリームをDMA制御部7の内部にラッチする(ステップ1004)。続いて、暗号処理回路8はオーディオストリームを暗号化する(ステップ1005)。次に、DMA制御部7は第1CPUバス5およびATAインタフェース3を介してハードディスク4に暗号化したデータを送信する(ステップ1006)。これらの動作を経て、オーディオストリームを暗号化したデータをハードディスク4に格納する(ステップ1007)。そして所定の方法でDMA制御部7の制御パラメータSAR0、DAR0、TCR0を更新する(ステップ1008)。これら一連のステップを経て、再度ステップ1002で再度DMA転送終了条件が成立しているか否かを判定し、成立時はDMA転送を終了する。成立しない場合は再びステップ1003から同様に動作を繰り返し、オーディオストリームを暗号化したデータをハードディスク4に送信する。
In
以上の動作により、周辺回路12で予めエンコードされて生成されたオーディオストリームを暗号化し、安全にハードディスク4に転送することができる。また、DMAチャネルを1チャネルのみを用いてDMA転送時に暗号化して転送することにより、目的の転送にかかるレイテンシを最小限に抑えることができる。
With the above operation, the audio stream encoded and generated in advance by the
以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。 Although the invention made by the present inventor has been specifically described above, the present invention is not limited thereto, and it goes without saying that various changes can be made without departing from the scope of the invention.
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるデータ処理装置に適用した場合について説明したが、本発明はそれに限定されるものではなく、データ転送システムに広く適用することができる。 In the above description, the case where the invention made mainly by the present inventor is applied to the data processing apparatus which is the field of use as the background has been described. However, the present invention is not limited to this and is widely applied to data transfer systems. Can be applied.
本発明は、少なくともデータ転送を行うことを条件に適用することができる。 The present invention can be applied on condition that at least data transfer is performed.
1 第1CPU
3 ATAインタフェース
4 ハードディスク(HDD)
5 第1CPUバス
6 暗号機能内蔵DMAコントローラ
7 DMA制御部
8 暗号処理回路
9 DMAパラメータ制御信号線
11 周辺回路
12 周辺回路
13 DMAバス
14 プログラムメモリ
15 データメモリ
16,17,18 第2CPUバス
19 第2CPU
103 暗号処理回路
201 ソースアドレスレジスタ
202 デスティネーションアドレスレジスタ
203 転送計数レジスタ
204 アドレス制御回路
205 転送回数制御回路
206 データラッチ回路
207 DMA情報制御回路
208 DMA情報レジスタ
209 アドレスバス
210 データバス
211 転送元メモリ
212 転送先メモリ
301 暗号機能内蔵DMAコントローラ
501 オーディオエンコーダ
601 オーディオデコーダ
1 1st CPU
3 ATA interface 4 Hard disk (HDD)
5 First CPU Bus 6 DMA Controller with
DESCRIPTION OF
Claims (7)
上記第1プログラムとは異なる第2プログラムに従って演算処理可能な第2データ処理部と、
上記第1データ処理部によってアクセス可能な第1メモリと、
上記第2データ処理部によってアクセス可能な第2メモリと、
上記第1メモリから上記第2データ処理部へのDMA転送を可能とするDMAコントローラと、を含み、
上記第1メモリには、上記第1プログラムが上記第1データ処理部で実行可能な状態で格納されるとともに、上記第2プログラムを暗号化したデータが格納されるデータ転送システム。 A first data processing unit capable of performing arithmetic processing according to a first program;
A second data processing unit capable of performing arithmetic processing according to a second program different from the first program;
A first memory accessible by the first data processing unit;
A second memory accessible by the second data processing unit;
A DMA controller that enables DMA transfer from the first memory to the second data processing unit,
A data transfer system in which the first memory stores the first program in a state executable by the first data processing unit, and stores data obtained by encrypting the second program.
転送先アドレスを格納可能な第2レジスタと、
上記第1レジスタに格納された転送元アドレスで特定される領域に存在するデータの暗号化処理又は復号化処理を可能とする暗号処理回路と、を含み、上記暗号処理回路で復号化された上記第2プログラムを、上記第2レジスタに格納された転送先アドレスで特定される領域に上記DMA転送する請求項1記載のデータ転送システム。 The DMA controller includes a first register capable of storing a transfer source address;
A second register capable of storing a transfer destination address;
An encryption processing circuit that enables encryption processing or decryption processing of data existing in an area specified by the transfer source address stored in the first register, and decrypted by the encryption processing circuit The data transfer system according to claim 1, wherein the second program is DMA-transferred to an area specified by a transfer destination address stored in the second register.
上記DMAコントローラと上記第2データ処理回路との間のデータ転送を可能とする第2バスと、を含み、上記暗号処理回路で復号化された上記第2プログラムは、上記第2バスを介して上記第2データ処理回路に上記DMA転送される請求項3記載のデータ転送システム。 A first bus enabling data transfer between the first data processing unit, the first memory, and the DMA controller;
A second bus enabling data transfer between the DMA controller and the second data processing circuit, and the second program decrypted by the encryption processing circuit is transmitted via the second bus. 4. The data transfer system according to claim 3, wherein the DMA transfer is performed to the second data processing circuit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005250853A JP2007065963A (en) | 2005-08-31 | 2005-08-31 | Data transfer system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005250853A JP2007065963A (en) | 2005-08-31 | 2005-08-31 | Data transfer system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007065963A true JP2007065963A (en) | 2007-03-15 |
Family
ID=37928101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005250853A Withdrawn JP2007065963A (en) | 2005-08-31 | 2005-08-31 | Data transfer system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007065963A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011516978A (en) * | 2008-04-01 | 2011-05-26 | アップル インコーポレイテッド | Central DMA with arbitrary processing function |
US8566485B2 (en) | 2005-09-29 | 2013-10-22 | Apple Inc. | Data transformation during direct memory access |
-
2005
- 2005-08-31 JP JP2005250853A patent/JP2007065963A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8566485B2 (en) | 2005-09-29 | 2013-10-22 | Apple Inc. | Data transformation during direct memory access |
JP2011516978A (en) * | 2008-04-01 | 2011-05-26 | アップル インコーポレイテッド | Central DMA with arbitrary processing function |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7336783B2 (en) | Cryptographic systems and methods supporting multiple modes | |
JP4843531B2 (en) | Encryption conversion apparatus, encryption conversion method, and encryption conversion program | |
WO2008083365A1 (en) | Architecture and instruction set for implementing advanced encryption standard (aes) | |
JP2006085676A (en) | Encryption instruction processing apparatus | |
JP2004226966A (en) | Cryptographic apparatus for supporting multiple modes | |
JP2008283672A (en) | Performing aes encryption or decryption in multiple modes with single instruction | |
JP5118494B2 (en) | Memory system having in-stream data encryption / decryption function | |
JP4619361B2 (en) | Recording medium having encryption instruction information | |
JP2004126323A (en) | Method and circuit for block ciphering, ciphering device, method and circuit for block deciphering, and deciphering device | |
JP2008524969A5 (en) | ||
JP2004199688A (en) | Secure driver | |
KR101126596B1 (en) | Dual mode aes implementation to support single and multiple aes operations | |
JP2007065963A (en) | Data transfer system | |
US7386124B2 (en) | Block encoding method and block encoding/decoding circuit | |
KR20080112082A (en) | Data encryption method and encrypted data reproduction method | |
JP2006330126A (en) | Ciphering processing method and deciphering processing method | |
WO2018205512A1 (en) | Information encryption and decryption method, set-top box, system, and storage medium | |
JP2006254099A (en) | Microprocessor | |
EP2676190B1 (en) | System, method and computer program product for application-agnostic audio acceleration | |
JP2001177516A (en) | Method and device for enciphering and decoding, and recording medium | |
JP2007043345A (en) | Communication device and processing method in it | |
JP2006246541A (en) | Digital information managing apparatus | |
JP2009037173A (en) | Data processing apparatus | |
JP2009075474A (en) | Cryptography processor | |
JP2007102468A (en) | Dma transfer circuit and dma controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20081104 |