JP2007065963A - Data transfer system - Google Patents

Data transfer system Download PDF

Info

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
Application number
JP2005250853A
Other languages
Japanese (ja)
Inventor
Hironori Koami
宏典 小網
Naohiro Nishikawa
直宏 西川
Takashi Nakamoto
貴士 中本
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2005250853A priority Critical patent/JP2007065963A/en
Publication of JP2007065963A publication Critical patent/JP2007065963A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data transfer system whose security is reinforced. <P>SOLUTION: The data transfer system is provided with: a first data processing part (101) for performing arithmetic processing according to a first program; a second data processing part (105) for performing arithmetic processing according to a second program; a first memory (104) for performing access by the first data processing part; a second memory (106) for performing access by the second data processing part; and a DMA controller (301) for operating DMA transfer from the first memory to the second data processing part. Then, the first program is stored so as to be executable by the first processing part, and the second program is stored in an encrypted status in the first memory. The rewriting of the second program in the second memory is made possible by the DMA transfer. The second program in the first memory is encrypted, so that security is reinforced. <P>COPYRIGHT: (C)2007,JPO&INPIT

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.

特開平7−21118号公報JP 7-21118 A 特開2000−286898号公報JP 2000-286898 A

マルチメディア信号を取り扱うシステムにおいて、ディジタル・シグナル・プロセッサ(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 CPU 101 that controls the entire system based on a program, a DMA controller 102 that handles data transfer, an encryption processing circuit 103 that performs encryption or decryption, and a main memory 104. . Also, a DSP (digital signal processor) 105 that performs signal processing based on a program, a program memory 106 that stores a program that the DSP 105 fetches and performs signal processing, and a temporary processing when the DSP 105 performs signal processing. In particular, a data memory 107 for storing data, a peripheral circuit 108 for performing predetermined signal processing, and a bus 109 are provided. The DMA controller 102, the cryptographic processing circuit 103, the main memory 104, the DSP 105, and the peripheral circuit 108 are coupled by a bus 109 so that data can be exchanged with each other.

バス109はデータバス、アドレスバスを含む。DSP105のプログラムメモリ106やデータメモリ107の容量には制約があり、できるだけ小規模にすることが望ましい。そのため、プログラムを例にとると、プログラムメモリ106に格納しきれないプログラムを安価で集積度を高くできるメインメモリ104に予め格納しておき、プログラムメモリ106の内容の書き換えを繰り返してDSP105を動作させるのが普通である。本発明の特徴点としては、メインメモリ104にはDSP105が必要とするプログラムの大部分を格納するため、セキュリティの観点からデータの暗号化を行っていることである。   The bus 109 includes a data bus and an address bus. The capacity of the program memory 106 and the data memory 107 of the DSP 105 is limited, and it is desirable to make it as small as possible. Therefore, taking a program as an example, a program that cannot be stored in the program memory 106 is stored in advance in the main memory 104 that is inexpensive and can be highly integrated, and the contents of the program memory 106 are rewritten to operate the DSP 105. Is normal. A feature of the present invention is that data is encrypted from the viewpoint of security in order to store most of the programs required by the DSP 105 in the main memory 104.

CPU101あるいはDSP105は、バス109を通じてDMAコントローラ102を動作させるためのDMAパラメータを設定する。DMAパラメータとは、起動するDMAチャネルの転送元アドレスや転送先アドレス、転送回数等のDMA転送に必要な初期設定値である。ここでは、DMAチャネル0およびDMAチャネル1について設定すると仮定する。DMAコントローラ102は、DMAチャネル0を起動し、メインメモリ104に格納されたデータをバス109を経由して受信する。該データはDSP105のプログラムデータが暗号化されたものであり、これを復号するため、暗号処理回路103に送信する。   The CPU 101 or DSP 105 sets DMA parameters for operating the DMA controller 102 through the bus 109. The DMA parameter is an initial setting value necessary for DMA transfer, such as a transfer source address, a transfer destination address, and a transfer count of a DMA channel to be activated. Here, it is assumed that DMA channel 0 and DMA channel 1 are set. The DMA controller 102 activates the DMA channel 0 and receives data stored in the main memory 104 via the bus 109. The data is obtained by encrypting the program data of the DSP 105, and is transmitted to the encryption processing circuit 103 in order to decrypt it.

暗号処理回路103は該プログラムデータが暗号化されたものを復号化し、内部に保持する。DMAコントローラ102は、DMAチャネル1も起動し、DMAチャネル0の転送に支障がないよう、暗号処理回路103にアクセスし、該プログラムデータを受信する。該データはDSP105が特別の処理なしにフェッチ、デコードできる平文であり、DSP105を経由してプログラムメモリ106に送信される。DSP105は、プログラムメモリ106に格納されたプログラムに基づいて信号処理を行う。   The cryptographic processing circuit 103 decrypts the encrypted program data and holds it inside. The DMA controller 102 also activates the DMA channel 1, accesses the cryptographic processing circuit 103 and receives the program data so that there is no hindrance to the transfer of the DMA channel 0. The data is plain text that can be fetched and decoded by the DSP 105 without special processing, and is transmitted to the program memory 106 via the DSP 105. The DSP 105 performs signal processing based on a program stored in the program memory 106.

上述のように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 DMA controller 102 activates the DMA channel 0 and receives data stored in the main memory 104 via the bus 109. The data is obtained by encrypting the program data of the DSP 105, and is transmitted to the encryption processing circuit 103 in order to decrypt it. The cryptographic processing circuit 103 decrypts the encrypted program data and holds it inside. This processing is performed a predetermined number of times, and plaintext programs are stored in the buffer of the cryptographic processing circuit 103 as needed. A plain text program may be automatically written in the main memory 104 or the like. When the predetermined number of times of processing is completed and DMA channel 0 transfer is completed, a necessary value is set again for DMA channel 0, and the plaintext program stored in the buffer of the cryptographic processing circuit 103 is transferred to the DMA controller 102. To the DSP 105. This can be realized by performing such processing a predetermined number of times. When the plain text program is stored in the main memory 104 or the like, the program is transferred from the main memory 104 to the DMA controller 102 and transferred to the DSP 105.

図3には、図2におけるDMAコントローラ102の詳細な構成が示される。   FIG. 3 shows a detailed configuration of the DMA controller 102 in FIG.

バス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 bus 109 includes an address bus 209 that enables the transfer of address signals and a data bus 210 that enables the transfer of data. The DMA controller 102 controls a source address register 201 that stores a transfer source address for each DMA channel, a destination address register 202 that stores a transfer destination address for each DMA channel, and a source address register 201 and a destination address register 202. The address control circuit 204 that performs the transfer, the transfer count register 203 that stores the transfer count for each DMA channel, the transfer count control circuit 205 that controls the transfer count register 203, and the data read from the transfer source memory 211 are temporarily stored. A data latch circuit 206, a DMA information register 208 that stores a plurality of information related to DMA transfer, and a DMA information control circuit 207 that controls DMA transfer based on the DMA information stored in the DMA information register 208 In constructed. The DMA information control circuit 207 controls, for example, the DMA channel to be activated. Hereinafter, a case where the DMA channel 0 is activated and data in the transfer source memory 211 is transferred to the transfer destination memory 212 will be described. Although not particularly limited, the transfer source memory 211 corresponds to the main memory 104, and the transfer destination memory 212 is a memory built in the encryption processing circuit 103.

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 information control circuit 207 based on the DMA information in the DMA information register 208, the address control circuit 204 selects the transfer source address (SAR0) of the DMA channel 0 from the source address register 201, and the address Output to the bus 209. The transfer source memory 211 outputs the data stored at the address to the data bus 210. The data is temporarily stored in the data latch circuit 206. The address control circuit 204 selects the transfer destination address (DAR0) of the DMA channel 0 from the destination address register 202 and outputs it to the address bus 209. At the same time, the data latch circuit 206 outputs the temporarily stored data to the data bus 210. The transfer destination memory 212 stores the data in an area specified by the address. Through this series of operations, the transfer count control circuit 205 subtracts 1 from the transfer count (TCR0) of the DMA channel 0 stored in the transfer count register 203 and updates it. Similarly, the address control circuit 204 updates SAR0 and DAR0 based on a predetermined method. The DMA controller 102 repeats the above operation and performs DMA transfer until TCR0 becomes 0. In order to realize transfer different from the DMA information of DMA channel 0 including the transfer source, transfer destination, etc., normally, another DMA channel is used, or another transfer is instructed after TCR0 becomes 0, and the DMA channel is renewed. It is necessary to start 0.

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 DMA controller 102 accesses the transfer source memory 211 until it receives data, and the data is latched and transferred to the transfer destination memory 212. And the time required to output the address and data to the address bus and data bus, respectively.

このように、DSP105用のプログラムを暗号化してメインメモリ104に格納することにより、セキュリティの強化を図ることができる。   As described above, by encrypting the program for the DSP 105 and storing it in the main memory 104, security can be enhanced.

<実施の形態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 CPU 101 may read the plaintext. This embodiment is intended to solve the problems newly found by such inventors.

この装置は、暗号機能内蔵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 DMA controller 301 with a cryptographic function, a CPU 101, a main memory 104, a DSP 105, a program memory 106 of the DSP 105, a data memory 107 of the DSP 105, and a peripheral circuit 108, and a single crystal silicon substrate by a known semiconductor integrated circuit manufacturing technique. Formed on one semiconductor substrate. The cryptographic function built-in DMA controller 301, CPU 101, main memory 104, DSP 105, and peripheral circuit 108 are coupled to each other via a bus 109 so that data can be exchanged. The bus 109 includes a data bus and an address bus. Here, the CPU 101 is an example of a first data processing unit in the present invention, and the DSP 105 is an example of a second data processing unit in the present invention. The main memory 104 corresponds to the first memory in the present invention, and the program memory 106 corresponds to the second memory in the present invention.

CPU101は、所定のプログラムに基づいて暗号機能内蔵DMAコントローラ301を起動するためのパラメータ設定を指示したり、システム全体を制御する。プログラムメモリ106は、DSP105が信号処理を実行するためのプログラムを格納するためのメモリであり、データメモリ107は、DSP105がプログラムに基づいて処理したデータを一時的に保持するためのメモリである。メインメモリ104は、DSP105が信号処理を実行するための大容量のプログラムを格納したり、周辺回路108が必要とするデータを格納する。本例では、メインメモリ104に格納されたプログラムは、暗号処理回路103で復号できる暗号化方式で暗号化されており、プログラムメモリ106が格納できるプログラム容量以上のプログラムを格納しているものとする。   The CPU 101 instructs parameter setting for starting the encryption function built-in DMA controller 301 based on a predetermined program, and controls the entire system. The program memory 106 is a memory for storing a program for the DSP 105 to execute signal processing, and the data memory 107 is a memory for temporarily holding data processed by the DSP 105 based on the program. The main memory 104 stores a large-capacity program for the DSP 105 to execute signal processing, and stores data required by the peripheral circuit 108. In this example, it is assumed that the program stored in the main memory 104 is encrypted by an encryption method that can be decrypted by the encryption processing circuit 103, and stores a program larger than the program capacity that can be stored in the program memory 106. .

以下、メインメモリ104に格納され、暗号化されたDSP105のプログラムを復号し、プログラムメモリ106に転送する動作について説明し、同様の動作を繰り返すことによってプログラムメモリ106の記憶内容を入れ替える動作について説明する。   Hereinafter, the operation of decrypting the encrypted program of the DSP 105 stored in the main memory 104 and transferring it to the program memory 106 will be described, and the operation of replacing the stored contents of the program memory 106 by repeating the same operation will be described. .

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 CPU 101 or the DSP 105 sets a DMA parameter for operating the DMA function built-in DMA controller 301 through the bus 109. The DMA parameter is an initial setting value for DMA transfer, such as the SAR 201, the DAR 202, the TCR 203, and the DMA information register 208. When the cryptographic function built-in DMA controller 301 is activated, the cryptographic function built-in DMA controller 301 accesses the main memory 104 via the bus 109 and receives the program data of the DSP 105 encrypted via the bus 109. The received data is input to a cryptographic processing circuit 103 in a cryptographic function built-in DMA controller, which will be described later, is decrypted by a predetermined algorithm, and is held therein. In accordance with an instruction from the DMA information control circuit 207 in the encryption function built-in DMA controller as will be described later, data held in the encryption processing circuit 103 is output and stored in the program memory 106 via the DSP 105. The DSP 105 fetches plain text program data stored in the program memory 106 and performs predetermined signal processing based on the program. After performing predetermined signal processing, the DSP 105 sets a DMA transfer parameter for starting the encryption function built-in DMA controller, and starts the DMA. The CPU 101 may set the DMA transfer parameter. When the cryptographic function built-in DMA controller 301 is activated, the contents of the program memory are updated through the above-described process, and the DSP 105 resumes signal processing based on the updated program. By repeating the above operation, the DSP 105 can perform predetermined signal processing even when the program memory 106 is small.

図4には、上記暗号機能内蔵DMAコントローラ301の構成例が示される。   FIG. 4 shows a configuration example of the above-described encryption function-containing DMA controller 301.

図4に示される暗号機能内蔵DMAコントローラ301が図3に示されるDMAコントローラ102と大きく相違するのは、データラッチ回路206に代えて暗号処理回路103を有する点である。この暗号処理回路103は、データの暗号化処理機能、及び暗号化されたデータの復号化処理機能を有する。バス109は、アドレスバス209とデータバス210とを含む。アドレスバス209は、アドレス制御回路204に結合され、データバス210は、暗号処理回路103に結合される。   A significant difference between the DMA controller 301 with a cryptographic function shown in FIG. 4 and the DMA controller 102 shown in FIG. 3 is that it has a cryptographic processing circuit 103 instead of the data latch circuit 206. The encryption processing circuit 103 has a data encryption processing function and a decryption processing function of encrypted data. The bus 109 includes an address bus 209 and a data bus 210. Address bus 209 is coupled to address control circuit 204, and data bus 210 is coupled to cryptographic processing circuit 103.

転送元メモリ211には暗号化されたデータが格納され、暗号機能内蔵DMAコントローラ301内部で復号化し、転送先メモリ212に平文データを転送する場合について説明する。尚、特に制限されないが、図4における転送元メモリ211は上記メインメモリ104に相当し、転送先メモリ212は上記DSP105もしくはその周辺に配置されたメモリとされる。   A case will be described in which encrypted data is stored in the transfer source memory 211, decrypted within the DMA controller 301 with a built-in encryption function, and plain text data is transferred to the transfer destination memory 212. Although not particularly limited, the transfer source memory 211 in FIG. 4 corresponds to the main memory 104, and the transfer destination memory 212 is a memory arranged in the DSP 105 or its periphery.

図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 controller 102 shown in FIG. 3, when the DMA information control circuit 207 activates, for example, the DMA channel 0 based on the DMA information in the DMA information register 208, the address control circuit 204 starts from the source address register 201 to the DMA channel. A transfer source address (SAR0) of 0 is selected and output to the address bus 209. The transfer source memory 211 outputs the data stored at the address to the data bus 210. The data is received by the cryptographic processing circuit 103. The cryptographic processing circuit 103 decrypts received data based on a predetermined algorithm such as DES encryption, and holds plaintext data therein. The address control circuit 204 selects the transfer destination address (DAR0) of the DMA channel 0 from the destination address register 202 and outputs it to the address bus 209. At the same time, the encryption processing circuit 103 outputs the stored plaintext data to the data bus 210. In the transfer destination memory 212, plain text data is stored in an area specified by the address. Through this series of operations, the transfer count control circuit 205 subtracts 1 from the transfer count (TCR0) of the DMA channel 0 stored in the transfer count register 203 and updates it. Similarly, the address control circuit 204 updates SAR0 and DAR0 based on a predetermined method. The encryption function built-in DMA controller 301 repeats the above operation and performs DMA transfer until TCR0 becomes 0.

このように転送元に暗号化されたデータが格納され、転送先に平文データを送信する場合において、暗号機能内蔵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 DMA controller 301 is used, only one DMA channel is required. Therefore, the latency generated in the transfer is minimized, and the amount is about half that of the case where two DMA channels are used. Also, unlike the configuration shown in FIG. 2, 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, leading to enhanced security.

上記の例によれば、以下の作用効果を得ることができる。   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 DMA controller 301 requires only one DMA channel. Latency is minimized, and the amount is approximately half that of the case where two DMA channels are used. The same applies when plaintext data is encrypted and transmitted to the transfer destination, and the data throughput is doubled.

(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 DMA controller 301. Efficient data transfer can be realized at scale.
<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 peripheral circuit 108. The encoding device 501 is provided.

一般的に、メディア信号の符号化システムには、割込み処理回路や、バス制御回路、外部インタフェース等の回路を必要とするが、本例では説明の便宜上、それらを省略している。また、本例では、オーディオ信号を例にとって、メディア信号符号化装置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 signal encoding device 501 receives audio PCM (Pulse Code Modulation) data as input, and is encoded with AAC (Advanced Audio Coding), MP3 (MPEG1 Audio Layer 3), or the like. A signal (referred to as an audio stream) is output.

以下、メディア信号符号化装置501で生成されたオーディオストリームを暗号化し、それをメインメモリ104に格納するまでの動作を説明する。オーディオストリームは、メディア信号符号化装置501内の図示されない内部メモリに格納されているものとする。   Hereinafter, an operation from encrypting an audio stream generated by the media signal encoding device 501 to storing it in the main memory 104 will be described. It is assumed that the audio stream is stored in an internal memory (not shown) in the media signal encoding device 501.

CPU101の指示で暗号機能内蔵DMAコントローラ301が起動すると、暗号機能内蔵DMAコントローラ301は、メディア信号符号化装置501にアクセスし、オーディオストリームを受信する。続いて暗号機能内蔵DMAコントローラ301の内部でオーディオストリームを暗号化し、内部で保持する。最後に、暗号機能内蔵DMAコントローラ301は暗号化されたオーディオストリームを出力し、メインメモリ104に格納する。このように、転送元のデータを暗号化して転送先に送信する場合も、本例のようなシステム構成にすればデータ転送にかかるレイテンシは最小限で済み、最小限の回路規模で、しかも安全で効率の良いDMA転送を実現することができる。
<実施の形態3>
図6には、本発明にかかるデータ転送システムが適用されたデータ処理装置の別の構成例が示される。
When the encryption function built-in DMA controller 301 is activated by an instruction from the CPU 101, the encryption function built-in DMA controller 301 accesses the media signal encoding device 501 and receives an audio stream. Subsequently, the audio stream is encrypted inside the DMA controller with built-in encryption function 301 and held inside. Finally, the encryption function built-in DMA controller 301 outputs the encrypted audio stream and stores it in the main memory 104. In this way, even when the transfer source data is encrypted and sent to the transfer destination, the system configuration as in this example requires minimal data transfer latency, a minimum circuit scale, and safety. Thus, efficient DMA transfer can be realized.
<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 peripheral circuit 108. The point is that a media signal decoding device 601 is provided which outputs the data.

一般的に、メディア信号のストリームを復号する復号化システムには割込み処理回路やバス制御回路、外部インタフェース等の回路を必要とするが、本例では説明の便宜上、それについての説明を省略する。また、本例では、オーディオ信号を例にとって、メディア信号復号化装置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 signal decoding apparatus 601 receives an audio stream, decodes it, and outputs PCM data.

以下、メインメモリ104に格納され、暗号化されたオーディオストリームを復号化し、メディア信号復号化装置601にオーディオストリームを送信するまでの動作を説明する。   Hereinafter, an operation from decrypting an encrypted audio stream stored in the main memory 104 to transmitting the audio stream to the media signal decrypting apparatus 601 will be described.

CPU101の指示で暗号機能内蔵DMAコントローラ301が起動すると、暗号機能内蔵DMAコントローラ301は、メインメモリ104にアクセスし、暗号化されたオーディオストリームを受信する。続いて暗号機能内蔵DMAコントローラ301の内部で該オーディオストリームを暗号について復号化し、内部で保持する。最後に、暗号機能内蔵DMAコントローラ301は該オーディオストリームを出力し、メディア信号復号化装置601に送信する。このように、暗号化された転送元のデータを復号化して転送先に送信する場合、本例のようなシステム構成にすればデータ転送にかかるレイテンシは最小限で済み、最小限の回路規模で、しかも安全で効率が良いDMA転送を実現することができる。
<実施の形態4>
図7には、本発明にかかるデータ転送システムが適用されたデータ処理装置の別の構成例が示される。
When the encryption function built-in DMA controller 301 is activated by an instruction from the CPU 101, the encryption function built-in DMA controller 301 accesses the main memory 104 and receives the encrypted audio stream. Subsequently, the audio stream is decrypted with respect to the cipher in the DMA controller 301 with a built-in encryption function, and held inside. Finally, the encryption function built-in DMA controller 301 outputs the audio stream and transmits it to the media signal decryption apparatus 601. In this way, when the encrypted transfer source data is decrypted and transmitted to the transfer destination, the latency for data transfer can be minimized with the system configuration as in this example, and the circuit scale can be minimized. In addition, safe and efficient DMA transfer can be realized.
<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 CPU 101 can be connected. The inventor has newly found that there is a possibility of being read. This embodiment is intended to solve the problems newly found by such inventors.

図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 register 10, peripheral circuits 11 and 12, a program memory 14, a data memory 15, And a second CPU 19, which are formed on one semiconductor substrate such as a single crystal silicon substrate by a known semiconductor integrated circuit manufacturing technique. Furthermore, a hard disk (HDD) 4 is included. The encryption function built-in DMA controller 6 includes a DMA control unit 7 and a cryptographic processing circuit 8, and basically has the same configuration as the encryption function built-in DMA controller 301 shown in FIG. That is, the cryptographic processing circuit 8 in FIG. 7 corresponds to the cryptographic processing circuit 103 in FIG. 4, and the DMA control unit 7 in FIG. 7 is other than the cryptographic processing circuit 103 in the encryption function built-in DMA controller 301 shown in FIG. Corresponds to all blocks. The first CPU 1, main memory 2, ATA interface 3, cryptographic function built-in DMA controller 6, and peripheral circuits 11 and 12 are configured to be able to exchange data with each other via a bus 5. The encryption function built-in DMA controller 6 and the register 10 are coupled by a DMA parameter control signal line 9. The encryption function built-in DMA controller 6 and the peripheral circuits 11 and 12 are coupled by a DMA bus 13. The second CPU 19 is coupled to the cryptographic function built-in DMA controller 6 via the second CPU bus 16, coupled to the register 10 via the second CPU bus 17, and coupled to the peripheral circuits 11 and 12 via the second CPU bus 18. . Here, the first CPU 1 is an example of a first data processing unit in the present invention, and the second CPU 19 is an example of a second data processing unit in the present invention.

図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 second CPU 19 sets the control parameter of the DMA control unit 7 in the register 10 via the bus 17 (step 801). Specifically, the transfer source address is set in SAR0, the transfer destination address is set in DAR0, and the transfer count is set in TCR0 (see FIG. 4). If the DMA transfer end condition is not satisfied in step 802, the DMA control unit 7 reads the encrypted data stored in the main memory 2 via the first CPU bus 5 (step 803). The encrypted data is data obtained by previously encrypting a program for operating the second CPU 19. Next, the encrypted data is latched inside the DMA control unit 7 (step 804). Subsequently, the cryptographic processing circuit 8 decrypts the encrypted data (step 805). Subsequently, the DMA control unit 7 transmits the decrypted plaintext to the second CPU 19 via the second CPU bus 16 (step 806). Here, the second CPU bus 16 is a bus that cannot be read from the outside connecting the DMA controller 6 with a cryptographic function and the CPU 2. By these operations, the plain text is stored in the program memory 14 (step 807). Then, the control parameters SAR0, DAR0 and TCR0 of the DMA control unit 7 are updated by a predetermined method (step 808). After these series of steps, it is determined again in step 802 whether or not the DMA transfer end condition is satisfied, and when it is satisfied, the DMA transfer is ended. If not established, the same operation is repeated from step 803 again, and the plaintext is stored in the program memory 14.

以上の動作により、メインメモリ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 second CPU 19 and safely transferred to the program memory 14. In addition, by encrypting and transferring the DMA channel at the time of DMA transfer using only one channel, the latency for the target transfer can be minimized.

次に、周辺回路11をオーディオデコーダとし、オーディオストリームを暗号化したデータの復号化動作について、図9の復号化フローチャートに基づいて説明する。   Next, the decoding operation of data obtained by encrypting the audio stream using the peripheral circuit 11 as an audio decoder will be described based on the decoding flowchart of FIG.

オーディオストリームを暗号化したデータは、予めハードディスク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 step 901, the first CPU 1 sets the control parameter of the DMA control unit 7 in the register 10 via the first CPU bus 5. Specifically, the transfer source address is set in SAR0, the transfer destination address is set in DAR0, and the transfer count is set in TCR0.

次に、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 DMA control unit 7 sends the hard disk 4 via the ATA interface 3 and the first CPU bus 5 in step 903. Read the stored encrypted data. Subsequently, the encrypted data is latched in the DMA controller 7 (step 904). Then, the encryption processing circuit 8 decrypts the encrypted data (step 905). Subsequently, the DMA control unit 7 transmits the decrypted plaintext (audio stream) to the peripheral circuit 11 (audio decoder) via the DMA bus 13 (step 906). Here, the DMA bus 13 is a bus that cannot be read from the first CPU 1, the second CPU 19, and the outside, which connect the DMA controller 6 with a cryptographic function, the peripheral circuit 11, and the peripheral circuit 12. With these operations, the audio stream is decoded by the audio decoder by a predetermined method (step 907). Then, the control parameters SAR0, DAR0 and TCR0 of the DMA control unit 7 are updated by a predetermined method (step 908). After these series of steps, it is determined again in step 902 whether or not the DMA transfer end condition is satisfied, and when it is satisfied, the DMA transfer is ended. If not, the same operation is repeated from step 903 again.

以上の動作により、ハードディスク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 peripheral circuit 12 and storing it in the hard disk 4 will be described with reference to the flowchart of FIG. It is assumed that the audio stream is generated in advance by the peripheral circuit 12.

ステップ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 step 1001, the first CPU 1 sets the control parameters (transfer source address in SAR 0, transfer destination address in DAR 0, transfer count in TCR 0) in the register 10 via the first CPU bus 5. Next, it is determined whether or not the DMA transfer end condition is satisfied (step 1002). If not satisfied, the DMA control unit 7 is stored in the peripheral circuit 12 via the DMA bus 13 in step 1003. Read audio stream (plaintext). The DMA bus 13 is a bus that cannot be read from the first CPU 1, the second CPU 19 and the outside. Subsequently, the audio stream is latched inside the DMA control unit 7 (step 1004). Subsequently, the encryption processing circuit 8 encrypts the audio stream (step 1005). Next, the DMA control unit 7 transmits the encrypted data to the hard disk 4 via the first CPU bus 5 and the ATA interface 3 (step 1006). Through these operations, the data obtained by encrypting the audio stream is stored in the hard disk 4 (step 1007). Then, the control parameters SAR0, DAR0 and TCR0 of the DMA control unit 7 are updated by a predetermined method (step 1008). After these series of steps, it is determined again in step 1002 whether or not the DMA transfer end condition is satisfied, and when it is satisfied, the DMA transfer is ended. If not established, the same operation is repeated again from step 1003, and the data obtained by encrypting the audio stream is transmitted to the hard disk 4.

以上の動作により、周辺回路12で予めエンコードされて生成されたオーディオストリームを暗号化し、安全にハードディスク4に転送することができる。また、DMAチャネルを1チャネルのみを用いてDMA転送時に暗号化して転送することにより、目的の転送にかかるレイテンシを最小限に抑えることができる。   With the above operation, the audio stream encoded and generated in advance by the peripheral circuit 12 can be encrypted and transferred to the hard disk 4 safely. In addition, by encrypting and transferring the DMA channel at the time of DMA transfer using only one channel, the latency for the target transfer can be minimized.

以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   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 is a block diagram illustrating a configuration example of a data processing apparatus to which a data transfer system according to the present invention is applied. 本発明に係るデータ転送システムが適用されたデータ処理装置の別の構成例ブロック図である。It is another example block diagram of a data processing apparatus to which the data transfer system according to the present invention is applied. 図2における主要部の構成例ブロック図である。FIG. 3 is a block diagram illustrating a configuration example of a main part in FIG. 2. 図1における主要部の構成例ブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a main part in FIG. 1. 上記データ処理装置の別の構成例ブロック図である。It is another structural example block diagram of the said data processor. 上記データ処理装置の別の構成例ブロック図である。It is another structural example block diagram of the said data processor. 上記データ処理装置の別の構成例ブロック図である。It is another structural example block diagram of the said data processor. 図7に示されるデータ処理装置における主要動作のフローチャートである。It is a flowchart of the main operation | movement in the data processor shown by FIG. 図7に示されるデータ処理装置における主要動作のフローチャートである。It is a flowchart of the main operation | movement in the data processor shown by FIG. 図7に示されるデータ処理装置における主要動作のフローチャートである。It is a flowchart of the main operation | movement in the data processor shown by FIG.

符号の説明Explanation of symbols

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 Cryptographic Function 7 DMA Controller 8 Cryptographic Processing Circuit 9 DMA Parameter Control Signal Line 11 Peripheral Circuit 12 Peripheral Circuit 13 DMA Bus 14 Program Memory 15 Data Memory 16, 17, 18 Second CPU Bus 19 Second CPU
DESCRIPTION OF SYMBOLS 103 Encryption processing circuit 201 Source address register 202 Destination address register 203 Transfer count register 204 Address control circuit 205 Transfer count control circuit 206 Data latch circuit 207 DMA information control circuit 208 DMA information register 209 Address bus 210 Data bus 211 Transfer source memory 212 Destination memory 301 DMA controller with built-in encryption function 501 Audio encoder 601 Audio decoder

Claims (7)

第1プログラムに従って演算処理可能な第1データ処理部と、
上記第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.
上記DMAコントローラは、暗号化された上記第2プログラムを復号化する機能を有し、上記DMA転送によって上記第2メモリにおける上記第2プログラムの書き換えが可能とされていることを特徴とする請求項1記載のデータ転送システム。   The DMA controller has a function of decrypting the encrypted second program, and the second program in the second memory can be rewritten by the DMA transfer. 1. The data transfer system according to 1. 上記DMAコントローラは、転送元アドレスを格納可能な第1レジスタと、
転送先アドレスを格納可能な第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.
上記第1データ処理部と、上記第1メモリと、上記DMAコントローラとの間のデータ転送を可能とする第1バスと、
上記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.
入力されたメディア信号を符号化可能なメディア信号符号化装置を含み、上記DMAコントローラは、上記メディア信号符号化装置で符号化されたメディア信号を上記暗号処理回路で暗号化してから上記第1メモリへDMA転送する請求項4記載のデータ転送システム。   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; 5. The data transfer system according to claim 4, wherein the data transfer system performs DMA transfer to the network. 符号化されたメディア信号を復号化可能なメディア信号復号化装置を含み、上記DMAコントローラは、上記第1メモリ内の暗号化されたメディア信号を復号化してから上記メディア信号復号化装置にDMA転送する請求項4記載のデータ転送システム。   A media signal decoding device capable of decrypting the encoded media signal, wherein the DMA controller decrypts the encrypted media signal in the first memory and then performs DMA transfer to the media signal decoding device. The data transfer system according to claim 4. 上記第1データ処理部と、上記第2データ処理部と、上記第1メモリと、上記第2メモリと、上記DMAコントローラとが一つの半導体基板上に形成されている請求項1記載のデータ転送システム。   2. The data transfer according to claim 1, wherein the first data processing unit, the second data processing unit, the first memory, the second memory, and the DMA controller are formed on one semiconductor substrate. system.
JP2005250853A 2005-08-31 2005-08-31 Data transfer system Withdrawn JP2007065963A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (2)

* Cited by examiner, † Cited by third party
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