JP2006254099A - Microprocessor - Google Patents

Microprocessor Download PDF

Info

Publication number
JP2006254099A
JP2006254099A JP2005067841A JP2005067841A JP2006254099A JP 2006254099 A JP2006254099 A JP 2006254099A JP 2005067841 A JP2005067841 A JP 2005067841A JP 2005067841 A JP2005067841 A JP 2005067841A JP 2006254099 A JP2006254099 A JP 2006254099A
Authority
JP
Japan
Prior art keywords
data
encryption
microprocessor
encrypted
encryption method
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.)
Pending
Application number
JP2005067841A
Other languages
Japanese (ja)
Inventor
Yoshiteru Tanaka
義照 田中
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005067841A priority Critical patent/JP2006254099A/en
Publication of JP2006254099A publication Critical patent/JP2006254099A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microprocessor, capable of applying encryption for preventing decoding or alteration from the outside to data and programs accessed via a data bus, which can be accessed from the outside. <P>SOLUTION: A microprocessor 1 encrypts a plurality of data, and comprises a storage portion 3 for storing information on a plurality of encryption methods, a selection control portion 4 for selecting one of the plurality of encryption methods from the storage portion 3, and an encryption portion 5 for encrypting data, in accordance with the selected encryption method from the selection control portion 4. Since the microprocessor 1 can encrypt each piece of data with a different encryption method, the microprocessor 1 makes it difficult to decode or tamper from the data or programs of others. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、マイクロプロセッサが処理するデータやプログラムが解読や改ざんされることを防止するマイクロプロセッサに関するものである。   The present invention relates to a microprocessor for preventing data and programs processed by the microprocessor from being decoded or falsified.

マイクロプロセッサが処理のためにアクセスするデータやプログラムは、マイクロプロセッサとデータバスを介して接続されるメモリ中に保存され、処理の必要に応じてマイクロプロセッサからアクセスされる。ここで、データバスはマイクロプロセッサだけでなく、他の装置などからもアクセスが可能であるため、メモリ中のデータやプログラム、あるいはマイクロプロセッサ内部のレジスタに取り込まれたデータやプログラムも他の装置などからアクセス可能である。このように他からアクセス可能であるために、データやプログラムの解読や改ざんが可能である。このため、これらのデータやプログラムの解読や改ざんを防止して機密保護を実現するために、マイクロプロセッサがアクセスするデータやプログラムを暗号化することが行われている。例えば、特許文献1(特開2003−280989号公報)は、アクセスされるデータやプログラムを、異なる暗号化鍵を用いて暗号化するマイクロプロセッサの技術を開示する。あるいは、特許文献1で開示されるマイクロプロセッサは、異なる暗号鍵で暗号化されたこれらのデータやプログラムを、異なる暗号鍵に対応する復号鍵で復号する。   Data and programs that the microprocessor accesses for processing are stored in a memory connected to the microprocessor via a data bus, and are accessed from the microprocessor as needed for processing. Here, since the data bus can be accessed not only by the microprocessor but also by other devices, the data and programs in the memory, or the data and programs fetched into the registers in the microprocessor are also other devices. It is accessible from. In this way, since it can be accessed from others, data and programs can be decrypted and altered. For this reason, data and programs accessed by the microprocessor are encrypted in order to prevent the decryption and falsification of these data and programs to realize confidentiality protection. For example, Patent Document 1 (Japanese Patent Laid-Open No. 2003-280989) discloses a technique of a microprocessor that encrypts data and programs to be accessed using different encryption keys. Or the microprocessor disclosed by patent document 1 decodes these data and programs encrypted with a different encryption key with the decryption key corresponding to a different encryption key.

特許文献1で開示されるマイクロプロセッサは、複数のデータやプログラムを異なる暗号鍵で暗号化するため、より強固な機密保護が実現されていた。   Since the microprocessor disclosed in Patent Document 1 encrypts a plurality of data and programs with different encryption keys, stronger security protection is realized.

しかしながら、近年の暗号化データの解読技術などの進歩により、暗号化するデータやプログラム毎に暗号鍵を相違させただけでは、解読防止などが不十分である。特に、暗号化方式が解読されることで、暗号鍵の異なる全ての暗号化データが解読されてしまう問題があった。更には、解読されたデータやプログラムが改ざんされることも生じる問題もあった。   However, with recent advances in decryption techniques for encrypted data, it is not sufficient to prevent decryption and the like just by changing the encryption key for each data or program to be encrypted. In particular, there is a problem in that all encrypted data having different encryption keys are decrypted by decrypting the encryption method. Furthermore, there has been a problem that the decrypted data and programs may be falsified.

特に、マイクロプロセッサがアクセスするデータやプログラムは、データバスを介して他からアクセスが可能であるため、暗号化の解読によりデータやプログラムの中身が容易に入手されてしまう問題があった。
特開2003−280989号公報
In particular, since data and programs accessed by the microprocessor can be accessed from others via a data bus, there is a problem that the contents of data and programs can be easily obtained by decryption of encryption.
JP 2003-280989 A

そこで本発明は、外部からアクセス可能なデータバスを介してアクセスされるデータやプログラムに対して、他からの解読や改ざんを防止する暗号化を施すマイクロプロセッサを提供することを目的とする。   SUMMARY OF THE INVENTION An object of the present invention is to provide a microprocessor that encrypts data and programs accessed via an externally accessible data bus to prevent decryption and alteration from others.

第1の発明に係るマイクロプロセッサは、複数のデータを暗号化するマイクロプロセッサであって、複数の暗号化方式の情報を格納する格納部と、格納部から複数の暗号化方式のいずれかを選択する選択制御部と、選択制御部で選択された暗号化方式に従ってデータの暗号化を行う暗号化部を備え、データ毎に異なる暗号化方式で暗号化する。   The microprocessor according to the first invention is a microprocessor for encrypting a plurality of data, and selects a storage unit for storing information of a plurality of encryption methods and a plurality of encryption methods from the storage unit And an encryption unit that encrypts data in accordance with the encryption method selected by the selection control unit, and encrypts data using different encryption methods.

この構成により、マイクロプロセッサがアクセスするデータやプログラムが、それぞれ別の暗号化方式により暗号化されるため、これらのデータやプログラムの他からの解読や改ざんが困難となる。結果として、マイクロプロセッサがアクセスするデータやプログラムの機密保護の度合いが高まる。   With this configuration, data and programs accessed by the microprocessor are encrypted by different encryption methods, making it difficult to decrypt and alter these data and programs from other sources. As a result, the degree of security of data and programs accessed by the microprocessor is increased.

第2の発明に係るマイクロプロセッサは、格納部は、複数のデータと複数の暗号化方式の組み合わせを有する暗号化方式テーブルを備える。   In the microprocessor according to the second invention, the storage unit includes an encryption method table having a combination of a plurality of data and a plurality of encryption methods.

この構成により、データやプログラム毎に異なる暗号化方式を容易に割り当てることができる。   With this configuration, different encryption methods can be easily assigned to each data and program.

第3の発明に係るマイクロプロセッサは、暗号化方式テーブルは、暗号化されている。   In the microprocessor according to the third invention, the encryption method table is encrypted.

この構成により、データ毎によって割り当てられる暗号化方式に関する情報も、他からの解読が困難となる。   With this configuration, it is difficult to decipher the information related to the encryption method assigned for each data.

第4の発明に係るマイクロプロセッサは、暗号化方式テーブルは、複数のデータの内、相関関係の高い2以上のデータのそれぞれに対して相関関係の低い異なる暗号化方式を割り当てる組み合わせを有する。   In the microprocessor according to the fourth invention, the encryption method table has a combination in which different encryption methods having a low correlation are assigned to each of two or more data having a high correlation among a plurality of data.

この構成により、相関関係の高いデータやプログラムの全ての暗号化が解読されることが極めて困難となる。結果として、機密保護の度合いが更に高まる。   With this configuration, it becomes extremely difficult to decipher all encryption of highly correlated data and programs. As a result, the degree of security is further increased.

第5の発明に係るマイクロプロセッサは、格納部は、暗号化方式に応じた暗号鍵を更に格納する。   In the microprocessor according to the fifth invention, the storage unit further stores an encryption key corresponding to the encryption method.

この構成により、データ毎に暗号化方式に加えて暗号鍵も異ならせて暗号化を行うことができる。   With this configuration, it is possible to perform encryption by changing the encryption key in addition to the encryption method for each data.

第6の発明に係るマイクロプロセッサは、データは、マイクロプロセッサが外部メモリから読み出したデータを含む。   In the microprocessor according to the sixth invention, the data includes data read from the external memory by the microprocessor.

この構成により、マイクロプロセッサとメモリ間のやり取り時における、他からのデータの解読を防止できる。   With this configuration, it is possible to prevent data from being decoded from others during the exchange between the microprocessor and the memory.

第7の発明に係るマイクロプロセッサは、データは、マイクロプロセッサで用いられるプログラムを含む。   In the microprocessor according to the seventh invention, the data includes a program used in the microprocessor.

この構成により、データのみならず、マイクロプロセッサが処理に用いるプログラムが異なる暗号化方式により暗号化される。   With this configuration, not only data but also a program used for processing by the microprocessor is encrypted by different encryption methods.

第8の発明に係るマイクロプロセッサでは、プログラムは、オペレーティングシステム用プログラムを含む。   In the microprocessor according to the eighth aspect of the invention, the program includes an operating system program.

この構成により、マイクロプロセッサが用いるオペレーティングシステム用プログラムも、異なる暗号化方式により暗号化され、オペレーティングシステム用プログラムが、外部メモリに記憶されている場合などにも効果的である。   With this configuration, the operating system program used by the microprocessor is also encrypted by a different encryption method, which is effective when the operating system program is stored in the external memory.

第9の発明に係るマイクロプロセッサでは、複数の暗号化方式は、オペレーティングシステム用プログラム専用の暗号化方式を含む。   In the microprocessor according to the ninth aspect of the invention, the plurality of encryption methods include encryption methods dedicated to operating system programs.

この構成により、オペレーティングシステム用プログラムに対しては、特に機密保護の度合いの高い暗号化を施すことができる。   With this configuration, the operating system program can be encrypted with a particularly high degree of security protection.

第10の発明に係るマイクロプロセッサでは、データの外部メモリからの読み出しアドレスと外部メモリへの書き込みアドレスを制御するメモリ制御部を更に備える。   The microprocessor according to the tenth aspect of the present invention further includes a memory control unit for controlling a read address of data from the external memory and a write address to the external memory.

この構成により、暗号化の前後で変化するアクセス先のアドレスやデータサイズに対応した、メモリにおけるデータ保持が適切に行われる。   With this configuration, data holding in the memory corresponding to the address and data size of the access destination that changes before and after encryption is appropriately performed.

第11の発明に係るマイクロプロセッサでは、メモリ制御部は、データの暗号化前と暗号化後のデータサイズの変化に対応したアドレス制御を行う。   In the microprocessor according to the eleventh aspect, the memory control unit performs address control corresponding to a change in data size before and after data encryption.

この構成により、暗号化の前後で変化するアクセス先のアドレスやデータサイズに対応した、メモリにおけるデータ保持が適切に行われる。   With this configuration, data holding in the memory corresponding to the address and data size of the access destination that changes before and after encryption is appropriately performed.

第12の発明に係るマイクロプロセッサでは、メモリ制御部は、選択制御部で選択された暗号化方式に基づいて、アドレス制御を行う。   In the microprocessor according to the twelfth aspect, the memory control unit performs address control based on the encryption method selected by the selection control unit.

この構成により、暗号化方式情報に基づいてアドレス制御を行うため、暗号化方式によってデータサイズの変化が異なる場合であっても、無駄のないメモリ空間におけるデータ配置が可能となる。   With this configuration, since address control is performed based on the encryption method information, even if the data size varies depending on the encryption method, data can be arranged in a memory space without waste.

第13の発明に係るマイクロプロセッサは、暗号化部で暗号化されたデータを復号する復号部を更に備える。   A microprocessor according to a thirteenth aspect of the present invention further includes a decryption unit that decrypts the data encrypted by the encryption unit.

この構成により、必要に応じてマイクロプロセッサは、暗号化されたデータやプログラムを復号した上で、演算処理などに用いることができる。   With this configuration, the microprocessor can decrypt the encrypted data or program and use it for arithmetic processing or the like as necessary.

本発明によれば、マイクロプロセッサがアクセスするデータやプログラムが、それぞれ別個の暗号化方式で暗号化されるため、これらの暗号化されたデータやプログラムの解読が非常に困難となる。このため、マイクロプロセッサとメモリ間に構成されるバスなどを介した、データの解読や改ざんが困難となり、マイクロプロセッサが必要とするデータやプログラムの機密保護の度合いが高まる効果がある。   According to the present invention, since data and programs accessed by the microprocessor are encrypted by separate encryption methods, it is very difficult to decrypt these encrypted data and programs. For this reason, it is difficult to decode or alter data via a bus or the like configured between the microprocessor and the memory, and there is an effect that the degree of security of data and programs required by the microprocessor is increased.

また、暗号化により変化するデータサイズに対応したメモリ制御を行うことで、機密保護の度合いを高めるために、データやプログラムに応じて暗号化方式を変える場合でも、確実なメモリ書き込みなどが可能となる。このようなメモリ制御により、データやプログラム毎の暗号化方式の割り当ての自由度が高まる効果がある。   In addition, by performing memory control corresponding to the data size that changes due to encryption, even if the encryption method is changed according to the data or program, it is possible to perform reliable memory writing, etc. in order to increase the degree of security protection Become. Such memory control has an effect of increasing the degree of freedom in assigning encryption methods for each data and program.

また、暗号化部に対応する復号部が備えられることで、マイクロプロセッサは、暗号化されたデータやプログラムを容易に演算処理に用いることができる。また、復号においては、暗号化方式に対応した復号方式が用いられるため、機密保護を高めるために複数の暗号化方式が用いられる場合に最適である。   In addition, since the decryption unit corresponding to the encryption unit is provided, the microprocessor can easily use the encrypted data or program for the arithmetic processing. In decryption, since a decryption method corresponding to the encryption method is used, the decryption method is optimal when a plurality of encryption methods are used in order to enhance security.

以下図面を参照しながら、本発明の実施の形態を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

(実施の形態1)
図1から図5を用いて、実施の形態1におけるマイクロプロセッサについて説明する。
(Embodiment 1)
The microprocessor according to the first embodiment will be described with reference to FIGS.

図1は、本発明の実施の形態1におけるマイクロプロセッサのブロック図である。   FIG. 1 is a block diagram of a microprocessor according to Embodiment 1 of the present invention.

最初に、マイクロプロセッサ1の構成について説明する。   First, the configuration of the microprocessor 1 will be described.

マイクロプロセッサ1は、次の要素を備える。プロセッサコア2は、メモリ9などから読み出したプログラムやデータに対して実際の演算を実行し、種々の命令制御を実行する。また、選択制御部4に暗号化の対象となるデータやプログラムの種類を通知する。選択制御部4は、プロセッサコア2からの暗号化対象のデータやプログラムの種類の通知に従い、格納部3を参照して、暗号化対象のデータなどに対応する暗号化方式を選択する。このとき、格納部3に格納された情報に従い、暗号化対象のデータやプログラム毎に異なった暗号化方式が選択される。選択制御部4は、選択結果を暗号化方式情報10として暗号化部5に出力する。   The microprocessor 1 includes the following elements. The processor core 2 executes actual arithmetic operations on programs and data read from the memory 9 and the like, and executes various instruction controls. In addition, the selection control unit 4 is notified of the type of data or program to be encrypted. The selection control unit 4 refers to the storage unit 3 according to the notification of the data to be encrypted and the type of program from the processor core 2 and selects an encryption method corresponding to the data to be encrypted. At this time, according to the information stored in the storage unit 3, a different encryption method is selected for each data or program to be encrypted. The selection control unit 4 outputs the selection result as encryption method information 10 to the encryption unit 5.

格納部3は、暗号化の対象となるデータ毎に割り当てられる暗号化方式の組み合わせなどを格納する。   The storage unit 3 stores a combination of encryption methods assigned to each data to be encrypted.

暗号化部5は、格納部3からの暗号化方式情報10に基づく暗号化方式を用いて、対象となるデータやプログラムを暗号化する。このとき、暗号化対象となるデータやプログラムは、メモリ9からバス8を介して読み出される。暗号化対象となるデータやプログラムによって異なった暗号化方式が選択されているので、データやプログラムに応じて異なった暗号化方式により暗号化が実現される。なお、仕様や必要に応じて、異なるデータやプログラムであっても、同一の暗号化方式により暗号化されても良い。また、暗号化方式が同一の場合に、暗号鍵が変えられても良い。   The encryption unit 5 encrypts target data and programs using an encryption method based on the encryption method information 10 from the storage unit 3. At this time, data and programs to be encrypted are read from the memory 9 via the bus 8. Since different encryption methods are selected depending on the data and program to be encrypted, encryption is realized by different encryption methods depending on the data and program. Note that different data and programs may be encrypted by the same encryption method according to specifications and necessity. Further, when the encryption method is the same, the encryption key may be changed.

バスインターフェース7は、バス8とのデータのやり取りを制御する。メモリ制御部6は、メモリ9へのアクセスにおけるアドレスなどの制御を行う。なお、メモリ制御部6とバスインターフェースは同一のブロックで構成されても良い。   The bus interface 7 controls data exchange with the bus 8. The memory control unit 6 controls an address and the like in accessing the memory 9. Note that the memory control unit 6 and the bus interface may be configured by the same block.

メモリ9には、マイクロプロセッサ1がアクセスするデータやプログラムが記憶されている。マイクロプロセッサ1は、バス8を介してメモリ9に記憶されているデータやプログラムを読み出して、種々の処理に用いる。このとき、メモリ9に記憶されているデータやプログラムが、暗号化部5で暗号化された上でメモリ9に書き出されるので、これらのデータやプログラムは暗号化された状態でメモリ9に記憶される。   The memory 9 stores data and programs that are accessed by the microprocessor 1. The microprocessor 1 reads out data and programs stored in the memory 9 via the bus 8 and uses them for various processes. At this time, since the data and programs stored in the memory 9 are encrypted by the encryption unit 5 and then written to the memory 9, these data and programs are stored in the memory 9 in an encrypted state. The

以上の構成により、マイクロプロセッサ1がメモリ9との間でやり取りするデータやプログラムは、それぞれ異なった暗号化方式で暗号化されるため、他からの解読や改ざんが高い精度で防止される。   With the above configuration, data and programs exchanged between the microprocessor 1 and the memory 9 are encrypted by different encryption methods, so that decryption and alteration from others are prevented with high accuracy.

次に、格納部3の詳細について図2から図4を用いて説明する。   Next, details of the storage unit 3 will be described with reference to FIGS.

格納部3は、暗号化対象となるデータやプログラム毎に、対応する暗号化方式を決定するための情報を格納する。例えば、格納部3はデータやプログラムの種別に対応する暗号化方式の組み合わせを有する暗号化方式テーブル11を格納する。暗号化方式テーブル11は、レジスタやメモリなどを用いて形成される。   The storage unit 3 stores information for determining a corresponding encryption method for each data or program to be encrypted. For example, the storage unit 3 stores an encryption method table 11 having a combination of encryption methods corresponding to the type of data or program. The encryption method table 11 is formed using a register or a memory.

図2、図3、図4は、本発明の実施の形態1における暗号化方式テーブルを表す図である。暗号化方式テーブル11は、暗号化対象のデータやプログラム(あるいはオペレーティングシステム用のプログラム)などと、これらに対応する暗号化方式をテーブル化したものである。   2, FIG. 3, and FIG. 4 are diagrams showing encryption scheme tables in Embodiment 1 of the present invention. The encryption method table 11 is a table of data to be encrypted, programs (or operating system programs), and the corresponding encryption methods.

図2に示される暗号化方式テーブル11は、4つの暗号化対象のデータとこれらに対応する暗号化方式を組み合わせたテーブルである。4つのデータは、第1データ20、第2データ21、第3データ22、第4データ23である。なお、図2では図示の便宜上第1データ20から第3データ23までの4つのデータが表されているが、これ以上であってもこれ以下であっても良い。   The encryption method table 11 shown in FIG. 2 is a table that combines four data to be encrypted and the corresponding encryption methods. The four data are first data 20, second data 21, third data 22, and fourth data 23. In FIG. 2, four data from the first data 20 to the third data 23 are shown for convenience of illustration, but may be more or less than this.

また、第1データ20から第4データ23は、それぞれ異なるデータである。例えば、第1データ20は、フィルタリングに用いられる係数データであったり、第2データ21は、誤り検出のための生成多項式にかかわるデータであったりする。   The first data 20 to the fourth data 23 are different data. For example, the first data 20 may be coefficient data used for filtering, and the second data 21 may be data related to a generator polynomial for error detection.

4つのデータには、各々に別個の暗号化方式が割り当てられている。第1データ20には、第1暗号化方式30が割り当てられている。第2データ21には、第2暗号化方式31が割り当てられている。第3データ22には、第3暗号化方式32が割り当てられている。第4データ23には、第4暗号化方式33が割り当てられている。第1暗号化方式30から第4暗号化方式33は、それぞれ異なる暗号化方式である。   A separate encryption method is assigned to each of the four data. A first encryption scheme 30 is assigned to the first data 20. A second encryption method 31 is assigned to the second data 21. A third encryption scheme 32 is assigned to the third data 22. A fourth encryption method 33 is assigned to the fourth data 23. The first encryption method 30 to the fourth encryption method 33 are different encryption methods.

例えば、第1暗号化方式と第2暗号化方式は、暗号化に用いられる符号長が相違する。あるいは第3暗号化方式はDES方式の暗号化方式であり、第4暗号化方式は楕円符号化方式である。   For example, the first encryption method and the second encryption method have different code lengths used for encryption. Alternatively, the third encryption method is a DES encryption method, and the fourth encryption method is an elliptic coding method.

次に、図3に示される暗号化方式テーブル11では、第1データ20、第2データ21、第1プログラム24、第2プログラム25に異なる暗号化方式が割り当てられている。第1データ20には、第1暗号化方式30が割り当てられている。第2データ21には、第2暗号化方式31が割り当てられている。第1プログラム24には、第3暗号化方式32が割り当てられている。第2プログラム25には、第4暗号化方式33が割り当てられている。このように、データのみでなく、マイクロプロセッサ1がアクセスするプログラムも異なる暗号化方式が割り当てられて、暗号化が実行される。   Next, in the encryption method table 11 shown in FIG. 3, different encryption methods are assigned to the first data 20, the second data 21, the first program 24, and the second program 25. A first encryption scheme 30 is assigned to the first data 20. A second encryption method 31 is assigned to the second data 21. The first encryption program 32 is assigned to the first program 24. A fourth encryption method 33 is assigned to the second program 25. In this way, not only data but also a program accessed by the microprocessor 1 is assigned a different encryption method, and encryption is executed.

更に、図4に示される暗号化方式テーブル11では、データやプログラムに加えてオペレーティングシステム(「OS」)用プログラム26に対して、オペレーティングシステム専用暗号化方式34が割り当てられている。メモリ9には、オペレーティングシステムに含まれる常駐タスクなどのプログラムも記憶されており、これらも他からの解読や改ざんの対象となりうるので、暗号化されることが好適である。また、オペレーティングシステム用プログラム26に対しては、特に機密保護の要求が高いのでオペレーティングシステム専用暗号化方式34が用いられることが好ましい。他のデータやプログラムには用いられない専用の暗号化方式が用いられることで、解読や改ざんのより強固な防止が図られる。なお、オペレーティングシステム専用暗号化方式34は、他の暗号化方式と関連性の低い異種の暗号化方式であることが好適である。   Further, in the encryption method table 11 shown in FIG. 4, an operating system dedicated encryption method 34 is assigned to the operating system (“OS”) program 26 in addition to data and programs. The memory 9 also stores programs such as resident tasks included in the operating system, which can be subject to decryption and tampering by others, and are therefore preferably encrypted. Further, since the operating system program 26 has a particularly high demand for security protection, it is preferable to use the operating system-dedicated encryption method 34. By using a dedicated encryption method that is not used for other data and programs, it is possible to more firmly prevent decryption and tampering. Note that the operating system-dedicated encryption method 34 is preferably a heterogeneous encryption method having low relevance to other encryption methods.

このように、データやプログラム毎に異なる暗号化方式が割り当てられることで、各々のデータやプログラムは異なる暗号化方式で暗号化される。データやプログラムが同一の暗号化方式で暗号化されている場合には、一つの暗号化方式が解読されると全てのデータやプログラムも解読される。すなわち、一つのデータに対する他からの解読や改ざんが、他の全てのデータやプログラムに波及する。これに対して、異なる暗号化方式で暗号化されている場合は、全ての暗号化されたデータやプログラムを解読するためには、全ての暗号化方式を解読する必要がある。このため、全ての暗号化されたデータやプログラムの解読や改ざんはきわめて困難となる。特に、暗号化方式が複数あることにより、解読者は、あらゆる組み合わせに基づいて暗号化の解読を行う必要があるため、暗号化方式が単一の場合に比べて、指数関数的に解読が困難となる。このため、データやプログラム毎に異なる暗号化方式を用いて暗号化することで、複数のデータやプログラムのいずれか、もしくは全部の機密保護の精度が向上する。また、従来の暗号鍵のみの相違では一つの暗号化方式に基づいた鍵の解読だけで、全ての暗号化されたデータなどが解読されていたため、機密保護の度合いが弱かった。これに対して、暗号化方式そのものが相違する本発明では、暗号鍵の解読よりはるかに困難な暗号化方式の解読を多数行う必要があるため、解読が非常に困難となり、機密保護の度合いが飛躍的に向上する。   Thus, by assigning different encryption methods to data and programs, each data and program is encrypted with different encryption methods. When data and programs are encrypted with the same encryption method, all data and programs are also decrypted when one encryption method is decrypted. In other words, decryption or alteration of one data from another affects all other data and programs. On the other hand, when encryption is performed using different encryption methods, it is necessary to decrypt all encryption methods in order to decrypt all encrypted data and programs. For this reason, it becomes extremely difficult to decrypt and alter all encrypted data and programs. In particular, because there are multiple encryption methods, it is necessary for the decipherer to decipher the encryption based on all combinations, so that it is difficult to decipher exponentially compared to the case of a single encryption method. It becomes. For this reason, by encrypting using different encryption methods for each data and program, the accuracy of security protection of any or all of the plurality of data and programs is improved. Further, in the difference only with the conventional encryption key, since all the encrypted data is decrypted only by decrypting the key based on one encryption method, the degree of security protection is weak. On the other hand, in the present invention in which the encryption method itself is different, since it is necessary to perform many decryption of the encryption method that is much more difficult than the decryption of the encryption key, the decryption becomes very difficult and the degree of security protection is increased. Improve dramatically.

また、データやプログラムは、バス8上に信号が流れているときに他から解読されやすい。このため、マイクロプロセッサ1がメモリ9に記憶されているこれらのデータをアクセスした場合に、データは解読の対象となりやすい。このため、頻繁にアクセスされるデータに対しては、符号長の長い暗号化方式などを用いることで暗号化データの解読防止を高めることができる。逆に、アクセス頻度の低いデータに対しては、短い符号長の暗号化方式などを用いるなど、解読の可能性の高低に従って暗号化方式が割り当てられることも好適である。あるいは、暗号化方式が、データの重要度に応じて割り当てられることも好適である。例えば、機密保護の要求の高いデータに対しては、符号長の長い暗号化方式などの強固な暗号化方式が割り当てられ、機密保護要求の低いデータに対しては、通常の暗号化方式が割り当てられる。このように重要度やアクセス頻度に応じて異なる暗号化方式が割り当てられることで、処理負荷と機密保護とのバランスが確保される。   Also, data and programs are easily deciphered from others when signals are flowing on the bus 8. For this reason, when the microprocessor 1 accesses these data stored in the memory 9, the data is likely to be decrypted. For this reason, for frequently accessed data, it is possible to enhance the prevention of decryption of the encrypted data by using an encryption method having a long code length. On the other hand, for data with low access frequency, it is also preferable to assign an encryption method according to the possibility of decryption, such as using an encryption method with a short code length. Alternatively, it is also preferable that the encryption method is assigned according to the importance of the data. For example, a strong encryption method such as an encryption method with a long code length is assigned to data with a high security requirement, and a normal encryption method is assigned to data with a low security requirement. It is done. By assigning different encryption methods according to importance and access frequency in this way, a balance between processing load and security protection is ensured.

また、相関性の高いデータやプログラムに対しては、相関性の低い暗号化方式をそれぞれ割り当てることも好適である。例えば、図3に示される第1データ20が第1プログラム24で用いられる場合は、第1データ20と第1プログラム24は相関性が高い。このため、第1データ20と第1プログラム24に、相関性の高い暗号化方式(例えば方式が類似している)が割り当てられた場合、一方が解読されることで他方も容易に解読、改ざんされてしまい、第1プログラムに基づく処理が不可能となることもありうる。このため、第1プログラム24と第1データ20には、相関性の低い暗号化方式が割り当てられ、一方の解読により他方の解読が容易となることを防止できる。結果として、改ざんによる誤動作などを防止できる。   It is also preferable to assign an encryption method with low correlation to data and programs with high correlation. For example, when the first data 20 shown in FIG. 3 is used in the first program 24, the first data 20 and the first program 24 are highly correlated. For this reason, when a highly correlated encryption method (for example, a method is similar) is assigned to the first data 20 and the first program 24, one of them is decrypted so that the other can be easily decrypted and altered. Therefore, the process based on the first program may be impossible. For this reason, an encryption method with low correlation is assigned to the first program 24 and the first data 20, and it is possible to prevent one from being easily decrypted by the other. As a result, malfunction due to tampering can be prevented.

これらのデータやプログラムに対する異なる暗号化方式の割り当ては、図2から図4に示される暗号化方式テーブル11により実現されることが簡便であるが、レジスタ割り当てなどで実現されても良い。また、暗号化対象となるデータやプログラムの個数が、暗号化方式の個数よりも多い場合には、相対的にアクセス頻度や保護重要度の低いデータなどに対しては、同じ暗号化方式が割り当てられても良い。また、データやプログラムに対して固定的に暗号化方式が割り当てられるのではなく、順次入れ替えて割り当てられても良い。   The assignment of different encryption methods to these data and programs can be easily realized by the encryption method table 11 shown in FIGS. 2 to 4, but may be realized by register assignment or the like. If the number of data and programs to be encrypted is larger than the number of encryption methods, the same encryption method is assigned to data with relatively low access frequency and protection importance. May be. In addition, the encryption method may not be fixedly assigned to the data or program, but may be assigned after being sequentially replaced.

なお、暗号化方式テーブル11そのものも、暗号化されて記憶されていることが好ましい。暗号化されていることで、暗号化方式テーブル11の他からの読み出しを防止できるからである。   Note that the encryption method table 11 itself is also preferably stored encrypted. This is because the encryption method can prevent reading from the other encryption method table 11.

以上のような、暗号化方式テーブル11などを格納した格納部3の暗号化情報を基に、暗号化部5でデータやプログラムが暗号化される。図5には、暗号化前と暗号化後のメモリ9の状態が示されている。   Based on the encryption information in the storage unit 3 storing the encryption method table 11 and the like as described above, the encryption unit 5 encrypts data and programs. FIG. 5 shows the state of the memory 9 before encryption and after encryption.

図5(a)は、本発明の実施の形態1における暗号化前のメモリの状態を表す図であり、図5(b)は、本発明の実施の形態1における暗号化後のメモリの状態を表す図である。暗号化前では、非暗号化第1データ40、非暗号化第2データ41、非暗号化第1プログラム42、非暗号化第2プログラム43が、メモリ9に記憶されている。これに対して、暗号化後では、第1暗号化方式30で暗号化された暗号化第1データ50と、第2暗号化方式31で暗号化された暗号化第2データ51と、第3暗号化方式32で暗号化された暗号化第1プログラム52と、オペレーティングシステム専用暗号化方式34で暗号化された暗号化オペレーティングシステム用プログラム53が記憶されている。   FIG. 5 (a) is a diagram showing the state of the memory before encryption in Embodiment 1 of the present invention, and FIG. 5 (b) is the state of the memory after encryption in Embodiment 1 of the present invention. FIG. Before encryption, unencrypted first data 40, unencrypted second data 41, unencrypted first program 42, and unencrypted second program 43 are stored in the memory 9. On the other hand, after encryption, the encrypted first data 50 encrypted by the first encryption scheme 30, the encrypted second data 51 encrypted by the second encryption scheme 31, and the third An encrypted first program 52 encrypted by the encryption method 32 and an encrypted operating system program 53 encrypted by the operating system dedicated encryption method 34 are stored.

このように、暗号化が実行されることで、各データやプログラムは、異なる暗号化方式で暗号化されてメモリ9に記憶される。このため、バス8などを介した他からのアクセスがあっても、異なる暗号化方式で暗号化されているこれら複数のデータやプログラムの解読は困難である。結果として、他からのアクセスが可能なデータやプログラムの機密保護が確保される。特に、従来のような暗号鍵だけでなく暗号化方式が異なることで解読の困難性が飛躍的に向上し、機密保護の度合いが非常に高くなる。   As described above, by performing encryption, each data and program is encrypted by different encryption methods and stored in the memory 9. For this reason, even if there is access from others via the bus 8 or the like, it is difficult to decipher these plural data and programs encrypted by different encryption methods. As a result, the security of data and programs that can be accessed from other sources is ensured. In particular, not only the conventional encryption key but also the encryption method is different, so that the difficulty of decryption is drastically improved, and the degree of security protection becomes very high.

(実施の形態2)
次に実施の形態2について図6から図8を用いて説明する。実施の形態2では、暗号化によってデータサイズが変化することに対応するマイクロプロセッサ1について説明する。
(Embodiment 2)
Next, the second embodiment will be described with reference to FIGS. In the second embodiment, the microprocessor 1 corresponding to the change in data size due to encryption will be described.

マイクロプロセッサ1は、メモリ9から読み出したデータやプログラムを暗号化し、暗号化されたデータなどを再びメモリに書き出して記憶させる。この暗号化によって、データやプログラムのデータサイズが変化する。このため、暗号化前と暗号化後では、メモリ9に記憶するデータなどの開始アドレスやデータサイズを変化させる必要がある。メモリ9に記憶される複数のデータの開始アドレスが、暗号化前と暗号化後で同一である場合に、暗号化によりデータサイズが増加すると、複数のデータのアドレスに重複部分が生じてしまう。結果として、メモリ9への暗号化後のデータなどの記憶が適切にできなくなる。特に、データやプログラム毎に異なる暗号化方式を用いて暗号化を行うマイクロプロセッサ1では、暗号化の種類毎にデータサイズ変化がまちまちとなる。   The microprocessor 1 encrypts the data and program read from the memory 9, and writes the encrypted data and the like again in the memory for storage. This encryption changes the data size of data and programs. For this reason, it is necessary to change the start address and data size of the data stored in the memory 9 before and after encryption. When the start addresses of a plurality of data stored in the memory 9 are the same before and after the encryption, if the data size is increased by the encryption, an overlapping portion is generated in the addresses of the plurality of data. As a result, it becomes impossible to properly store the encrypted data in the memory 9. In particular, in the microprocessor 1 that performs encryption using different encryption methods for each data and program, the data size varies depending on the type of encryption.

図6は、本発明の実施の形態におけるマイクロプロセッサのブロック図であり、図7は、本発明の実施の形態2におけるメモリ制御部周辺のブロック図である。   FIG. 6 is a block diagram of the microprocessor according to the embodiment of the present invention, and FIG. 7 is a block diagram around the memory control unit according to the second embodiment of the present invention.

マイクロプロセッサ1は、選択制御部4を備え、選択制御部4は、使用する暗号化方式を選択する。結果として、選択制御部4は、選択した暗号化情報10を暗号化部5とメモリ制御部6に出力する。   The microprocessor 1 includes a selection control unit 4, and the selection control unit 4 selects an encryption method to be used. As a result, the selection control unit 4 outputs the selected encryption information 10 to the encryption unit 5 and the memory control unit 6.

ここで、暗号化部5は、メモリ制御部6から、第2暗号化前データ情報101(暗号化対象の領域の先頭を基準とした暗号化前のアクセス先のオフセットアドレス、サイズ、値を含む)を受けて暗号化する。更に、暗号化の後、暗号化部5は、第2暗号化後データ情報102(暗号化対象の暗号化後のアクセス先オフセットアドレス、サイズ、値を含む)を出力する。   Here, the encryption unit 5 includes, from the memory control unit 6, the second pre-encryption data information 101 (the offset address, size, and value of the access destination before encryption with reference to the head of the area to be encrypted) ) And encrypt. Further, after encryption, the encryption unit 5 outputs the second encrypted data information 102 (including the encrypted access destination offset address, size, and value to be encrypted).

暗号化部5で扱われるアドレスが、暗号化対象の領域内のオフセットアドレスであるのは、適用する暗号化方式によってアクセスするアドレスとの相違は、暗号化対象の領域内部に限定されるためである。また、暗号化方式の違いによるアクセス先のアドレス、サイズの変換についての情報は、暗号化部5での暗号化方式のそれぞれに対応して備えられることも好適である。   The address handled by the encryption unit 5 is an offset address in the encryption target area because the difference from the address accessed by the applied encryption method is limited to the inside of the encryption target area. is there. In addition, it is also preferable that information on the address of the access destination and the size conversion due to the difference in the encryption method is provided corresponding to each of the encryption methods in the encryption unit 5.

メモリ制御部6は、プロセッサコア2とバスインターフェース7との間で変換する暗号化前後のデータのアドレス、サイズの制御を行う。まず、プロセッサコア2から受けた第1暗号化前データ情報100(暗号化前のメモリアクセス先のアドレス、サイズ、値を含む)を、第2暗号化前データ情報101(暗号化対象の領域の先頭を基準とした暗号化前のアクセス先のオフセットアドレス、サイズ、値を含む)に変換して暗号化部5へ出力する。   The memory control unit 6 controls the address and size of data before and after encryption converted between the processor core 2 and the bus interface 7. First, the first pre-encryption data information 100 (including the address, size, and value of the memory access destination before encryption) received from the processor core 2 is stored in the second pre-encryption data information 101 (the encryption target area). (Including the offset address, size, and value of the access destination before encryption based on the head) and output to the encryption unit 5.

次に、暗号化部5から第2暗号化後データ情報102(暗号化対象の暗号化後のアクセス先オフセットアドレス、サイズ、値を含む)を受けて、第1暗号化後データ情報103(暗号化後のメモリアクセス先のアドレス、サイズ、値を含む)に変換して出力する。メモリ制御部6は、この第1暗号化後データ情報103を用いて、データやプログラムのメモリ9への書き出し時のアドレスや領域の制御を行う。   Next, the second encrypted data information 102 (including the encrypted access destination offset address, size, and value) to be encrypted is received from the encryption unit 5, and the first encrypted data information 103 (encryption) (Including the address, size, and value of the memory access destination after conversion) and output. The memory control unit 6 uses the first encrypted data information 103 to control addresses and areas at the time of writing data and programs to the memory 9.

例えば、暗号化方式情報10と第1暗号化前データ情報100より、暗号化によるデータサイズが概ね倍となる場合には、メモリ制御部6は、格納サイズを倍とする領域制御を行う。同様に、メモリ制御部6は、次のデータ書き込み開始アドレスも、読み出し時の倍の値とする制御を行う。この制御により、暗号化によるデータサイズの変化に対応したメモリ9への制御が実現される。また、暗号化情報10などが用いられることで、暗号化方式の違いに応じたデータサイズ変化に適切に対応したメモリ制御が実現される。   For example, when the data size by encryption is approximately doubled from the encryption method information 10 and the first pre-encryption data information 100, the memory control unit 6 performs area control to double the storage size. Similarly, the memory control unit 6 performs control to set the next data write start address to a value twice that at the time of reading. By this control, the control to the memory 9 corresponding to the change in the data size due to encryption is realized. In addition, by using the encryption information 10 or the like, memory control appropriately corresponding to a data size change corresponding to a difference in the encryption method is realized.

図8には、メモリ制御の状態が示されている。   FIG. 8 shows the state of memory control.

図8(a)は、本発明の実施の形態2における暗号化前のメモリの状態を表す図であり、図8(b)は、本発明の実施の形態2における暗号化後のメモリの状態を表す図である。   FIG. 8A is a diagram showing the state of the memory before encryption in the second embodiment of the present invention, and FIG. 8B is the state of memory after encryption in the second embodiment of the present invention. FIG.

暗号化前においては、メモリ9には、非暗号化第1データ40と非暗号化第2データ41が記憶されている。非暗号化第1データ40は、第1開始アドレス60から記憶され、非暗号化第2データ41は、第2開始アドレス61から記憶されている。これらの非暗号化第1データ40と非暗号化第2データ41が暗号化されることで、そのデータサイズが拡大する。このため、メモリ制御部6は、このデータサイズの拡大に合わせて開始アドレスを変化させる。   Before encryption, the memory 9 stores unencrypted first data 40 and unencrypted second data 41. The unencrypted first data 40 is stored from the first start address 60, and the unencrypted second data 41 is stored from the second start address 61. By encrypting the unencrypted first data 40 and the unencrypted second data 41, the data size is increased. Therefore, the memory control unit 6 changes the start address in accordance with the increase in the data size.

暗号化第2データ51の変換後第2開始アドレス63は、データサイズ拡大に合わせて変化される。例えば、変換後第2開始アドレスの値は、一定の割合で増加されたり、暗号化方式情報10などに基づいて増加されたりする。   The converted second start address 63 of the encrypted second data 51 is changed in accordance with the data size expansion. For example, the value of the second start address after conversion is increased at a constant rate or increased based on the encryption method information 10 or the like.

以上のような、メモリ制御部6による、メモリ9に対する暗号化データなどの開始アドレス制御により、暗号化によるデータサイズの変化に対応したメモリ記憶が可能となる。このように、データサイズの変化に対応したメモリ制御により、機密保持の度合いの向上と、暗号化処理における適切なメモリ制御が同時に確保される。   As described above, the memory address corresponding to the change in the data size due to the encryption can be realized by the start address control of the encrypted data or the like for the memory 9 by the memory control unit 6. As described above, by the memory control corresponding to the change in the data size, the improvement of the degree of confidentiality and the appropriate memory control in the encryption process are simultaneously ensured.

(実施の形態3)
次に実施の形態3について、図9と図10を用いて説明する。実施の形態3におけるマイクロプロセッサは、暗号化されたデータやプログラムを復号する復号部を更に備えている。
(Embodiment 3)
Next, Embodiment 3 will be described with reference to FIG. 9 and FIG. The microprocessor according to the third embodiment further includes a decryption unit that decrypts encrypted data and programs.

図9は、本発明の実施の形態3におけるマイクロプロセッサのブロック図である。復号部14は、暗号化部5と共にマイクロプロセッサ1に備えられ、暗号化されたデータやプログラムを復号する。プロセッサコア2が、読み出した暗号化データなどを用いた処理を行う場合に、必要に応じて復号部14で暗号化データが復号される。   FIG. 9 is a block diagram of the microprocessor according to the third embodiment of the present invention. The decryption unit 14 is provided in the microprocessor 1 together with the encryption unit 5 and decrypts encrypted data and programs. When the processor core 2 performs processing using the read encrypted data or the like, the encrypted data is decrypted by the decryption unit 14 as necessary.

格納部3は、復号部14で用いられる復号方式に関する情報を保持する。選択制御部4は、この復号方式情報から必要な復号方式を選択して、選択結果を復号部14に出力する。このとき、選択制御部4は暗号化方式に対応する復号方式を選択する。格納部3は、データやプログラム毎に異なる暗号化方式に対応した復号方式を保持する。例えば、テーブルなどによりデータやプログラム毎の復号方式を保持する。   The storage unit 3 holds information regarding the decoding method used by the decoding unit 14. The selection control unit 4 selects a necessary decoding method from the decoding method information and outputs the selection result to the decoding unit 14. At this time, the selection control unit 4 selects a decryption method corresponding to the encryption method. The storage unit 3 holds a decryption method corresponding to an encryption method that differs for each data or program. For example, a decoding method for each data or program is held by a table or the like.

図10は、本発明の実施の形態3における格納部を表す図であり、暗号化方式/復号方式テーブル15が示されている。暗号化方式/復号方式テーブル15は、データやプログラム毎に適用する暗号化方式と復号方式の対応関係を備えている。なお、暗号化方式/復号方式テーブル15は、暗号化方式と復号方式の両方を備えているが、暗号化方式と復号方式のそれぞれを個別で構成されてもよい。   FIG. 10 is a diagram showing a storage unit according to the third embodiment of the present invention, and shows an encryption method / decryption method table 15. The encryption method / decryption method table 15 has a correspondence relationship between the encryption method and the decryption method applied to each data or program. The encryption method / decryption method table 15 includes both the encryption method and the decryption method, but each of the encryption method and the decryption method may be configured individually.

