JP2010044792A - Secure device, integrated circuit, and encryption method - Google Patents

Secure device, integrated circuit, and encryption method Download PDF

Info

Publication number
JP2010044792A
JP2010044792A JP2009262994A JP2009262994A JP2010044792A JP 2010044792 A JP2010044792 A JP 2010044792A JP 2009262994 A JP2009262994 A JP 2009262994A JP 2009262994 A JP2009262994 A JP 2009262994A JP 2010044792 A JP2010044792 A JP 2010044792A
Authority
JP
Japan
Prior art keywords
unique key
program
information
key
secure device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009262994A
Other languages
Japanese (ja)
Other versions
JP4580030B2 (en
Inventor
Mutsumi Fujiwara
睦 藤原
Yusuke Nemoto
祐輔 根本
Junichi Yasui
純一 安井
Takuji Maeda
卓治 前田
Takayuki Ito
孝幸 伊藤
Taiji Yamada
泰司 山田
Shinji Inoue
信治 井上
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 Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2009262994A priority Critical patent/JP4580030B2/en
Publication of JP2010044792A publication Critical patent/JP2010044792A/en
Application granted granted Critical
Publication of JP4580030B2 publication Critical patent/JP4580030B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To update a program while maintaining high security on an LSI (large scale integrated circuit) executing a program encrypted with a unique key. <P>SOLUTION: A system including the secure LSI 1 establishes a communication line with a server 3 (UD1), and receives a shared key encrypted program transmitted from the server 3 and encrypted with a shared key (UD6, UD7). The system then decodes the received shared key encrypted program to generate a plaintext program, further re-encrypts the plaintext program with the unique key and stores it as a new unique key encrypted program in an external memory. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、鍵実装されたシステムやこれに用いるLSIにおいて、セキュリティを保ちつつ、プログラムを更新する技術に関する。   The present invention relates to a technique for updating a program while maintaining security in a key-mounted system and an LSI used for the system.

従来、LSIを動作させるプログラムを不正な処理から守るために、予め定まったメーカー鍵で暗号化したプログラムをメモリに記憶しておき、復号化して実行することが行われている。しかしながら、このようなシステムでは共通のメーカー鍵で暗号化されたプログラムを実行するLSIが大量にあるため、たとえ1個の製品からでもメーカー鍵の情報が不正に漏洩すると、大量の製品においてプログラムを改ざん可能になってしまい、したがって、セキュリティを高めることができないという課題がある。   Conventionally, in order to protect a program for operating an LSI from unauthorized processing, a program encrypted with a predetermined manufacturer key is stored in a memory, decrypted and executed. However, in such a system, since there are a large number of LSIs that execute programs encrypted with a common manufacturer key, if the information of the manufacturer key is illegally leaked even from one product, the program can be executed in a large number of products. There is a problem that it becomes possible to tamper, and therefore security cannot be increased.

この課題を解決するために、LSIを動作させるプログラムをLSI毎に固有の固有鍵で暗号化し、製品としては固有鍵で暗号化されたプログラムのみを実行可能とする手法がある(特願2002−215096、特願2002−258481参照)。この手法を用いることにより、1個の製品で鍵情報が不正に漏洩したとしても、その他の製品への影響はないので、セキュリティを高めることができる。また、この手法の前提として、鍵を二重に暗号化する手法がある(特願2001−286881参照。)。   In order to solve this problem, there is a technique in which a program for operating an LSI is encrypted with a unique key unique to each LSI, and the product can execute only a program encrypted with a unique key (Japanese Patent Application 2002-2002). 215096, Japanese Patent Application No. 2002-258484). By using this method, even if the key information is illegally leaked in one product, there is no influence on other products, so that security can be improved. As a premise of this method, there is a method of double-encrypting a key (see Japanese Patent Application No. 2001-286881).

なお、ここで挙げた特許出願はいずれも未だ出願公開されておらず、このため、記載すべき先行技術文献情報はない。   Note that none of the patent applications listed here has been published yet, and therefore there is no prior art document information to be described.

一般に、製品となっているLSIに実装されたプログラムのアップデート(更新)は、SSL接続によって通信路を安全に確保し、平文プログラム、またはメーカー鍵で暗号化されたプログラムをサーバからLSIへ送信することによって行われている。しかしながら、この手法では、通信路を不正にアクセスされると、大量の製品で実行可能なプログラムが不正に入手されてしまうので、プログラム更新におけるセキュリティを高めることができない。   In general, in updating (updating) a program installed in an LSI that is a product, a communication path is secured by SSL connection, and a plaintext program or a program encrypted with a manufacturer key is transmitted from the server to the LSI. Is done by that. However, with this technique, if the communication path is illegally accessed, a program that can be executed by a large number of products is illegally obtained, and thus security in program update cannot be increased.

これを解決するために、上述の手法を用いた場合、LSIは固有鍵で暗号化されたプログラムのみを実行するので、平文プログラムやメーカー鍵で暗号化されたプログラムを送信しても、そのままでは実行することができない。   In order to solve this, when the above-described method is used, the LSI executes only the program encrypted with the unique key, so even if the plaintext program or the program encrypted with the manufacturer key is transmitted, Cannot be executed.

また、LSI毎に異なる鍵で暗号化されたプログラムをサーバ側で準備し、LSI毎に鍵情報を管理した上で、サーバからLSIへ、LSI毎に異なる鍵で暗号化されたプログラムを送信する方法も考えられるが、この方法では、莫大な手間とコストを必要とするため、現実的ではない。   Also, a program encrypted with a different key for each LSI is prepared on the server side, key information is managed for each LSI, and then the program encrypted with a different key for each LSI is transmitted from the server to the LSI. Although a method is conceivable, this method is not practical because it requires enormous effort and cost.

前記の問題に鑑み、本発明は、セキュリティの高い情報の暗号化を可能とするセキュアデバイス、集積回路、および暗号化方法を提供することを課題とする。   In view of the above problems, it is an object of the present invention to provide a secure device, an integrated circuit, and an encryption method that enable high-security information encryption.

前記の課題を解決するために、本発明が講じた解決手段は、集積回路と、前記集積回路の外部に設けられた外部メモリとを含むセキュアデバイスとして、前記集積回路は、前記集積回路に固有の固有鍵を生成して保持する固有鍵保持手段と、前記集積回路の外部から受け取った情報を前記固有鍵を用いて暗号化することによって固有鍵暗号化情報を生成する暗号手段と、前記固有鍵暗号化情報を前記外部メモリに出力する出力手段とを備え、前記固有鍵保持手段における前記固有鍵は、生成後、変更不可能となるものである。   In order to solve the above problems, the solution provided by the present invention is a secure device including an integrated circuit and an external memory provided outside the integrated circuit, and the integrated circuit is unique to the integrated circuit. A unique key holding means for generating and holding a unique key, encryption means for generating unique key encryption information by encrypting information received from outside the integrated circuit using the unique key, and the unique key Output means for outputting key encryption information to the external memory, and the unique key in the unique key holding means cannot be changed after generation.

また、本発明が講じた解決手段は、集積回路として、前記集積回路に固有の固有鍵を生成して保持する固有鍵保持手段と、前記固有鍵を用いて暗号化した情報である固有鍵暗号化情報を生成する暗号手段と、前記固有鍵暗号化情報を前記集積回路の外部に設けられた外部メモリに出力する出力手段とを備え、前記固有鍵保持手段における前記固有鍵は、生成後、変更不可能となるものである。   The solution provided by the present invention includes, as an integrated circuit, a unique key holding means for generating and holding a unique key unique to the integrated circuit, and a unique key encryption that is information encrypted using the unique key. Encryption means for generating encrypted information, and output means for outputting the unique key encryption information to an external memory provided outside the integrated circuit, wherein the unique key in the unique key holding means is generated, It cannot be changed.

また、本発明が講じた解決手段は、集積回路と、前記集積回路の外部に設けられた外部メモリとを含むセキュアデバイスにおける暗号化方法として、前記集積回路に固有の固有鍵を生成して固有鍵保持手段に保持するステップと、前記集積回路の外部から受け取った情報を前記固有鍵を用いて暗号化することによって固有鍵暗号化情報を生成するステップと、前記固有鍵暗号化情報を、前記外部メモリに出力するステップとを備え、前記固有鍵保持手段における前記固有鍵は、生成後、変更不可能となるものである。   Further, the solution provided by the present invention is to generate a unique key unique to the integrated circuit as an encryption method in a secure device including the integrated circuit and an external memory provided outside the integrated circuit. Holding in a key holding means; generating unique key encryption information by encrypting information received from outside the integrated circuit using the unique key; and the unique key encryption information, And outputting to an external memory, and the unique key in the unique key holding means cannot be changed after generation.

本発明によると、プログラムをLSI毎の固有鍵で再暗号化して実行する秘匿性の高いセキュアLSIにおいても、サーバから同一のプログラムを送信するだけで、プログラムの更新をすること可能となる。   According to the present invention, even in a highly confidential secure LSI in which a program is re-encrypted with a unique key for each LSI and executed, the program can be updated only by transmitting the same program from the server.

また、サーバからセキュアLSIへの通信路が不正にアクセスされて共有鍵暗号化プログラムが盗み出されたとしても、そのプログラムではセキュアLSIを動作させることができないので、秘匿性が向上する。また、万一、暗号を破られた場合でも、被害を受ける製品の数が限定されることになり、従来よりもセキュリティが高まる。   Further, even if the communication path from the server to the secure LSI is illegally accessed and the shared key encryption program is stolen, the secure LSI cannot be operated by the program, so the confidentiality is improved. In addition, even if the encryption is broken, the number of products that are damaged is limited, and the security is higher than before.

さらに、サーバから受信した共有鍵やプログラムの正当性を平文状態のハッシュ値を用いて行うので、通信路における暗号化状態でのハッシュ値で行うよりもハッシュ値の改ざんが行いにくくなり、セキュリティは高まる。   Furthermore, since the validity of the shared key and program received from the server is performed using the hash value in the plaintext state, it is more difficult to tamper with the hash value than with the hash value in the encrypted state in the communication path, and security is improved. Rise.

本発明の実施形態に係るセキュアLSIの構成を示すブロック図である。1 is a block diagram showing a configuration of a secure LSI according to an embodiment of the present invention. 図1のセキュアLSIを用いた開発および製品化の全体の流れを表す図である。It is a figure showing the whole flow of development and commercialization using the secure LSI of FIG. ブートプログラムの全体的な処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the whole process of a boot program. セキュアメモリ初期値設定SZ1のデータフローである。It is a data flow of secure memory initial value setting SZ1. 商品動作モードにおけるプログラム実装処理SD1のフローチャートである。It is a flowchart of program mounting processing SD1 in the product operation mode. プログラム実装処理SD1のデータフロー1である。It is data flow 1 of program mounting process SD1. プログラム実装処理SD1のデータフロー2である。It is the data flow 2 of program mounting process SD1. 商品動作モードにおける通常ブート処理SD2のフローチャートである。It is a flowchart of normal boot processing SD2 in the product operation mode. 通常ブート処理SD2のデータフロー1である。It is data flow 1 of normal boot processing SD2. 通常ブート処理SD2のデータフロー1である。It is data flow 1 of normal boot processing SD2. プログラム更新におけるサーバとの通信を示すフローチャートである。It is a flowchart which shows communication with the server in program update. 外部メモリ100に格納された,プログラム更新に係わるプログラムの構成を示す図である。2 is a diagram showing a configuration of a program related to program update stored in an external memory 100. FIG. プログラムの更新処理を示すフローチャートである。It is a flowchart which shows the update process of a program.

以下、本発明の実施の形態について、図面を参照して説明する。なお、以下の説明では、X(鍵またはプログラム)を鍵Yを用いて暗号化して得た、暗号化された鍵またはプログラムのことを、Enc(X,Y)と表すものとする。   Embodiments of the present invention will be described below with reference to the drawings. In the following description, an encrypted key or program obtained by encrypting X (key or program) using the key Y is expressed as Enc (X, Y).

図1は本実施形態に係る半導体装置としてのセキュアLSIの内部構成を示すブロック図である。図1において、セキュアLSI1は外部バス120を介して、外部メモリ(フラッシュメモリ)100や外部ツール110などと接続可能に構成されている。また、モードIDを与えることによって、その動作モードを設定することが可能になっている。   FIG. 1 is a block diagram showing an internal configuration of a secure LSI as a semiconductor device according to the present embodiment. In FIG. 1, the secure LSI 1 is configured to be connectable to an external memory (flash memory) 100, an external tool 110, and the like via an external bus 120. In addition, the operation mode can be set by giving the mode ID.

本実施形態に関わる主な構成要素について、簡単に説明する。   The main components related to this embodiment will be briefly described.

まず、セキュアLSI1は、書き換え不可領域11を含むセキュアメモリ(セキュアFlash)10を備えている。この書き換え不可領域11には、書き換え不可領域書き込みフラグ12が設けられている。書き換え不可領域書き込みフラグ12は、モードIDが一度セキュアメモリ10に書き込まれると、そのフラグ値が“可”から“済”になり、それ以降の書き換え不可領域への書き込みが不能になる。なお、本実施形態では、セキュアメモリ10および外部メモリ100はフラッシュメモリによって構成されているが、もちろんこれに限定されるものではなく、不揮発性のメモリであればどのようなものであってもかまわない。   First, the secure LSI 1 includes a secure memory (secure flash) 10 including a non-rewritable area 11. In this non-rewritable area 11, a non-rewritable area write flag 12 is provided. When the mode ID is once written in the secure memory 10, the flag value of the non-rewritable area write flag 12 changes from “permitted” to “done”, and subsequent writing to the non-rewritable area becomes impossible. In the present embodiment, the secure memory 10 and the external memory 100 are configured by flash memory, but of course, the present invention is not limited to this, and any non-volatile memory may be used. Absent.

また、暗号化部2はプログラムの暗号化や復号化を行うものであり、秘密鍵演算処理部20と、鍵生成・更新シーケンサ30とを備えている。秘密鍵演算処理部20は各種の鍵、およびプログラム暗号種を格納するレジスタ(プログラム共有鍵格納レジスタ21、プログラム固有鍵格納レジスタ22、暗号鍵格納レジスタ23等)を備えており、プログラムの暗号化処理又は復号化処理を含む複数のシーケンスを実行可能である。鍵生成・更新シーケンサ30は秘密鍵演算処理部20が実行可能な各シーケンスについて実行の諾否を判断し、実行が許されないと判断したシーケンスについて秘密鍵演算処理部20の動作を禁止する。鍵生成更新シーケンサ30はモードID格納レジスタ31を有しており、このモードID格納レジスタ31に格納されているモードIDに応じて、各シーケンスの実行の諾否を判断する。また、鍵またはプログラムがどのようなアルゴリズムや鍵長で暗号化されているかを示す暗号種別識別子を格納する暗号種別識別子格納レジスタ32、およびプログラム暗号種を記憶する記憶部33を備えている。   The encryption unit 2 encrypts and decrypts a program, and includes a secret key calculation processing unit 20 and a key generation / update sequencer 30. The secret key calculation processing unit 20 includes registers (program shared key storage register 21, program unique key storage register 22, encryption key storage register 23, etc.) for storing various keys and program encryption types, and encrypting programs. A plurality of sequences including processing or decoding processing can be executed. The key generation / update sequencer 30 determines whether to execute each sequence that can be executed by the secret key calculation processing unit 20, and prohibits the operation of the secret key calculation processing unit 20 for the sequence that is determined not to be executed. The key generation / update sequencer 30 has a mode ID storage register 31, and determines whether to execute each sequence according to the mode ID stored in the mode ID storage register 31. Further, an encryption type identifier storage register 32 for storing an encryption type identifier indicating what algorithm and key length the key or program is encrypted with, and a storage unit 33 for storing the program encryption type are provided.

モードシーケンサ40も、モードID格納レジスタ41を備えており、モードID格納レジスタ41に格納されているモードIDと、ジャンパ43の値に応じて、外部ホストインターフェース(I/F)50の動作、すなわち、外部メモリ100に格納されたプログラムやデータをどのI/Fを介して読み込むか、を制御する。これにより、外部メモリ100に格納された平文プログラムが実行できるか否かを制御することができる。さらに、モードシーケンサ40は、鍵がどの手法によって暗号化されているかを示す暗号種別識別子を格納する暗号種別識別子格納レジスタ42を備えている。   The mode sequencer 40 also includes a mode ID storage register 41, and the operation of the external host interface (I / F) 50 according to the mode ID stored in the mode ID storage register 41 and the value of the jumper 43, that is, The I / F through which the program or data stored in the external memory 100 is read is controlled. Thereby, it is possible to control whether or not the plaintext program stored in the external memory 100 can be executed. Furthermore, the mode sequencer 40 includes an encryption type identifier storage register 42 that stores an encryption type identifier indicating which method is used to encrypt the key.

外部ホストI/F50は、モードシーケンサ40の制御に従って、プログラム処理部51が有する暗号化用スルー部52、実行用スルー部53およびプログラム復号用暗号エンジン54、並びに、データ処理部55が有するスルー部56およびコンテンツ暗号・復号用暗号エンジン57のうちのいずれかを介して、外部メモリ100や外部ツール110との間でプログラムやデータの入出力を行う。またプログラム復号用暗号エンジン54は、プログラムの復号に用いるプログラム固有鍵を格納するためのプログラム固有鍵可能レジスタ58を備えている。   According to the control of the mode sequencer 40, the external host I / F 50 includes an encryption through unit 52, an execution through unit 53, a program decryption cryptographic engine 54, and a data processing unit 55 that are included in the program processing unit 51. 56 and the content encryption / decryption encryption engine 57 are used to input / output programs and data to / from the external memory 100 and the external tool 110. The program decryption cryptographic engine 54 includes a program unique key enable register 58 for storing a program unique key used for decrypting a program.

ここで、後述する鍵生成モードと商品動作モードにおいては、実行用スルー部53を介してプログラムを取り込むことが出来ないように構成されている。すなわち、セキュアLSI1は後述する鍵生成モードと商品動作モードにおいては、固有鍵で暗号化されたプログラム以外へは動作を遷移しないように構成されている。   Here, in the key generation mode and the product operation mode, which will be described later, the program cannot be taken in via the execution through unit 53. In other words, the secure LSI 1 is configured not to make a transition to a program other than a program encrypted with a unique key in a key generation mode and a product operation mode described later.

ブートROM60は、セキュアLSI1の起動動作を制御するブートプログラムを格納している。HASH演算部70は、セキュアLSI1に読み込まれたプログラムについてその正当性を検証するために、HASH値を演算する。   The boot ROM 60 stores a boot program that controls the startup operation of the secure LSI 1. The HASH calculation unit 70 calculates a HASH value in order to verify the validity of the program read into the secure LSI 1.

また、外部メモリ100には、プログラムやコンテンツが格納されている。外部ツール110には、セキュアLSI1の最初の起動時にセキュアメモリ10に格納する各種の初期値が格納されている。この初期値の種類は、設定される動作モードに応じて、異なったものになる。   The external memory 100 stores programs and contents. The external tool 110 stores various initial values stored in the secure memory 10 when the secure LSI 1 is first activated. The type of the initial value varies depending on the set operation mode.

図2は図1のセキュアLSI1を用いた開発および製品化の全体の流れを表す図である。図2に示すように、セキュアLSI1は、アドミニストレータモード(モードID:00)、鍵生成モード(モードID:01)、開発モード(モードID:10)および商品動作モード(モードID:11)の4種類の動作モードで、動作する。   FIG. 2 is a diagram showing the overall flow of development and commercialization using the secure LSI 1 of FIG. As shown in FIG. 2, the secure LSI 1 has four modes: an administrator mode (mode ID: 00), a key generation mode (mode ID: 01), a development mode (mode ID: 10), and a product operation mode (mode ID: 11). Operates in various operation modes.

まず、アドミニストレータモードに設定されたセキュアLSI1は、管理者用LSIとして、動作する。管理者用LSIでは、鍵生成プログラムが開発され(PA1)、また、その鍵生成プログラムが任意の鍵生成鍵を用いて暗号化される(PA2)。   First, the secure LSI 1 set to the administrator mode operates as an administrator LSI. In the administrator LSI, a key generation program is developed (PA1), and the key generation program is encrypted using an arbitrary key generation key (PA2).

鍵生成モードに設定されたセキュアLSI1は、鍵生成用LSIとして、動作する。鍵生成用LSIでは、管理者用LSIにおいて生成された、暗号化された鍵生成プログラムが実装され(PB1)、この鍵生成プログラムを実行することによって、各種の鍵が生成される(PB2)。   The secure LSI 1 set to the key generation mode operates as a key generation LSI. In the key generation LSI, an encrypted key generation program generated in the administrator LSI is mounted (PB1), and various keys are generated by executing this key generation program (PB2).

開発モードに設定されたセキュアLSI1は、開発用LSIとして、動作する。開発用LSIでは、実際の製品で実行されるアプリケーション用プログラムが開発される(PC1)。そして、このアプリケーション用プログラムが、プログラム共有鍵を用いて暗号化される(PC2)。   The secure LSI 1 set to the development mode operates as a development LSI. In the development LSI, an application program to be executed by an actual product is developed (PC1). Then, the application program is encrypted using the program shared key (PC2).

商品動作モードに設定されたセキュアLSI1は、実際の商品LSIとして、動作する。商品LSIでは、開発用LSIにおいて生成された、プログラム共有鍵で暗号化されたアプリケーション用プログラムが実装され、その内部で、プログラム固有鍵で暗号化されたアプリケーション用プログラムに、変換される(PD1)。その後、通常の商品LSIとして動作する(PD2)。なお、この変換処理は、開発用LSIでも、アプリケーション用プログラムのデバッグのために、実行可能になっている(PC3)。   The secure LSI 1 set in the product operation mode operates as an actual product LSI. In the product LSI, the application program generated by the development LSI and encrypted with the program shared key is installed and converted into the application program encrypted with the program unique key (PD1). . Thereafter, it operates as a normal product LSI (PD2). This conversion process can be executed in the development LSI for debugging the application program (PC3).

以下、上記のように構成されたセキュアLSI1の商品動作モードにおける通常動作およびセキュアアップデート動作の詳細について、フローチャートおよびデータフローを参照して、説明する。   Hereinafter, details of the normal operation and the secure update operation in the product operation mode of the secure LSI 1 configured as described above will be described with reference to a flowchart and a data flow.

図3はブートプログラムの全体的な処理の流れを示すフローチャートである。セキュアLSI1に電源が投入されると、ブートROM60に格納されたブートプログラムがCPU65によって実行される。図3に示すように、まず、各ハードウェアを初期化する(SZ0)。そして、外部ツール110からさまざまな初期値を読み込み、セキュアメモリ10に設定する(SZ1)。   FIG. 3 is a flowchart showing the overall processing flow of the boot program. When the secure LSI 1 is turned on, the boot program stored in the boot ROM 60 is executed by the CPU 65. As shown in FIG. 3, first, each hardware is initialized (SZ0). Then, various initial values are read from the external tool 110 and set in the secure memory 10 (SZ1).

図4は初期値設定処理SZ1のフローチャートである。まず、ジャンパ44で、セキュアメモリ10がLSI内に実装されているか否かの判定を行う(SZ11)。次に、書き換え不可領域書き込みフラグ12が“済”であるか否かを判定し(SZ12)、“済”であるときは(Yes)すでにセキュアメモリ10に初期値が設定されているので、処理SZ1を終了する。書き換え不可領域書き込みフラグ12が“可”であるときは(No)、セキュアメモリ10に初期値を書き込んでいく(SZ13〜SZ18)。モードIDに加えて、暗号化されたプログラム固有鍵、アドレス管理情報、データ固有鍵をセキュアメモリ10の書き換え不可領域11に書き込む。なお、最初の判定の結果、セキュアメモリ10がLSIの外部にあると判定されたときは(SZ14でNo)、モードIDは商品動作モードを表す値に上書きされる(SZ15)。これにより、セキュアメモリ10がLSIパッケージ外にあるような不正な製品は、商品動作モードでしか動作できない。   FIG. 4 is a flowchart of the initial value setting process SZ1. First, the jumper 44 determines whether or not the secure memory 10 is mounted in the LSI (SZ11). Next, it is determined whether or not the non-rewritable area write flag 12 is “completed” (SZ12). If it is “completed” (Yes), an initial value has already been set in the secure memory 10, so SZ1 is terminated. When the non-rewritable area write flag 12 is “permitted” (No), the initial value is written into the secure memory 10 (SZ13 to SZ18). In addition to the mode ID, the encrypted program unique key, address management information, and data unique key are written in the non-rewritable area 11 of the secure memory 10. As a result of the initial determination, when it is determined that the secure memory 10 is outside the LSI (No in SZ14), the mode ID is overwritten with a value representing the product operation mode (SZ15). Thereby, an unauthorized product in which the secure memory 10 is outside the LSI package can operate only in the product operation mode.

次に、書き込み不可領域書き込みフラグ12を“済”にセットする(SZ19)。これによって、以後の書き換え不可領域11の書き換えはできなくなる。さらに、通常領域13,14に暗号種別識別子および実装モードフラグを書き込む(SZ1A)。そして、モードIDがアドミニストレータモード以外のモードを示すときは(SZ1BでNo)、これらに加えて、暗号化された共有鍵/鍵生成鍵も通常領域13,14に書き込む(SZ1C)。   Next, the unwritable area write flag 12 is set to “completed” (SZ19). This makes it impossible to rewrite the non-rewritable area 11 thereafter. Further, the encryption type identifier and the implementation mode flag are written in the normal areas 13 and 14 (SZ1A). When the mode ID indicates a mode other than the administrator mode (No in SZ1B), in addition to these, the encrypted shared key / key generation key is also written in the normal areas 13 and 14 (SZ1C).

その後、前処理SZ2を実行する。ここでは、セキュアメモリ10の書き込み不可領域11に設定されたモードIDが、鍵生成・更新シーケンサ30のモードID格納レジスタ31と、モードシーケンサ40のモードID格納レジスタ41とに設定される。また、セキュアメモリ10の第1の通常領域13に設定された暗号種別識別子が、鍵生成・更新シーケンサ30の暗号種別識別子格納レジスタ32と、モードシーケンサ40の暗号種別識別子格納レジスタ42とに設定される。さらに、セキュアメモリ10の書き換え不可領域11に格納されたアドレス管理情報が、MEMC80の暗号アドレス区分格納レジスタ81に設定される。ここまでの動作は、図2における初期値設定フェーズPA0,PB0,PC0,PD0に対応している。   Thereafter, pre-processing SZ2 is executed. Here, the mode ID set in the non-writable area 11 of the secure memory 10 is set in the mode ID storage register 31 of the key generation / update sequencer 30 and the mode ID storage register 41 of the mode sequencer 40. In addition, the encryption type identifier set in the first normal area 13 of the secure memory 10 is set in the encryption type identifier storage register 32 of the key generation / update sequencer 30 and the encryption type identifier storage register 42 of the mode sequencer 40. The Furthermore, the address management information stored in the non-rewritable area 11 of the secure memory 10 is set in the encryption address section storage register 81 of the MEMC 80. The operations so far correspond to the initial value setting phases PA0, PB0, PC0, PD0 in FIG.

その後は、モードIDの値に応じて、それぞれのモードにおける動作を行う(SZ3)。このようにモードIDの値に応じて、セキュアLSIで行う動作を制限することによりプログラムの秘匿性を高めている。   Thereafter, the operation in each mode is performed according to the value of the mode ID (SZ3). In this way, the confidentiality of the program is enhanced by restricting the operations performed by the secure LSI according to the value of the mode ID.

次に通常の商品動作(通常ブート処理)について詳細に説明する。   Next, normal product operation (normal boot processing) will be described in detail.

モードIDが「11」のとき、セキュアLSI1は商品動作モードになり、実装モードフラグの値に応じて(SD0)、プログラム実装処理SD1、または通常ブート処理SD2を実行する。   When the mode ID is “11”, the secure LSI 1 is in the product operation mode, and executes the program mounting process SD1 or the normal boot process SD2 according to the value of the mounting mode flag (SD0).

図5はプログラム実装処理SD1のフローチャート、図6、7はデータフローである。プログラム実装処理SD1においては、セキュアメモリ10に格納された固有鍵情報を用いてプログラム固有鍵を(SD11、SD12)、共有鍵情報を用いてプログラム共有鍵を復号し(SD13、SD14)、復号されたプログラム共有鍵とプログラム固有鍵を用いて外部メモリ100に格納されたプログラムEnc(プログラム、プログラム共有鍵)をEnc(プログラム、プログラム固有鍵)へと変換する(SD15−SD17)。その後、プログラムの正当性の検証を行い(SD18)、正当であるならば実装モードフラグをOFFに設定する(SD19)。これにより次回の起動時からはプログラム実装処理SD1は行われない。そして最後にセキュアメモリ10に格納されたプログラム共有鍵と、外部メモリ100に格納されたプログラムEnc(プログラム、プログラム共有鍵)は削除される(SD1A、SD1B)。   FIG. 5 is a flowchart of the program mounting process SD1, and FIGS. 6 and 7 are data flows. In the program implementation process SD1, the program unique key (SD11, SD12) is decrypted using the unique key information stored in the secure memory 10, and the program shared key is decrypted using the shared key information (SD13, SD14). The program Enc (program, program shared key) stored in the external memory 100 is converted into Enc (program, program unique key) using the program shared key and program unique key (SD15-SD17). Thereafter, the validity of the program is verified (SD18), and if it is valid, the mounting mode flag is set to OFF (SD19). As a result, the program mounting process SD1 is not performed from the next startup. Finally, the program shared key stored in the secure memory 10 and the program Enc (program, program shared key) stored in the external memory 100 are deleted (SD1A, SD1B).

図8は通常ブート処理SD2のフローチャート、図9、10はデータフローである。通常ブート処理SD2においては、まず、内部メモリとしてのセキュアメモリ10の書き込み不可領域11に格納された、固有鍵鍵情報としての暗号化されたプログラム固有鍵、すなわち、暗号化固有鍵Enc(プログラム固有鍵(平文)、MK0(平文第3中間鍵))および暗号化第2中間鍵Enc(MK0,CK0(平文第4中間鍵))を秘密鍵演算処理部20の暗号鍵格納レジスタに設定する(SD21)。そして、この暗号化されたプログラム固有鍵を、鍵生成・更新シーケンサ30に実装されたプログラム暗号種を用いて復号し、プログラム固有鍵を得る(SD22)。得られたプログラム固有鍵は秘密鍵演算処理部20のプログラム固有鍵格納レジスタ22と、外部ホストI/F50のプログラム復号用暗号エンジン54のプログラム固有鍵格納レジスタ58に設定する(SD23)。   FIG. 8 is a flowchart of the normal boot process SD2, and FIGS. 9 and 10 are data flows. In the normal boot process SD2, first, the encrypted program unique key as the unique key key information stored in the non-writable area 11 of the secure memory 10 as the internal memory, that is, the encrypted unique key Enc (program unique key) The key (plaintext), MK0 (plaintext third intermediate key)) and the encrypted second intermediate key Enc (MK0, CK0 (plaintext fourth intermediate key)) are set in the encryption key storage register of the secret key calculation processing unit 20 ( SD21). Then, the encrypted program unique key is decrypted using the program encryption type installed in the key generation / update sequencer 30 to obtain the program unique key (SD22). The obtained program unique key is set in the program unique key storage register 22 of the secret key calculation processing unit 20 and the program unique key storage register 58 of the program decryption cryptographic engine 54 of the external host I / F 50 (SD23).

その後、セキュアメモリ10の書き込み不可領域11に格納されているデータ固有IDを秘密鍵演算処理部20の固有ID格納レジスタに設定する(SD24)。また、CPU65によって乱数を生成し、秘密鍵演算処理部20の乱数格納レジスタに設定する(SD25)。そして、秘密鍵演算処理部20によって、データ固有IDと乱数からデータ固有鍵を生成する(SD26)。コンテンツの再生にはデータ固有鍵を用いて行う。データ固有鍵は乱数を用いて生成されるため、起動毎に異なることとなり、コンテンツ再生の安全性が高まる。   Thereafter, the data unique ID stored in the unwritable area 11 of the secure memory 10 is set in the unique ID storage register of the secret key calculation processing unit 20 (SD24). Further, a random number is generated by the CPU 65 and set in a random number storage register of the secret key calculation processing unit 20 (SD25). Then, the secret key calculation processing unit 20 generates a data unique key from the data unique ID and the random number (SD26). Content reproduction is performed using a data unique key. Since the data unique key is generated using a random number, the data unique key is different for each activation, and the safety of content reproduction is increased.

その後、外部メモリ100に格納されていた,プログラム固有鍵で暗号化されたプログラムEnc(プログラム,プログラム固有鍵)を、外部ホストI/F50が有するプログラム処理部51のプログラム復号用暗号エンジン54を介して復号し、HASH演算部70に取り込み、HASH値を演算する(SD27)。復号に用いられる鍵としては外部ホストI/Fのプログラム固有鍵格納レジスタ58に格納されたプログラム固有鍵が用いられる。そして、この演算したHASH値と、セキュアメモリ10の通常領域13に格納されていたHASH値とを比較し、プログラムが改ざんされていないかどうかをチェックする(SD28)。HASH値が一致していたとき(SD29でNo)、外部メモリ100に格納されていたプログラムEnc(プログラム,プログラム固有鍵)に処理を遷移し、アプリケーションを実行する(SD2A)。一方、HASH値が一致していないとき(SD29でYes)は、何らかの不正が行われたものと推定して、不正アクセス時制御による処理を実行する(SD2B)。   Thereafter, the program Enc (program, program unique key) encrypted with the program unique key stored in the external memory 100 is passed through the program decryption cryptographic engine 54 of the program processing unit 51 of the external host I / F 50. Are decoded and fetched into the HASH calculation unit 70 to calculate the HASH value (SD27). As a key used for decryption, a program unique key stored in the program unique key storage register 58 of the external host I / F is used. Then, the calculated HASH value is compared with the HASH value stored in the normal area 13 of the secure memory 10 to check whether the program has been tampered with (SD28). When the HASH values match (No in SD29), the process transitions to the program Enc (program, program unique key) stored in the external memory 100, and the application is executed (SD2A). On the other hand, when the HASH values do not match (Yes in SD29), it is presumed that some kind of fraud has been performed, and processing by the unauthorized access time control is executed (SD2B).

ここで、上述のように商品として動作するセキュアLSIについて、プログラムの更新を行う処理について、図面を参照しながら説明する。図11はプログラム更新の際に、サーバ3とセキュアLSI1を含むシステムとの間におけるデータのやり取りを示すフローである。   Here, processing for updating a program for a secure LSI operating as a product as described above will be described with reference to the drawings. FIG. 11 is a flow showing data exchange between the server 3 and the system including the secure LSI 1 during program update.

図11に示すように、まず、セキュアLSI1がプログラム更新処理を起動すると、サーバ3はシステムからセキュアLSI1のIDを受信してID認証を行い、認証した場合は、セキュアLSI1とSSL接続する(UD1)。これにより、サーバ3とセキュアLSI1を含むシステムとの間の通信路の安全性が一応確保される。   As shown in FIG. 11, first, when the secure LSI 1 starts the program update process, the server 3 receives the ID of the secure LSI 1 from the system, performs ID authentication, and if authenticated, establishes an SSL connection with the secure LSI 1 (UD1). ). Thereby, the safety of the communication path between the server 3 and the system including the secure LSI 1 is temporarily ensured.

通信路が確保されると、システムは、更新対象プログラムの識別情報であるアプリIDをサーバ3へ送信する(UD2)。サーバ3は、更新可能なプログラムのアプリIDと、プログラムを動作させて良いLSIのIDとの対応関係を示す第1のテーブル4を管理しており、この第1のテーブル4に基づいて、プログラムを送信してよいか否かを判断する。セキュアLSI1のIDと、更新を要求されたプログラムのアプリIDとの対応が確認されると、サーバ3は、この更新対象プログラムの送信を開始する。   When the communication path is secured, the system transmits an application ID that is identification information of the update target program to the server 3 (UD2). The server 3 manages a first table 4 indicating a correspondence relationship between an application ID of an updatable program and an ID of an LSI that can operate the program. Based on the first table 4, the program Is determined whether or not to be transmitted. When the correspondence between the ID of the secure LSI 1 and the application ID of the program requested to be updated is confirmed, the server 3 starts transmitting the update target program.

まず、サーバ3から、更新対象プログラムの付加情報をセキュアLSI1へ送信する(UD3)。ここでの付加情報は、セキュアLSI1側でプログラムを更新してよいか否かを認証させるための署名、更新対象プログラムのサイズ、および、更新対象プログラムのハッシュ値(平文での値)等を含む。セキュアLSI1は、付加情報として送信された署名を用いて認証を行い、また、送信されたプログラムサイズを基にして、外部メモリ100に更新可能な空き領域があるか否かを判断する。そして、更新が可能であると判断した場合は、サーバ3に対して、共有鍵情報を送信するよう要求する(UD4)。   First, the server 3 transmits the additional information of the update target program to the secure LSI 1 (UD3). The additional information here includes a signature for authenticating whether or not the program can be updated on the secure LSI 1 side, the size of the update target program, the hash value (value in plain text) of the update target program, and the like. . The secure LSI 1 performs authentication using the signature transmitted as additional information, and determines whether there is a free space that can be updated in the external memory 100 based on the transmitted program size. If it is determined that the update is possible, the server 3 is requested to transmit the shared key information (UD4).

サーバ3は、要求を受信すると、共有鍵情報として、暗号化共有鍵Enc(プログラム共有鍵(平文),MK1(平文第1中間鍵))および暗号化第1中間鍵Enc(MK1,CK1(平文第2中間鍵))をセキュアLSI1へ送信する(UD5)。セキュアLSI1は、共有鍵情報を用いてプログラム共有鍵を復号し、復号された状態でハッシュ演算を行い、正当性の検証をする。プログラム共有鍵を正常に復号すると、システムはサーバ3に対して、共有鍵暗号化プログラムを送信するよう要求する(UD6)。サーバ3は、要求を受信すると、プログラムEnc(プログラム、プログラム共有鍵)をシステムへ送信する(UD7)。セキュアLSI1は、Enc(プログラム、プログラム共有鍵)をEnc(プログラム、プログラム固有鍵)へと変換する。さらに、変換されたEnc(プログラム、プログラム固有鍵)を平文プログラムに復号し、ハッシュ演算して、先に付加情報として受信したハッシュ値との比較によって、正当性を検証する。ここでの処理については、後で詳細に説明する。   When the server 3 receives the request, the shared key information is encrypted shared key Enc (program shared key (plaintext), MK1 (plaintext first intermediate key)) and encrypted first intermediate key Enc (MK1, CK1 (plaintext). The second intermediate key)) is transmitted to the secure LSI 1 (UD5). The secure LSI 1 decrypts the program shared key using the shared key information, performs a hash operation in the decrypted state, and verifies the validity. When the program shared key is successfully decrypted, the system requests the server 3 to transmit the shared key encryption program (UD6). Upon receiving the request, the server 3 transmits a program Enc (program, program shared key) to the system (UD7). The secure LSI 1 converts Enc (program, program shared key) into Enc (program, program unique key). Further, the converted Enc (program, program unique key) is decrypted into a plain text program, subjected to a hash operation, and the validity is verified by comparison with the hash value previously received as additional information. This process will be described later in detail.

共有鍵暗号化プログラムが固有鍵暗号化プログラムに正常に変換できたとき、セキュアLSI1を含むシステムはサーバ3へ、アプリ固有情報を送信するよう要求する(UD8)。アプリ固有情報はプログラムの実行に必要な情報を含んでおり、アプリ固有情報がないと、セキュアLSI1は更新したプログラムを実行できない。サーバ3は、アプリ固有情報の送信履歴とLSIのIDとの対応関係を示す第2のテーブル5も管理しており、同一のセキュアLSIには複数のアプリ固有情報を送信しないようにする。よって、同一のセキュアLSIは複数回、同一のプログラムを更新することができない。   When the shared key encryption program is successfully converted into the unique key encryption program, the system including the secure LSI 1 requests the server 3 to transmit the application unique information (UD8). The application specific information includes information necessary for program execution. Without the application specific information, the secure LSI 1 cannot execute the updated program. The server 3 also manages the second table 5 indicating the correspondence between the transmission history of the application specific information and the ID of the LSI, and prevents a plurality of application specific information from being transmitted to the same secure LSI. Therefore, the same secure LSI cannot update the same program a plurality of times.

サーバ3は、アプリ固有情報を送信してよいと判断したとき、アプリ固有情報をセキュアLSI1を含むシステムへ送信し(UD9)、セキュアLSI1がこれをハッシュ演算して正当性を検証すると、プログラム更新が終了し、通信は切断される(UD10)。   When the server 3 determines that the application specific information may be transmitted, the server 3 transmits the application specific information to the system including the secure LSI 1 (UD9). When the secure LSI 1 performs a hash operation to verify the validity, the program update is performed. Is terminated and communication is disconnected (UD10).

なお、本発明におけるサーバ3とセキュアLSIを含むシステムとの間におけるデータのやり取りは上述のフローに限定されるものではない。例えば、サーバ3は、必ずしも、第2のテーブルを管理し、同一のセキュアLSIに複数のアプリ固有情報を送信しないようにする必要はない。しかしながら、同一のセキュアLSIに複数回、同一のプログラムを送信しないようにすることにより、プログラムの秘匿性はより高まる。   Note that data exchange between the server 3 and the system including the secure LSI in the present invention is not limited to the above-described flow. For example, the server 3 does not necessarily have to manage the second table and prevent a plurality of application specific information from being transmitted to the same secure LSI. However, by not transmitting the same program to the same secure LSI multiple times, the confidentiality of the program is further enhanced.

また、付加情報、共有鍵情報、共有鍵暗号化プログラムは、必ずしも、サーバ3からセキュアLSIへと別々に送信する必要はなく、その一部、または全部をまとめたプログラムパッケージとして一度に送信してもよい。   Further, the additional information, shared key information, and shared key encryption program do not necessarily have to be transmitted separately from the server 3 to the secure LSI. Also good.

セキュアLSI1における、共有鍵暗号化プログラムEnc(プログラム、プログラム共有鍵)から固有鍵暗号化プログラムEnc(プログラム、プログラム固有鍵)への変換について、図面を参照しながら詳述する。図12は外部メモリ100に格納された、プログラム更新に係わるプログラムの構成を示す図である。   The conversion from the shared key encryption program Enc (program, program shared key) to the unique key encryption program Enc (program, program unique key) in the secure LSI 1 will be described in detail with reference to the drawings. FIG. 12 is a diagram showing a configuration of a program related to program update stored in the external memory 100.

図12に示すように、外部メモリ100には、固有鍵でそれぞれ暗号化された、暗号化制御プログラム200(Enc(制御プログラム、プログラム固有鍵))、および暗号化アプリケーションプログラム210(Enc(アプリケーションプログラム、プログラム固有鍵))が格納されている。   As shown in FIG. 12, in the external memory 100, an encrypted control program 200 (Enc (control program, program unique key)) and an encrypted application program 210 (Enc (application program) each encrypted with a unique key are stored. , The program unique key)) is stored.

暗号化制御プログラム200はアプリケーション起動部201およびプログラム更新制御部205を備え、プログラム更新制御部205は共有鍵復号部206、プログラム固有鍵暗号化処理部207およびプログラム更新成否判定部208を備えている。   The encryption control program 200 includes an application activation unit 201 and a program update control unit 205, and the program update control unit 205 includes a shared key decryption unit 206, a program unique key encryption processing unit 207, and a program update success / failure determination unit 208. .

アプリケーション起動部201はブートROM60に格納されたブートプログラムからの指示を受けて、暗号化アプリケーションプログラム210を起動する。共有鍵復号部206はサーバ3から送信された共有鍵情報を基にして、鍵生成・更新シーケンサ30を用いて、プログラム共有鍵を復号する。プログラム固有鍵暗号化処理部207は鍵生成・更新シーケンサ30を用いて、共有鍵暗号化プログラムEnc(プログラム、プログラム共有鍵)から固有鍵暗号化プログラムEnc(プログラム、プログラム固有鍵)への変換を行う。プログラム更新成否判定部208は、固有鍵暗号化プログラムEnc(プログラム、プログラム固有鍵)を平文プログラムに復号し、ハッシュ検証によってプログラム更新の成否を判定する。そして、プログラム更新が成功したときは、古いプログラムを削除し、プログラム格納先・サイズなどの情報をセキュアメモリ10に格納する。   In response to an instruction from the boot program stored in the boot ROM 60, the application activation unit 201 activates the encrypted application program 210. The shared key decryption unit 206 decrypts the program shared key using the key generation / update sequencer 30 based on the shared key information transmitted from the server 3. The program unique key encryption processing unit 207 uses the key generation / update sequencer 30 to convert the shared key encryption program Enc (program, program shared key) to the unique key encryption program Enc (program, program unique key). Do. The program update success / failure determination unit 208 decrypts the unique key encryption program Enc (program, program unique key) into a plain text program, and determines the success or failure of the program update by hash verification. When the program update is successful, the old program is deleted and information such as the program storage location and size is stored in the secure memory 10.

暗号化アプリケーションプログラム210は、通常のアプリケーションプログラムである通常動作部211の他、サーバや記録媒体から新しいアプリケーションプログラムを取得するためのプログラム取得部212もアプリケーションプログラムとして備えている。プログラムの更新は、これらのような外部メモリ100に格納されたプログラムを用いて行われる。   In addition to the normal operation unit 211 that is a normal application program, the encrypted application program 210 includes a program acquisition unit 212 for acquiring a new application program from a server or a recording medium. The program is updated using a program stored in the external memory 100 as described above.

図13は共有鍵暗号化プログラムから固有鍵暗号化プログラムへの変換処理を含む、プログラム更新処理を示すフローチャートである。   FIG. 13 is a flowchart showing a program update process including a conversion process from a shared key encryption program to a unique key encryption program.

アプリケーションプログラムの実行中(SX1)に、ユーザの操作等の外部要因によってプログラムの更新が要求されると、システムはこれを検知し、プログラム更新を開始するために、通常動作部211が暗号化アプリケーションプログラム210の取得プログラムとしてのプログラム取得部212を起動する(SX2)。   When the application program is being executed (SX1) and the program is requested to be updated due to an external factor such as a user operation, the system detects this and the normal operation unit 211 starts the encryption The program acquisition unit 212 as an acquisition program of the program 210 is activated (SX2).

プログラム取得部212はサーバ3と通信して、認証や、共有鍵情報・プログラムの取得を行う(SX3)。サーバ3から共有鍵情報を取得すると、共有鍵復号部206はプログラム共有鍵を復号する(SX4,SX5)。すなわち、共有鍵鍵情報としての暗号化されたプログラム共有鍵Enc(プログラム共有鍵,MK2)、Enc(MK2,CK)を秘密鍵演算処理部20の暗号鍵格納レジスタ23に設定し、この暗号化されたプログラム共有鍵を、鍵生成・更新シーケンサ30に実装されたプログラム暗号種を用いて復号し、プログラム共有鍵を得る。得られたプログラム共有鍵は秘密鍵演算処理部20のプログラム共有鍵格納レジスタ21に格納される。   The program acquisition unit 212 communicates with the server 3 to perform authentication and acquire shared key information / program (SX3). When the shared key information is acquired from the server 3, the shared key decryption unit 206 decrypts the program shared key (SX4, SX5). That is, the encrypted program shared key Enc (program shared key, MK2) and Enc (MK2, CK) as shared key key information are set in the encryption key storage register 23 of the secret key calculation processing unit 20, and this encryption is performed. The program shared key is decrypted using the program encryption type installed in the key generation / update sequencer 30 to obtain the program shared key. The obtained program shared key is stored in the program shared key storage register 21 of the secret key calculation processing unit 20.

次に、プログラム固有鍵暗号化処理部207が、共有鍵暗号化プログラムから固有鍵暗号化プログラムへの変換を行う。すなわち、サーバ3から送信され外部メモリ100に格納されていたプログラムEnc(プログラム,プログラム共有鍵)を、外部ホストI/F50が有するプログラム処理部51の暗号化用スルー部52を介して、秘密鍵演算処理部20に取り込む(SX6)。そして、取り込んだプログラムを、プログラム共有鍵格納レジスタ21に格納されたプログラム共有鍵で復号した後、プログラム固有鍵格納レジスタ22に格納されたプログラム固有鍵で暗号化し、プログラムEnc(プログラム,プログラム固有鍵)を得る。なお、上述したように、プログラム固有鍵はシステムの起動時にすでに復号されており、秘密鍵演算処理部20のプログラム固有鍵格納レジスタ22に格納されている。   Next, the program unique key encryption processing unit 207 converts the shared key encryption program into the unique key encryption program. That is, the program Enc (program, program shared key) transmitted from the server 3 and stored in the external memory 100 is transferred to the private key via the encryption through unit 52 of the program processing unit 51 of the external host I / F 50. The data is taken into the arithmetic processing unit 20 (SX6). Then, the fetched program is decrypted with the program shared key stored in the program shared key storage register 21 and then encrypted with the program unique key stored in the program unique key storage register 22 to obtain a program Enc (program, program unique key). ) As described above, the program unique key has already been decrypted when the system is activated, and is stored in the program unique key storage register 22 of the secret key calculation processing unit 20.

最後に、プログラム更新成否判定部208が、プログラム更新の成否を判定する。すなわち、Enc(プログラム,プログラム固有鍵)を外部メモリ100に書き込んだ(SX8)後、外部ホストI/F50が有するプログラム処理部51のプログラム復号用暗号エンジン53を用いて、復号して取り込み(SX9)、平文状態でのハッシュ値を演算する(SX10)。演算されたハッシュ値は、プログラム取得部212が暗号化プログラムとともに取得したハッシュ値と比較され、この比較によって更新の成否が判定される(SX11)。更新が成功したときは、古いプログラムを消去する(SX12)一方、更新が失敗したときは、送信されたプログラムを消去する(SX13)。そしてプログラム格納先、サイズなどの情報をセキュアメモリ10に書き込み(SX14)、更新処理が終了する。   Finally, the program update success / failure determination unit 208 determines the success or failure of the program update. That is, Enc (program, program unique key) is written in the external memory 100 (SX8), and then decrypted and fetched using the program decryption cryptographic engine 53 of the program processing unit 51 of the external host I / F 50 (SX9 ), The hash value in the plaintext state is calculated (SX10). The calculated hash value is compared with the hash value acquired together with the encryption program by the program acquisition unit 212, and the success or failure of the update is determined by this comparison (SX11). When the update is successful, the old program is deleted (SX12). When the update fails, the transmitted program is deleted (SX13). Then, information such as the program storage destination and size is written to the secure memory 10 (SX14), and the update process is completed.

上述のプログラム更新方法を用いることによって、サーバからプログラム共有鍵暗号化プログラムを送信すると、セキュアLSIにおいて、暗号化する鍵がプログラム共有鍵からプログラム固有鍵に変換されて、システムに実装される。このため、たとえサーバからセキュアLSIへの通信路が不正にアクセスされプログラム共有鍵暗号化プログラムが盗み出されたとしても、このプログラムによってセキュアLSIを動作させることは、できない。また更新の結果、ユーザの持つ各製品では、互いに異なる固有鍵によって暗号化されたプログラムが実装されることになり、秘匿性が向上する。また、万一、暗号を破られた場合でも、被害を受ける製品の数が限定されることになり、従来よりもセキュリティが高まる。   When the program shared key encryption program is transmitted from the server by using the program update method described above, the key to be encrypted is converted from the program shared key to the program unique key in the secure LSI, and is installed in the system. For this reason, even if the communication path from the server to the secure LSI is illegally accessed and the program shared key encryption program is stolen, the secure LSI cannot be operated by this program. Also, as a result of the update, each product that the user has is installed with a program encrypted with a different unique key, thereby improving confidentiality. In addition, even if the encryption is broken, the number of products that are damaged is limited, and the security is higher than before.

なお、本実施形態において、共有鍵情報をサーバから取得しているが、これは、商品動作モード「11」におけるプログラム実装(SD1)の最後において、復号されたプログラム共有鍵およびセキュアメモリ10上の共有鍵情報を削除しているためであり、これらを削除しない場合は、共有鍵情報はサーバから取得する必要はなく、セキュアメモリ10から読み出して復号すればよい。   In this embodiment, the shared key information is acquired from the server. This is because the decrypted program shared key and the secure memory 10 are stored at the end of the program implementation (SD1) in the product operation mode “11”. This is because the shared key information is deleted, and when these are not deleted, the shared key information does not need to be acquired from the server, but may be read from the secure memory 10 and decrypted.

また、本実施形態では、外部要因によってプログラムの更新の開始が指示され、通常瞳サブ211がプログラム取得部212を起動し、プログラムの取得後はブートプログラムによって各処理を指示するものとしたが、本発明はこれに限られるものではない。例えば、ブートプログラムがプログラム取得部212を起動する構成にすることによって、さらにセキュリティを高めることができる。   Further, in this embodiment, the start of the program update is instructed by an external factor, the normal pupil sub 211 starts the program acquisition unit 212, and after the program is acquired, each process is instructed by the boot program. The present invention is not limited to this. For example, by configuring the boot program to activate the program acquisition unit 212, security can be further enhanced.

また、プログラム固有鍵は必ずしも製品毎に固有である必要はなく、品種ごとまたは複数個毎に同一であっても良い。1個の製品において暗号を破られたときに被害を少なくするのが本願発明のねらいであり、同一の鍵で暗号化されたプログラムを有するLSIの数を少しでも減らすだけで効果は充分に発揮できる。さらに言えば、プログラム固有鍵は全て共通であったとしても、通信路が破られ共有鍵暗号化プログラムが盗み出されたとしてもそのままではセキュアLSIで動作できないので、鍵を共有鍵から固有鍵に書き換えるだけでも、効果は発揮できる。   Further, the program unique key does not necessarily have to be unique for each product, and may be the same for each product type or for each plurality. The purpose of the present invention is to reduce the damage when a cipher is broken in one product, and the effect can be sufficiently exerted only by reducing the number of LSIs having programs encrypted with the same key as much as possible. it can. Furthermore, even if all the program unique keys are common, even if the communication path is broken and the shared key encryption program is stolen, it cannot be operated on the secure LSI as it is, so the key is rewritten from the shared key to the unique key. Even just, it can be effective.

1 セキュアLSI
3 サーバ
4 第1のテーブル
5 第2のテーブル
10 セキュアメモリ(内部メモリ)
58 プログラム固有鍵格納レジスタ
60 ブートROM
100 外部メモリ
1 Secure LSI
3 Server 4 First table 5 Second table 10 Secure memory (internal memory)
58 Program unique key storage register 60 Boot ROM
100 External memory

Claims (11)

集積回路と、前記集積回路の外部に設けられた外部メモリとを含むセキュアデバイスであって、
前記集積回路は、
前記集積回路に固有の固有鍵を、生成して保持する固有鍵保持手段と、
前記集積回路の外部から受け取った情報を前記固有鍵を用いて暗号化することによって、固有鍵暗号化情報を生成する暗号手段と、
前記固有鍵暗号化情報を、前記外部メモリに出力する出力手段とを備え、
前記固有鍵保持手段における前記固有鍵は、生成後、変更不可能となる
ことを特徴とするセキュアデバイス。
A secure device including an integrated circuit and an external memory provided outside the integrated circuit,
The integrated circuit comprises:
Unique key holding means for generating and holding a unique key unique to the integrated circuit;
Encryption means for generating unique key encryption information by encrypting information received from outside the integrated circuit using the unique key;
Output means for outputting the unique key encryption information to the external memory,
The secure device, wherein the unique key in the unique key holding unit cannot be changed after generation.
請求項1記載のセキュアデバイスにおいて、
前記固有鍵保持手段は、
前記固有鍵保持手段における固有鍵が保持される記録領域について書き換えが許されるか否かを示す情報の設定を受ける設定保持部と、
前記設定保持部に設定されている情報に応じて、前記固有鍵が保持される記録領域に対する書き換えの可否を切り替える書き換え制御部とを備え、
前記集積回路は、さらに、
前記固有鍵が前記固有鍵保持手段に書き込まれたとき、前記設定保持部に対して、前記記録領域の書き換えを禁止する情報を設定する書き込み不可設定手段を備えている
ことを特徴とするセキュアデバイス。
The secure device of claim 1, wherein
The unique key holding means is
A setting holding unit that receives a setting of information indicating whether rewriting is permitted for a recording area in which the unique key in the unique key holding unit is held;
A rewrite control unit that switches whether to rewrite a recording area in which the unique key is held according to information set in the setting holding unit,
The integrated circuit further includes:
A secure device, comprising: a write disable setting unit that sets information for prohibiting rewriting of the recording area to the setting holding unit when the unique key is written to the unique key holding unit. .
請求項1記載のセキュアデバイスにおいて、
前記固有鍵暗号化情報は、固有鍵で暗号化されたデータである
ことを特徴とするセキュアデバイス。
The secure device of claim 1, wherein
The secure device, wherein the unique key encryption information is data encrypted with a unique key.
請求項1記載のセキュアデバイスにおいて、
前記固有鍵暗号化情報は、固有鍵で暗号化されたプログラムである
ことを特徴とするセキュアデバイス。
The secure device of claim 1, wherein
The secure device, wherein the unique key encryption information is a program encrypted with a unique key.
請求項1記載のセキュアデバイスにおいて、
外部のサーバから、前記サーバが保持する共有鍵で暗号化された情報である共有鍵暗号化情報を受信する受信手段と、
前記サーバが保持する共有鍵と同一の共有鍵を保持する共有鍵保持手段と、
前記受信手段により受信した情報を変換する変換手段とを備え、
前記暗号手段は、さらに、前記共有鍵保持手段が保持する共有鍵を用いた復号処理を行うものであり、
前記変換手段は、
前記受信手段から前記共有鍵暗号化情報を受け取り、
前記暗号手段を用いて、受け取った前記共有鍵暗号化情報を前記共有鍵を用いて復号化して平文情報を生成し、前記平文情報を前記固有鍵を用いて暗号化して第2の固有鍵暗号化情報を生成し、
前記第2の固有鍵暗号化情報を、前記外部メモリに出力する
ことを特徴とするセキュアデバイス。
The secure device of claim 1, wherein
Receiving means for receiving shared key encryption information, which is information encrypted with a shared key held by the server, from an external server;
Shared key holding means for holding the same shared key as the shared key held by the server;
Conversion means for converting the information received by the receiving means,
The encryption means further performs a decryption process using a shared key held by the shared key holding means,
The converting means includes
Receiving the shared key encryption information from the receiving means;
Using the encryption means, the received shared key encryption information is decrypted using the shared key to generate plaintext information, and the plaintext information is encrypted using the unique key to obtain a second unique key encryption Generation information
The secure device, wherein the second unique key encryption information is output to the external memory.
請求項5記載のセキュアデバイスにおいて、
前記受信手段は、さらに、前記サーバから、前記平文情報が改竄されていない場合に計算されるべき認証ハッシュ値を含んだ付加情報を受信し、
前記集積回路は、さらに、
復号化によって生成された前記平文情報のハッシュ値を計算するハッシュ演算手段を備えており、
前記セキュアデバイスは、さらに、前記ハッシュ演算手段が計算した前記平文情報のハッシュ値と、前記認証ハッシュ値とを比較することによって、前記平文情報に対する改竄の有無を確認する確認手段とを備えている
ことを特徴とするセキュアデバイス。
The secure device of claim 5, wherein
The receiving means further receives from the server additional information including an authentication hash value to be calculated when the plaintext information has not been tampered with,
The integrated circuit further includes:
A hash operation means for calculating a hash value of the plaintext information generated by decryption,
The secure device further includes confirmation means for confirming whether or not the plaintext information is falsified by comparing the hash value of the plaintext information calculated by the hash calculation means with the authentication hash value. Secure device characterized by that.
請求項5記載のセキュアデバイスにおいて、
前記第2の固有鍵暗号化情報が前記外部メモリに書き込まれたことを確認した後に、前記第2の固有鍵暗号化情報よりも前に前記外部メモリに書き込まれていた古い固有鍵暗号化情報を削除する削除手段を備えている
ことを特徴とするセキュアデバイス。
The secure device of claim 5, wherein
The old unique key encryption information written in the external memory before the second unique key encryption information after confirming that the second unique key encryption information has been written in the external memory A secure device comprising a deleting means for deleting
請求項5記載のセキュアデバイスにおいて、
前記受信手段は、さらに、前記サーバから、前記第2の固有鍵暗号化情報に対応するハッシュ値を受信し、
前記セキュアデバイスは、さらに、
前記受信手段により受信した前記ハッシュ値と、前記第2の固有鍵暗号化情報から計算したハッシュ値とが等しいとき、前記第2の固有鍵暗号化情報の書き込みが完了したと判断する完了確認手段を備えている
ことを特徴とするセキュアデバイス。
The secure device of claim 5, wherein
The receiving means further receives a hash value corresponding to the second unique key encryption information from the server,
The secure device further includes:
Completion confirmation means for determining that writing of the second unique key encryption information is completed when the hash value received by the receiving means is equal to the hash value calculated from the second unique key encryption information A secure device comprising:
請求項5記載のセキュアデバイスにおいて、
前記集積回路は、さらに、
前記セキュアデバイスの起動処理を行うブートプログラムを記録した記録手段を備え、
前記変換手段は、前記ブートプログラムによって制御される
ことを特徴とするセキュアデバイス。
The secure device of claim 5, wherein
The integrated circuit further includes:
Comprising a recording means for recording a boot program for performing a startup process of the secure device;
The secure device is characterized in that the conversion means is controlled by the boot program.
集積回路であって、
前記集積回路に固有の固有鍵を、生成して保持する固有鍵保持手段と、
前記固有鍵を用いて暗号化した情報である固有鍵暗号化情報を生成する暗号手段と、
前記固有鍵暗号化情報を、前記集積回路の外部に設けられた外部メモリに出力する出力手段とを備え、
前記固有鍵保持手段における前記固有鍵は、生成後、変更不可能となる
ことを特徴とする集積回路。
An integrated circuit,
Unique key holding means for generating and holding a unique key unique to the integrated circuit;
Encryption means for generating unique key encryption information that is information encrypted using the unique key;
Output means for outputting the unique key encryption information to an external memory provided outside the integrated circuit;
The integrated circuit according to claim 1, wherein the unique key in the unique key holding unit cannot be changed after generation.
集積回路と、前記集積回路の外部に設けられた外部メモリとを含むセキュアデバイスにおける暗号化方法であって、
前記集積回路に固有の固有鍵を生成して、固有鍵保持手段に保持するステップと、
前記集積回路の外部から受け取った情報を前記固有鍵を用いて暗号化することによって、固有鍵暗号化情報を生成するステップと、
前記固有鍵暗号化情報を、前記外部メモリに出力するステップとを備え、
前記固有鍵保持手段における前記固有鍵は、生成後、変更不可能となる
ことを特徴とする暗号化方法。
An encryption method in a secure device including an integrated circuit and an external memory provided outside the integrated circuit,
Generating a unique key unique to the integrated circuit and holding it in a unique key holding means;
Generating unique key encryption information by encrypting information received from outside the integrated circuit using the unique key;
Outputting the unique key encryption information to the external memory,
The encryption method, wherein the unique key in the unique key holding means cannot be changed after generation.
JP2009262994A 2009-11-18 2009-11-18 Secure device Expired - Lifetime JP4580030B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009262994A JP4580030B2 (en) 2009-11-18 2009-11-18 Secure device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009262994A JP4580030B2 (en) 2009-11-18 2009-11-18 Secure device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007148054A Division JP2007272923A (en) 2007-06-04 2007-06-04 Server

Publications (2)

Publication Number Publication Date
JP2010044792A true JP2010044792A (en) 2010-02-25
JP4580030B2 JP4580030B2 (en) 2010-11-10

Family

ID=42016069

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009262994A Expired - Lifetime JP4580030B2 (en) 2009-11-18 2009-11-18 Secure device

Country Status (1)

Country Link
JP (1) JP4580030B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6441947A (en) * 1987-08-07 1989-02-14 Hitachi Ltd Semiconductor integrated circuit
JPH11259330A (en) * 1998-03-06 1999-09-24 Hitachi Ltd Module for evaluation, microcomputer chip for evaluation and debugging system
JPH11282667A (en) * 1998-03-31 1999-10-15 Nakamichi Corp Microprocessor having cipher processing function of multiple key system
JP2000122931A (en) * 1998-10-15 2000-04-28 Toshiba Corp Digital integrated circuit
WO2000057278A1 (en) * 1999-03-19 2000-09-28 Hitachi, Ltd. Information processing device
JP2001290671A (en) * 2000-04-10 2001-10-19 Matsushita Electric Ind Co Ltd In-circuit emulator, recording medium and middleware issuing system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6441947A (en) * 1987-08-07 1989-02-14 Hitachi Ltd Semiconductor integrated circuit
JPH11259330A (en) * 1998-03-06 1999-09-24 Hitachi Ltd Module for evaluation, microcomputer chip for evaluation and debugging system
JPH11282667A (en) * 1998-03-31 1999-10-15 Nakamichi Corp Microprocessor having cipher processing function of multiple key system
JP2000122931A (en) * 1998-10-15 2000-04-28 Toshiba Corp Digital integrated circuit
WO2000057278A1 (en) * 1999-03-19 2000-09-28 Hitachi, Ltd. Information processing device
WO2000057290A1 (en) * 1999-03-19 2000-09-28 Hitachi, Ltd. Information processor
JP2001290671A (en) * 2000-04-10 2001-10-19 Matsushita Electric Ind Co Ltd In-circuit emulator, recording medium and middleware issuing system

Also Published As

Publication number Publication date
JP4580030B2 (en) 2010-11-10

Similar Documents

Publication Publication Date Title
JP4099039B2 (en) Program update method
KR101735023B1 (en) Method and apparatus including architecture for protecting sensitive code and data
KR100792287B1 (en) Method for security and the security apparatus thereof
JP4912921B2 (en) Secure processor system, secure processor, and secure processor system control method
JP3881942B2 (en) Semiconductor device having encryption unit
US8190912B2 (en) Program development method, program development supporting system, and program installation method
JP2008226159A (en) Information processing device, software update method, and image processing device
JP2017157018A (en) Information processing device, information processing method, information processing program, and trusted platform module
JP2016146618A (en) Information processing device
JP5582231B2 (en) Information processing apparatus, authenticity confirmation method, and recording medium
JP4580030B2 (en) Secure device
JP2007272923A5 (en)
JP2007272923A (en) Server
JP4676547B2 (en) Semiconductor device and boot method thereof
JP2010033603A (en) Information processor
JP4580024B2 (en) Content playback method
JP4336690B2 (en) Semiconductor device having external interface
JP2008003774A (en) Microcomputer
JP2013191226A (en) Information processing apparatus, software update method, and image processing apparatus
JP2007249996A (en) Program development support device and program installation method
JP2009169989A (en) Program mounting method and information processing apparatus
JP5234217B2 (en) Information processing apparatus, software update method, and program
JP5310897B2 (en) Information processing apparatus, software update method, and recording medium
JP2004280678A (en) Data processor and data processing method
JP2010033613A (en) Information processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100302

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100422

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100803

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100826

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

Free format text: PAYMENT UNTIL: 20130903

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4580030

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term