JP2019121955A - Semiconductor device and generating method of encryption key - Google Patents
Semiconductor device and generating method of encryption key Download PDFInfo
- Publication number
- JP2019121955A JP2019121955A JP2018001228A JP2018001228A JP2019121955A JP 2019121955 A JP2019121955 A JP 2019121955A JP 2018001228 A JP2018001228 A JP 2018001228A JP 2018001228 A JP2018001228 A JP 2018001228A JP 2019121955 A JP2019121955 A JP 2019121955A
- Authority
- JP
- Japan
- Prior art keywords
- key
- scramble
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、半導体装置、特にデータを暗号化するための暗号鍵を記憶する記憶部を含む半導体装置、及び暗号鍵の生成方法に関する。 The present invention relates to a semiconductor device, and more particularly to a semiconductor device including a storage unit that stores an encryption key for encrypting data, and an encryption key generation method.
現在、暗号鍵を用いてデータを暗号化し、暗号化された暗号化データに対してこの暗号鍵を用いた復号を施すことにより元のデータを復元する機能を備えたマイクロコンピュータを含む半導体装置が知られている(例えば、特許文献1参照)。 At present, there is a semiconductor device including a microcomputer having a function of decrypting data using an encryption key and decrypting the encrypted data using the encryption key to restore the original data. It is known (for example, refer to patent documents 1).
当該半導体装置には、暗号鍵を格納するメモリとして、EEPROM(Electrically Erasable Programmable Read-Only Memory)が設けられている。 In the semiconductor device, an EEPROM (Electrically Erasable Programmable Read-Only Memory) is provided as a memory for storing the encryption key.
ところで、暗号鍵は第三者に漏洩してはならないものであるが、外部からの物理攻撃或いは物理解析等の不正なアクセスにより、メモリに格納されている暗号鍵が不正に読み出されてしまう虞があった。この際、不正に取得した暗号鍵により上記した暗号化データが復号されてしまい、データの漏洩を招くことになる。 By the way, although the encryption key should not be leaked to a third party, the encryption key stored in the memory is illegally read out due to an external access such as a physical attack or physical analysis from outside. There was a fear. At this time, the above-described encrypted data is decrypted by the illegitimately obtained 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 of generating an encryption key.
本発明に係る半導体装置は、暗号鍵を用いてデータを暗号化する半導体装置であって、乱数を生成する乱数生成部と、前記乱数をスクランブルキーを用いてスクランブルしたものをスクランブル暗号鍵として保持し、読出要求に応じて、前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルして得た暗号鍵を出力する鍵保持部と、を有し、前記鍵保持部は、保持した前記スクランブル暗号鍵を所定期間毎にスクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として保持する。 A semiconductor device according to the present invention is a semiconductor device that encrypts data using an encryption key, and holds a random number generation unit that generates a random number and a scrambled key that scrambles the random number using a scramble key. A key holding unit for outputting an encryption key obtained by descrambling the scramble encryption key using the scramble key in response to a read request, and the key holding unit holds the scramble encryption key held The key is scrambled with the scramble key at predetermined intervals and held as a new scramble encryption key.
また、本発明に係る暗号鍵の生成方法は、データの暗号化に用いる暗号鍵の生成方法であって、乱数をスクランブルキーでスクランブルしたものをスクランブル暗号鍵としてメモリに保持させると共に、前記スクランブル暗号鍵を所定期間毎にスクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として前記メモリに保持させ、読出要求に応じて、前記メモリに保持されている前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルすることにより前記暗号鍵を得る。 Further, a method of generating an encryption key according to the present invention is a method of generating an encryption key used to encrypt data, wherein a random number scrambled with a scramble key is held in a memory as a scramble encryption key, and the scramble encryption is performed. The key is scrambled with a scramble key at predetermined intervals and held in the memory as a new scramble encryption key, and the scramble encryption key held in the memory is de-multiplexed using the scramble key according to the read request. The encryption key is obtained by scrambling.
本発明では、鍵保持部が、乱数をスクランブルしたものをスクランブル暗号鍵として保持し、この保持したスクランブル暗号鍵自体を所定期間毎にスクランブルしたものを、新たなスクランブル暗号鍵として保持する。 In the present invention, the key holding unit holds the scrambled random number scrambled as a scramble encryption key, and holds the scrambled encryption key itself held scrambled for each predetermined period as a new scramble encryption key.
これにより、鍵保持部に保持されたスクランブル暗号鍵は、それ自体が所定期間毎に繰り返しスクランブルされるので、時間経過につれてその値が変化する。よって、たとえ外部からの不正なアクセスによって、鍵保持部に保持されているスクランブル暗号鍵が漏洩しても、このスクランブル暗号鍵からでは、暗号鍵自体を特定することが困難となる。したがって、不正なアクセスが行われても平文データの漏洩を防ぐことが可能となる。 As a result, the scramble encryption key held in the key holding unit is itself scrambled repeatedly at predetermined intervals, and its value changes as time passes. Therefore, even if the scramble encryption key held in the key holding unit leaks due to an unauthorized access from the outside, it is difficult to specify the encryption key itself from the scramble 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,
データバスBS1には、暗号処理部12、乱数生成部13、CPU14、RAM15、ROM制御部16、ROM17、セキュアRAM19、及びキーストレージ22が接続されている。
To the data bus BS1, an
データバスBS8は、データバスBS1には接続されておらず、且つマイクロコンピュータ100の外部からのアクセス不可な独立したバスである。データバスBS8は、秘匿性を要求される乱数生成部13、セキュアRAM19、セキュアROM20、セキュアDMAC21及びキーストレージ22、並びに暗号処理部12に接続されている。
Data bus BS8 is an independent bus which is not connected to data bus BS1 and can not be accessed from the outside of
暗号処理部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からのデータ読出アクセスは受け付けない。
Secure
セキュアROM20は、セキュアDMAC21からのデータ読出アクセスに応じて、自身に格納されているデータを読み出し、これをデータバスBS8に送出する。また、セキュアROM20は、ROM制御部16がセキュアDMAC21へ書き込み要求を行った際に、セキュアDMAC21がデータバスBS8を介して受けたデータを書き込む。
In response to the data read access from
セキュアDMAC21は、データバスBS8を介して、暗号処理部12、乱数生成部13、セキュアRAM19、セキュアROM20、セキュアDMAC21、及びキーストレージ22間のデータ転送を行う。
The
キーストレージ22は、乱数生成部13で生成された乱数をスクランブルしたスクランブル暗号鍵を生成し、これを保持する。また、キーストレージ22は、暗号鍵の読出要求に応じて、保持されているスクランブル暗号鍵を読み出し、このスクランブル暗号鍵に施されているスクランブルを解除したものを暗号鍵としてデータバスBS8に送出する。
The
上記した構成により、マイクロコンピュータ100は、ROM17に格納されているプログラムに従って、上記した暗号鍵を用いた平文データの暗号化及び復号化処理を含む各種のデータ処理を行う。
According to the above configuration, the
以下に、RAM15に記憶されている平文データを暗号化する際の動作を、図2〜図6を参照して説明する。
The operation of 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に転送する。
As described above, in encryption of plaintext data, in the
尚、RAM15に記憶されている暗号化データ片を元の平文データ片に復号する場合には、CPU14が、この暗号化データ片をRAM15から読み出し、これをデータバスBS1を介して暗号処理部12に転送する。更に、セキュアDMAC21が、この平文データ片を暗号化する際に用いた暗号鍵をセキュアRAM19から読み出し、データバスBS8を介して暗号処理部12に転送する。よって、暗号処理部12は、転送された暗号化データ片を、転送された暗号鍵を用いて復号することにより平文データ片を得る。
When the encrypted data piece stored in the
また、暗号化データ片をマイクロコンピュータ100に接続されている外部機器に送信する場合には、所定のアルゴリズムに従って当該暗号化データ片と共にこの暗号化データ片に対応した暗号鍵を送信する。
Further, when transmitting the encrypted data piece to an external device connected to the
ところで、キーストレージ22では、外部からの不正なアクセスによる暗号鍵の漏洩を防止する為に、以下の構成を採用している。
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に保持させる。
When the
また、スクランブル処理部214は、タイムアウト信号Toutに応じて、ストレージRAM215に保持されているスクランブル暗号鍵SEKを読み出すと共に、スクランブルキー生成部213で生成されたスクランブルキーSKYを取り込む。ここで、スクランブル処理部214は、取り込んだスクランブルキーSKYを用いたスクランブル演算を、ストレージRAM215から読み出したスクランブル暗号鍵SEKに施すことにより、新たなスクランブル暗号鍵SEKを生成する。そして、スクランブル処理部214は、この新たなスクランブル暗号鍵データSEKを、スクランブルキーSKYと対応付けしてストレージRAM215に保持させる。
In addition, the
また、スクランブル処理部214は、暗号鍵の読出要求に応じて、先ず、ストレージRAM215に保持されているスクランブル暗号鍵SEKと、このスクランブル暗号鍵SEKに対応付けされているスクランブルキーSKYと、を読み出す。次に、スクランブル処理部214は、スクランブルキーSKYを用いて、スクランブル暗号鍵SEKにデスクランブル演算を施すことにより暗号鍵を復元し、当該暗号鍵をデータバスBS8に送出する。
Further, the
レジスタ216は、データバスBS1を介して受けた動作開始信号又は動作停止信号を保持する。レジスタ216は、動作開始信号を保持した場合には、タイマ217のカウント動作を開始させる動作開始信号STをタイマ217に供給する。一方、動作停止信号を保持した場合には、レジスタ216は、タイマ217のカウント動作を停止させる動作停止信号STPをタイマ217に供給する。
タイマ217は、クロック信号を受け、動作開始信号STが供給された場合に、当該クロック信号のパルス数のカウントを開始する。ここで、タイマ217は、カウント数が所定値に到達したときに、タイムアウト信号Toutをスクランブル処理部214に供給する。タイムアウト信号Toutをスクランブル処理部214に供給した後、引き続き、タイマ217は、初期値(例えばゼロ)からクロック信号のパルス数のカウントを継続する。すなわち、タイマ217は、所定期間毎に、タイムアウト信号Toutをスクランブル処理部214に供給する。尚、タイマ217は、動作停止信号STPを受けた場合には、上記したカウント動作を停止する。
The
以下に、図7に示す構成を有するキーストレージ22の内部で行われる暗号鍵の保持及び読出動作について説明する。
The operation of storing 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 operation of holding the encryption key 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が供給されたか否かの判定を行う。
If it is determined in step S32 that the timeout signal Tout is not supplied, the
ステップS32でタイムアウト信号Toutが供給されたと判定した場合、スクランブル処理部214は、ストレージRAM215に保持されているスクランブル暗号鍵を読み出してこれを取り込むと共に、スクランブルキーSKYを取り込む(ステップS33)。
If it is determined in step S32 that the time-out 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, a 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に保持されていた全てのスクランブル暗号鍵及びスクランブルキーが書き込まれる。
Incidentally, the
図9は、セキュアDMAC21からデータバスBS8を介して受けた暗号鍵の読出し要求に応じて、キーストレージ22内で行われる暗号鍵の読出動作の手順を表すフローチャートである。
FIG. 9 is a flow chart 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 such, since the scramble encryption key held in the
したがって、不正なアクセスが行われても、マイクロコンピュータ100で運用されている平文データの漏洩を防ぐことが可能となる。
Therefore, even if unauthorized access is performed, it is possible to prevent the leakage of plaintext data operated by the
尚、図1に示すマイクロコンピュータ100では、CPU14に接続されており且つ外部アクセス可能なデータバスBS1とは別に、CPU14に接続されておらず且つ外部アクセス不可なデータバスBS8を用いることで秘匿性の高い暗号鍵の運用を行っている。
In the
しかしながら、マイクロコンピュータ100で用いるデータバスとしては、データバスBS1だけであっても、秘匿性の高い暗号鍵の運用を行うことが可能である。
However, even with only the data bus BS1 as the data bus used in the
図10は、かかる点に鑑みて為されたマイクロコンピュータ100の内部構成の変形例を示すブロック図である。
FIG. 10 is a block diagram showing a modification of the internal configuration of
図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 indicates the disable 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 indicates the enabled state, the
上記した点を除き、図10に示されるマイクロコンピュータ100に含まれる各モジュール(12〜17、19〜22)の構成は、図1に示されるものと同一である。
Except for the points described above, the configuration of each module (12 to 17 and 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
バス接続部21は、バスマスタイネーブル信号BSEを受け、当該バスマスタイネーブル信号BSEがイネーブル状態を表す場合には、スクランブル処理部214及びレジスタ216をデータバスBS1に接続する。一方、バスマスタイネーブル信号BSEがディスエーブル状態を表す場合には、バス接続部21は、スクランブル処理部214及びレジスタ216と、データバスBS1との接続を遮断する。
The
尚、キーストレージ22以外の他のモジュール(12〜17、19〜21)にも、バスマスタイネーブル信号BSEに応じて、データバスBS1との接続状態(接続又は遮断)を上述したように切り替えるバス接続部が含まれている。ただし、暗号処理部12については、バスマスタイネーブル信号BSEの内容(イネーブル状態、ディスエイーブル状態)に拘わらず、常にデータバスBS1と接続されている。
In addition, the other modules (12 to 17 and 19 to 21) other than the
以下に、図10及び図11に示される構成を有するマイクロコンピュータ100において、RAM15に記憶されている平文データ片を暗号化する際の動作を、図12〜図17を参照して説明する。
In the following, 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 enable state. Thus, among the modules (12 to 17 and 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. Thereby, among the modules (12 to 17 and 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
尚、上記実施例では、ストレージRAM215を含むキーストレージ22、つまり揮発性の半導体メモリを、スクランブル化した暗号鍵を保持する鍵保持部としているが、当該鍵保持部としては不揮発性のメモリ、或いは磁気又は光学式記録媒体であっても良い。
In the above embodiment, the
要するに、データの暗号化機能を備えたマイクロコンピュータ100としては、以下の乱数生成部、及び鍵保持部を含むものであれば良い。
In short, as 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 scramble encryption key (SEK). At this time, the key holding unit (22) holds the scrambled encryption key scrambled by the scramble key every predetermined period as a new scrambled encryption key. In addition, the key holding unit (22) outputs, in response to the read request, the scrambled encryption key held and descrambled using the scramble key as the encryption key.
12 暗号処理部
13 乱数生成部
22 キーストレージ
213 スクランブルキー生成部
214 スクランブル処理部
215 ストレージRAM
12
Claims (8)
乱数を生成する乱数生成部と、
前記乱数をスクランブルキーを用いてスクランブルしたものをスクランブル暗号鍵として保持し、読出要求に応じて、前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルして得た暗号鍵を出力する鍵保持部と、を有し、
前記鍵保持部は、
保持した前記スクランブル暗号鍵を所定期間毎にスクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として保持することを特徴とする半導体装置。 A semiconductor device that encrypts data using an encryption key,
A random number generation unit that generates random numbers;
A key holding unit which holds the scrambled random number scrambled using a scramble key as a scramble encryption key, and outputs an encryption key obtained by descrambling the scramble encryption key using the scramble key according to the read request And
The key holding unit is
A semiconductor device characterized in that a scrambled key obtained by scrambling the held scrambled encryption key with a scramble key at predetermined intervals is held as a new scrambled encryption key.
時間経過につれて値が変化する乱数を前記スクランブルキーとして生成するスクランブルキー生成部と、
メモリと、
前記乱数を前記スクランブルキーでスクランブルしたものを前記スクランブル暗号鍵として前記メモリに保持させると共に、前記所定期間毎に、前記スクランブルキー生成部が生成した前記スクランブルキー、及び前記メモリに保持されている前記スクランブル暗号鍵を取り込み、取り込んだ前記スクランブル暗号鍵を、取り込んだ前記スクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として前記メモリに保持させるスクランブル処理部と、を含むことを特徴とする請求項1に記載の半導体装置。 The key holding unit is
A scramble key generation unit that generates a random number whose value changes as time passes, as the scramble key;
With memory
The random number scrambled by the scramble key is held as the scramble encryption key in the memory, and the scramble key generated by the scramble key generation unit is stored in the memory for each predetermined period. A scramble processing unit for capturing a scramble encryption key, and scrambled the captured scramble encryption key with the captured scramble key, and holding the scrambled encryption key in the memory as a new scramble encryption key. The semiconductor device according to claim 1.
前記所定期間は前記一定周期よりも短いことを特徴とする請求項1又は2に記載の半導体装置。 The random number generation unit generates the random number whose random number value changes at a predetermined constant cycle,
The semiconductor device according to claim 1, wherein the predetermined period is shorter than the predetermined period.
前記プログラムに従った制御を行うCPUと、
RAMと、
暗号鍵に基づきデータを暗号化する暗号処理部と、
前記鍵保持部に対して書込及び読出制御を行うDMAC(direct memory access controller)と、を含むことを特徴とする請求項1〜3のいずれか1に記載の半導体装置。 The ROM where the program is stored,
A CPU that performs control according to the program;
RAM,
An encryption processing unit that encrypts data based on an encryption key;
The semiconductor device according to any one of claims 1 to 3, further comprising: a direct memory access controller (DMAC) that performs write and read control on 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;
A plaintext data piece is 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 in response to the read request to the encryption processing unit via the second data bus.
The encryption processing unit generates an encrypted data piece obtained by encrypting the plaintext data piece received via the first data bus with the encryption key received via the second data bus. 5. The semiconductor device according to claim 4, wherein the data is sent to a data bus of 1.
イネーブル又はディスエーブルを表すバスマスタイネーブル信号を受け、
前記バスマスタイネーブル信号が前記イネーブルを表す場合には前記乱数生成部、前記鍵保持部、前記DMAC及び前記暗号処理部が前記第1のデータバスと接続され、前記バスマスタイネーブル信号が前記ディスエーブルを表す場合には前記ROM、前記CPU、前記RAM、及び前記暗号処理部が前記第1のデータバスと接続されることを特徴とする請求項4に記載の半導体装置。 Including the first data bus,
Receive a bus master enable signal representing enable or disable;
When the bus master enable signal indicates 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 indicates the disable. 5. The semiconductor device according to claim 4, wherein the ROM, the CPU, the RAM, and the encryption processing unit are connected to the first data bus in this case.
前記バスマスタイネーブル信号を前記ディスエーブルを表す状態に設定した状態で、前記CPUが、前記RAMに記憶されている前記平文データ片を前記第1のデータバスを介して前記暗号処理部に転送し、
前記バスマスタイネーブル信号を前記イネーブルを表す状態に設定した状態で、前記DMACが、前記読出要求によって前記鍵保持部から読み出した前記暗号鍵を、前記第1のデータバスを介して前記暗号処理部に転送し、
前記暗号処理部は、前記第1のデータバスを介して受けた前記平文データ片を、前記第1のデータバスを介して受けた前記暗号鍵で暗号化した暗号化データ片を生成することを特徴とする請求項6に記載の半導体装置。 A plaintext data piece is 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 sends the encryption key read from the key holding unit by the read request to the encryption processing unit via the first data bus. Transfer
The encryption processing unit may generate an encrypted data piece obtained by encrypting the plaintext data piece received via the first data bus with the encryption key received via the first data bus. The semiconductor device according to claim 6, characterized in that
乱数をスクランブルキーでスクランブルしたものをスクランブル暗号鍵としてメモリに保持させると共に、前記スクランブル暗号鍵を所定期間毎にスクランブルキーでスクランブルしたものを新たなスクランブル暗号鍵として前記メモリに保持させ、
読出要求に応じて、前記メモリに保持されている前記スクランブル暗号鍵を前記スクランブルキーを用いてデスクランブルすることにより前記暗号鍵を得ることを特徴とする暗号鍵の生成方法。 A method of generating an encryption key used for data encryption, comprising:
A random number scrambled by a scramble key is held as a scramble encryption key in a memory, and a scrambled key scrambled by a scramble key every predetermined period is held as a new scramble encryption key in the memory.
A method of generating an encryption key, comprising obtaining the encryption key by descrambling the scramble encryption key held in the memory using the scramble key in response to a read request.
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 true JP2019121955A (en) | 2019-07-22 |
JP7057675B2 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111159097A (en) * | 2019-12-09 | 2020-05-15 | 中山大学 | On-chip access protection system and method |
CN114422143A (en) * | 2022-01-13 | 2022-04-29 | 中国平安人寿保险股份有限公司 | Artificial intelligence based dynamic data encryption method, device, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09205419A (en) * | 1996-01-26 | 1997-08-05 | Nri & Ncc Co Ltd | Method for storing and managing secret key |
JP2000023137A (en) * | 1998-07-02 | 2000-01-21 | Matsushita Electric Ind Co Ltd | Broadcasting system and broadcasting transmitter- receiver |
JP2000049770A (en) * | 1998-07-31 | 2000-02-18 | Hitachi Ltd | Cipher communication method, cipher algorithm shared management method, cipher algorithm conversion method and network communication system |
JP2005303370A (en) * | 2004-04-06 | 2005-10-27 | Sony Corp | Semiconductor chip, start program, semiconductor chip program, storage medium, terminal, and information processing method |
-
2018
- 2018-01-09 JP JP2018001228A patent/JP7057675B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09205419A (en) * | 1996-01-26 | 1997-08-05 | Nri & Ncc Co Ltd | Method for storing and managing secret key |
JP2000023137A (en) * | 1998-07-02 | 2000-01-21 | Matsushita Electric Ind Co Ltd | Broadcasting system and broadcasting transmitter- receiver |
JP2000049770A (en) * | 1998-07-31 | 2000-02-18 | Hitachi Ltd | Cipher communication method, cipher algorithm shared management method, cipher algorithm conversion method and network communication system |
JP2005303370A (en) * | 2004-04-06 | 2005-10-27 | Sony Corp | Semiconductor chip, start program, semiconductor chip program, storage medium, terminal, and information processing method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111159097A (en) * | 2019-12-09 | 2020-05-15 | 中山大学 | On-chip access protection system and method |
CN114422143A (en) * | 2022-01-13 | 2022-04-29 | 中国平安人寿保险股份有限公司 | Artificial intelligence based dynamic data encryption method, device, equipment and medium |
CN114422143B (en) * | 2022-01-13 | 2023-06-20 | 中国平安人寿保险股份有限公司 | Data dynamic encryption method, device, equipment and medium based on artificial intelligence |
Also Published As
Publication number | Publication date |
---|---|
JP7057675B2 (en) | 2022-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9483664B2 (en) | Address dependent data encryption | |
CN106599735B (en) | Data protection device, method and storage controller | |
KR102013841B1 (en) | Method of managing key for secure storage of data, and and apparatus there-of | |
US20190384938A1 (en) | Storage apparatus and method for address scrambling | |
KR100445406B1 (en) | Apparatus for encrypting the data and method therefor | |
JP7225220B2 (en) | Storage data encryption/decryption device and method | |
KR101546204B1 (en) | Host device, semiconductor memory device, and authentication method | |
KR101303278B1 (en) | FPGA apparatus and method for protecting bitstream | |
CN110490008B (en) | Security device and security chip | |
JP6265783B2 (en) | Encryption / decryption system, control method therefor, and program | |
CN114785503B (en) | Cipher card, root key protection method thereof and computer readable storage medium | |
CN112887077B (en) | SSD main control chip random cache confidentiality method and circuit | |
TWI401583B (en) | Data scramble and reverse-scranble method, data processing method, and controller and storage system thereof | |
CN111488630A (en) | Storage device capable of configuring safe storage area and operation method thereof | |
US20100067689A1 (en) | Computing platform with system key | |
JP7057675B2 (en) | Semiconductor device and encryption key generation method | |
JP2007336446A (en) | Data encryption apparatus | |
JP6636006B2 (en) | Encryption / decryption system, control method thereof, and program | |
JP6203532B2 (en) | Semiconductor memory device and data processing system | |
JP7032926B2 (en) | Semiconductor device and encryption key control method | |
KR20220000537A (en) | System and method for transmitting and receiving data based on vehicle network | |
JP7170588B2 (en) | Data processing method and data processing system | |
JP2017108293A (en) | Semiconductor integrated circuit device and data processing apparatus | |
CN113688407A (en) | Data management method and related device | |
KR20210016764A (en) | System on chip |
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 |