暗号化方式/復号方式テーブル15は、図10に示される対応関係を備えている。第1データ20には、第1暗号化方式30と第1復号方式70が割り当てられる。第2データ21には、第2暗号化方式31と第2復号方式71が割り当てられる。第1プログラム24には、第3暗号化方式32と第3復号方式72が割り当てられる。オペレーティングシステム用プログラム26には、オペレーティングシステム専用暗号化方式34とオペレーティングシステム専用復号方式73が割り当てられる。   The encryption method / decryption method table 15 has the correspondence shown in FIG. A first encryption scheme 30 and a first decryption scheme 70 are assigned to the first data 20. A second encryption scheme 31 and a second decryption scheme 71 are assigned to the second data 21. A third encryption scheme 32 and a third decryption scheme 72 are assigned to the first program 24. The operating system program 26 is assigned an operating system dedicated encryption system 34 and an operating system dedicated decryption system 73.

選択制御部4は、格納部3に備えられているこの暗号化方式/復号方式テーブル15に基づいて、復号方式を選択して、選択結果を復号部14に出力する。すなわち、復号部14は、復号の対象となるデータが第1データ20の場合には、第1復号方式70を用いて復号する。復号の対象となるデータが第2データ21の場合には、復号部14は第2復号方式71を用いて復号する。復号の対象となるプログラムが第1プログラム24である場合には、復号部14は、第3復号方式72を用いて復号する。復号の対象となるプログラムがオペレーティングシステム用プログラム26である場合には、復号部14は、オペレーティングシステム専用復号方式73を用いて復号する。   The selection control unit 4 selects a decryption method based on the encryption method / decryption method table 15 provided in the storage unit 3, and outputs the selection result to the decryption unit 14. That is, when the data to be decoded is the first data 20, the decoding unit 14 decodes using the first decoding method 70. When the data to be decoded is the second data 21, the decoding unit 14 decodes using the second decoding method 71. When the program to be decoded is the first program 24, the decoding unit 14 performs decoding using the third decoding method 72. When the program to be decrypted is the operating system program 26, the decrypting unit 14 decrypts using the operating system dedicated decryption method 73.

以上のように、格納部3にあらかじめ備えられた復号方式の対応関係に従って、暗号化されたデータやプログラムが復号される。復号されたデータやプログラムは、プロセッサコア2での演算処理に用いられる。   As described above, the encrypted data and program are decrypted according to the correspondence of the decryption methods provided in the storage unit 3 in advance. The decrypted data and program are used for arithmetic processing in the processor core 2.

なお、図10に示された暗号化方式/復号方式テーブル15は一例であり、別の組み合わせであってもよく、データやプログラムによって同じ復号方式が割り当てられても良い。   Note that the encryption scheme / decryption scheme table 15 shown in FIG. 10 is an example, and may be a different combination, or the same decryption scheme may be assigned depending on data or a program.

また、復号されたデータやプログラムは、プロセッサコア2において用いられるので、バス8からはアクセスされることがない。復号されたデータやプログラムは、再び暗号化部5で暗号化された後にメモリ9に書き出されるので、バス8を介した解読なども行われにくい。   Also, since the decrypted data and program are used in the processor core 2, they are not accessed from the bus 8. Since the decrypted data and program are encrypted again by the encryption unit 5 and then written to the memory 9, it is difficult to perform decryption or the like via the bus 8.

このように、マイクロプロセッサ1内部に、暗号化方式に対応した復号方式を用いて復号する復号部5が設けられることで、プロセッサコア2での処理に必要な場合に復号されたデータやプログラムを用いることができる。また、暗号化方式と同様にデータやプログラム毎に復号方式が異なることで、外部からの解読なども非常に困難となり、機密保護の度合いが高まる。   As described above, the decryption unit 5 for decrypting using the decryption method corresponding to the encryption method is provided in the microprocessor 1, so that the decrypted data and programs can be stored when necessary for processing in the processor core 2. Can be used. In addition, since the decryption method is different for each data and program as in the encryption method, decryption from the outside becomes very difficult, and the degree of security protection is increased.

なお、復号部14は暗号化部5と共通する回路などが共用されてもよく、この場合には、回路規模などの削減が図られる。   Note that the decryption unit 14 may share a common circuit with the encryption unit 5, and in this case, the circuit scale and the like can be reduced.

(実施の形態4)
次に実施の形態4について、図11と図12を用いて説明する。
(Embodiment 4)
Next, a fourth embodiment will be described with reference to FIGS.

実施の形態4では、暗号化されたデータやプログラムがメモリ上に存在し、これをマイクロプロセッサ1が処理する場合について説明する。   In the fourth embodiment, a case will be described in which encrypted data and programs exist on the memory and the microprocessor 1 processes them.

図11は、本発明の実施の形態4におけるマイクロプロセッサのブロック図であり、図12は本発明の実施の形態4におけるマイクロプロセッサのデータ処理のフローチャートである。   FIG. 11 is a block diagram of the microprocessor according to the fourth embodiment of the present invention, and FIG. 12 is a flowchart of data processing of the microprocessor according to the fourth embodiment of the present invention.

メモリ9には、暗号化された暗号化第1データ50、暗号化第2データ51と暗号化オペレーティングシステム用プログラム53が記憶されている。これらは、暗号化第1データ50は第1暗号化方式30で暗号化され、暗号化第2データ51は第2暗号化方式31で暗号化され、暗号化オペレーティングシステム用プログラム53は、オペレーティングシステム専用暗号化方式34で暗号化されている。このため、マイクロプロセッサ1は、これらを用いた処理を行う場合には、それぞれの暗号化方式に対応する復号方式で復号する必要がある。特に、処理対象のデータが変わったにも関らず、異なる復号方式で復号して処理を行うと、エラーや誤動作が生じる。このため、プロセッサコア1による一連のプログラム処理において、処理するデータやプログラムが変化する際、すなわち異なる暗号化方式で暗号化されているデータやプログラムに変化する際には、変化する暗号化方式に対応して、復号方式を切り替える必要がある。データやプログラムが異なる暗号化方式を用いて暗号化されているためである。   The memory 9 stores encrypted first data 50, encrypted second data 51, and an encrypted operating system program 53. The encrypted first data 50 is encrypted by the first encryption method 30, the encrypted second data 51 is encrypted by the second encryption method 31, and the encrypted operating system program 53 is stored in the operating system. It is encrypted with the dedicated encryption method 34. For this reason, when performing processing using these, it is necessary for the microprocessor 1 to perform decryption using a decryption method corresponding to each encryption method. In particular, when data to be processed is changed, decoding and processing using different decoding methods causes errors and malfunctions. For this reason, in a series of program processing by the processor core 1, when the data or program to be processed changes, that is, when the data or program is encrypted with a different encryption method, the changing encryption method is used. Correspondingly, it is necessary to switch the decoding method. This is because data and programs are encrypted using different encryption methods.

メモリ9に記憶されている暗号化第1データ50、暗号化第2データ51、及び暗号化オペレーティングシステム用プログラム53は、マイクロプロセッサ1により使用される。   The encrypted first data 50, the encrypted second data 51, and the encrypted operating system program 53 stored in the memory 9 are used by the microprocessor 1.

マイクロプロセッサ1は、これらのデータやプログラムを処理する際には、復号して暗号化を解除し、演算処理に用いる必要がある。このため、マイクロプロセッサ1は、選択制御部4において選択された復号方式に従って、復号部14にて復号されたデータなどを用いる。このとき、暗号化第1データ50は、第1復号方式70を必要とする。暗号化第2データ51は、第2復号方式71を必要とする。暗号化オペレーティングシステム用プログラム53は、オペレーティングシステム専用復号方式73を必要とする。このため、選択制御部4は、いずれの暗号化されたデータやプログラムが処理対象であるかを、認識した上で復号方式を選択する。選択制御部4は、データやプログラムのソフトウェア処理の終了によるソフトウェアからの通知信号や、ハードウェアからの割り込み信号を用いて、これらの復号対象となるデータやプログラムの切り替えを認識する。   When processing these data and programs, the microprocessor 1 needs to decrypt and decrypt the data and use it for arithmetic processing. For this reason, the microprocessor 1 uses the data decoded by the decoding unit 14 according to the decoding method selected by the selection control unit 4. At this time, the encrypted first data 50 requires the first decryption method 70. The encrypted second data 51 requires the second decryption method 71. The encrypted operating system program 53 requires an operating system dedicated decryption method 73. Therefore, the selection control unit 4 selects a decryption method after recognizing which encrypted data or program is a processing target. The selection control unit 4 recognizes switching of data and programs to be decoded by using a notification signal from software upon completion of software processing of data and programs and an interrupt signal from hardware.

図12を用いて、復号対象となるデータの復号処理の流れについて説明する。   The flow of the decoding process for data to be decoded will be described with reference to FIG.

まず、ステップ1にて、マイクロプロセッサ1は、メモリ9から暗号化第1データ50を読み出す。選択制御部4は、暗号化第1データ50の読み出し命令を出すときに、暗号化第1データ50が、第1暗号化方式30で暗号化され、第1暗号化方式30には、第1復号方式70が対応することを、格納部3の情報から認識する。この情報に従い、ステップ2にて、復号部14は、第1復号方式70を用いて暗号化第1データ50を復号する。マイクロプロセッサ1は、復号された第1データ20を用いた処理を実行する。   First, in step 1, the microprocessor 1 reads the encrypted first data 50 from the memory 9. When the selection control unit 4 issues a read command for the encrypted first data 50, the encrypted first data 50 is encrypted by the first encryption method 30, and the first encryption method 30 includes the first data It recognizes from the information of the storage part 3 that the decoding method 70 respond | corresponds. In accordance with this information, in step 2, the decryption unit 14 decrypts the encrypted first data 50 using the first decryption method 70. The microprocessor 1 executes processing using the decoded first data 20.

次に、ステップ3にて、第1データから第2データへの切り替え通知がマイクロプロセッサ1に出力される。演算終了に伴い、ソフトウェアからの通知が、マイクロプロセッサに出力される。この通知により、選択制御部4は、第1データ20の処理に次いで、第2データの処理が必要であることを認識する。この認識に従って、ステップ4にて、選択制御部4は、格納部3の情報に基づいて第2復号方式71を選択する。選択制御部4は、第2復号方式71の選択結果を、復号方式情報として復号部14に出力する。   Next, in step 3, a notification of switching from the first data to the second data is output to the microprocessor 1. Upon completion of the calculation, a notification from the software is output to the microprocessor. By this notification, the selection control unit 4 recognizes that the processing of the second data is necessary after the processing of the first data 20. In accordance with this recognition, in step 4, the selection control unit 4 selects the second decoding method 71 based on the information in the storage unit 3. The selection control unit 4 outputs the selection result of the second decoding method 71 to the decoding unit 14 as decoding method information.

次いで、ステップ5にて、マイクロプロセッサ1はメモリ9から暗号化第2データ51を読み出し、ステップ6にて、復号部は選択された第2復号方式71を用いて、暗号化第2データ51を復号する。マイクロプロセッサ1は、復号された第2データ21を用いた処理を行う。   Next, in step 5, the microprocessor 1 reads the encrypted second data 51 from the memory 9. In step 6, the decryption unit uses the selected second decryption method 71 to store the encrypted second data 51. Decrypt. The microprocessor 1 performs processing using the decoded second data 21.

次に、このようなデータを用いたソフトウェア処理が行われている間に、ハードウェアからの割り込み(例えば、タイマー割り込みやインストラクション割り込みなど)が生じる場合がある。ハードウェア割り込みの場合には、マイクロプロセッサ1は、オペレーティングシステム用プログラムを用いた処理を行う必要がある。このため、ステップ7以降の処理が必要となる。   Next, while a software process using such data is being performed, an interrupt from hardware (for example, a timer interrupt or an instruction interrupt) may occur. In the case of a hardware interrupt, the microprocessor 1 needs to perform processing using an operating system program. For this reason, the process after step 7 is needed.

ステップ7にて、ハードウェア割り込みが発生する(発生しない場合は、第2データ21を用いた処理が続行する)。ハードウェア割り込みが発生すると、ステップ8にて、選択制御部4はオペレーティングシステム専用復号方式73を、格納部3の情報に従って選択する。選択制御部4は、オペレーティングシステム専用復号方式73の選択結果を、復号方式情報として、復号部14に出力する。次いで、ステップ9にて、マイクロプロセッサ1は、メモリ9より暗号化オペレーティングシステム用プログラム53を読み出す。復号部14は、読み出された暗号化オペレーティングシステム用プログラム53を、オペレーティングシステム専用復号方式73を用いて復号する。マイクロプロセッサ1は、復号されたオペレーティングシステム用プログラム26を用いて、ハードウェア割り込み対する処理を実行する。このように、処理終了通知や、ハードウェア割り込みを利用して、異なる暗号化方式で暗号化されているデータやプログラムの、エラーなどの無い処理が実現される。また、このとき、処理終了通知が用いられることで、復号方式の選択切り替えと、メモリ9へのアクセスのタイミングを合わせることができ、無駄のない復号が実現される。更に、通常のデータやプログラムの処理から、オペレーティングシステム用プログラムの処理への切り替えに、割り込みを用いることで、適切な復号方式の切り替えが可能である。   In step 7, a hardware interrupt occurs (if it does not occur, processing using the second data 21 continues). When a hardware interrupt occurs, the selection control unit 4 selects the operating system dedicated decoding method 73 according to the information in the storage unit 3 in step 8. The selection control unit 4 outputs the selection result of the operating system dedicated decoding method 73 to the decoding unit 14 as decoding method information. Next, in step 9, the microprocessor 1 reads the encrypted operating system program 53 from the memory 9. The decryption unit 14 decrypts the read encrypted operating system program 53 using the operating system dedicated decryption method 73. The microprocessor 1 uses the decrypted operating system program 26 to execute processing for a hardware interrupt. In this way, processing without error or the like of data or programs encrypted by different encryption methods is realized by using a processing end notification or hardware interrupt. At this time, by using the process end notification, it is possible to synchronize the selection switching of the decoding method and the timing of access to the memory 9, thereby realizing decoding without waste. Further, by using an interrupt for switching from normal data or program processing to operating system program processing, an appropriate decoding method can be switched.

特に、オペレーティングシステム用プログラム26に対応する復号方式を、選択制御部4が選択するためには、プロセッサコア2が特定のモード(特権モードなど)とする設定がされていれば復号中の機密保護も高まる。すなわち、オペレーティングシステム用プログラムの復号中には、バスや内部レジスタへのアクセスはプロセッサコア2のみに許可されるため、バス8を介した他からのアクセスが拒絶される。このため、復号されたプログラムが、マイクロプロセッサ1内部のレジスタなどに記憶されている場合でも、他からのアクセスを防止できる。これは、特に機密保護の必要性の高いオペレーティングシステム用プログラム26において好適である。   In particular, in order for the selection control unit 4 to select a decryption method corresponding to the operating system program 26, if the processor core 2 is set to a specific mode (privileged mode or the like), security protection during decryption is performed. Will also increase. That is, during the decoding of the operating system program, access to the bus and internal registers is permitted only to the processor core 2, and access from others via the bus 8 is rejected. For this reason, even when the decrypted program is stored in a register or the like in the microprocessor 1, access from others can be prevented. This is particularly suitable for the operating system program 26 where security is highly required.

以上のように、処理終了信号や割り込み信号を用いて、異なる暗号化方式で暗号化されているデータやプログラムを、エラーやタイムラグを生じさせること無く、読み出して処理することができる。   As described above, it is possible to read and process data and programs encrypted by different encryption methods without causing an error or a time lag, using a processing end signal or an interrupt signal.

本発明は、例えばメモリから読み出して演算処理に用いるデータやプログラムの、外部からの解読や改ざんを防止する暗号化処理を備えるマイクロプロセッサの分野等において好適に利用できる。   The present invention can be suitably used, for example, in the field of a microprocessor having an encryption process for preventing data from being read from a memory and used for arithmetic processing from being externally decoded or falsified.

本発明の実施の形態1におけるマイクロプロセッサのブロック図Block diagram of a microprocessor according to the first embodiment of the present invention 本発明の実施の形態1における暗号化方式テーブルを表す図The figure showing the encryption system table in Embodiment 1 of this invention. 本発明の実施の形態1における暗号化方式テーブルを表す図The figure showing the encryption system table in Embodiment 1 of this invention. 本発明の実施の形態1における暗号化方式テーブルを表す図The figure showing the encryption system table in Embodiment 1 of this invention. (a)本発明の実施の形態1における暗号化前のメモリの状態を表す図 (b)本発明の実施の形態1における暗号化後のメモリの状態を表す図(A) The figure showing the state of the memory before encryption in Embodiment 1 of this invention (b) The figure showing the state of the memory after encryption in Embodiment 1 of this invention 本発明の実施の形態2におけるマイクロプロセッサのブロック図Block diagram of the microprocessor according to the second embodiment of the present invention 本発明の実施の形態2におけるメモリ制御部周辺のブロック図Block diagram around the memory control unit in Embodiment 2 of the present invention (a)本発明の実施の形態2における暗号化前のメモリの状態を表す図 (b)本発明の実施の形態2における暗号化後のメモリの状態を表す図(A) The figure showing the state of the memory before encryption in Embodiment 2 of this invention (b) The figure showing the state of the memory after encryption in Embodiment 2 of this invention 本発明の実施の形態3におけるマイクロプロセッサのブロック図Block diagram of a microprocessor according to Embodiment 3 of the present invention 本発明の実施の形態3における格納部を表す図The figure showing the storage part in Embodiment 3 of this invention 本発明の実施の形態4におけるマイクロプロセッサのブロック図Block diagram of a microprocessor according to a fourth embodiment of the present invention 本発明の実施の形態4におけるマイクロプロセッサのデータ処理のフローチャートFlowchart of microprocessor data processing in Embodiment 4 of the present invention.

符号の説明Explanation of symbols

1 マイクロプロセッサ
2 プロセッサコア
3 格納部
4 選択制御部
5 暗号化部
6 メモリ制御部
7 バスインターフェース
8 バス
9 メモリ
10 暗号化方式情報
11暗号化方式テーブル
12 データサイズ情報
13 復号方式情報
14 復号部
15 暗号化方式/復号方式テーブル
20 第1データ
21 第2データ
22 第3データ
23 第4データ
24 第1プログラム
25 第2プログラム
26 オペレーティングシステム用プログラム
30 第1暗号化方式
31 第2暗号化方式
32 第3暗号化方式
33 第4暗号化方式
34 オペレーティングシステム専用暗号化方式
40 非暗号化第1データ
41 非暗号化第2データ
42 非暗号化第1プログラム
43 非暗号化オペレーティングシステム用プログラム
70 第1復号方式
71 第2復号方式
72 第3復号方式
73 オペレーティングシステム用復号方式
DESCRIPTION OF SYMBOLS 1 Microprocessor 2 Processor core 3 Storage part 4 Selection control part 5 Encryption part 6 Memory control part 7 Bus interface 8 Bus 9 Memory 10 Encryption method information 11 Encryption method table 12 Data size information 13 Decoding method information 14 Decoding part 15 Encryption method / decryption method table 20 First data 21 Second data 22 Third data 23 Fourth data 24 First program 25 Second program 26 Operating system program 30 First encryption method 31 Second encryption method 32 First 3 encryption method 33 4th encryption method 34 operating system dedicated encryption method 40 unencrypted first data 41 unencrypted second data 42 unencrypted first program 43 unencrypted operating system program 70 first decryption Method 71 Second decoding method 72 Third decoding method 73 operating system for decoding scheme

Claims (15)

複数のデータを暗号化するマイクロプロセッサであって、
複数の暗号化方式の情報を格納する格納部と、
前記格納部から前記複数の暗号化方式のいずれかを選択する選択制御部と、
前記選択制御部で選択された暗号化方式に従って前記データの暗号化を行う暗号化部を備え、前記データ毎に異なる暗号化方式で暗号化するマイクロプロセッサ。
A microprocessor for encrypting a plurality of data,
A storage unit for storing information of a plurality of encryption methods;
A selection control unit for selecting any of the plurality of encryption methods from the storage unit;
A microprocessor that includes an encryption unit that encrypts the data according to an encryption method selected by the selection control unit, and encrypts the data using a different encryption method.
前記格納部は、前記複数のデータと前記複数の暗号化方式の組み合わせを有する暗号化方式テーブルを備える請求項1記載のマイクロプロセッサ。 The microprocessor according to claim 1, wherein the storage unit includes an encryption method table having a combination of the plurality of data and the plurality of encryption methods. 前記暗号化方式テーブルは、暗号化されている請求項2記載のマイクロプロセッサ。 The microprocessor according to claim 2, wherein the encryption method table is encrypted. 前記暗号化方式テーブルは、前記複数のデータの内、相関関係の高い2以上のデータのそれぞれに対して相関関係の低い異なる暗号化方式を割り当てる組み合わせを有する請求項2記載のマイクロプロセッサ。 3. The microprocessor according to claim 2, wherein the encryption method table has a combination in which different encryption methods having a low correlation are assigned to each of two or more pieces of data having a high correlation among the plurality of data. 前記格納部は、前記暗号化方式に応じた暗号鍵を更に格納する請求項1から4のいずれか記載のマイクロプロセッサ。 The microprocessor according to any one of claims 1 to 4, wherein the storage unit further stores an encryption key corresponding to the encryption method. 前記データは、前記マイクロプロセッサが外部メモリから読み出したデータを含む請求項1から5のいずれか記載のマイクロプロセッサ。 6. The microprocessor according to claim 1, wherein the data includes data read from an external memory by the microprocessor. 前記データは、前記マイクロプロセッサで用いられるプログラムを含む請求項1から6のいずれか記載のマイクロプロセッサ。 The microprocessor according to claim 1, wherein the data includes a program used by the microprocessor. 前記プログラムは、オペレーティングシステム用プログラムを含む請求項7記載のマイクロプロセッサ。 The microprocessor according to claim 7, wherein the program includes an operating system program. 前記複数の暗号化方式は、前記オペレーティングシステム用プログラム専用の暗号化方式を含む請求項8記載のマイクロプロセッサ。 9. The microprocessor according to claim 8, wherein the plurality of encryption methods include an encryption method dedicated to the operating system program. 前記データの外部メモリからの読み出しアドレスと該外部メモリへの書き込みアドレスを制御するメモリ制御部を更に備える請求項1から9のいずれか記載のマイクロプロセッサ。 The microprocessor according to any one of claims 1 to 9, further comprising a memory control unit that controls a read address of the data from an external memory and a write address to the external memory. 前記メモリ制御部は、前記データの暗号化前と暗号化後のデータサイズの変化に対応したアドレス制御を行う請求項10記載のマイクロプロセッサ。 The microprocessor according to claim 10, wherein the memory control unit performs address control corresponding to a change in data size before and after the data is encrypted. 前記メモリ制御部は、前記選択制御部で選択された暗号化方式に基づいて、アドレス制御を行う請求項10記載のマイクロプロセッサ。 The microprocessor according to claim 10, wherein the memory control unit performs address control based on an encryption method selected by the selection control unit. 前記暗号化部で暗号化されたデータを復号する復号部を更に備える請求項1から12のいずれか記載のマイクロプロセッサ。 The microprocessor according to claim 1, further comprising a decryption unit that decrypts the data encrypted by the encryption unit. 前記格納部が、前記復号部で用いられる復号方式の情報を更に格納する請求項13記載のマイクロプロセッサ。 The microprocessor according to claim 13, wherein the storage unit further stores information on a decoding method used in the decoding unit. 前記復号部が、前記暗号化部で用いられた暗号化方式に対応する復号方式により前記暗号化されたデータを復号する請求項13記載のマイクロプロセッサ。 The microprocessor according to claim 13, wherein the decryption unit decrypts the encrypted data by a decryption method corresponding to the encryption method used in the encryption unit.
JP2005067841A 2005-03-10 2005-03-10 Microprocessor Pending JP2006254099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005067841A JP2006254099A (en) 2005-03-10 2005-03-10 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005067841A JP2006254099A (en) 2005-03-10 2005-03-10 Microprocessor

Publications (1)

Publication Number Publication Date
JP2006254099A true JP2006254099A (en) 2006-09-21

Family

ID=37094107

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005067841A Pending JP2006254099A (en) 2005-03-10 2005-03-10 Microprocessor

Country Status (1)

Country Link
JP (1) JP2006254099A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008259163A (en) * 2007-04-04 2008-10-23 Cyberlink Corp Systems and method for hardware driven program execution
JP2009200805A (en) * 2008-02-21 2009-09-03 Ricoh Co Ltd Image forming apparatus, information processing method and program
JP2018506059A (en) * 2014-12-24 2018-03-01 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. Cryptographic system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008259163A (en) * 2007-04-04 2008-10-23 Cyberlink Corp Systems and method for hardware driven program execution
JP2009200805A (en) * 2008-02-21 2009-09-03 Ricoh Co Ltd Image forming apparatus, information processing method and program
JP2018506059A (en) * 2014-12-24 2018-03-01 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. Cryptographic system and method
US10469245B2 (en) 2014-12-24 2019-11-05 Koninklijke Philips N.V. Cryptographic system and method

Similar Documents

Publication Publication Date Title
US5224166A (en) System for seamless processing of encrypted and non-encrypted data and instructions
US20040177257A1 (en) Data processing device and data processing method
JP4767985B2 (en) Executing AES encryption or decryption in multiple modes with a single instruction
US20060041747A1 (en) Encryption instruction processing apparatus
JP2009521154A (en) Secure system on chip
JP2006350782A (en) Processor and system
US7076667B1 (en) Storage device having secure test process
EP2434682A1 (en) Cryptographic apparatus and memory system
US20170046280A1 (en) Data processing device and method for protecting a data processing device against attacks
US11748493B2 (en) Secure asset management system
JP2004199688A (en) Secure driver
JP2005216027A (en) Encryption device, encryption system therewith, decryption device and semiconductor system therewith
US20100064125A1 (en) Programmable device and booting method
JP2006254099A (en) Microprocessor
US7769166B2 (en) Dual mode AES implementation to support single and multiple AES operations
KR20180059217A (en) Apparatus and method for secure processing of memory data
JP2007043724A (en) Method, apparatus and computer program for decoding data by using host processor and co-processor
US10019584B2 (en) Performance of image forming functions based on encrypted data stored in volatile memory
JP4309726B2 (en) Microprocessor
JP2005172866A (en) Encryption/decryption system
JP2003203013A (en) Microprocessor, and program forming device and program debugging device therefor
JP2004287754A (en) Computer and instruction processing method
JP2005018434A (en) Microprocessor
JP2008048268A (en) Data processing apparatus and data transfer system
JP4939305B2 (en) Encryption / decryption device