[go: up one dir, main page]

JP2010033122A - Storage device - Google Patents

Storage device Download PDF

Info

Publication number
JP2010033122A
JP2010033122A JP2008191612A JP2008191612A JP2010033122A JP 2010033122 A JP2010033122 A JP 2010033122A JP 2008191612 A JP2008191612 A JP 2008191612A JP 2008191612 A JP2008191612 A JP 2008191612A JP 2010033122 A JP2010033122 A JP 2010033122A
Authority
JP
Japan
Prior art keywords
address
signal
memory
data
unit
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
JP2008191612A
Other languages
Japanese (ja)
Other versions
JP5140512B2 (en
Inventor
Noboru Takizawa
登 瀧澤
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.)
Rohm Co Ltd
Original Assignee
Rohm Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP2008191612A priority Critical patent/JP5140512B2/en
Publication of JP2010033122A publication Critical patent/JP2010033122A/en
Application granted granted Critical
Publication of JP5140512B2 publication Critical patent/JP5140512B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a storage device for properly preventing unauthorized copy. <P>SOLUTION: In the storage device, an address analyzing part 203 which detects whether or not the increment operation of an address is operated includes: a load signal generation part 1 for generating a load signal LD; a counter 2 for reading an address signal ADD to be supplied to a memory 100 by using the load signal LD as a trigger, and for setting the address value as its own count value, and for incrementing the count value one by one for output based on a read signal RD; and an address comparing part 3 for comparing the address signal ADD to be supplied to the memory 100 with the counter value of the counter 2, and for outputting a comparison result signal showing the matching/mismatching. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、不正コピー防止機能を備えた記憶装置に関するものである。   The present invention relates to a storage device having an unauthorized copy prevention function.

従来より、不正コピー防止機能を備えた記憶装置が種々開示・提案されている(例えば特許文献1や特許文献2を参照)。なお、従来の記憶装置の多くは、所定の鍵情報を用いて暗号化されたデータを格納する構成とされていた。
特開2003−59178号公報 特開2002−373320号公報
Conventionally, various storage devices having an unauthorized copy prevention function have been disclosed and proposed (see, for example, Patent Document 1 and Patent Document 2). Many conventional storage devices are configured to store data encrypted using predetermined key information.
JP 2003-59178 A JP 2002-373320 A

確かに、上記従来の記憶装置であれば、格納されたデータが不正コピーされた場合であっても、所定の鍵情報を用いた暗号解読処理が行われない限り、その内容は不明なものとなるため、不正コピーされたデータの利用は困難であった。   Certainly, in the case of the conventional storage device, even if the stored data is illegally copied, the content is unknown unless decryption processing using predetermined key information is performed. Therefore, it is difficult to use illegally copied data.

しかしながら、上記従来の記憶装置は、あくまで、不正コピーされたデータの利用を困難とするものであって、格納されたデータの読み出しは自由であった。そのため、高速なコンピュータを用いて不正コピーされたデータが解析され、その暗号が解読されてしまった場合には、以後、その内容を自由にコピーされてしまうという問題があった。   However, the conventional storage device described above makes it difficult to use illegally copied data, and the stored data can be freely read. For this reason, when illegally copied data is analyzed using a high-speed computer and the cipher is decrypted, there is a problem that the contents are freely copied thereafter.

本発明は、上記の問題点に鑑み、不正コピーを適切に防止することが可能な記憶装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a storage device that can appropriately prevent unauthorized copying.

上記目的を達成するために、本発明に係る記憶装置は、データを格納するメモリと;前記メモリから読み出されたデータにアドレスのジャンプ動作を伴う所定の監視対象コードが含まれているか否かを検出するコード解析部と;アドレスのインクリメント動作が行われているか否かを検出するアドレス解析部と;前記コード解析部と前記アドレス解析部の解析結果を参照して、前記監視対象コードの実行時にアドレスのインクリメント動作が行われたか否かを検出するエラー検出部と;前記エラー検出部の判定結果に基づいて、前記メモリに格納されたデータの出力を禁止する出力制御部と;を有して成る記憶装置であって、前記アドレス解析部は、ロード信号を生成するロード信号生成部と;前記ロード信号をトリガとして前記メモリに供給されるアドレス信号を読み込み、そのアドレス値を自身のカウント値として設定した上で、それ以後、リード信号に基づいて、前記カウント値を1つずつインクリメントして出力するカウンタと;前記メモリに供給されるアドレス信号と前記カウンタのカウンタ値とを比較し、その一致/不一致を示す比較結果信号を出力するアドレス比較部と;を有して成る構成(第1の構成)とされている。   In order to achieve the above object, a storage device according to the present invention includes a memory for storing data, and whether or not a predetermined monitoring target code accompanying an address jump operation is included in the data read from the memory A code analysis unit for detecting the address; an address analysis unit for detecting whether or not an address increment operation is performed; and executing the monitoring target code with reference to the analysis results of the code analysis unit and the address analysis unit An error detection unit that detects whether or not an address increment operation has been performed; and an output control unit that prohibits output of data stored in the memory based on a determination result of the error detection unit. The address analyzing unit includes: a load signal generating unit that generates a load signal; and the load signal is used as a trigger for the memory. A counter that reads the address signal to be read and sets the address value as its own count value, and thereafter increments the count value one by one based on the read signal; and is supplied to the memory; And an address comparison unit that compares the counter signal with the counter value of the counter and outputs a comparison result signal indicating coincidence / non-coincidence (first configuration).

なお、上記第1の構成から成る記憶装置において、前記ロード信号生成部は、前記メモリの読み出し開始時にワンショット信号を生成するワンショット生成部と;前記ワンショット信号と前記比較結果信号から前記ロード信号を生成する論理回路と;を有して成る構成(第2の構成)にするとよい。   In the storage device having the first configuration, the load signal generation unit includes a one-shot generation unit that generates a one-shot signal at the start of reading of the memory; and the load signal is generated from the one-shot signal and the comparison result signal. And a logic circuit for generating a signal (second configuration).

また、上記第2の構成から成る記憶装置において、前記ワンショット生成部は、前記記憶装置のリセット状態が解除された後、前記リード信号の最初のパルスが到来してから2つめのパルスが到来するまでの間、所定の論理レベルとなる前記ワンショット信号を生成する構成(第3の構成)にするとよい。   In the storage device having the second configuration, the one-shot generation unit receives a second pulse after the first pulse of the read signal has arrived after the reset state of the storage device is released. In the meantime, it is preferable to adopt a configuration (third configuration) for generating the one-shot signal having a predetermined logic level.

本発明に係る記憶装置であれば、不正コピーを適切に防止することが可能となる。   With the storage device according to the present invention, unauthorized copying can be prevented appropriately.

まず、本発明に係る記憶装置の第1実施形態について、図1を参照しながら詳細に説明する。図1は、本発明に係る記憶装置の第1実施形態を示すブロック図である。   First, a first embodiment of a storage device according to the present invention will be described in detail with reference to FIG. FIG. 1 is a block diagram showing a first embodiment of a storage device according to the present invention.

図1に示すように、本実施形態の記憶装置は、読み出し専用のメモリ100(図1ではROM[Random Access Memory]と標記)と、不正コピー防止回路200と、を有して成る。また、不正コピー防止回路200は、コードチェック部201と、タイミング制御部202と、インクリメントチェック部203と、エラー検出部204と、初期アドレスチェック部205と、論理和演算器206と、セレクタ207と、を有して成る。   As shown in FIG. 1, the storage device of the present embodiment includes a read-only memory 100 (indicated as ROM [Random Access Memory] in FIG. 1) and an unauthorized copy prevention circuit 200. The unauthorized copy prevention circuit 200 includes a code check unit 201, a timing control unit 202, an increment check unit 203, an error detection unit 204, an initial address check unit 205, an OR calculator 206, a selector 207, , Comprising.

メモリ100は、データD(CPU[Central Processing Unit]に読み出されて実行されるプログラムなど)を不揮発的に格納する手段である。   The memory 100 is means for storing data D (such as a program read and executed by a CPU [Central Processing Unit]) in a nonvolatile manner.

コードチェック部201は、メモリ100から読み出されたデータDに含まれるコードを解析するコード解析部である。より具体的に述べると、コードチェック部201は、メモリ100から読み出されたデータDをモニタして、実行時にアドレスのジャンプ動作を伴う所定の監視対象コード(ジャンプ命令のほか、コール命令やアドレス指定付きのロード命令などを含む)を検出し、その解析結果をタイミング制御部202やエラー検出部204に伝達する。なお、メモリ100に格納されたデータDに対して暗号化処理や圧縮処理が施されている場合、コードチェック部201は、上記したコード解析機能に加えて、データDの暗号解読処理機能や伸長処理機能を具備する必要がある。   The code check unit 201 is a code analysis unit that analyzes a code included in the data D read from the memory 100. More specifically, the code check unit 201 monitors the data D read from the memory 100, and executes a predetermined monitoring target code (address instruction or address in addition to the jump instruction) accompanied by an address jump operation at the time of execution. And the analysis result is transmitted to the timing control unit 202 and the error detection unit 204. When the data D stored in the memory 100 is subjected to encryption processing or compression processing, the code check unit 201 performs a decryption processing function or decompression of the data D in addition to the code analysis function described above. It is necessary to have a processing function.

タイミング制御部202は、データDの読み出しを指示するリード信号RDの入力を受けて動作し、コードチェック部201で得られた解析結果に基づいて、上記した監視対象コードの実行タイミングをインクリメントチェック部203やエラー検出部204に伝達する手段である。   The timing control unit 202 operates in response to an input of a read signal RD instructing reading of the data D, and based on the analysis result obtained by the code check unit 201, the timing check unit 202 increments the execution timing of the monitoring target code. 203 and a means for transmitting to the error detection unit 204.

インクリメントチェック部203は、メモリ100に対するアドレス動作を解析するアドレス解析部である。より具体的に述べると、インクリメントチェック部203は、メモリ100に与えられるアドレス信号ADDをモニタして、アドレスのインクリメント動作(ここでは、アドレスを1つだけインクリメントする動作を指すものとする)が行われたか否かを検出する。   The increment check unit 203 is an address analysis unit that analyzes an address operation with respect to the memory 100. More specifically, the increment check unit 203 monitors the address signal ADD supplied to the memory 100 and performs an address increment operation (in this case, an operation for incrementing only one address). Detect whether or not

エラー検出部204は、コードチェック部201とインクリメントチェック部203の解析結果を参照し、コードに合致したアドレス動作が行われているか否かを判定する手段である。より具体的に述べると、エラー検出部204は、前記監視対象コードの実行時にアドレスのインクリメント動作が検出された場合にエラーフラグを立てる。すなわち、エラー検出部204は、アドレスのジャンプ動作が行われるべきタイミングでアドレスのインクリメント動作が行われたことを検出したときに、不正コピーのおそれがあると判断して、論理和演算器206への出力信号をローレベルからハイレベルに変遷する。   The error detection unit 204 is a unit that refers to the analysis results of the code check unit 201 and the increment check unit 203 and determines whether an address operation that matches the code is performed. More specifically, the error detection unit 204 sets an error flag when an address increment operation is detected during execution of the monitoring target code. That is, when the error detection unit 204 detects that the address increment operation has been performed at the timing at which the address jump operation should be performed, the error detection unit 204 determines that there is a possibility of unauthorized copying, and then proceeds to the logical sum calculator 206. The output signal of the transition from low level to high level.

初期アドレスチェック部205は、メモリ100に与えられるアドレス信号ADDをモニタして、メモリ100の読み出し開始時における初期アドレスが予め設定された所定値と一致しているか否かを判定し、その不一致が検出された場合にエラーフラグを立てる手段である。すなわち、初期アドレスチェック部205は、所定値以外のアドレスからデータDの読み出しが開始されたことを検出したときに、不正コピーのおそれがあると判断して、論理和演算器206への出力信号をローレベルからハイレベルに変遷する。   The initial address check unit 205 monitors the address signal ADD given to the memory 100 to determine whether or not the initial address at the start of reading of the memory 100 matches a predetermined value set in advance. It is a means for setting an error flag when it is detected. That is, the initial address check unit 205 determines that there is a possibility of unauthorized copying when detecting that the reading of the data D is started from an address other than a predetermined value, and outputs an output signal to the logical sum calculator 206. From low level to high level.

論理和演算器206は、エラー検出部204の出力信号と初期アドレスチェック部205の出力信号の論理和演算を行い、その演算結果をセレクタ207の制御信号として出力する手段である。すなわち、セレクタ207の制御信号は、エラー検出部204の出力信号と初期アドレスチェック部205の出力信号の両方がローレベルであるときにのみローレベルとなり、その余の場合にはハイレベルとなる。   The logical sum calculator 206 is a means for performing a logical sum operation on the output signal of the error detection unit 204 and the output signal of the initial address check unit 205 and outputting the calculation result as a control signal for the selector 207. That is, the control signal of the selector 207 is low level only when both the output signal of the error detection unit 204 and the output signal of the initial address check unit 205 are low level, and is high level in the other cases.

セレクタ207は、論理和演算器206の出力信号に基づいて、メモリ100に格納されたデータDの出力を禁止する出力制御部である。より具体的に述べると、セレクタ207は、論理和演算器206の出力信号がローレベルであるときには、メモリ100から読み出されたデータDを選択して出力する一方、論理和演算器206の出力信号がハイレベルであるときには、所定のダミーデータDDを選択して出力する。なお、ダミーデータDDは、固定値としてもよいし、乱数値としてもよい。   The selector 207 is an output control unit that prohibits the output of the data D stored in the memory 100 based on the output signal of the logical sum calculator 206. More specifically, the selector 207 selects and outputs the data D read from the memory 100 when the output signal of the logical sum calculator 206 is at a low level, while the output of the logical sum calculator 206. When the signal is at a high level, predetermined dummy data DD is selected and output. The dummy data DD may be a fixed value or a random value.

次に、上記構成から成る記憶装置のデータ読み出し時における不正コピー防止回路200のプロテクト動作について詳細な説明を行う。   Next, the protection operation of the unauthorized copy prevention circuit 200 when reading data from the storage device having the above-described configuration will be described in detail.

メモリ100に対して正当なアクセスが行われている場合には、予め設定された所定値を初期アドレスとしてデータDの読み出しが開始され、メモリ100に対するアドレス動作についても、データDに含まれるコードに合致したものとなる。従って、エラー検出部204と初期アドレスチェック部205の出力信号は、いずれもローレベルに維持されるので、論理和演算器206の出力信号はローレベルとなり、セレクタ207は、メモリ100から読み出されたデータDを選択して出力する状態(すなわち、データDの出力許可状態)となる。   When a legitimate access to the memory 100 is performed, reading of the data D is started with a predetermined value set in advance as an initial address, and an address operation for the memory 100 is also performed in a code included in the data D. Matched. Accordingly, since the output signals of the error detection unit 204 and the initial address check unit 205 are both kept at a low level, the output signal of the logical sum calculator 206 is at a low level, and the selector 207 is read from the memory 100. The data D is selected and output (that is, the data D output permission state).

一方、メモリ100に格納されたデータDの不正コピーが行われている場合には、データDに含まれるコードの内容とは何ら関係なく、アドレスのインクリメント動作が行われて、メモリ100に格納されたデータDがそのアドレス順に連続して読み出されていく。すなわち、データDの不正コピー時には、先述の監視対象コードに基づいてアドレスのジャンプ動作が行われるべきタイミングであっても、これを無視してアドレスのインクリメント動作が行われるので、メモリ100に対するアドレス動作がコードに合致したものではなくなる。このような場合、エラー検出部204の出力信号は、ローレベルからハイレベルに遷移されるので、論理和演算器206の出力信号はハイレベルとなり、セレクタ207は、メモリ100から読み出されたデータDではなく、所定のダミーデータDDを選択して出力する状態(データDの出力禁止状態)となる。   On the other hand, when the data D stored in the memory 100 is illegally copied, the address is incremented and stored in the memory 100 regardless of the contents of the code included in the data D. The data D are successively read in the order of their addresses. That is, when the data D is illegally copied, even if the address jump operation should be performed based on the monitoring target code described above, the address increment operation is performed ignoring this, so the address operation for the memory 100 is performed. Is no longer consistent with the code. In such a case, since the output signal of the error detection unit 204 transitions from the low level to the high level, the output signal of the logical sum calculator 206 becomes the high level, and the selector 207 reads the data read from the memory 100. Instead of D, predetermined dummy data DD is selected and output (data D output prohibited state).

また、メモリ100に格納されたデータDの不正コピーが行われる場合、予め設定された所定値以外のアドレスからデータDの読み出しが開始されることもあり得る。このような場合、初期アドレスチェック部205の出力信号は、ローレベルからハイレベルに遷移されるので、論理和演算器206の出力信号はハイレベルとなり、セレクタ207は、エラー検出部204の検出結果を待つことなく、所定のダミーデータDDを選択して出力する状態となる。   In addition, when illegal copying of the data D stored in the memory 100 is performed, reading of the data D may be started from an address other than a predetermined value set in advance. In such a case, since the output signal of the initial address check unit 205 is shifted from the low level to the high level, the output signal of the logical sum calculator 206 becomes the high level, and the selector 207 detects the detection result of the error detection unit 204. Without waiting for, the predetermined dummy data DD is selected and output.

このように、本実施形態の記憶装置であれば、データDの不正コピーが疑われる状況下において、メモリ100に格納されたデータDの出力自体を禁止することができるので、従来構成に比べて、データDの不正コピーをより適切に防止することが可能となる。   As described above, in the storage device according to the present embodiment, the output of the data D stored in the memory 100 can be prohibited under a situation where an illegal copy of the data D is suspected. Thus, unauthorized copying of data D can be prevented more appropriately.

なお、上記構成から成る記憶装置において、コードチェック部201は、前記監視対象コードのうち、実行時の条件に応じてアドレスのジャンプ動作を伴うか否かが不明であるものを検出した場合、エラー検出部204に対して、その監視対象コードの実行時に得られるエラーフラグをマスクするように指示する構成にするとよい。   In the storage device having the above configuration, the code check unit 201 detects an error in the monitoring target code when it is unclear whether or not it involves an address jump operation according to the execution condition. A configuration may be adopted in which the detection unit 204 is instructed to mask an error flag obtained when the monitoring target code is executed.

このような構成とすることにより、メモリ100に対して正当なアクセスが行われているにも関わらず、監視対象コードが実行時の条件に応じてアドレスのジャンプ動作を伴わなかった場合であっても、これを誤ってエラーと判断することがなくなるので、データDの不必要な出力禁止を回避することが可能となる。   By adopting such a configuration, although the legal access to the memory 100 is performed, the monitored code does not accompany the address jump operation according to the conditions at the time of execution. However, since this is not erroneously determined as an error, unnecessary output prohibition of the data D can be avoided.

ただし、コードチェック部201は、エラー検出部204に対するマスク指示が所定値に達した場合、以後のマスク指示を中止する構成にするとよい。このような構成とすることにより、例えば、実行時の条件に応じてアドレスのジャンプ動作を伴うか否かが不明であるコードの記述回数に上限値が定められているにも関わらず、その上限値を超えてエラー検出部204のエラーフラグが過度にマスクされることを回避することができるので、エラーの誤検出を低減しつつ、データDの不正コピーを防止することが可能となる。   However, the code check unit 201 may be configured to stop the subsequent mask instruction when the mask instruction to the error detection unit 204 reaches a predetermined value. By adopting such a configuration, for example, although there is an upper limit on the number of times the code is described whether it is unclear whether or not an address jump operation is involved depending on the execution condition, the upper limit is set. Since it is possible to avoid excessively masking the error flag of the error detection unit 204 beyond the value, it is possible to prevent unauthorized copying of the data D while reducing erroneous detection of errors.

次に、本発明に係る記憶装置の第2実施形態について、図2を参照しながら詳細に説明する。図2は、本発明に係る記憶装置の第2実施形態を示すブロック図である。   Next, a second embodiment of the storage device according to the present invention will be described in detail with reference to FIG. FIG. 2 is a block diagram showing a second embodiment of the storage device according to the present invention.

図2に示すように、本実施形態の記憶装置は、先出の第1実施形態とほぼ同様の構成から成り、セレクタ207に代えて、デコーダ208を有する点に特徴を有している。そこで、第1実施形態と同様の構成要素については、図1と同一の符号を付すことで重複した説明を省略し、以下では、本実施形態の特徴部分であるデコーダ208を中心に詳細な説明を行うことにする。   As shown in FIG. 2, the storage device according to the present embodiment has substantially the same configuration as that of the first embodiment, and is characterized in that a decoder 208 is provided instead of the selector 207. Therefore, the same components as those in the first embodiment are denoted by the same reference numerals as those in FIG. 1, thereby omitting a redundant description, and in the following, detailed description centering on the decoder 208 that is a characteristic part of the present embodiment. To do.

本実施形態の記憶装置において、メモリ100には、暗号化されたデータDが格納されている。なお、データDに施される暗号化処理については、1重であっても、2重以上であっても構わない。   In the storage device of the present embodiment, the memory 100 stores encrypted data D. Note that the encryption processing applied to the data D may be single or double.

デコーダ208は、論理和演算器206の出力信号に基づいて、メモリ100に格納されたデータDの出力を禁止する出力制御部である。より具体的に述べると、デコーダ208は、メモリ100から読み出されたデータDを出力する際に、論理和演算器206の出力信号に基づいて、所定の鍵情報を用いて正しい暗号解読処理を行うか、ダミーの鍵情報を用いて意図的にでたらめな暗号解読処理を行うかを決定する。   The decoder 208 is an output control unit that prohibits the output of the data D stored in the memory 100 based on the output signal of the logical sum calculator 206. More specifically, when outputting the data D read from the memory 100, the decoder 208 performs a correct decryption process using predetermined key information based on the output signal of the logical sum calculator 206. Whether to perform random decryption processing intentionally using dummy key information.

このような構成とすることにより、データDの不正コピーが疑われる状況下において、デコーダ208は、メモリ100から読み出されたデータDに対して、全くでたらめな暗号解読処理を施して出力する。従って、記憶装置から不正に出力されたデータ(ここでは第1実施形態に倣ってダミーデータDDと称する)の内容は不明なものとなるため、これを利用することは不可能となる。   With such a configuration, in a situation where an illegal copy of the data D is suspected, the decoder 208 subjects the data D read from the memory 100 to an extremely random decryption process and outputs it. Accordingly, the contents of data illegally output from the storage device (herein referred to as dummy data DD according to the first embodiment) are unknown, and cannot be used.

また、ダミーデータDDは、デコーダ208によるでたらめな暗号解読処理を経て作成されたものであるため、メモリ100に格納されたデータDとは全く別物となっており、データDの暗号化処理に用いた鍵情報では、もはやその暗号解読処理を行うことができなくなっている。そのため、ダミーデータDDを高速なコンピュータで解析したとしても、データDの内容を読み取ることは非常に困難となっている。特に、デコーダ208でダミーの鍵情報を複数切り替えながらでたらめな暗号解読処理を行う構成とすれば、事実上、ダミーデータDDの解析処理は不可能なものとなる。   Further, since the dummy data DD is created through a random decryption process by the decoder 208, it is completely different from the data D stored in the memory 100 and is used for the encryption process of the data D. It is no longer possible to perform the decryption process with the existing key information. Therefore, even if the dummy data DD is analyzed by a high speed computer, it is very difficult to read the contents of the data D. In particular, if the decoder 208 is configured to perform random decryption processing while switching a plurality of pieces of dummy key information, the analysis processing of the dummy data DD is virtually impossible.

このように、本実施形態の記憶装置であれば、メモリ100に格納されたデータDの出力自体を禁止することができるので、従来構成に比べて、データDの不正コピーをより適切に防止することが可能となる。   As described above, in the storage device according to the present embodiment, the output of the data D stored in the memory 100 can be prohibited, so that illegal copying of the data D can be more appropriately prevented as compared with the conventional configuration. It becomes possible.

なお、上記では、意図的にでたらめな暗号解読処理を行う構成を例に挙げて説明を行ったが、本発明の構成はこれに限定されるものではなく、正しい暗号解読処理とは異なる暗号解読処理を行う構成であれば、いかなる構成であっても構わない。   In the above description, the configuration of intentionally performing random decryption processing has been described as an example. However, the configuration of the present invention is not limited to this, and decryption different from correct decryption processing is performed. Any configuration may be used as long as processing is performed.

次に、本発明に係る記憶装置の第3実施形態について、図3を参照しながら詳細に説明する。図3は、本発明に係る記憶装置の第3実施形態を示すブロック図である。   Next, a third embodiment of the storage device according to the present invention will be described in detail with reference to FIG. FIG. 3 is a block diagram showing a third embodiment of the storage device according to the present invention.

図3に示すように、本実施形態の記憶装置は、先出の第1実施形態とほぼ同様の構成から成り、セレクタ207に代えて、エンコーダ209を有する点に特徴を有している。そこで、第1実施形態と同様の構成要素については、図1と同一の符号を付すことで重複した説明を省略し、以下では、本実施形態の特徴部分であるエンコーダ209を中心に詳細な説明を行うことにする。   As shown in FIG. 3, the storage device according to the present embodiment has substantially the same configuration as that of the first embodiment, and is characterized in that an encoder 209 is provided instead of the selector 207. Therefore, the same components as those in the first embodiment are denoted by the same reference numerals as those in FIG. 1, and redundant description is omitted. In the following, detailed description centering on the encoder 209 that is a characteristic part of the present embodiment. To do.

エンコーダ209は、論理和演算器206の出力信号に基づいて、メモリ100に格納されたデータDの出力を禁止する出力制御部である。より具体的に述べると、エンコーダ209は、メモリ100から読み出されたデータDを出力する際に、論理和演算器206の出力信号に基づいて、所定の鍵情報を用いて正しい暗号化処理を行うか、ダミーの鍵情報を用いて意図的にでたらめな暗号化処理を行うかを決定する。   The encoder 209 is an output control unit that prohibits output of the data D stored in the memory 100 based on the output signal of the logical sum calculator 206. More specifically, when outputting the data D read from the memory 100, the encoder 209 performs a correct encryption process using predetermined key information based on the output signal of the logical sum calculator 206. Whether to perform random encryption processing intentionally using dummy key information.

このような構成とすることにより、データDの不正コピーが疑われる状況下において、エンコーダ209は、メモリ100から読み出されたデータDに対して、全くでたらめな暗号化処理(言い換えればその可逆性を前提としない暗号化処理)を施して出力する。従って、記憶装置から不正に出力されたデータ(ここでは第1実施形態に倣ってダミーデータDDと称する)の内容は不明なものとなるため、これを利用することは不可能となる。特に、エンコーダ209でダミーの鍵情報を複数切り替えながらでたらめな暗号化処理を行う構成とすれば、事実上、ダミーデータDDの暗号解読処理は不可能なものとなる。   By adopting such a configuration, the encoder 209 performs completely random encryption processing (in other words, reversibility thereof) on the data D read from the memory 100 under a situation where an illegal copy of the data D is suspected. Encryption processing that does not assume Accordingly, the contents of data illegally output from the storage device (herein referred to as dummy data DD according to the first embodiment) are unknown, and cannot be used. In particular, if the encoder 209 is configured to perform random encryption processing while switching a plurality of dummy key information, the decryption processing of the dummy data DD is practically impossible.

このように、本実施形態の記憶装置であれば、メモリ100に格納されたデータDの出力自体を禁止することができるので、従来構成に比べて、データDの不正コピーをより適切に防止することが可能となる。   As described above, in the storage device according to the present embodiment, the output of the data D stored in the memory 100 can be prohibited, so that illegal copying of the data D can be more appropriately prevented as compared with the conventional configuration. It becomes possible.

なお、上記では、意図的にでたらめな暗号化処理を行う構成を例に挙げて説明を行ったが、本発明の構成はこれに限定されるものではなく、正しい暗号化処理とは異なる暗号化処理を行う構成であれば、いかなる構成であっても構わない。   In the above description, the configuration of intentionally performing random encryption processing has been described as an example. However, the configuration of the present invention is not limited to this, and encryption different from the correct encryption processing is performed. Any configuration may be used as long as processing is performed.

次に、本発明に係る記憶装置の第4実施形態について、図4を参照しながら詳細に説明する。図4は、本発明に係る記憶装置の第4実施形態を示すブロック図である。   Next, a fourth embodiment of the storage device according to the present invention will be described in detail with reference to FIG. FIG. 4 is a block diagram showing a fourth embodiment of the storage device according to the present invention.

図4に示すように、本実施形態の記憶装置は、先出の第1実施形態とほぼ同様の構成から成り、セレクタ207に代えてアドレス制御部210を有する点に特徴を有している。そこで、第1実施形態と同様の構成要素については、図1と同一の符号を付すことで重複した説明を省略し、以下では、本実施形態の特徴部分であるアドレス制御部210を中心に詳細な説明を行うことにする。   As shown in FIG. 4, the storage device according to the present embodiment has substantially the same configuration as that of the first embodiment described above, and is characterized by having an address control unit 210 instead of the selector 207. Therefore, the same components as those in the first embodiment are denoted by the same reference numerals as those in FIG. 1, and redundant description is omitted. Hereinafter, the details of the address control unit 210 that is a characteristic part of the present embodiment will be mainly described. I will give a simple explanation.

アドレス制御部210は、論理和演算器206の出力信号に基づいて、メモリ100に格納されたデータDの出力を禁止する出力制御部である。より具体的に述べると、アドレス制御部210は、論理和演算器206の出力信号がローレベルであるときには、メモリ100に対するアドレス動作を許可する一方、論理和演算器206の出力信号がハイレベルであるときには、メモリ100に対するアドレス動作を禁止する。   The address control unit 210 is an output control unit that prohibits the output of the data D stored in the memory 100 based on the output signal of the logical sum calculator 206. More specifically, the address control unit 210 permits an address operation to the memory 100 when the output signal of the logical sum calculator 206 is at a low level, while the output signal of the logical sum calculator 206 is at a high level. In some cases, the address operation for the memory 100 is prohibited.

このような構成とすることにより、データDの不正コピーが疑われる状況下において、アドレス制御部210は、メモリ100に対するアドレス動作を禁止して、メモリ100に格納されたデータDの読み出し自体を禁止することができるので、従来構成に比べて、データDの不正コピーをより適切に防止することが可能となる。   By adopting such a configuration, the address control unit 210 prohibits the address operation for the memory 100 and prohibits the reading of the data D stored in the memory 100 under a situation where unauthorized copying of the data D is suspected. Therefore, illegal copying of data D can be prevented more appropriately than in the conventional configuration.

次に、インクリメントチェック部203、及び、エラー検出部204の構成について、図5を参照しながら詳細に説明する。図5は、インクリメントチェック部203、及び、エラー検出部204の一構成例を示すブロック図である。なお、以下で説明する回路構成は、一のデータDにコードとアドレスの両方が含まれていること(いわゆるCPUダイレクトコマンドがデータDとして格納されていること)を前提とするものである。   Next, the configuration of the increment check unit 203 and the error detection unit 204 will be described in detail with reference to FIG. FIG. 5 is a block diagram illustrating a configuration example of the increment check unit 203 and the error detection unit 204. The circuit configuration described below is based on the premise that one code D includes both a code and an address (a so-called CPU direct command is stored as data D).

図5に示したように、本構成例のインクリメントチェック部203は、ロード信号生成部1と、インクリメントカウンタ2と、アドレス比較部3と、を有して成り、エラー検出部204は、Dフリップフロップ4と、排他的論理和演算器5と、Dフリップフロップ5と、を有して成る。   As shown in FIG. 5, the increment check unit 203 of this configuration example includes a load signal generation unit 1, an increment counter 2, and an address comparison unit 3, and the error detection unit 204 includes a D flip-flop. 4, an exclusive OR calculator 5, and a D flip-flop 5.

ロード信号生成部1は、メモリ100に供給されるアドレス信号ADDをインクリメントカウンタ2に読み込ませるためのロード信号LDを生成する手段であり、ワンショット生成部11と論理和演算器12を有して成る。なお、ワンショット生成部11は、メモリ100の読み出し開始時に、リード信号RD(データDの読出タイミング制御信号)からワンショット信号を生成する手段である。また、論理和演算器12は、ワンショット生成部11で生成されるワンショット信号とアドレス比較部3で生成される比較結果信号との論理和演算を行い、その演算結果をロード信号LDとして出力する手段である。   The load signal generation unit 1 is a unit that generates a load signal LD for causing the increment counter 2 to read the address signal ADD supplied to the memory 100, and includes a one-shot generation unit 11 and a logical sum calculator 12. Become. The one-shot generation unit 11 is a unit that generates a one-shot signal from the read signal RD (read timing control signal for data D) when reading from the memory 100 is started. Further, the logical sum calculator 12 performs a logical sum operation between the one-shot signal generated by the one-shot generation unit 11 and the comparison result signal generated by the address comparison unit 3, and outputs the calculation result as a load signal LD. It is means to do.

インクリメントカウンタ2は、ロード信号生成部1から入力されるロード信号LDをトリガとして、メモリ100に供給されるアドレス信号ADDを読み込み、そのアドレス値を自身のカウント値として設定した上で、それ以後、リード信号RDのパルスが到来する毎に、上記のカウント値を1つずつインクリメントして出力する手段である。   The increment counter 2 reads the address signal ADD supplied to the memory 100 using the load signal LD input from the load signal generation unit 1 as a trigger, sets the address value as its own count value, and thereafter Each time the pulse of the read signal RD arrives, the count value is incremented by one and output.

アドレス比較部3は、メモリ100に供給されるアドレス信号ADDと、インクリメントカウンタ2のカウンタ値と、を比較し、その一致/不一致を示す比較結果信号を出力する手段である。なお、比較結果信号は、例えば、アドレス信号ADDとインクリメントカウンタ2のカウンタ値が互いに一致していればローレベルとなり、一致していなければハイレベルとなる2値信号である。   The address comparison unit 3 is means for comparing the address signal ADD supplied to the memory 100 with the counter value of the increment counter 2 and outputting a comparison result signal indicating the match / mismatch. The comparison result signal is, for example, a binary signal that is at a low level if the address signal ADD and the counter value of the increment counter 2 match each other, and that is a high level if they do not match.

Dフリップフロップ4は、リード信号RDをトリガとして、コードチェック部201の出力信号をラッチ出力する手段である。なお、コードチェック部201の出力信号は、例えば、データDに先述の監視対象コードが含まれていればハイレベルとなり、含まれていなければローレベルとなる2値信号である。   The D flip-flop 4 is means for latching and outputting the output signal of the code check unit 201 using the read signal RD as a trigger. Note that the output signal of the code check unit 201 is, for example, a binary signal that is at a high level if the data D includes the above-described monitoring target code and is at a low level if the data D is not included.

排他的論理和演算器5は、アドレス比較部3の出力信号とDフリップフロップ4の出力信号との排他的論理和演算を行い、その演算結果を出力する手段である。すなわち、排他的論理和演算器5の出力信号は、アドレス比較部3の出力信号とDフリップフロップ4の出力信号の論理レベルが互いに一致していればローレベルとなり、一致していなければハイレベルとなる。   The exclusive OR calculator 5 is means for performing an exclusive OR operation on the output signal of the address comparator 3 and the output signal of the D flip-flop 4 and outputting the calculation result. That is, the output signal of the exclusive OR calculator 5 is low level if the logic level of the output signal of the address comparator 3 and the output signal of the D flip-flop 4 match each other, and is high level if they do not match. It becomes.

Dフリップフロップ6は、リード信号RDをトリガとして、排他的論理和演算器5の出力信号をラッチし、これをエラーフラグERRとして論理和演算器206(図5では不図示)に出力する手段である。   The D flip-flop 6 is a means for latching the output signal of the exclusive OR calculator 5 using the read signal RD as a trigger and outputting this as an error flag ERR to the OR calculator 206 (not shown in FIG. 5). is there.

なお、図5では、タイミング制御部202が独立の回路ブロックとして明示されていないが、先出のワンショット生成部11、インクリメントカウンタ2、及び、Dフリップフロップ4、6の動作は、いずれもリード信号RDに基づいて同期されている。すなわち、図5に例示した構成において、タイミング制御部202は、インクリメントチェック部203とエラー検出部204の同期機能を実現する手段として、これらの回路ブロック内に包含されていると言える。   In FIG. 5, the timing control unit 202 is not clearly shown as an independent circuit block. However, the operations of the one-shot generation unit 11, the increment counter 2, and the D flip-flops 4 and 6 are all read. Synchronization is based on signal RD. That is, in the configuration illustrated in FIG. 5, it can be said that the timing control unit 202 is included in these circuit blocks as means for realizing the synchronization function of the increment check unit 203 and the error detection unit 204.

次に、上記構成から成るインクリメントチェック部203及びエラー検出部204の動作について、まずはメモリ100に対して正当なアクセスが行われている場合を例に挙げながら、詳細に説明する。   Next, operations of the increment check unit 203 and the error detection unit 204 configured as described above will be described in detail with reference to an example in which a valid access to the memory 100 is performed.

メモリ100の読み出し開始時に、ワンショット信号生成部11のワンショット信号がハイレベルに立ち上げられると、論理和演算器12から出力されるロード信号LDもハイレベルとなる。インクリメントカウンタ2は、このロード信号LDをトリガとして、メモリ100に供給されるアドレス信号ADD(初期アドレス)を読み込み、そのアドレス値を自身のカウント値として設定した上で、それ以後、リード信号RDのパルスが到来する毎に、上記のカウント値を1つずつインクリメントして出力する。   When the one-shot signal of the one-shot signal generator 11 is raised to a high level at the start of reading from the memory 100, the load signal LD output from the OR calculator 12 also becomes a high level. The increment counter 2 uses the load signal LD as a trigger to read the address signal ADD (initial address) supplied to the memory 100, sets the address value as its own count value, and thereafter reads the read signal RD. Each time a pulse arrives, the count value is incremented by one and output.

従って、メモリ100から読み出されるデータDに監視対象コードが含まれていなければ、メモリ100に供給されるアドレス信号ADDは、ホスト(CPU)によって1つずつインクリメントされていき、また、インクリメントカウンタ2のカウント値は、リード信号RDのパルスが到来する毎に、1つずつインクリメントされていくため、両値は互いに一致する形となり、アドレス比較部3で生成される比較結果信号はローレベルとなる。また、このとき、コードチェック部201では、データDに監視対象コードが含まれていないという判断の下、その出力信号がローレベルとされる。その結果、排他的論理和演算器5に入力される論理信号は、いずれも同一の論理レベル(ローレベル)となるため、その出力信号(延いてはエラーフラグERR)はローレベルとなる。   Therefore, if the monitoring target code is not included in the data D read from the memory 100, the address signal ADD supplied to the memory 100 is incremented one by one by the host (CPU), and the increment counter 2 Since the count value is incremented by one each time the pulse of the read signal RD arrives, both values coincide with each other, and the comparison result signal generated by the address comparison unit 3 is at a low level. At this time, the code check unit 201 sets the output signal to the low level based on the determination that the data D does not include the monitoring target code. As a result, all of the logic signals input to the exclusive OR calculator 5 have the same logic level (low level), so that the output signal (and hence the error flag ERR) becomes the low level.

また、メモリ100から読み出されるデータDに監視対象コードが含まれていた場合、メモリ100に供給されるアドレス信号ADDは、ホスト(CPU)によって所定のアドレス値にジャンプされるが、インクリメントカウンタ2のカウント値については、先と同様のインクリメント動作が継続されるため、両値は互いに不一致となり、アドレス比較部3で生成される比較結果信号はハイレベルとなる。また、このとき、コードチェック部201では、データDに監視対象コードが含まれているという判断の下、その出力信号がハイレベルとされる。従って、排他的論理和演算器5に入力される論理信号はいずれも同一の論理レベル(ハイレベル)となるため、その出力信号(延いてはエラーフラグERR)はローレベルとなる。   When the monitoring target code is included in the data D read from the memory 100, the address signal ADD supplied to the memory 100 is jumped to a predetermined address value by the host (CPU). As for the count value, since the same increment operation as described above is continued, the two values do not coincide with each other, and the comparison result signal generated by the address comparison unit 3 becomes high level. At this time, the code check unit 201 sets the output signal to the high level based on the determination that the monitoring target code is included in the data D. Accordingly, since all the logic signals input to the exclusive OR calculator 5 have the same logic level (high level), the output signal (and hence the error flag ERR) becomes the low level.

なお、比較結果信号がハイレベルに立ち上げられると、論理和演算器12から出力されるロード信号LDはハイレベルとなる。インクリメントカウンタ2は、このロード信号LDをトリガとして、メモリ100に供給されるアドレス信号ADD(ジャンプ後のアドレス)を読み込み、そのアドレス値を自身のカウント値として設定した上で、それ以後、リード信号RDのパルスが到来する毎に、上記のカウント値を1つずつインクリメントして出力する。従って、アドレスがジャンプされた後には、メモリ100に供給されるアドレス信号ADDとインクリメントカウンタ2のカウント値が改めて一致されるので、以後のアドレス比較動作に支障が生じることはない。   Note that when the comparison result signal rises to a high level, the load signal LD output from the logical sum calculator 12 becomes a high level. The increment counter 2 uses the load signal LD as a trigger to read an address signal ADD (address after jump) supplied to the memory 100, sets the address value as its own count value, and thereafter reads the read signal. Each time an RD pulse arrives, the count value is incremented by one and output. Therefore, after the address is jumped, the address signal ADD supplied to the memory 100 is again matched with the count value of the increment counter 2, so that the subsequent address comparison operation is not hindered.

このように、メモリ100に対して正当なアクセスが行われている場合には、メモリ100から読み出されるデータDのコードに合致したアドレス動作が行われ、コードチェック部201の出力信号とインクリメントチェック部203の出力信号が互いに同一の論理レベルとなるため、エラーフラグERRはローレベルに維持される。   As described above, when a legitimate access to the memory 100 is performed, an address operation that matches the code of the data D read from the memory 100 is performed, and the output signal of the code check unit 201 and the increment check unit Since the output signals 203 are at the same logic level, the error flag ERR is maintained at a low level.

次に、メモリ100に格納されたデータDの不正コピーが疑われる場合について詳細に説明する。先にも述べたように、メモリ100に格納されたデータDの不正コピーが行われている場合には、データDに含まれるコードの内容とは何ら関係なく、アドレスのインクリメント動作が行われて、メモリ100に格納されたデータDがそのアドレス順に連続して読み出されていく。すなわち、データDの不正コピー時には、先述の監視対象コードに基づいてアドレスのジャンプ動作が行われるべきタイミングであっても、これを無視してアドレスのインクリメント動作が行われる。その結果、メモリ100に供給されるアドレス信号ADDとインクリメントカウンタ2のカウント値は、互いに一致したままとなるので、アドレス比較部3で生成される比較結果信号はローレベルとなる。一方、コードチェック部201では、データDに監視対象コードが含まれているという判断の下、その出力信号がハイレベルとされる。従って、排他的論理和演算器5に入力される論理信号は、互いに異なる論理レベルとなるため、その出力信号(延いてはエラーフラグERR)はハイレベルとなる。   Next, a case where an illegal copy of the data D stored in the memory 100 is suspected will be described in detail. As described above, when the data D stored in the memory 100 is illegally copied, the address increment operation is performed regardless of the contents of the code included in the data D. The data D stored in the memory 100 is continuously read in the order of the addresses. That is, when the data D is illegally copied, even if the address jump operation should be performed based on the monitoring target code, the address increment operation is performed ignoring this. As a result, the address signal ADD supplied to the memory 100 and the count value of the increment counter 2 remain in agreement with each other, so that the comparison result signal generated by the address comparison unit 3 is at a low level. On the other hand, the code check unit 201 sets the output signal to a high level based on the determination that the data D includes a monitoring target code. Accordingly, since the logic signals input to the exclusive OR calculator 5 have different logic levels, their output signals (and hence the error flag ERR) are at a high level.

このように、メモリ100に格納されたデータDの不正コピーが疑われる場合には、メモリ100から読み出されるデータDのコードに合致したアドレス動作が行われず、コードチェック部201の出力信号とインクリメントチェック部203の出力信号が互いに異なる論理レベルとなるため、エラーフラグERRはハイレベルに遷移される。   As described above, when an illegal copy of the data D stored in the memory 100 is suspected, an address operation matching the code of the data D read from the memory 100 is not performed, and the output signal and the increment check of the code check unit 201 are performed. Since the output signals of the unit 203 have different logic levels, the error flag ERR is changed to a high level.

次に、ワンショット生成部11の構成について、図6を参照しながら詳細に説明する。図6は、ワンショット生成部11の一構成例を示すブロック図である。   Next, the configuration of the one-shot generation unit 11 will be described in detail with reference to FIG. FIG. 6 is a block diagram illustrating a configuration example of the one-shot generation unit 11.

図6に示すように、本構成例のワンショット生成部11は、インバータ111と、Dフリップフロップ112及びDフリップフロップ113と、論理積演算器114と、を有して成る。インバータ111の入力端は、リード信号RDの印加端に接続されている。Dフリップフロップ112、113のクロック入力端は、いずれもインバータ111の出力端に接続されている。Dフリップフロップ112のデータ入力端(D)は、ハイレベル信号の印加端(例えば、電源ライン)に接続されている。Dフリップフロップ113のデータ入力端(D)は、Dフリップフロップ112の出力端(Q)に接続されている。Dフリップフロップ112、113のリセット入力端は、いずれもリセット信号RSTの印加端に接続されている。論理積演算器114の一入力端は、Dフリップフロップ112の出力端(Q)に接続されている。論理積演算器114の他入力端は、Dフリップフロップ113の反転出力端(Qバー)に接続されている。なお、論理積演算器114の出力端は、ワンショット生成部11の出力端(ワンショット信号Sdの出力端)に相当する。   As shown in FIG. 6, the one-shot generation unit 11 of this configuration example includes an inverter 111, a D flip-flop 112 and a D flip-flop 113, and an AND operator 114. The input end of the inverter 111 is connected to the application end of the read signal RD. The clock input terminals of the D flip-flops 112 and 113 are both connected to the output terminal of the inverter 111. A data input terminal (D) of the D flip-flop 112 is connected to a high-level signal application terminal (for example, a power supply line). The data input terminal (D) of the D flip-flop 113 is connected to the output terminal (Q) of the D flip-flop 112. The reset input terminals of the D flip-flops 112 and 113 are both connected to the application terminal of the reset signal RST. One input terminal of the AND operator 114 is connected to the output terminal (Q) of the D flip-flop 112. The other input terminal of the AND operator 114 is connected to the inverting output terminal (Q bar) of the D flip-flop 113. Note that the output terminal of the AND operator 114 corresponds to the output terminal of the one-shot generator 11 (the output terminal of the one-shot signal Sd).

次に、上記構成から成るワンショット生成部11の動作について、図7を参照しながら詳細に説明する。図7は、ワンショット生成部11の動作を説明するためのタイミングチャートであり、上から順に、リセット信号RST、リード信号RD、及び、ワンショット生成部11各部の論理信号(インバータ111の反転リード信号Sa、Dフリップフロップ112の出力信号Sb、Dフリップフロップ113の反転出力信号Sc、及び、論理積演算器114のワンショット信号Sd)が描写されている。なお、ここで示す論理信号はあくまで一例であり、その論理レベルは反転されていても構わない。   Next, the operation of the one-shot generation unit 11 having the above configuration will be described in detail with reference to FIG. FIG. 7 is a timing chart for explaining the operation of the one-shot generation unit 11. From the top, the reset signal RST, the read signal RD, and the logic signals (inverted read of the inverter 111) of each part of the one-shot generation unit 11 are illustrated. The signal Sa, the output signal Sb of the D flip-flop 112, the inverted output signal Sc of the D flip-flop 113, and the one-shot signal Sd of the AND operator 114) are depicted. Note that the logic signal shown here is merely an example, and the logic level may be inverted.

リセット信号RSTがハイレベルからローレベルに遷移され、記憶装置のリセット状態が解除されたとき、Dフリップフロップ112の出力信号Sbはローレベルとされ、Dフリップフロップ113の反転出力信号Scはハイレベルとされる。その後、リード信号RDに最初のパルスP1が立ち下げられると、Dフリップフロップ112は、反転リード信号Saの立上がりエッジをトリガとして、データ入力端(D)に常時印加されているハイレベル信号を取り込み、出力信号Sbをハイレベルにセットする。また、Dフリップフロップ113は、反転リード信号Saの立上がりエッジをトリガとして、その時点でデータ入力端(D)に印加されているDフリップフロップ112の出力信号Sb(ローレベル)を取り込み、反転出力信号Scをハイレベルにセットする。従って、出力信号Sbと反転出力信号Scの論理積演算によって得られるワンショット信号Sdはハイレベルとなる。   When the reset signal RST transitions from the high level to the low level and the reset state of the memory device is released, the output signal Sb of the D flip-flop 112 is set to the low level, and the inverted output signal Sc of the D flip-flop 113 is the high level. It is said. After that, when the first pulse P1 falls to the read signal RD, the D flip-flop 112 takes in the high level signal that is always applied to the data input terminal (D) with the rising edge of the inverted read signal Sa as a trigger. The output signal Sb is set to a high level. Further, the D flip-flop 113 takes the output signal Sb (low level) of the D flip-flop 112 applied to the data input terminal (D) at that time as a trigger using the rising edge of the inverted read signal Sa, and outputs the inverted output. The signal Sc is set to a high level. Accordingly, the one-shot signal Sd obtained by the logical product operation of the output signal Sb and the inverted output signal Sc becomes high level.

ワンショット信号Sdがハイレベルとされた後に、リード信号RDに2つめのパルスP2が立ち下げられると、Dフリップフロップ112は、反転リード信号Saの立上がりエッジをトリガとして、データ入力端(D)に常時印加されているハイレベル信号を取り込み、出力信号Sbをハイレベルにセットする。また、Dフリップフロップ113は、反転リード信号Saの立上がりエッジをトリガとして、その時点でデータ入力端(D)に印加されているDフリップフロップ112の出力信号Sb(ハイレベル)を取り込み、反転出力信号Scをローレベルにセットする。従って、出力信号Sbと反転出力信号Scの論理積演算によって得られるワンショット信号Sdはローレベルとなる。   When the second pulse P2 falls to the read signal RD after the one-shot signal Sd is set to the high level, the D flip-flop 112 uses the rising edge of the inverted read signal Sa as a trigger to trigger the data input terminal (D) The high level signal that is always applied to is taken in, and the output signal Sb is set to the high level. The D flip-flop 113 takes the output signal Sb (high level) of the D flip-flop 112 applied to the data input terminal (D) at that time as a trigger by using the rising edge of the inverted read signal Sa as a trigger, and outputs the inverted signal. The signal Sc is set to a low level. Therefore, the one-shot signal Sd obtained by the logical product operation of the output signal Sb and the inverted output signal Sc is at a low level.

以後、リード信号RDのパルスが順次立ち下げられた場合についても、上記と同様の信号処理が行われて、ワンショット信号Sdはローレベルに維持される。すなわち、ワンショット生成部11では、記憶装置のリセット状態が解除された後、リード信号RDの最初のパルスP1が到来してから2つめのパルスP2が到来するまでの間、所定の論理レベル(図7の例ではハイレベル)となるワンショット信号Sdが生成される形となる。   Thereafter, even when the pulse of the read signal RD is sequentially lowered, the signal processing similar to the above is performed, and the one-shot signal Sd is maintained at the low level. That is, in the one-shot generation unit 11, after the storage device is released from the reset state, a predetermined logic level (from the first pulse P1 of the read signal RD to the arrival of the second pulse P2) In this example, a one-shot signal Sd having a high level is generated.

また、先にも述べたように、ワンショット信号生成部11のワンショット信号がハイレベルに立ち上げられると、論理和演算器12から出力されるロード信号LDもハイレベルとなり、インクリメントカウンタ2では、このロード信号LDをトリガとして、メモリ100に供給されるアドレス信号ADD(初期アドレス)が読み込まれる。   As described above, when the one-shot signal of the one-shot signal generation unit 11 is raised to a high level, the load signal LD output from the OR calculator 12 also becomes a high level. The address signal ADD (initial address) supplied to the memory 100 is read using the load signal LD as a trigger.

このような構成とすることにより、極めて容易かつ簡易な回路構成で、ワンショット生成部11(延いてはインクリメントチェック部203)を実現することが可能となる。   With such a configuration, the one-shot generation unit 11 (and hence the increment check unit 203) can be realized with a very simple and simple circuit configuration.

なお、本発明の構成は、上記実施形態のほか、発明の主旨を逸脱しない範囲で種々の変更を加えることが可能である。   The configuration of the present invention can be variously modified in addition to the above-described embodiment without departing from the gist of the invention.

例えば、上記実施形態では、コードに合致したアドレス動作が行われているか否かを判定する手法として、アドレスのジャンプ動作を伴うコードの実行時に、アドレスのインクリメント動作が行われたか否かを検出する構成を例に挙げて説明を行ったが、本発明の構成はこれに限定されるものではなく、その余の手法を用いても構わない。   For example, in the above-described embodiment, as a method for determining whether or not an address operation that matches a code is performed, it is detected whether or not an address increment operation has been performed when executing a code that involves an address jump operation. Although the configuration has been described as an example, the configuration of the present invention is not limited to this, and other methods may be used.

また、上記実施形態では、データDの格納手段として、読み出し専用のメモリ100を用いた構成を例示して説明を行ったが、本発明の構成はこれに限定されるものではなく、データDの読み書きが可能なフラッシュメモリやEEPROM[Electrically Erasable and Programmable Read Only Memory]などを用いても構わない。   In the above embodiment, the configuration using the read-only memory 100 as an example of the storage means for the data D has been described. However, the configuration of the present invention is not limited to this, and the configuration of the data D A readable / writable flash memory or an EEPROM [Electrically Erasable and Programmable Read Only Memory] may be used.

本発明は、ゲームカートリッジ、ICカード、セキュリティ機器などに用いられる記憶装置の不正コピーを防止する技術として利用することが可能である。   The present invention can be used as a technique for preventing unauthorized copying of storage devices used in game cartridges, IC cards, security devices, and the like.

は、本発明に係る記憶装置の第1実施形態を示すブロック図である。These are block diagrams which show 1st Embodiment of the memory | storage device which concerns on this invention. は、本発明に係る記憶装置の第2実施形態を示すブロック図である。These are block diagrams which show 2nd Embodiment of the memory | storage device based on this invention. は、本発明に係る記憶装置の第3実施形態を示すブロック図である。These are block diagrams which show 3rd Embodiment of the memory | storage device based on this invention. は、本発明に係る記憶装置の第4実施形態を示すブロック図である。These are block diagrams which show 4th Embodiment of the memory | storage device based on this invention. は、インクリメントチェック部203、及び、エラー検出部204の一構成例を示すブロック図である。FIG. 4 is a block diagram illustrating a configuration example of an increment check unit 203 and an error detection unit 204. は、ワンショット生成部11の一構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration example of a one-shot generation unit 11. は、ワンショット生成部11の動作を説明するタイミングチャートである。These are timing charts for explaining the operation of the one-shot generator 11.

符号の説明Explanation of symbols

100 読み出し専用メモリ(ROM)
200 不正コピー防止回路
201 コードチェック部(コード解析部)
202 タイミング制御部
203 インクリメントチェック部(アドレス解析部)
204 エラー検出部
205 初期アドレスチェック部
206 論理和演算器
207 セレクタ
208 デコーダ
209 エンコーダ
210 アドレス制御部
1 ロード信号生成部
11 ワンショット生成部
111 インバータ
112、113 Dフリップフロップ
114 論理積演算器
12 論理和演算器
2 インクリメントカウンタ
3 アドレス比較部
4 Dフリップフロップ
5 排他的論理和演算器
6 Dフリップフロップ
100 Read only memory (ROM)
200 Unauthorized Copy Prevention Circuit 201 Code Check Unit (Code Analysis Unit)
202 Timing control unit 203 Increment check unit (address analysis unit)
204 Error detection unit 205 Initial address check unit 206 OR operation unit 207 selector 208 decoder 209 encoder 210 address control unit 1 load signal generation unit 11 one shot generation unit 111 inverter 112, 113 D flip-flop 114 AND operation unit 12 logical sum Operation unit 2 Increment counter 3 Address comparison unit 4 D flip-flop 5 Exclusive OR operator 6 D flip-flop

Claims (3)

データを格納するメモリと;
前記メモリから読み出されたデータにアドレスのジャンプ動作を伴う所定の監視対象コードが含まれているか否かを検出するコード解析部と;
アドレスのインクリメント動作が行われているか否かを検出するアドレス解析部と;
前記コード解析部と前記アドレス解析部の解析結果を参照して、前記監視対象コードの実行時にアドレスのインクリメント動作が行われたか否かを検出するエラー検出部と;
前記エラー検出部の判定結果に基づいて、前記メモリに格納されたデータの出力を禁止する出力制御部と;
を有して成る記憶装置であって、
前記アドレス解析部は、
ロード信号を生成するロード信号生成部と;
前記ロード信号をトリガとして前記メモリに供給されるアドレス信号を読み込み、そのアドレス値を自身のカウント値として設定した上で、それ以後、リード信号に基づいて、前記カウント値を1つずつインクリメントして出力するカウンタと;
前記メモリに供給されるアドレス信号と前記カウンタのカウンタ値とを比較し、その一致/不一致を示す比較結果信号を出力するアドレス比較部と;
を有して成ることを特徴とする記憶装置。
Memory for storing data;
A code analysis unit for detecting whether or not the data read from the memory includes a predetermined monitoring target code accompanied by an address jump operation;
An address analysis unit for detecting whether or not an address increment operation is performed;
An error detection unit that refers to the analysis results of the code analysis unit and the address analysis unit and detects whether or not an address increment operation has been performed when the monitored code is executed;
An output control unit that prohibits output of data stored in the memory based on a determination result of the error detection unit;
A storage device comprising:
The address analysis unit
A load signal generator for generating a load signal;
The address signal supplied to the memory is read using the load signal as a trigger, the address value is set as its own count value, and thereafter, the count value is incremented by one based on the read signal. A counter to output;
An address comparison unit that compares an address signal supplied to the memory with a counter value of the counter and outputs a comparison result signal indicating the match / mismatch;
A storage device comprising:
前記ロード信号生成部は、
前記メモリの読み出し開始時にワンショット信号を生成するワンショット生成部と; 前記ワンショット信号と前記比較結果信号から前記ロード信号を生成する論理回路と;
を有して成ることを特徴とする請求項1に記載の記憶装置。
The load signal generator is
A one-shot generation unit that generates a one-shot signal at the start of reading of the memory; and a logic circuit that generates the load signal from the one-shot signal and the comparison result signal;
The storage device according to claim 1, further comprising:
前記ワンショット生成部は、前記記憶装置のリセット状態が解除された後、前記リード信号の最初のパルスが到来してから2つめのパルスが到来するまでの間、所定の論理レベルとなる前記ワンショット信号を生成することを特徴とする請求項2に記載の記憶装置。   The one-shot generation unit is configured to perform the one-shot generation at a predetermined logic level after the first pulse of the read signal arrives until the second pulse arrives after the reset state of the storage device is released. The storage device according to claim 2, wherein a shot signal is generated.
JP2008191612A 2008-07-25 2008-07-25 Storage device Expired - Fee Related JP5140512B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008191612A JP5140512B2 (en) 2008-07-25 2008-07-25 Storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008191612A JP5140512B2 (en) 2008-07-25 2008-07-25 Storage device

Publications (2)

Publication Number Publication Date
JP2010033122A true JP2010033122A (en) 2010-02-12
JP5140512B2 JP5140512B2 (en) 2013-02-06

Family

ID=41737563

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008191612A Expired - Fee Related JP5140512B2 (en) 2008-07-25 2008-07-25 Storage device

Country Status (1)

Country Link
JP (1) JP5140512B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111630595A (en) * 2018-01-23 2020-09-04 微芯片技术股份有限公司 Memory device, memory address decoder, system and related methods for memory attack detection

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111630595A (en) * 2018-01-23 2020-09-04 微芯片技术股份有限公司 Memory device, memory address decoder, system and related methods for memory attack detection

Also Published As

Publication number Publication date
JP5140512B2 (en) 2013-02-06

Similar Documents

Publication Publication Date Title
US9117070B2 (en) Method for adapting and executing a computer program and computer architecture therefore
US20240427944A1 (en) Undefined Lifecycle State Identifier for Managing Security of an Integrated Circuit Device
US20210004456A1 (en) Method for executing a binary code of a secure function with a microprocessor
US11704128B2 (en) Method for executing a machine code formed from blocks having instructions to be protected, each instruction associated with a construction instruction to modify a signature of the block
EP4248340B1 (en) Code flow protection with error propagation
JP4537003B2 (en) Method for protecting a computer from unauthorized manipulation of register contents and computer for implementing this method
KR20060135467A (en) Systems and Methods Using Protected Nonvolatile Memory
US7954153B2 (en) Secured coprocessor comprising an event detection circuit
US20090125728A1 (en) Security method of system by encoding instructions
JP5140512B2 (en) Storage device
JP2008287449A (en) Data processor
JP2010033121A (en) Storage device
JP2009169489A (en) Encryption method, decryption method, encryption device, and decryption device
JP5070136B2 (en) Storage device
CN114036512B (en) Method, device, equipment and storage medium for preventing chip from being cracked
JP2010033123A (en) Storage device
US7934265B2 (en) Secured coprocessor comprising means for preventing access to a unit of the coprocessor
JP5070137B2 (en) Storage device and data writing device
CN118260760A (en) Method for resisting fault injection attack in safety starting
JP2011150495A (en) Storage device
JP2007066021A (en) External data falsification detecting device and method
CN115437622B (en) Method and device for automatically generating return-oriented code for processing side effects of code snippets
US10242183B2 (en) Method of executing a program by a processor and electronic entity comprising such a processor
CN120011973A (en) Method, device, electronic device and storage medium for determining fuse status and level
CN117762483A (en) Processor and jump instruction execution method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110725

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121017

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: 20121023

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: 20121119

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20151122

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees