JP5011512B2 - Memory monitoring method - Google Patents

Memory monitoring method Download PDF

Info

Publication number
JP5011512B2
JP5011512B2 JP2008005001A JP2008005001A JP5011512B2 JP 5011512 B2 JP5011512 B2 JP 5011512B2 JP 2008005001 A JP2008005001 A JP 2008005001A JP 2008005001 A JP2008005001 A JP 2008005001A JP 5011512 B2 JP5011512 B2 JP 5011512B2
Authority
JP
Japan
Prior art keywords
memory
error detection
stored
electronic device
detection code
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.)
Expired - Fee Related
Application number
JP2008005001A
Other languages
Japanese (ja)
Other versions
JP2009169550A (en
Inventor
勉 馬場
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.)
Nidec Sankyo Corp
Original Assignee
Nidec Sankyo Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nidec Sankyo Corp filed Critical Nidec Sankyo Corp
Priority to JP2008005001A priority Critical patent/JP5011512B2/en
Priority to PCT/JP2009/000061 priority patent/WO2009087970A1/en
Publication of JP2009169550A publication Critical patent/JP2009169550A/en
Application granted granted Critical
Publication of JP5011512B2 publication Critical patent/JP5011512B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、機密データが格納されたメモリを監視するメモリ監視方法に関する。   The present invention relates to a memory monitoring method for monitoring a memory in which confidential data is stored.

カードリーダ等の電子機器装置においては、機密データ(例えば、暗号処理に使用する鍵データ)を二次電源によりバックアップされている揮発性メモリに保持しておき、電子機器装置に不正行為が生じた場合に、揮発性メモリ内に格納されている機密データを消去することが行われている。例えば、ターミナルから電子機器装置が外されたり、カバーが開放された場合などの不正行為を検知すると、揮発性メモリへの電力供給を遮断し、揮発性メモリ内の機密データが自然消去される。これにより、以後の電子機器装置の動作を不能とし、機密データの外部への漏洩を防止することができる。   In an electronic device such as a card reader, confidential data (for example, key data used for encryption processing) is held in a volatile memory backed up by a secondary power supply, and an illegal act has occurred in the electronic device. In some cases, the confidential data stored in the volatile memory is erased. For example, when an unauthorized action is detected such as when the electronic device is removed from the terminal or the cover is opened, the power supply to the volatile memory is cut off, and the confidential data in the volatile memory is naturally erased. As a result, the subsequent operation of the electronic device can be disabled, and leakage of confidential data to the outside can be prevented.

また、揮発性メモリ内に格納されている機密データの誤り検知符号を常に監視し、誤り検知符号が異常である場合に不正行為を検知したとして、電子機器装置の動作を不能とする機能を組み込んでいる。誤り検知符号が異常であるとは、揮発性メモリ内に格納されている機密データが、不正に書き換えられたり消失したりする場合のことで、常時計算される機密データの誤り検知符号と同時に保持されている誤り検知符号とが一致しない場合のことを意味する。   In addition, a function is incorporated that constantly monitors the error detection code of confidential data stored in the volatile memory and disables the operation of the electronic device device if an illegal action is detected when the error detection code is abnormal. It is out. An error detection code is abnormal when confidential data stored in volatile memory is illegally rewritten or lost, and is always kept at the same time as the error detection code of confidential data calculated This means a case where the error detection code that is set does not match.

このような機能を組み込む電子機器装置では、電源OFFの状態で不正行為を検知した場合は、二次電源からの揮発性メモリへの電力供給を遮断することで機密データが消失され、次回電源立ち上げ時にデータ消失を検知して電子機器装置の動作を不能とする。電源ONの状態で不正行為を検知した場合は、主電源及び二次電源からの揮発性メモリへの電力供給を遮断することで機密データが消失される。電源ONの状態では常時機密データの誤り検知符号を計算して、揮発性メモリ内に同時に保持して格納されている誤り検知符号と比較することで異常を検知している。   In an electronic device device incorporating such a function, if an illegal act is detected while the power is off, the confidential data is lost by shutting off the power supply from the secondary power source to the volatile memory. Data loss is detected at the time of raising, and the operation of the electronic device is disabled. When an illegal act is detected while the power is on, the confidential data is lost by shutting off the power supply to the volatile memory from the main power source and the secondary power source. When the power is on, an error detection code of confidential data is always calculated, and an abnormality is detected by comparing with an error detection code stored and stored in the volatile memory at the same time.

そして、誤り検知符号と比較することで異常を検知するものとして、特許文献1に記載された監視方式が存在する。かかる監視方式では、OS(オペレーティングシステム)やAP(アプリケーションプログラム)を格納するときにBCC値を算出して格納しておき、OSやAPを起動するときにBCC値を算出して、予め格納されたBCC値と比較して一致、不一致を判断するものである。   And the monitoring system described in patent document 1 exists as what detects abnormality by comparing with an error detection code. In such a monitoring method, a BCC value is calculated and stored when an OS (operating system) or an AP (application program) is stored, and a BCC value is calculated and stored in advance when the OS or AP is activated. Compared with the BCC value, a match / mismatch is determined.

特開平3−5856号公報Japanese Patent Laid-Open No. 3-5856

しかしながら、従来の方法では、本来格納されているべき機密データが完全に消失してall 0になった場合、初期値を0とするCRCの計算結果は0となり、さらに同時に保持されているCRCも0になっているため、CRCのチェック結果はOKとなることから、異常か否かを検知することができない。   However, in the conventional method, when the confidential data that should be originally stored is completely lost and becomes all 0, the CRC calculation result with an initial value of 0 becomes 0, and the CRC held at the same time is also stored. Since it is 0, the CRC check result is OK, so it cannot be detected whether or not there is an abnormality.

このため、もう一段別の検知方法を組み込んで判断する必要があるが、常時監視処理としては冗長となってしまうとか監視システムの負荷が重くなるという欠点がある。   For this reason, it is necessary to make a judgment by incorporating another detection method, but there is a drawback that the monitoring process becomes redundant or the load on the monitoring system becomes heavy.

また、特許文献1記載の方法では、OSの中に監視機能を有していて、APのBCC値をOSが常に計算し、APが保持しているBCC値と比較することによって、APの破壊を調べるものである。APやOSというものは本来消失しないものとして1つのメモリ内に格納されるが、APやOSの内容がall 0になることは考慮されていない。よって、APやOSが保持するBCC値は不変のものとして、例えばインストール時のBCC値を保持しているのが通常である。   In the method described in Patent Document 1, the OS has a monitoring function. The OS always calculates the BCC value of the AP and compares it with the BCC value held by the AP. Is to examine. APs and OSs are stored in one memory as they do not disappear, but it is not considered that the contents of APs and OSs become all 0. Therefore, it is normal that the BCC value held by the AP or OS is unchanged, for example, the BCC value at the time of installation is held.

また、APやOSというものは、それが漏洩しても特に不都合はないことから、不正行為による漏洩やコピー等が行われるとしても本来消失しないように格納されているものの、機密データが漏洩すると大事に至ることから、機密データの漏洩を防ぐためにも不正行為を検知したときは機密データを消失できるように格納されている。このため、機密データが消失して格納されていないのか、元々機密データが格納されていないのかを判断して、異常検知をすることが重要である。   In addition, since AP and OS are not particularly inconvenient even if they are leaked, they are stored so that they will not be lost even if they are leaked or copied due to fraud. In order to prevent leakage of confidential data, it is stored so that confidential data can be lost when an illegal act is detected. For this reason, it is important to detect abnormality by determining whether the confidential data is lost and not stored or whether the confidential data is originally stored.

本発明は、このような点に鑑みてなされたものであり、その目的は、不正行為によってデータが消失してall 0になった場合でも、CRC等の誤り検知符号の計算結果を異常として出力することができるメモリ監視方法を提供することにある。   The present invention has been made in view of such a point, and its purpose is to output the calculation result of error detection codes such as CRC as abnormal even when data is lost due to fraud and becomes all 0. It is an object of the present invention to provide a memory monitoring method that can be performed.

以上のような課題を解決するために、本発明のメモリ監視方法は、機密データ及び誤り検知符号が格納されたメモリと、電子機器装置の各種動作に必要な作業データが格納される作業メモリとを備えた電子機器装置において、電子機器装置の電源立ち上げ時に、メモリ内に格納されている誤り検知符号を、作業メモリに格納し、一方で、常時メモリに格納されている機密データの誤り検知符号の計算をしていき、計算をした結果算出される誤り検知符号と作業メモリに格納された誤り検知符号とを比較することを特徴とする。   In order to solve the above-described problems, a memory monitoring method according to the present invention includes a memory storing confidential data and an error detection code, a work memory storing work data necessary for various operations of the electronic device. In the electronic device apparatus equipped with the error detection code stored in the memory is stored in the working memory when the power of the electronic device is turned on, while the error detection of the confidential data stored in the memory is always performed The code is calculated, and the error detection code calculated as a result of the calculation is compared with the error detection code stored in the working memory.

より具体的には、本発明は、以下のものを提供する。   More specifically, the present invention provides the following.

(1) 電子機器装置において取り扱われる機密データ及び誤り検知符号を格納するメモリを監視するメモリ監視方法であって、電子機器装置には、前記機密データ及び誤り検知符号が格納されたメモリと、電子機器装置の各種動作に必要な作業データが格納される作業メモリと、が備えられ、電子機器装置の電源立ち上げ時に、前記メモリ内に格納されている前記誤り検知符号を、前記作業メモリに格納する格納工程と、前記作業メモリへ格納後、前記メモリに格納されている機密データの誤り検知符号の計算をする計算工程と、前記計算をした誤り検知符号と前記作業メモリに格納された誤り検知符号とを比較する比較工程と、を有し、前記計算工程以降を繰り返して、これら2つの誤り検知符号が異なる場合に、電子機器装置の上位装置に異常であることを通知する工程を備えたことを特徴とするメモリ監視方法。

(1) A memory monitoring method for monitoring a memory storing confidential data and an error detection code handled in an electronic device, wherein the electronic device includes a memory storing the confidential data and an error detection code, an electronic A work memory for storing work data necessary for various operations of the device, and storing the error detection code stored in the memory in the work memory when the power of the electronic device is turned on. A storage step, a calculation step of calculating an error detection code of confidential data stored in the memory after being stored in the working memory, an error detection code that has been calculated, and an error detection stored in the working memory A comparison step of comparing the codes, and when the two error detection codes are different by repeating the calculation step and the subsequent steps , Memory monitoring method characterized by comprising the step of notifying that it is abnormal.

本発明によれば、メモリ内に格納されている誤り検知符号をメモリとは別の作業メモリに格納し、一方で、常時メモリに格納されている機密データの誤り検知符号の計算をしていき、計算をした結果算出される誤り検知符号と作業メモリに格納された誤り検知符号とを比較することによって、これら2つの誤り検知符号が異なる場合は異常と、これら2つの誤り検知符号が同じ場合は正常として、電子機器装置の上位装置に異常であることを通知することができる。   According to the present invention, the error detection code stored in the memory is stored in a working memory different from the memory, while the error detection code of the confidential data stored in the memory is constantly calculated. By comparing the error detection code calculated as a result of the calculation and the error detection code stored in the working memory, when these two error detection codes are different from each other, abnormal, and when these two error detection codes are the same Can be notified to the host device of the electronic device device as normal.

よって、メモリに格納されている機密データの誤り検知符号を常時計算し、別の作業メモリに電源立ち上げ時における機密データの誤り検知符号を格納しておき、これらの誤り検知符号を比較することで、機密データがall 0になった場合でも、異常を検知することができる。   Therefore, always calculate the error detection code of the confidential data stored in the memory, store the error detection code of the confidential data when the power is turned on in another working memory, and compare these error detection codes Thus, even when the confidential data becomes all 0, an abnormality can be detected.

また、「電子機器装置の電源立ち上げ時に、メモリ内に格納されている誤り検知符号を、作業メモリに格納する工程」は、電子機器装置の電源立ち上げ時ごとに行い、電源遮断後は作業メモリに格納された誤り検知符号を保持しない構成とすることで、一旦作業メモリに格納された誤り検知符号が以後も作業メモリ内に保持されたことによって、誤り検知符号が外部に漏洩するといったことを防止することができる。特に、誤り検知符号から機密データの内容を判読したり推測したりすることが可能な場合には、誤り検知符号の機密性も確保することが望ましい。   In addition, “the process of storing the error detection code stored in the memory in the working memory when the electronic device is turned on” is performed every time the electronic device is turned on. By adopting a configuration that does not hold the error detection code stored in the memory, the error detection code leaked to the outside because the error detection code once stored in the work memory is subsequently held in the work memory. Can be prevented. In particular, it is desirable to ensure the confidentiality of the error detection code when the content of the confidential data can be read or estimated from the error detection code.

(2) 前記メモリは、バックアップ電源からの電力が供給されることで格納されている内容を保持する揮発性メモリであり、非通電時においても前記機密データ及び誤り検知符号を保持していることを特徴とするメモリ監視方法。   (2) The memory is a volatile memory that retains the stored contents when power is supplied from a backup power source, and retains the confidential data and the error detection code even when the power is off. A memory monitoring method characterized by the above.

本発明によれば、機密データ及び誤り検知符号が揮発性メモリに格納されており、電子機器装置の非通電時においてもバックアップ電源からの電力供給によって機密データ及び誤り検知符号を保持していることから、不正行為時には揮発性メモリへの電力供給を遮断して機密データ及び誤り検知符号を消失させる一方、通常時には揮発性メモリへの電力供給を維持して機密データ及び誤り検知符号を保持することができる。   According to the present invention, the confidential data and the error detection code are stored in the volatile memory, and the confidential data and the error detection code are held by the power supply from the backup power supply even when the electronic device is not energized. Therefore, in the case of fraud, the power supply to the volatile memory is cut off and the confidential data and the error detection code are lost, while the power supply to the volatile memory is maintained and the confidential data and the error detection code are retained in the normal time. Can do.

(3) 電子機器装置には、前記メモリに電源からの電力の供給を制御する電源制御手段が備えられ、前記電源制御手段は、電子機器装置の不正行為を検知した場合に、前記メモリへの電力の供給を遮断することを特徴とするメモリ監視方法。   (3) The electronic device apparatus includes power control means for controlling supply of power from a power source to the memory, and the power control means is configured to supply the memory to the memory when detecting an illegal act of the electronic device apparatus A memory monitoring method characterized by shutting off power supply.

本発明によれば、電源制御手段によってメモリへの電力の供給が制御されており、電子機器装置の不正行為を検知した場合にメモリへの電力の供給を遮断することから、特にバックアップ電源からの電力が供給されることで格納されている内容を保持する揮発性メモリの場合には、バックアップ電源からの電力の供給も遮断することができるので、揮発性メモリの内容を完全に消失することができる。   According to the present invention, the supply of power to the memory is controlled by the power supply control means, and the power supply to the memory is cut off when an illegal act of the electronic device is detected. In the case of a volatile memory that retains the stored contents when power is supplied, the power supply from the backup power supply can also be cut off, so the contents of the volatile memory may be completely lost. it can.

本発明によれば、電子機器装置の不正行為によって機密データが完全に消失した場合でも、誤り検知符号のチェック結果を異常として検知することができ、以後の電子機器装置を動作不能としたり、正常な運用を不能としたりすることができる。   According to the present invention, even when confidential data is completely lost due to an illegal act of the electronic device apparatus, the error detection code check result can be detected as abnormal, and the subsequent electronic apparatus device can be made inoperable or normal. Can be disabled.

以下、本発明を実施するための最良の形態について、図面を参照しながら説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

[電子機器装置の構成]
図1は、本発明の実施の形態に係るメモリ監視方法にて使用する電子機器装置1のブロック図である。
[Configuration of electronic device]
FIG. 1 is a block diagram of an electronic device apparatus 1 used in a memory monitoring method according to an embodiment of the present invention.

電子機器装置1は、CPU10と、RAM11と、EEPROM12と、バックアップRAM15と、バッテリー16と、電源17と、電源制御手段18と、不正検知手段19と、を有し、バスを介して各種接続がされている。また例えば、電子機器装置1がカードリーダの場合、装置内部の保護あるいはカード処理中のカード保護等の目的で具備されるシャッター13や、装置内部でのカード位置を把握するために具備されるセンサ14等も有し、各種接続がされている。   The electronic device apparatus 1 includes a CPU 10, a RAM 11, an EEPROM 12, a backup RAM 15, a battery 16, a power source 17, a power source control unit 18, and a fraud detection unit 19, and various connections are made via a bus. Has been. Further, for example, when the electronic device 1 is a card reader, a shutter 13 provided for the purpose of protecting the inside of the device or card protection during card processing, or a sensor provided for grasping the card position inside the device. 14 etc., and various connections are made.

CPU10は、電子機器装置1の全体の制御を司る。例えば、シャッター13の開閉を行ったり、センサ14で検知したカード位置を通知したりするためのコマンドを送受信する。また、各種データをメモリ間で転送する役割も果たす。また、CPU10は、メモリパリティチェック機能を有しており、CRC等の誤り検知符号を計算して、同一データか否かのチェックを行うことができる。   The CPU 10 governs overall control of the electronic device apparatus 1. For example, a command for opening / closing the shutter 13 or notifying the card position detected by the sensor 14 is transmitted / received. It also serves to transfer various data between memories. Further, the CPU 10 has a memory parity check function, and can calculate an error detection code such as a CRC to check whether the data is the same.

RAM11は、揮発性メモリの一例であって、CPU10がプログラムを実行するための作業領域を提供する。作業領域には、各種動作に必要な作業データが格納される。   The RAM 11 is an example of a volatile memory, and provides a work area for the CPU 10 to execute a program. Work data necessary for various operations is stored in the work area.

EEPROM12は、不揮発性メモリの一例であって、鍵データがセットされたかどうかのフラグ等の電子情報が格納される。その他の不揮発性メモリとして、フラッシュメモリでもよい。   The EEPROM 12 is an example of a nonvolatile memory, and stores electronic information such as a flag indicating whether or not key data has been set. Another nonvolatile memory may be a flash memory.

バックアップRAM15は、不正行為を検知したらデータを消失するものであり、機密データ、誤り検知符号(CRC,チェックSUM,BCC等)を格納する。図2に示すように、鍵データ及び誤り検知符号としてのCRCとによってデータが構成される。16バイト単位の書き込みができるバックアップRAM15に8バイトの鍵データを格納するケースの場合、鍵データは8バイト分、最終2バイト分のブロックはCRC値が格納される。   The backup RAM 15 loses data when an illegal act is detected, and stores confidential data and error detection codes (CRC, check SUM, BCC, etc.). As shown in FIG. 2, the data is composed of key data and CRC as an error detection code. In the case of storing 8-byte key data in the backup RAM 15 capable of writing in units of 16 bytes, the CRC value is stored in the block of key data for 8 bytes and the last 2 bytes.

バッテリー16は、バックアップ電源として、電源制御手段18を介してバックアップRAM15に電力を供給する。また、電源17も、電源制御手段18を介してバックアップRAM15に電力を供給したり、各種接続されている手段・機器に電力を供給する。   The battery 16 supplies power to the backup RAM 15 via the power control means 18 as a backup power source. The power supply 17 also supplies power to the backup RAM 15 via the power supply control means 18 and supplies power to various connected means / devices.

電源制御手段18は、電子機器装置1の通電時にはバッテリー16又は電源17からバックアップRAM15に電力を供給し、電子機器装置1の非通電時にはバッテリー16からバックアップRAM15に電力を供給する制御を行うもので、さらに、不正検知手段19によって不正行為を検知した場合には、バックアップRAM15に電力を供給せずに、電力を遮断する制御を行うものである。   The power supply control means 18 controls to supply power from the battery 16 or the power supply 17 to the backup RAM 15 when the electronic device 1 is energized, and to supply power from the battery 16 to the backup RAM 15 when the electronic device 1 is not energized. Furthermore, when the fraud detection is detected by the fraud detection means 19, the power is cut off without supplying power to the backup RAM 15.

不正検知手段19は、ターミナルから電子機器装置が取り外されるのを検知したり、カバーが開放されたりした場合などの不正行為を検知する回路である。   The fraud detection means 19 is a circuit that detects fraud such as when the electronic device is removed from the terminal or when the cover is opened.

[メモリ監視]
図3は、電子機器装置1にて実行されるメモリ監視処理ルーチンを示すフローチャートである。
[Memory monitoring]
FIG. 3 is a flowchart showing a memory monitoring process routine executed by the electronic device 1.

まず、上位装置から鍵データ登録コマンドを受信して(ステップS1)、鍵データを登録する作業を開始する。CPU10は、上記装置から受信した鍵データのCRC値を計算して(ステップS2)、受信した鍵データをバックアップRAM15に(ステップS3)、計算したCRC値をバックアップRAM15に(ステップS4)、それぞれ書き込んで格納する。   First, a key data registration command is received from the host device (step S1), and an operation for registering key data is started. The CPU 10 calculates the CRC value of the key data received from the device (step S2), writes the received key data to the backup RAM 15 (step S3), and writes the calculated CRC value to the backup RAM 15 (step S4). Store with.

次に、計算したCRC値をRAM11に格納して保持する(ステップS5)。なお、CPU10によって計算したCRC値がRAM11に格納されている場合には、ステップS5を省略することができる。   Next, the calculated CRC value is stored and held in the RAM 11 (step S5). If the CRC value calculated by the CPU 10 is stored in the RAM 11, step S5 can be omitted.

次に、鍵データ格納済みフラグをEEPROM12にセットして(ステップS6)、メモリ監視が開始される。   Next, a key data stored flag is set in the EEPROM 12 (step S6), and memory monitoring is started.

監視工程では、バックアップRAM15に格納されている鍵データを常時ブロック単位ごとにCRC計算をし(ステップS7)、ステップS5においてRAM11に格納したCRC値と、ステップS7においてCRC計算をしたものとをCPU10にて比較する(ステップS8)。   In the monitoring process, the key data stored in the backup RAM 15 is always CRC-calculated for each block (step S7), and the CPU 10 stores the CRC value stored in the RAM 11 in step S5 and the CRC calculated in step S7. (Step S8).

比較の結果、CRC値が一致しないと判断すれば、セキュリティエラーのコマンドを上位装置に発する(ステップS9)。一方で、CRC値が一致すると判断すれば、ステップS10に処理を移す。なお、セキュリティエラーのコマンドを発するのは、バックアップRAM15の鍵データ格納エリア内の鍵データが不正行為によって消失したと判断した場合である。   If it is determined that the CRC values do not match as a result of the comparison, a security error command is issued to the host device (step S9). On the other hand, if it is determined that the CRC values match, the process proceeds to step S10. Note that the security error command is issued when it is determined that the key data in the key data storage area of the backup RAM 15 has been lost due to fraud.

ステップS10では、他の監視タスクが実行され、順次ステップS7に処理を戻して、CRC値の監視がされる。   In step S10, another monitoring task is executed, and the process is sequentially returned to step S7 to monitor the CRC value.

[電源投入時のメモリ監視]
図4は、電子機器装置1にて実行される電源投入時のメモリ監視処理ルーチンを示すフローチャートである。
[Memory monitoring at power-on]
FIG. 4 is a flowchart showing a memory monitoring processing routine at power-on that is executed in the electronic device 1.

電源を投入して電子機器装置を立ち上げると(ステップS11)、初期化処理の中でEEPROM12の鍵データ格納済みフラグをチェックする(ステップS12)。これは、鍵データがバックアップRAM15にセット済みか否かをチェックするもので、フラグが立っていたら、処理をステップS15に移す。一方、フラグが立っていなかったら、鍵データがバックアップRAM15に1つもセットされていないことから、監視処理は行わずに(ステップS14)、その他の監視タスクのみを実行する通常動作に移る。   When the power is turned on and the electronic device is started up (step S11), the key data stored flag of the EEPROM 12 is checked during the initialization process (step S12). This is to check whether or not the key data has been set in the backup RAM 15. If the flag is set, the process proceeds to step S15. On the other hand, if no flag is set, no key data is set in the backup RAM 15, and therefore, the monitoring process is not performed (step S14), and the normal operation for executing only other monitoring tasks is started.

ステップS13において鍵データ格納済みフラグが立っていると判断したら、バックアップRAM15に格納されているCRC値をRAM11に格納して保持し(ステップS15)、メモリ監視が開始される。   If it is determined in step S13 that the key data stored flag is set, the CRC value stored in the backup RAM 15 is stored and held in the RAM 11 (step S15), and memory monitoring is started.

なお、メモリ監視の処理については前述したステップS7〜S10と同様である。   Note that the memory monitoring process is the same as steps S7 to S10 described above.

ここで、ステップS13において鍵データ格納済みフラグが立っていると判断したものの、バックアップRAM15に鍵データが格納されていない場合は、非通電時において何らかの不正行為を検知して、バックアップRAM15の内容が消失された可能性がある。   Here, if it is determined in step S13 that the key data stored flag is set, but the key data is not stored in the backup RAM 15, some fraud is detected when the power is off, and the contents of the backup RAM 15 It may have been lost.

この場合は、ステップS15におけるバックアップRAM15のCRC値と、ステップS8における計算したCRC値が異なるので、CRC計算結果をエラーとして、セキュリティエラーを発する(ステップS9)。
また、バックアップRAM15の鍵データ及びCRC値が格納されているブロックがall 0になってしまった場合は、ステップS15におけるバックアップRAM15のCRC値が0で、ステップS8における計算したCRC値も0となるので、CRC計算結果をエラーとして、セキュリティエラーを発する(ステップS9)。或いは、バックアップRAM15のデータがall 0であるとして、セキュリティエラーを発する。
In this case, since the CRC value of the backup RAM 15 in step S15 is different from the CRC value calculated in step S8, a security error is issued with the CRC calculation result as an error (step S9).
If the block storing the key data and CRC value of the backup RAM 15 becomes all 0, the CRC value of the backup RAM 15 in step S15 is 0, and the CRC value calculated in step S8 is also 0. Therefore, a security error is issued with the CRC calculation result as an error (step S9). Alternatively, a security error is issued assuming that the data in the backup RAM 15 is all 0.

[応用例]
本明細書では、誤り検知符号としてCRC値を用いて説明したが、チェックSUMやBCCを用いてもよいし、CRCとチェックSUMとBCCの併用であってもよい。併用する場合には、16バイト単位の書き込みができるバックアップRAM15の場合、鍵データは8バイト分、チェックSUMを2バイト分、CRCを2バイト分、BCCを2バイト分など、記憶領域を分割して格納することができる。
[Application example]
In this specification, the CRC value is used as the error detection code, but a check SUM or BCC may be used, or a combination of CRC, check SUM, and BCC may be used. In the case of the combined use, in the case of the backup RAM 15 capable of writing in units of 16 bytes, the storage area is divided into 8 bytes for key data, 2 bytes for check SUM, 2 bytes for CRC, 2 bytes for BCC, etc. Can be stored.

また、誤り検知符号をバックアップRAM15に格納するのではなく、EEPROM12や別のバックアップメモリに格納することもできる。これにより、電源立ち上げ時に機密データが消失しているか否かのall 0チェックが不要となる。   In addition, the error detection code can be stored not in the backup RAM 15 but in the EEPROM 12 or another backup memory. This eliminates the need for an all 0 check as to whether confidential data has been lost when the power is turned on.

または、誤り検知符号をバックアップRAM15に格納すると共に、EEPROM12や別のバックアップメモリに格納することもできる。これにより、バックアップRAM15とEEPROM12や別のバックアップメモリとの双方の誤り検知符号の値を常時比較するだけで異常か否かの検知ができ、処理速度の向上につながる。   Alternatively, the error detection code can be stored in the backup RAM 15 and also stored in the EEPROM 12 or another backup memory. As a result, it is possible to detect whether or not there is an abnormality simply by always comparing the error detection code values of both the backup RAM 15 and the EEPROM 12 or another backup memory, leading to an improvement in processing speed.

本発明に係るメモリ監視方法は、簡易な処理で電子機器装置の不正行為を見分けることができるものとして有用である。   The memory monitoring method according to the present invention is useful as a method capable of recognizing fraudulent behavior of an electronic device apparatus by simple processing.

本発明の実施の形態に係るメモリ監視方法にて使用する電子機器装置のブロック図である。It is a block diagram of the electronic device apparatus used with the memory monitoring method which concerns on embodiment of this invention. データ構造の一例を示す図である。It is a figure which shows an example of a data structure. 電子機器装置にて実行されるメモリ監視処理ルーチンを示すフローチャートである。It is a flowchart which shows the memory monitoring process routine performed with an electronic device apparatus. 電子機器装置にて実行される電源投入時のメモリ監視処理ルーチンを示すフローチャートである。It is a flowchart which shows the memory monitoring process routine at the time of power activation performed with an electronic device apparatus.

符号の説明Explanation of symbols

1 電子機器装置
10 CPU
11 RAM
12 EEPROM
15 バックアップRAM(不揮発性メモリ)
16 バッテリー
17 電源
18 電源制御手段
19 不正検知手段
1 Electronic device 10 CPU
11 RAM
12 EEPROM
15 Backup RAM (nonvolatile memory)
16 Battery 17 Power supply 18 Power supply control means 19 Fraud detection means

Claims (3)

電子機器装置において取り扱われる機密データ及び誤り検知符号を格納するメモリを監視するメモリ監視方法であって、
電子機器装置には、前記機密データ及び誤り検知符号が格納されたメモリと、電子機器装置の各種動作に必要な作業データが格納される作業メモリと、が備えられ、
電子機器装置の電源立ち上げ時に、前記メモリ内に格納されている前記誤り検知符号を、前記作業メモリに格納する格納工程と、
前記作業メモリへ格納後、前記メモリに格納されている機密データの誤り検知符号の計算をする計算工程と、
前記計算をした誤り検知符号と前記作業メモリに格納された誤り検知符号とを比較する比較工程と、を有し、
前記計算工程以降を繰り返して、これら2つの誤り検知符号が異なる場合に、電子機器装置の上位装置に異常であることを通知する工程を備えたことを特徴とするメモリ監視方法。
A memory monitoring method for monitoring a memory storing confidential data and an error detection code handled in an electronic device,
The electronic device device includes a memory in which the confidential data and the error detection code are stored, and a work memory in which work data necessary for various operations of the electronic device device is stored.
A storage step of storing the error detection code stored in the memory in the working memory when powering on the electronic device;
A calculation step of calculating an error detection code of confidential data stored in the memory after being stored in the working memory;
Anda comparison step for comparing the error detection code stored in the error detection code to the working memory in which the above calculation,
A memory monitoring method comprising: a step of notifying the host device of an electronic device device of an abnormality when the two error detection codes are different by repeating the calculation step and thereafter .
前記メモリは、バックアップ電源からの電力が供給されることで格納されている内容を保持する揮発性メモリであり、非通電時においても前記機密データ及び誤り検知符号を保持していることを特徴とする請求項1記載のメモリ監視方法。   The memory is a volatile memory that retains the stored content when power is supplied from a backup power source, and retains the confidential data and the error detection code even when the power is off. The memory monitoring method according to claim 1. 電子機器装置には、前記メモリに電源からの電力の供給を制御する電源制御手段が備えられ、
前記電源制御手段は、電子機器装置の不正行為を検知した場合に、前記メモリへの電力の供給を遮断することを特徴とする請求項1又は2記載のメモリ監視方法。
The electronic device apparatus is provided with power control means for controlling the power supply from the power source to the memory,
3. The memory monitoring method according to claim 1, wherein the power control unit cuts off the supply of power to the memory when detecting an illegal act of the electronic device. 4.
JP2008005001A 2008-01-11 2008-01-11 Memory monitoring method Expired - Fee Related JP5011512B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008005001A JP5011512B2 (en) 2008-01-11 2008-01-11 Memory monitoring method
PCT/JP2009/000061 WO2009087970A1 (en) 2008-01-11 2009-01-09 Memory monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008005001A JP5011512B2 (en) 2008-01-11 2008-01-11 Memory monitoring method

Publications (2)

Publication Number Publication Date
JP2009169550A JP2009169550A (en) 2009-07-30
JP5011512B2 true JP5011512B2 (en) 2012-08-29

Family

ID=40853084

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008005001A Expired - Fee Related JP5011512B2 (en) 2008-01-11 2008-01-11 Memory monitoring method

Country Status (2)

Country Link
JP (1) JP5011512B2 (en)
WO (1) WO2009087970A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5822123B2 (en) * 2011-10-04 2015-11-24 大日本印刷株式会社 Security token, data update method, and computer program
JP6075878B2 (en) * 2013-11-12 2017-02-08 ニチコン株式会社 Power converter used by connecting to an electric vehicle

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH035856A (en) * 1989-06-01 1991-01-11 Nec Software Ltd Monitoring system for memory content holding function
JPH03135643A (en) * 1989-10-20 1991-06-10 Mita Ind Co Ltd Lifetime detecting method for rewritable nonvolatile memory
JP2002091831A (en) * 2000-09-12 2002-03-29 Hitachi Ltd System and method for processing data
JP2005292959A (en) * 2004-03-31 2005-10-20 Toshiba Corp Nonvolatile memory module and nonvolatile memory system

Also Published As

Publication number Publication date
JP2009169550A (en) 2009-07-30
WO2009087970A1 (en) 2009-07-16

Similar Documents

Publication Publication Date Title
US8612800B2 (en) Computing device with recovery mode
CN102955921B (en) Electronic device and safe starting method
TWI522838B (en) Configuring a system
US20060129791A1 (en) Secure booting apparatus and method
JP5421679B2 (en) Detection method to detect fraud
JP5740646B2 (en) How to download software
JP5319830B2 (en) Data protection method and computer apparatus
JP2008276749A (en) Protection unit for programmable data processor
JP5011512B2 (en) Memory monitoring method
WO2007088605A1 (en) Component information restoring method, component information managing method and electronic apparatus
US20200233676A1 (en) Bios management device, bios management system, bios management method, and bios management program-stored recording medium
CN114007906B (en) Safety processing device
JP2002062956A (en) Service interruption processing method and service interruption processing device
CN111090541B (en) Data anti-lost method and device of controller, driving computer equipment and storage medium
JP4675980B2 (en) Fraud prevention method
US20060107133A1 (en) Tampering-protected microprocessor system and operating procedure for same
CN104573417A (en) UEFI (Unified Extensible Firmware Interface)-based software whole-process protection system and UEFI-based software whole-process protection method
US20130268934A1 (en) Dynamic method for controlling the integrity of the execution of an executable code
CN1210654C (en) Safety data storage equipment and method for preventing data lest in data transaction system
US20200380135A1 (en) Integrated circuit and control method of integrated circuit
CN111695164B (en) Electronic apparatus and control method thereof
KR101572854B1 (en) A PLC device with enhanced cyber security
JP2010026623A (en) Rewrite device of network system
JP2018055598A (en) Information processing apparatus and information processing method
CN103488945A (en) Authentication method and device for kernel in operation system of firewall

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120329

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

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

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

Free format text: PAYMENT UNTIL: 20150615

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5011512

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees