JP7057675B2 - Semiconductor device and encryption key generation method - Google Patents
Semiconductor device and encryption key generation method Download PDFInfo
- Publication number
- JP7057675B2 JP7057675B2 JP2018001228A JP2018001228A JP7057675B2 JP 7057675 B2 JP7057675 B2 JP 7057675B2 JP 2018001228 A JP2018001228 A JP 2018001228A JP 2018001228 A JP2018001228 A JP 2018001228A JP 7057675 B2 JP7057675 B2 JP 7057675B2
- Authority
- JP
- Japan
- Prior art keywords
- key
- scrambled
- encryption key
- encryption
- data
- 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.)
- Active
Links
- 239000004065 semiconductor Substances 0.000 title claims description 19
- 238000000034 method Methods 0.000 title claims description 16
- 238000012545 processing Methods 0.000 claims description 71
- 238000012546 transfer Methods 0.000 claims description 34
- 230000004044 response Effects 0.000 claims description 17
- 230000008569 process Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Images
Description
本発明は、半導体装置、特にデータを暗号化するための暗号鍵を記憶する記憶部を含む半導体装置、及び暗号鍵の生成方法に関する。 The present invention relates to a semiconductor device, particularly a semiconductor device including a storage unit for storing an encryption key for encrypting data, and a method for generating an encryption key.
現在、暗号鍵を用いてデータを暗号化し、暗号化された暗号化データに対してこの暗号鍵を用いた復号を施すことにより元のデータを復元する機能を備えたマイクロコンピュータを含む半導体装置が知られている(例えば、特許文献1参照)。 Currently, semiconductor devices including microcomputers that have the function of encrypting data using an encryption key and restoring the original data by decrypting the encrypted encrypted data using this encryption key are available. It is known (see, for example, Patent Document 1).
当該半導体装置には、暗号鍵を格納するメモリとして、EEPROM(Electrically Erasable Programmable Read-Only Memory)が設けられている。 The semiconductor device is provided with an EEPROM (Electrically Erasable Programmable Read-Only Memory) as a memory for storing an encryption key.
ところで、暗号鍵は第三者に漏洩してはならないものであるが、外部からの物理攻撃或いは物理解析等の不正なアクセスにより、メモリに格納されている暗号鍵が不正に読み出されてしまう虞があった。この際、不正に取得した暗号鍵により上記した暗号化データが復号されてしまい、データの漏洩を招くことになる。 By the way, the encryption key must not be leaked to a third party, but the encryption key stored in the memory is illegally read by an unauthorized access such as a physical attack or physical analysis from the outside. There was a risk. At this time, the above-mentioned encrypted data is decrypted by the illegally acquired encryption key, which causes data leakage.
そこで、本発明は、不正なアクセスによるデータの漏洩を防ぐことが可能な半導体装置、及び暗号鍵の生成方法を提供することを目的とする。 Therefore, an object of the present invention is to provide a semiconductor device capable of preventing data leakage due to unauthorized access, and a method for generating an encryption key.
本発明に係る半導体装置は、暗号鍵を用いてデータを暗号化する半導体装置であって、乱数を生成する乱数生成部と、時間経過につれて値が変化するスクランブルキーを生成するスクランブルキー生成部と、前記乱数を前記スクランブルキーを用いてスクランブルしたものをスクランブル暗号鍵として保持し、読出要求に応じて、前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルしたものを暗号鍵として出力する鍵保持部と、を有し、前記鍵保持部は、前記スクランブル暗号鍵を前記スクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として保持する処理を所定期間毎に繰り返し行う。 The semiconductor device according to the present invention is a semiconductor device that encrypts data using an encryption key, and includes a random number generation unit that generates a random number and a scramble key generation unit that generates a scramble key whose value changes with the passage of time. , The key holding that scrambles the random number using the scramble key is held as a scrambled encryption key, and outputs the scrambled encryption key descrambled using the scramble key as an encryption key in response to a read request. The key holding unit repeats the process of holding the scrambled encryption key scrambled with the scrambled key as a new scrambled encryption key at predetermined intervals .
また、本発明に係る暗号鍵の生成方法は、データの暗号化に用いる暗号鍵の生成方法であって、時間経過につれて値が変化するスクランブルキーを生成し、乱数を前記スクランブルキーでスクランブルしたものをスクランブル暗号鍵としてメモリに保持させると共に、前記スクランブル暗号鍵を前記スクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として前記メモリに保持させる処理を所定期間毎に繰り返し行いつつ、読出要求に応じて、前記メモリに保持されている前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルすることにより暗号鍵を得る。 Further, the method for generating an encryption key according to the present invention is a method for generating an encryption key used for encrypting data, in which a scramble key whose value changes with the passage of time is generated and a random number is scrambled with the scramble key. Is held in the memory as a scrambled encryption key, and the scrambled encryption key is retained in the memory as a new scrambled encryption key by repeating the process of holding the scrambled encryption key in the memory at predetermined intervals , in response to a read request. Then, the scrambled encryption key held in the memory is descrambled using the scrambled key to obtain an encryption key.
本発明では、鍵保持部が、乱数をスクランブルしたものをスクランブル暗号鍵として保持し、この保持したスクランブル暗号鍵自体を所定期間毎にスクランブルしたものを、新たなスクランブル暗号鍵として保持する。 In the present invention, the key holding unit holds a scrambled random number as a scrambled encryption key, and holds the held scrambled encryption key itself scrambled at predetermined intervals as a new scrambled encryption key.
これにより、鍵保持部に保持されたスクランブル暗号鍵は、それ自体が所定期間毎に繰り返しスクランブルされるので、時間経過につれてその値が変化する。よって、たとえ外部からの不正なアクセスによって、鍵保持部に保持されているスクランブル暗号鍵が漏洩しても、このスクランブル暗号鍵からでは、暗号鍵自体を特定することが困難となる。したがって、不正なアクセスが行われても平文データの漏洩を防ぐことが可能となる。 As a result, the scrambled encryption key held in the key holder is scrambled repeatedly at predetermined intervals, and its value changes with the passage of time. Therefore, even if the scrambled encryption key held in the key holding unit is leaked due to unauthorized access from the outside, it is difficult to identify the encryption key itself from this scrambled encryption key. Therefore, it is possible to prevent the leakage of plaintext data even if unauthorized access is performed.
図1は、本発明に係る半導体装置に含まれるマイクロコンピュータ100の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a
マイクロコンピュータ100は、暗号処理部12、乱数生成部13、CPU(central processing unit)14、RAM(random access memory)15、ROM(read only memory)制御部16、ROM17、セキュアRAM19、セキュアROM20、セキュアDMAC(direct memory access controller)21、及びキーストレージ22を有する。
The
更に、マイクロコンピュータ100は、2系統のデータバスBS1及びBS8を含む。マイクロコンピュータ100は、外部接続された機器とのデータ通信が可能であり、当該データバスBS1を介して各種データの送信又は受信を行う。
Further, the
データバスBS1には、暗号処理部12、乱数生成部13、CPU14、RAM15、ROM制御部16、ROM17、セキュアRAM19、及びキーストレージ22が接続されている。
The
データバスBS8は、データバスBS1には接続されておらず、且つマイクロコンピュータ100の外部からのアクセス不可な独立したバスである。データバスBS8は、秘匿性を要求される乱数生成部13、セキュアRAM19、セキュアROM20、セキュアDMAC21及びキーストレージ22、並びに暗号処理部12に接続されている。
The data bus BS8 is an independent bus that is not connected to the data bus BS1 and is inaccessible from the outside of the
暗号処理部12は、データバスBS1を介して受けた暗号化前の平文データ片を、暗号鍵を用いて暗号化することにより暗号化データ片を得て、これをデータバスBS1に送出する。また、暗号処理部12は、データバスBS1を介して受けた暗号化データ片を、この暗号鍵を用いて復号することにより、暗号化前の平文データ片を復元する。尚、暗号処理部12は、このような暗号化又は復号化処理を行うにあたり、その実行前に、キーストレージ22から暗号鍵を取得しておく。
The
乱数生成部13は、所定の一定周期で乱数値が変化する乱数を生成し、これをデータバスBS8に送出する。
The random
CPU14は、このマイクロコンピュータ100の中央演算処理装置であり、ROM17に格納されているプログラムに従った各種の演算、或いはデータの転送を行う。
The
RAM15は、データ書き込みが可能な記憶素子であり、CPU14によってデータの書込又は読出が行われる。
The
ROM制御部16は、ROM17に対して、データの書き込み、又はデータが正しく書き込まれたか否かを確認するベリファイ、或いは書き込まれたデータの消去等を行う。また、ROM制御部16は、セキュアDMAC21に対して書き込み要求を行う。
The
ROM17には、CPU14が実行するプログラムを表すプログラムデータが書き込まれている。
Program data representing a program executed by the
セキュアRAM19は、セキュアDMAC21からのデータ書込アクセスに応じて、データバスBS8を介して受けたデータを記憶する。また、セキュアRAM19は、セキュアDMAC21からのデータ読出アクセスに応じて、自身に記憶されているデータを読み出し、これをデータバスBS8に送出する。また、セキュアRAM19は、CPU14からのデータ書込アクセスに応じて、データバスBS1を介して受けたデータを記憶する。尚、セキュアRAM19は、CPU14からのデータ読出アクセスは受け付けない。
The
セキュアROM20は、セキュアDMAC21からのデータ読出アクセスに応じて、自身に格納されているデータを読み出し、これをデータバスBS8に送出する。また、セキュアROM20は、ROM制御部16がセキュアDMAC21へ書き込み要求を行った際に、セキュアDMAC21がデータバスBS8を介して受けたデータを書き込む。
The
セキュアDMAC21は、データバスBS8を介して、暗号処理部12、乱数生成部13、セキュアRAM19、セキュアROM20、セキュアDMAC21、及びキーストレージ22間のデータ転送を行う。
The
キーストレージ22は、乱数生成部13で生成された乱数をスクランブルしたスクランブル暗号鍵を生成し、これを保持する。また、キーストレージ22は、暗号鍵の読出要求に応じて、保持されているスクランブル暗号鍵を読み出し、このスクランブル暗号鍵に施されているスクランブルを解除したものを暗号鍵としてデータバスBS8に送出する。
The
上記した構成により、マイクロコンピュータ100は、ROM17に格納されているプログラムに従って、上記した暗号鍵を用いた平文データの暗号化及び復号化処理を含む各種のデータ処理を行う。
With the above configuration, the
以下に、RAM15に記憶されている平文データを暗号化する際の動作を、図2~図6を参照して説明する。
Hereinafter, the operation for encrypting the plaintext data stored in the
先ず、セキュアDMAC21が、乱数生成部13で生成された乱数を、図2の太線矢印に示すように、データバスBS8を介してキーストレージ22に転送する。キーストレージ22は、転送された乱数をスクランブルしたものを、スクランブル暗号鍵として保持する。
First, the
次に、セキュアDMAC21は、キーストレージ22に対して暗号鍵の読出要求を行い、これによりキーストレージ22から送出された暗号鍵を図3の太線矢印に示すように、データバスBS8を介してセキュアRAM19に転送する。これにより、セキュアRAM19は、当該暗号鍵を記憶する。
Next, the
次に、セキュアDMAC21は、セキュアRAM19に記憶されている暗号鍵を読み出し、これを図4の太線矢印に示すように、データバスBS8を介してセキュアROM20に転送する。これにより、セキュアROM20は、当該暗号鍵を書き込む。つまり、暗号処理部12で暗号化が行われる度にその暗号化で用いられた暗号鍵がセキュアROM20に追記される。よって、セキュアROM20には、使用した暗号鍵の履歴が残る。
Next, the
次に、セキュアDMAC21は、セキュアRAM19に記憶されている暗号鍵を読み出し、これを図5の太線矢印に示すように、データバスBS8を介して暗号処理部12に転送する。更に、CPU14が、RAM15に記憶されている平文データ片を読み出し、これを図5の太線矢印に示すように、データバスBS1を介して暗号処理部12に転送する。暗号処理部12は、転送された平文データを、転送された暗号鍵を用いて暗号化することにより暗号化データ片を生成し、これをデータバスBS1に送出する。
Next, the
次に、CPU14が、暗号処理部12で生成された暗号化データ片を、図6の太線矢印にて示すように、データバスBS1を介してRAM15に転送する。これにより、RAM15は、転送された暗号化データ片を記憶する。
Next, the
このように、平文データの暗号化を行うにあたり、マイクロコンピュータ100内では、先ず、図2に示すように、セキュアDMAC21が、乱数生成部13で生成された乱数をキーストレージ22に転送する。この際、キーストレージ22では、当該乱数をスクランブル化したものをスクランブル暗号鍵として保持する。そして、セキュアDMAC21が、当該キーストレージ22からスクランブルが解除された暗号鍵を読み出し、当該暗号鍵を図3及び図4に示すようにセキュアRAM19及びセキュアROM20に記憶させてから、図5に示すように暗号処理部12に転送する。
In this way, in encrypting the plaintext data, first, as shown in FIG. 2, the
尚、RAM15に記憶されている暗号化データ片を元の平文データ片に復号する場合には、CPU14が、この暗号化データ片をRAM15から読み出し、これをデータバスBS1を介して暗号処理部12に転送する。更に、セキュアDMAC21が、この平文データ片を暗号化する際に用いた暗号鍵をセキュアRAM19から読み出し、データバスBS8を介して暗号処理部12に転送する。よって、暗号処理部12は、転送された暗号化データ片を、転送された暗号鍵を用いて復号することにより平文データ片を得る。
When decrypting the encrypted data piece stored in the
また、暗号化データ片をマイクロコンピュータ100に接続されている外部機器に送信する場合には、所定のアルゴリズムに従って当該暗号化データ片と共にこの暗号化データ片に対応した暗号鍵を送信する。
Further, when the encrypted data piece is transmitted to an external device connected to the
ところで、キーストレージ22では、外部からの不正なアクセスによる暗号鍵の漏洩を防止する為に、以下の構成を採用している。
By the way, the
図7は、キーストレージ22の内部構成の一例を示すブロック図である。
FIG. 7 is a block diagram showing an example of the internal configuration of the
図7に示すように、キーストレージ22は、スクランブルキー生成部213、スクランブル処理部214、ストレージRAM215、レジスタ216、及びタイマ217を有する。
As shown in FIG. 7, the
スクランブルキー生成部213は、時間経過につれて乱数値が変化する乱数をスクランブルキーSKYとして生成し、これをスクランブル処理部214に供給する。
The scramble
スクランブル処理部214は、乱数生成部13で生成された乱数をデータバスBS8を介して受けたときにスクランブルキーSKYを取り込み、このスクランブルキーSKYを用いたスクランブル演算(例えば排他的論理和)を、上記した乱数に施す。そして、スクランブル処理部214は、当該スクランブル演算によって得られた結果をスクランブル暗号鍵SEKとし、上記したスクランブルキーSKYと対応付けしてストレージRAM215に保持させる。
The
また、スクランブル処理部214は、タイムアウト信号Toutに応じて、ストレージRAM215に保持されているスクランブル暗号鍵SEKを読み出すと共に、スクランブルキー生成部213で生成されたスクランブルキーSKYを取り込む。ここで、スクランブル処理部214は、取り込んだスクランブルキーSKYを用いたスクランブル演算を、ストレージRAM215から読み出したスクランブル暗号鍵SEKに施すことにより、新たなスクランブル暗号鍵SEKを生成する。そして、スクランブル処理部214は、この新たなスクランブル暗号鍵データSEKを、スクランブルキーSKYと対応付けしてストレージRAM215に保持させる。
Further, the
また、スクランブル処理部214は、暗号鍵の読出要求に応じて、先ず、ストレージRAM215に保持されているスクランブル暗号鍵SEKと、このスクランブル暗号鍵SEKに対応付けされているスクランブルキーSKYと、を読み出す。次に、スクランブル処理部214は、スクランブルキーSKYを用いて、スクランブル暗号鍵SEKにデスクランブル演算を施すことにより暗号鍵を復元し、当該暗号鍵をデータバスBS8に送出する。
Further, the
レジスタ216は、データバスBS1を介して受けた動作開始信号又は動作停止信号を保持する。レジスタ216は、動作開始信号を保持した場合には、タイマ217のカウント動作を開始させる動作開始信号STをタイマ217に供給する。一方、動作停止信号を保持した場合には、レジスタ216は、タイマ217のカウント動作を停止させる動作停止信号STPをタイマ217に供給する。
The
タイマ217は、クロック信号を受け、動作開始信号STが供給された場合に、当該クロック信号のパルス数のカウントを開始する。ここで、タイマ217は、カウント数が所定値に到達したときに、タイムアウト信号Toutをスクランブル処理部214に供給する。タイムアウト信号Toutをスクランブル処理部214に供給した後、引き続き、タイマ217は、初期値(例えばゼロ)からクロック信号のパルス数のカウントを継続する。すなわち、タイマ217は、所定期間毎に、タイムアウト信号Toutをスクランブル処理部214に供給する。尚、タイマ217は、動作停止信号STPを受けた場合には、上記したカウント動作を停止する。
When the
以下に、図7に示す構成を有するキーストレージ22の内部で行われる暗号鍵の保持及び読出動作について説明する。
The operation of holding and reading the encryption key performed inside the
図8は、CPU14からデータバスBS1を介して受けた動作開始信号に応じて、キーストレージ22内で行われる暗号鍵の保持動作の手順を表すフローチャートである。尚、CPU14は、例えば電源投入に応じて、動作開始信号をデータバスBS1を介してキーストレージ22に供給する。
FIG. 8 is a flowchart showing the procedure of the encryption key holding operation performed in the
先ず、キーストレージ22のレジスタ216が、動作開始信号STをタイマ217に供給することにより、当該タイマ217のカウント動作を開始させる(ステップS31)。これにより、タイマ217は、初期値からクロック信号のパルス数のカウントを行う。
First, the
この間、スクランブル処理部214は、タイマ217からタイムアウト信号Toutが供給されたか否かを判定する(ステップS32)。尚、タイマ217は、そのカウント数が所定値に達したらタイムアウト信号Toutをスクランブル処理部214に供給する。
During this time, the
ステップS32においてタイムアウト信号Toutが供給されていないと判定した場合、スクランブル処理部214は、引き続きタイムアウト信号Toutが供給されたか否かの判定を行う。
When it is determined in step S32 that the timeout signal Tout is not supplied, the
ステップS32でタイムアウト信号Toutが供給されたと判定した場合、スクランブル処理部214は、ストレージRAM215に保持されているスクランブル暗号鍵を読み出してこれを取り込むと共に、スクランブルキーSKYを取り込む(ステップS33)。
When it is determined in step S32 that the timeout signal Tout has been supplied, the
次に、スクランブル処理部214は、上記したように取り込んだスクランブルキーを用いて、取り込んだスクランブル暗号鍵にスクランブル演算を施すことにより、新たなスクランブル暗号鍵SEKを生成する(ステップS34)。
Next, the
次に、スクランブル処理部214は、ステップS34で生成したスクランブル暗号鍵SEKと、スクランブル演算で用いたスクランブルキーSKYと、を対応付けしてストレージRAM215に保持させる(ステップS35)。
Next, the
次に、タイマ217は、レジスタ216から動作停止信号STPが供給されたか否かを判定する(ステップS36)。
Next, the
ステップS36において動作停止信号STPが供給されていないと判定された場合、タイマ217は、クロック信号のパルスのカウント動作を継続する。これにより、スクランブル処理部214は、上記したステップS32に戻り、前述したステップS32~S35の動作を再び実行する。
If it is determined in step S36 that the operation stop signal STP is not supplied, the
よって、暗号鍵をスクランブルしたスクランブル暗号鍵がストレージRAM215に保持され、この保持したスクランブル暗号鍵自体を所定期間毎にスクランブルしたものが、新たなスクランブル暗号鍵としてストレージRAM215に保持される。尚、この所定期間、つまりタイマ217が初期値からカウントを開始した時点から、タイムアウト信号Toutを送出するまでに費やされる期間は、乱数生成部13における乱数の変化周期(一定周期)よりも短い。これにより、乱数生成部13で生成された1つの乱数に対して、複数回のスクランブルを施すことが可能となる。
Therefore, the scrambled encryption key obtained by scrambling the encryption key is held in the
ここで、CPU14は、キーストレージ22の動作を停止させる場合には、その旨を促す動作停止信号をデータバスBS1を介してキーストレージ22に供給する。かかる動作停止信号を受けると、キーストレージ22のレジスタ216は当該動作停止信号を保持し、動作停止信号STPをタイマ217に供給する。これにより、キーストレージ22による暗号鍵の保持動作が停止する。
Here, when the operation of the
尚、スクランブル処理部214は、電源遮断に応じて、ストレージRAM215に保持されている全てのスクランブル暗号鍵及びスクランブルキーを読み出し、データバスBS8に送出する。この際、セキュアDMAC21は、データバスBS8に送出された、全てのスクランブル暗号鍵及びスクランブルキーをセキュアROM20に転送する。よって、マイクロコンピュータ100の電源遮断に応じて、セキュアROM20には、ストレージRAM215に保持されていた全てのスクランブル暗号鍵及びスクランブルキーが書き込まれる。
The
図9は、セキュアDMAC21からデータバスBS8を介して受けた暗号鍵の読出し要求に応じて、キーストレージ22内で行われる暗号鍵の読出動作の手順を表すフローチャートである。
FIG. 9 is a flowchart showing the procedure of the encryption key reading operation performed in the
先ず、スクランブル処理部214は、ストレージRAM215から、所望とするスクランブル暗号鍵を読み出し(ステップS41)、引き続き、このスクランブル暗号鍵に対応付けされているスクランブルキーを読み出す(ステップS42)。
First, the
次に、スクランブル処理部214は、読み出されたスクランブル暗号鍵に対してスクランブルキーを用いたデスクランブル演算を施してスクランブルを解除することにより、暗号鍵を復元する(ステップS43)。
Next, the
そして、スクランブル処理部214は、復元した暗号鍵をデータバスBS8を介して送信する(ステップS44)。
Then, the
以上のように、キーストレージ22は、乱数生成部13で生成された乱数をスクランブルしたものをスクランブル暗号鍵として保持する。その後、キーストレージ22は、保持したスクランブル暗号鍵自体を所定期間毎にスクランブルしたものを、新たなスクランブル暗号鍵として保持する(S32~S36)。
As described above, the
また、キーストレージ22は、暗号鍵の読出要求に応じて、先ず、保持したスクランブル暗号鍵を読み出し(S41)、引き続きこのスクランブル暗号鍵に対応したスクランブルキーを読み出す(S42)。そして、キーストレージ22は、スクランブルキーを用いてスクランブル暗号鍵をデスクランブルすることにより、暗号鍵を復元し(S43)、これを出力する。
Further, the
このように、キーストレージ22に保持されているスクランブル暗号鍵は、それ自体が所定期間毎に繰り返しスクランブルされているので、その値は時間経過につれて変化している。よって、外部からの不正なアクセスによって、キーストレージ22に保持されているスクランブル暗号鍵が漏洩しても、このスクランブル暗号鍵からでは、暗号鍵自体を特定することはできない。また、用いられた暗号鍵が書き込まれるセキュアRAM19及びセキュアROM20は、マイクロコンピュータ100の外部からのアクセスが可能なデータバスBS1ではなく、外部アクセスが不可能なデータバスBS8を介して暗号鍵の読み出しが行われる。
As described above, since the scrambled encryption key held in the
したがって、不正なアクセスが行われても、マイクロコンピュータ100で運用されている平文データの漏洩を防ぐことが可能となる。
Therefore, even if unauthorized access is performed, it is possible to prevent leakage of plaintext data operated by the
尚、図1に示すマイクロコンピュータ100では、CPU14に接続されており且つ外部アクセス可能なデータバスBS1とは別に、CPU14に接続されておらず且つ外部アクセス不可なデータバスBS8を用いることで秘匿性の高い暗号鍵の運用を行っている。
In the
しかしながら、マイクロコンピュータ100で用いるデータバスとしては、データバスBS1だけであっても、秘匿性の高い暗号鍵の運用を行うことが可能である。
However, even if only the data bus BS1 is used as the data bus used in the
図10は、かかる点に鑑みて為されたマイクロコンピュータ100の内部構成の変形例を示すブロック図である。
FIG. 10 is a block diagram showing a modified example of the internal configuration of the
図10に示されるマイクロコンピュータ100では、図1に示される構成中から、データバスBS8を省くと共に、バスマスタイネーブル信号BSEを各モジュール(12~17、19~22)に供給している。バスマスタイネーブル信号BSEは、例えばイネーブル状態を表す論理レベル1、及びディスエーブル状態を表す論理レベル0のうちの一方を表す2値信号である。
In the
バスマスタイネーブル信号BSEがディスエーブル状態を表す場合には、暗号処理部12、CPU14、RAM15、ROM制御部16及びROM17がデータバスBS1に接続される。尚、この際、乱数生成部13、セキュアRAM19、セキュアROM20、セキュアDMAC21、及びキーストレージ22は、データバスBS1との接続が遮断される。
When the bus master enable signal BSE represents an disabled state, the
一方、バスマスタイネーブル信号BSEがイネーブル状態を表す場合には、暗号処理部12、乱数生成部13、セキュアRAM19、セキュアROM20、セキュアDMAC21、及びキーストレージ22がデータバスBS1に接続される。尚、バスマスタイネーブル信号BSEがイネーブル状態を表す場合には、CPU14、RAM15、ROM制御部16及びROM17は、データバスBS1との接続が遮断される。
On the other hand, when the bus master enable signal BSE represents the enable state, the
上記した点を除き、図10に示されるマイクロコンピュータ100に含まれる各モジュール(12~17、19~22)の構成は、図1に示されるものと同一である。
Except for the above points, the configurations of the modules (12 to 17, 19 to 22) included in the
図11は、図10に示される構成のマイクロコンピュータ100で用いられるキーストレージ22の内部構成を示すブロック図である。図11に示す構成では、バス接続部210を新たに設けた点を除く他の構成及びその動作は、図7~図9で説明したものと同一である。
FIG. 11 is a block diagram showing an internal configuration of the
バス接続部21は、バスマスタイネーブル信号BSEを受け、当該バスマスタイネーブル信号BSEがイネーブル状態を表す場合には、スクランブル処理部214及びレジスタ216をデータバスBS1に接続する。一方、バスマスタイネーブル信号BSEがディスエーブル状態を表す場合には、バス接続部21は、スクランブル処理部214及びレジスタ216と、データバスBS1との接続を遮断する。
The
尚、キーストレージ22以外の他のモジュール(12~17、19~21)にも、バスマスタイネーブル信号BSEに応じて、データバスBS1との接続状態(接続又は遮断)を上述したように切り替えるバス接続部が含まれている。ただし、暗号処理部12については、バスマスタイネーブル信号BSEの内容(イネーブル状態、ディスエイーブル状態)に拘わらず、常にデータバスBS1と接続されている。
It should be noted that the bus connection to other modules (12 to 17, 19 to 21) other than the
以下に、図10及び図11に示される構成を有するマイクロコンピュータ100において、RAM15に記憶されている平文データ片を暗号化する際の動作を、図12~図17を参照して説明する。
Hereinafter, the operation of encrypting the plaintext data piece stored in the
先ず、バスマスタイネーブル信号BSEをイネーブル状態に設定する。これにより、各モジュール(12~17、19~22)のうちで、暗号処理部12、乱数生成部13、セキュアRAM19、セキュアROM20、セキュアDMAC21、及びキーストレージ22が、データバスBS1に接続される。ここで、セキュアDMAC21が、乱数生成部13で生成された乱数を、図12の太線矢印に示すように、データバスBS1を介してキーストレージ22に転送する。この際、キーストレージ22は、転送された乱数をスクランブルしたものを、スクランブル暗号鍵として保持する。
First, the bus master enable signal BSE is set to the enabled state. As a result, among the modules (12 to 17, 19 to 22), the
次に、セキュアDMAC21は、キーストレージ22に対して暗号鍵の読出要求を行い、これによりキーストレージ22から読み出された暗号鍵を、図13の太線矢印に示すように、データバスBS1を介してセキュアRAM19に転送する。これにより、セキュアRAM19は、当該暗号鍵を記憶する。
Next, the
次に、セキュアDMAC21は、上記したようにセキュアRAM19に記憶した暗号鍵を読み出し、これを図14の太線矢印に示すように、データバスBS1を介してセキュアROM20に転送する。これにより、セキュアROM20は、当該暗号鍵を書き込む。つまり、セキュアROM20には、暗号処理部12で暗号処理が行われる度に、その暗号処理で用いられた暗号鍵がセキュアROM20に追記される。よって、セキュアROM20には、使用した暗号鍵の履歴が残る。
Next, the
次に、セキュアDMAC21は、セキュアRAM19に記憶されている暗号鍵を読み出し、これを図15の太線矢印に示すように、データバスBS1を介して暗号処理部12に転送する。
Next, the
次に、図16に示すように、バスマスタイネーブル信号BSEをディスエーブル状態に設定する。これにより、モジュール(12~17、19~22)のうちで、暗号処理部12、CPU14、RAM15、ROM制御部16及びROM17がデータバスBS1に接続される。ここで、CPU14が、RAM15に記憶されている平文データ片を読み出し、これを図16の太線矢印に示すように、データバスBS1を介して暗号処理部12に転送する。暗号処理部12は、転送された平文データを、転送された暗号鍵を用いて暗号化することにより暗号化データ片を生成する。
Next, as shown in FIG. 16, the bus master enable signal BSE is set to the disabled state. As a result, among the modules (12 to 17, 19 to 22), the
そして、図17に示すように、バスマスタイネーブル信号BSEを再びイネーブル状態に設定し、セキュアDMAC21が、暗号処理部12で生成された暗号化データ片を、図17の太線矢印にて示すように、データバスBS1を介してRAM15に転送する。これにより、RAM15は、転送された暗号化データ片を記憶する。
Then, as shown in FIG. 17, the bus master enable signal BSE is set to the enable state again, and the
このように、マイクロコンピュータ100として図10に示す構成を採用した場合には、データバスBS8が不要となるので、図1に示す構成を採用した場合に比べて、マイクロコンピュータ100を構築する領域の面積を縮小化することが可能となる。
As described above, when the configuration shown in FIG. 10 is adopted as the
尚、上記実施例では、ストレージRAM215を含むキーストレージ22、つまり揮発性の半導体メモリを、スクランブル化した暗号鍵を保持する鍵保持部としているが、当該鍵保持部としては不揮発性のメモリ、或いは磁気又は光学式記録媒体であっても良い。
In the above embodiment, the
要するに、データの暗号化機能を備えたマイクロコンピュータ100としては、以下の乱数生成部、及び鍵保持部を含むものであれば良い。
In short, the
すなわち、鍵保持部(22)は、乱数生成部(13)で生成された乱数をスクランブルキー(SKY)でスクランブルしたものをスクランブル暗号鍵(SEK)として保持する。この際、鍵保持部(22)は、スクランブル暗号鍵を所定期間毎にスクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として保持する。また、鍵保持部(22)は、読出要求に応じて、保持したスクランブル暗号鍵をスクランブルキーを用いてデスクランブルしたものを暗号鍵として出力する。 That is, the key holding unit (22) holds the random number generated by the random number generation unit (13) scrambled with the scramble key (SKY) as the scrambled encryption key (SEK). At this time, the key holding unit (22) holds the scrambled encryption key scrambled with the scrambled key at predetermined intervals as a new scrambled encryption key. Further, the key holding unit (22) outputs the scrambled encryption key held by the scrambled key as an encryption key in response to a read request.
12 暗号処理部
13 乱数生成部
22 キーストレージ
213 スクランブルキー生成部
214 スクランブル処理部
215 ストレージRAM
12
Claims (8)
乱数を生成する乱数生成部と、
時間経過につれて値が変化するスクランブルキーを生成するスクランブルキー生成部と、
前記乱数を前記スクランブルキーを用いてスクランブルしたものをスクランブル暗号鍵として保持し、読出要求に応じて、前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルしたものを暗号鍵として出力する鍵保持部と、を有し、
前記鍵保持部は、
前記スクランブル暗号鍵を前記スクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として保持する処理を所定期間毎に繰り返し行うことを特徴とする半導体装置。 A semiconductor device that encrypts data using an encryption key.
A random number generator that generates random numbers, and a random number generator
A scramble key generator that generates a scramble key whose value changes over time,
A key holding unit that holds the random number scrambled using the scramble key as a scrambled encryption key, and outputs the scrambled encryption key descrambled using the scrambled key as an encryption key in response to a read request. And have
The key holder is
A semiconductor device characterized in that a process of holding a scrambled encryption key scrambled with the scrambled key as a new scrambled encryption key is repeated at predetermined intervals .
メモリと、
前記乱数を前記スクランブルキーでスクランブルしたものを前記スクランブル暗号鍵として前記メモリに保持させると共に、前記所定期間毎に、前記スクランブルキー生成部が生成した前記スクランブルキー、及び前記メモリに保持されている前記スクランブル暗号鍵を取り込み、取り込んだ前記スクランブル暗号鍵を、取り込んだ前記スクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として前記メモリに保持させるスクランブル処理部と、を含むことを特徴とする請求項1に記載の半導体装置。 The key holder is
With memory
The random number scrambled with the scramble key is held in the memory as the scramble encryption key, and the scramble key generated by the scramble key generation unit and the scramble key held in the memory are held every predetermined period. Claim 1 is characterized by including a scramble processing unit that captures the scrambled encryption key, scrambles the captured scrambled encryption key with the captured scrambled key, and holds the scrambled encryption key in the memory as a new scrambled encryption key. The semiconductor device described in.
前記所定期間は前記一定周期よりも短いことを特徴とする請求項1又は2に記載の半導体装置。 The random number generation unit generates the random number whose random number value changes at a predetermined fixed cycle, and generates the random number.
The semiconductor device according to claim 1 or 2, wherein the predetermined period is shorter than the fixed period.
前記プログラムに従った制御を行うCPUと、
RAMと、
暗号鍵に基づきデータを暗号化する暗号処理部と、
前記鍵保持部に対して書込及び読出制御を行うDMAC(direct memory access controller)と、を含むことを特徴とする請求項1~3のいずれか1に記載の半導体装置。 The ROM where the program is stored and
A CPU that controls according to the program
RAM and
An encryption processing unit that encrypts data based on the encryption key,
The semiconductor device according to any one of claims 1 to 3, further comprising a DMAC (direct memory access controller) that controls writing and reading to the key holding unit.
前記乱数生成部、前記鍵保持部、前記DMAC及び前記暗号処理部が接続されている第2のデータバスと、を含み、
前記RAMには平文データ片が記憶されており、
前記CPUは、前記RAMに記憶されている前記平文データ片を、前記第1のデータバスを介して前記暗号処理部に転送し、
前記DMACは、前記読出要求によって前記鍵保持部から読み出された前記暗号鍵を、前記第2のデータバスを介して前記暗号処理部に転送し、
前記暗号処理部は、前記第1のデータバスを介して受けた前記平文データ片を、前記第2のデータバスを介して受けた前記暗号鍵で暗号化した暗号化データ片を生成する前記第1のデータバスに送出することを特徴とする請求項4に記載の半導体装置。 A first data bus to which the ROM, the CPU, the RAM, and the encryption processing unit are connected.
The random number generation unit, the key holding unit, the DMAC, and a second data bus to which the encryption processing unit is connected are included.
Plaintext data pieces are stored in the RAM.
The CPU transfers the plaintext data piece stored in the RAM to the encryption processing unit via the first data bus.
The DMAC transfers the encryption key read from the key holding unit by the read request to the encryption processing unit via the second data bus.
The encryption processing unit generates an encrypted data piece in which the plaintext data piece received via the first data bus is encrypted with the encryption key received via the second data bus. The semiconductor device according to claim 4, wherein the data is sent to the data bus of 1.
イネーブル又はディスエーブルを表すバスマスタイネーブル信号を受け、
前記バスマスタイネーブル信号が前記イネーブルを表す場合には前記乱数生成部、前記鍵保持部、前記DMAC及び前記暗号処理部が前記第1のデータバスと接続され、前記バ
スマスタイネーブル信号が前記ディスエーブルを表す場合には前記ROM、前記CPU、前記RAM、及び前記暗号処理部が前記第1のデータバスと接続されることを特徴とする請求項4に記載の半導体装置。 Including the first data bus
Receives a bus master enable signal indicating enable or disable
When the bus master enable signal represents the enable, the random number generation unit, the key holding unit, the DMAC, and the encryption processing unit are connected to the first data bus, and the bus master enable signal represents the disable. The semiconductor device according to claim 4, wherein in the case, the ROM, the CPU, the RAM, and the encryption processing unit are connected to the first data bus.
前記バスマスタイネーブル信号を前記ディスエーブルを表す状態に設定した状態で、前記CPUが、前記RAMに記憶されている前記平文データ片を前記第1のデータバスを介して前記暗号処理部に転送し、
前記バスマスタイネーブル信号を前記イネーブルを表す状態に設定した状態で、前記DMACが、前記読出要求によって前記鍵保持部から読み出した前記暗号鍵を、前記第1のデータバスを介して前記暗号処理部に転送し、
前記暗号処理部は、前記第1のデータバスを介して受けた前記平文データ片を、前記第1のデータバスを介して受けた前記暗号鍵で暗号化した暗号化データ片を生成することを特徴とする請求項6に記載の半導体装置。 Plaintext data pieces are stored in the RAM.
With the bus master enable signal set to a state representing the disable, the CPU transfers the plaintext data piece stored in the RAM to the encryption processing unit via the first data bus.
With the bus master enable signal set to a state representing the enable, the DMAC transfers the encryption key read from the key holding unit by the read request to the encryption processing unit via the first data bus. Transfer and
The encryption processing unit generates an encrypted data piece in which the plaintext data piece received via the first data bus is encrypted with the encryption key received via the first data bus. The semiconductor device according to claim 6, which is characterized.
時間経過につれて値が変化するスクランブルキーを生成し、
乱数を前記スクランブルキーでスクランブルしたものをスクランブル暗号鍵としてメモリに保持させると共に、前記スクランブル暗号鍵を前記スクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として前記メモリに保持させる処理を所定期間毎に繰り返し行いつつ、
読出要求に応じて、前記メモリに保持されている前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルすることにより暗号鍵を得ることを特徴とする暗号鍵の生成方法。 A method of generating an encryption key used to encrypt data.
Generates a scramble key whose value changes over time,
A process of holding a random number scrambled with the scramble key in the memory as a scrambled encryption key and holding the scrambled encryption key scrambled with the scrambled key in the memory as a new scrambled encryption key is performed every predetermined period. While doing it repeatedly
A method for generating an encryption key, which comprises obtaining an encryption key by descrambled the scrambled encryption key held in the memory in response to a read request using the scrambled key.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018001228A JP7057675B2 (en) | 2018-01-09 | 2018-01-09 | Semiconductor device and encryption key generation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018001228A JP7057675B2 (en) | 2018-01-09 | 2018-01-09 | Semiconductor device and encryption key generation method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019121955A JP2019121955A (en) | 2019-07-22 |
| JP7057675B2 true JP7057675B2 (en) | 2022-04-20 |
Family
ID=67307995
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018001228A Active JP7057675B2 (en) | 2018-01-09 | 2018-01-09 | Semiconductor device and encryption key generation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7057675B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111159097A (en) * | 2019-12-09 | 2020-05-15 | 中山大学 | On-chip access protection system and method |
| CN114422143B (en) * | 2022-01-13 | 2023-06-20 | 中国平安人寿保险股份有限公司 | Data dynamic encryption method, device, equipment and medium based on artificial intelligence |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000023137A (en) | 1998-07-02 | 2000-01-21 | Matsushita Electric Ind Co Ltd | Broadcast system and broadcast transceiver |
| JP2000049770A (en) | 1998-07-31 | 2000-02-18 | Hitachi Ltd | Encryption communication method, encryption algorithm sharing management method, encryption algorithm conversion method, network communication system |
| JP2005303370A (en) | 2004-04-06 | 2005-10-27 | Sony Corp | Semiconductor chip, boot program, semiconductor chip program, storage medium, terminal device, and information processing method |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3549657B2 (en) * | 1996-01-26 | 2004-08-04 | 株式会社野村総合研究所 | Private key retention management method |
-
2018
- 2018-01-09 JP JP2018001228A patent/JP7057675B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000023137A (en) | 1998-07-02 | 2000-01-21 | Matsushita Electric Ind Co Ltd | Broadcast system and broadcast transceiver |
| JP2000049770A (en) | 1998-07-31 | 2000-02-18 | Hitachi Ltd | Encryption communication method, encryption algorithm sharing management method, encryption algorithm conversion method, network communication system |
| JP2005303370A (en) | 2004-04-06 | 2005-10-27 | Sony Corp | Semiconductor chip, boot program, semiconductor chip program, storage medium, terminal device, and information processing method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019121955A (en) | 2019-07-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108599930B (en) | Firmware encryption and decryption system and method | |
| KR101303278B1 (en) | FPGA apparatus and method for protecting bitstream | |
| JP3975677B2 (en) | Information processing device | |
| US20170046281A1 (en) | Address dependent data encryption | |
| JP5159916B2 (en) | host | |
| JP6265783B2 (en) | Encryption / decryption system, control method therefor, and program | |
| JP5050114B1 (en) | Information recording device | |
| KR20140063863A (en) | Host device, semiconductor memory device, and authentication method | |
| EP1662697A1 (en) | Method and apparatus for security over multiple interfaces | |
| KR100849956B1 (en) | Semiconductor device and its scrambled data transfer method | |
| TWI401583B (en) | Data scramble and reverse-scranble method, data processing method, and controller and storage system thereof | |
| US9444622B2 (en) | Computing platform with system key | |
| JP7057675B2 (en) | Semiconductor device and encryption key generation method | |
| JP2009071838A (en) | Security feature in electronic device | |
| CN110932853B (en) | Key management device and key management method based on trusted module | |
| US7752407B1 (en) | Security RAM block | |
| EP1258796A2 (en) | Copy protection method and system for a field-programmable gate array | |
| US8015416B2 (en) | Memory information protection system and methods | |
| JPH104403A (en) | Encryption device, decryption device and method thereof | |
| US20250028834A1 (en) | Storage device and method of providing firmware image | |
| JP7032926B2 (en) | Semiconductor device and encryption key control method | |
| JP2007336446A (en) | Data encryption device | |
| JP6636006B2 (en) | Encryption / decryption system, control method thereof, and program | |
| JP6203532B2 (en) | Semiconductor memory device and data processing system | |
| JP2007193800A (en) | Apparatus and method for improving security level of card authentication system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201130 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210730 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210817 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211015 |
|
| 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: 20220315 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220408 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7057675 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |