JP2010225009A - Real-time clock and method for setting security of electronic appliance - Google Patents

Real-time clock and method for setting security of electronic appliance Download PDF

Info

Publication number
JP2010225009A
JP2010225009A JP2009073198A JP2009073198A JP2010225009A JP 2010225009 A JP2010225009 A JP 2010225009A JP 2009073198 A JP2009073198 A JP 2009073198A JP 2009073198 A JP2009073198 A JP 2009073198A JP 2010225009 A JP2010225009 A JP 2010225009A
Authority
JP
Japan
Prior art keywords
access code
access
real
time
time clock
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
JP2009073198A
Other languages
Japanese (ja)
Other versions
JP5278813B2 (en
Inventor
Toru Shiratori
透 白鳥
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2009073198A priority Critical patent/JP5278813B2/en
Publication of JP2010225009A publication Critical patent/JP2010225009A/en
Application granted granted Critical
Publication of JP5278813B2 publication Critical patent/JP5278813B2/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 real-time clock with improved tamper resistance and high reliability of time information. <P>SOLUTION: The real-time clock includes: an OTP-ROM (One Time Programmable Read Only Memory) 12 for recording a unique access code; a clock register 28 for generating time information; a general-purpose memory 30 for storing at least time information; and an access control unit 14 for controlling an access to the general-purpose memory 30 from the outside on the basis of an access signal from the outside. The access control unit 14 compares a user access code included in the access signal with an access code recorded in the OTP-ROM 12, allows the access to the general-purpose memory 30 from the outside when they match each other, and prohibits the access when they do not match. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明はリアルタイムクロック、および電子機器のセキュリティ設定方法に係り、特に耐タンパー性の高いリアルタイムクロックおよびセキュリティ設定方法に関する。   The present invention relates to a real-time clock and a security setting method for an electronic device, and more particularly to a real-time clock and a security setting method with high tamper resistance.

リアルタイムクロックは、PC,各種携帯機器等の電子機器に搭載され、時刻情報を供給する装置として広く用いられている。このようなリアルタイムクロックとして、特許文献1に開示されているものを挙げることができる。具体的には、振動子が接続された発振回路と時刻情報を供給するための時計回路、及び電源供給部を備え、必要に応じてバックアップ用の電源手段を備えるというものである。   Real-time clocks are mounted on electronic devices such as PCs and various portable devices, and are widely used as devices for supplying time information. An example of such a real time clock is disclosed in Patent Document 1. Specifically, an oscillation circuit to which a vibrator is connected, a clock circuit for supplying time information, and a power supply unit are provided, and backup power supply means is provided as necessary.

特開2008−256574号公報JP 2008-256574 A

このような構成のリアルタイムクロックでは、時刻情報を供給するという目的は果たすことができるものの、一般的に用いられているデータ入出力方法により簡単に、時計回路等にアクセスすることができるといった問題があった。このため、例えばリアルタイムクロックの各端子に直接プローブピンを接触させて不正アクセスを行うことで、時計回路等に記録された時刻情報を改竄することが可能であり、耐タンパー性が低いとされてきた。なお、ここでいう耐タンパー性とは、リアルタイムクロック内部に記憶されたデータなどの読み出しや書換え等を行う際の解析の困難さのことを言う。   Although the real-time clock having such a configuration can fulfill the purpose of supplying time information, there is a problem that a clock circuit or the like can be easily accessed by a generally used data input / output method. there were. For this reason, for example, it is possible to tamper with time information recorded in a clock circuit or the like by making probe pins directly contact each terminal of a real-time clock to perform unauthorized access, and tamper resistance is low. It was. Here, the tamper resistance refers to the difficulty of analysis when reading or rewriting data stored in the real-time clock.

このような問題から、時刻情報に信頼性が必要とされる用途、例えばレンタル機器の稼動時間計測や期限付き音楽・映像メディアのビューアー等にリアルタイムクロックを用いる場合には、安易に時刻情報の改竄が出来ないようにする手段が必要であるが、その対策はなされて来なかった。   Because of these problems, when using real-time clocks for applications where time information is required to be reliable, such as measuring the operating time of rental equipment or viewing time-limited music / video media, the time information can be easily altered. There is a need for a means to prevent this from happening, but no countermeasures have been taken.

そこで本発明では、耐タンパー性を向上させ、時刻情報の信頼性を高めたリアルタイムクロックを提供すること、およびこれを利用した電子機器のセキュリティ設定方法を提供することを目的とする。   Accordingly, an object of the present invention is to provide a real-time clock with improved tamper resistance and improved reliability of time information, and to provide a security setting method for an electronic device using the same.

本発明は上記課題の少なくとも一部を解決するためになされたものであり、以下の形態または適用例として実現することが可能である。
[適用例1]アクセスコードが記録されるワンタイムプログラマブルメモリと、時刻情報を生成し、前記時刻情報を保持する時計レジスタを有する計時部と、少なくとも前記時刻情報を記憶する記憶部と、外部からのアクセス信号に基づき、前記外部から前記記憶部へのアクセスを制御するアクセス制御部と、を備え、前記アクセス制御部は、前記アクセス信号に含まれるユーザーアクセスコードと、前記ワンタイムプログラマブルメモリに記録された前記アクセスコードとを比較し、一致した場合には前記外部から前記記憶部への前記アクセスを許可し、一致しなかった場合には前記アクセスを禁止することを特徴とするリアルタイムクロック。
このような特徴を有するリアルタイムクロックであれば、耐タンパー性の向上を図ることができ、時刻情報の信頼性を高めることができる。
SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms or application examples.
[Application Example 1] One-time programmable memory in which an access code is recorded, a timekeeping unit that has a clock register that generates time information and holds the time information, a storage unit that stores at least the time information, and an external device An access control unit that controls access to the storage unit from the outside based on the access signal of the user, and the access control unit records the user access code included in the access signal and the one-time programmable memory A real-time clock characterized in that the access code is compared with the access code, the access from the outside to the storage unit is permitted if they match, and the access is prohibited if they do not match.
With a real-time clock having such characteristics, tamper resistance can be improved and the reliability of time information can be improved.

[適用例2]適用例1に記載のリアルタイムクロックであって、前記ワンタイムプログラマブルメモリに記録される前記アクセスコードは、リード用アクセスコードおよびライト用アクセスコードを含んでいることを特徴とするリアルタイムクロック。   Application Example 2 The real-time clock according to Application Example 1, wherein the access code recorded in the one-time programmable memory includes a read access code and a write access code. clock.

このような特徴を有するリアルタイムクロックによれば、アクセスコードが2種類となるため、1種類のアクセスコードによりタンパー性を保持するよりも、耐タンパー性を向上させることができる。   According to the real-time clock having such a feature, since there are two types of access codes, the tamper resistance can be improved as compared with the case where tampering is maintained with one type of access code.

[適用例3]適用例1または適用例2に記載のリアルタイムクロックであって、前記ワンタイムプログラマブルメモリに対しての前記アクセスコードの書き込みの可否を判定するOTP−メモリアクセス制御部を備えたことを特徴とするリアルタイムクロック。   [Application Example 3] The real-time clock according to Application Example 1 or Application Example 2, including an OTP-memory access control unit that determines whether the access code can be written to the one-time programmable memory. Real-time clock characterized by

このような特徴を有するリアルタイムクロックによれば、ワンタイムプログラマブルメモリへアクセスコードの書き込みについても制御することができる。このため、不要意な書き込みを防ぐことができるとともに、ワンタイムプログラマブルメモリに記録されたアクセスコードが他人に把握される可能性を低減することができる。   According to the real-time clock having such characteristics, it is possible to control the writing of the access code to the one-time programmable memory. For this reason, unnecessary writing can be prevented, and the possibility that an access code recorded in the one-time programmable memory is recognized by another person can be reduced.

[適用例4]実装基板を備えた電子機器のセキュリティ設定方法であって、適用例1乃至適用例3のいずれかに記載のリアルタイムクロックを実装基板に実装する実装ステップと、実装した前記リアルタイムクロックのワンタイムプログラマブルメモリにアクセスコードの書き込みを行う書き込みステップと、を有することを特徴とする電子機器のセキュリティ設定方法。
このような特徴を有することにより、アクセスコードが他人に知られる可能性を極めて低くすることができる。
[Application Example 4] A security setting method for an electronic device including a mounting board, the mounting step of mounting the real-time clock according to any one of Application Examples 1 to 3 on the mounting board, and the mounted real-time clock. And a writing step of writing an access code to the one-time programmable memory.
By having such a feature, the possibility that the access code is known to others can be extremely reduced.

[適用例5]適用例4に記載の電子機器のセキュリティ設定方法であって、前記電子機器は演算処理装置を備え、前記書き込みステップは、前記アクセスコードを前記演算処理装置によって生成し、生成された前記アクセスコードを前記ワンタイムプログラマブルメモリに書き込むことを特徴とする電子機器のセキュリティ設定方法。
このような特徴を有することにより、ユーザーの個人情報等に基づいてアクセスコードが推測されることが無くなる。このため、他人による不正アクセスの可能性を低減することができる。
Application Example 5 In the electronic device security setting method according to Application Example 4, the electronic device includes an arithmetic processing device, and the writing step is generated by generating the access code by the arithmetic processing device. And writing the access code to the one-time programmable memory.
By having such a feature, an access code is not guessed based on the user's personal information or the like. For this reason, the possibility of unauthorized access by others can be reduced.

第1の実施形態に係るリアルタイムクロックである。2 is a real-time clock according to the first embodiment. 第1の実施形態に係る信号のやり取りの様子を示す図である。It is a figure which shows the mode of the exchange of the signal which concerns on 1st Embodiment. 第2の実施形態に係るリアルタイムクロックである。It is a real time clock concerning a 2nd embodiment. 第3の実施形態に係るリアルタイムクロックである。It is a real time clock concerning a 3rd embodiment. I2Cバスを利用した信号のやりとりを示す図である。It is a figure which shows the exchange of the signal using an I2C bus. 第4の実施形態に係るリアルタイムクロックである。It is a real time clock concerning a 4th embodiment.

以下、本発明のリアルタイムクロックおよび電子機器のセキュリティ設定方法に係る実施の形態について、図面を参照しつつ詳細に説明する。
本実施形態に係るリアルタイムクロック10は、発振器32と計時部26、ワンタイムプログラマブルリードオンリーメモリ(以下単に、OTP−ROMと称す)12、アクセス制御部14、データバッファ24、およびSPIインターフェース22とを基本として構成される。
DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments according to a real-time clock and a security setting method for an electronic device according to the present invention will be described in detail with reference to the drawings.
The real-time clock 10 according to the present embodiment includes an oscillator 32, a clock unit 26, a one-time programmable read-only memory (hereinafter simply referred to as OTP-ROM) 12, an access control unit 14, a data buffer 24, and an SPI interface 22. Configured as a base.

発振器32は、水晶振動子36と発振回路34とを有する。水晶振動子36は、発振回路34を介して電気信号が入力されることにより所定の周波数で振動するよう構成されている。詳細を後述する計時部26と発振器32との間には分周回路が設けられ、発振回路34は、水晶振動子36から出力された信号を増幅して分周回路38へと出力する。また、分周回路38は、発振器32から出力された信号を分周して1[Hz]の1秒信号や、1[Hz]の1/1000秒信号等を生成し、後段の計時部26へと信号を出力する。なお、本実施形態では発振器32を構成する振動子を水晶振動子36としたが、振動子の形態を他のものとした場合であっても、本発明を実施する上で問題は無い。   The oscillator 32 includes a crystal resonator 36 and an oscillation circuit 34. The crystal resonator 36 is configured to vibrate at a predetermined frequency when an electric signal is input via the oscillation circuit 34. A frequency dividing circuit is provided between the time measuring unit 26 and the oscillator 32, which will be described in detail later, and the oscillation circuit 34 amplifies the signal output from the crystal resonator 36 and outputs the amplified signal to the frequency dividing circuit 38. The frequency dividing circuit 38 divides the signal output from the oscillator 32 to generate a 1 second signal of 1 [Hz], a 1/1000 second signal of 1 [Hz], and the like. Output a signal. In the present embodiment, the vibrator constituting the oscillator 32 is the crystal vibrator 36, but there is no problem in carrying out the present invention even if the vibrator is in another form.

計時部26は、時計レジスタ28と、記憶部としての汎用のメモリである汎用メモリ30を備える。汎用メモリ30は、例えばRAM(Random Access Memory)または不揮発性のメモリであるEEPROM(Electrically Erasable Programmable ROM)で構成することができる。計時部26は、分周回路38から出力された1秒信号等を利用して年、月、日、時、分、秒、曜、世紀等の時刻情報を生成する。生成された時刻情報は、時計レジスタ28が保持する。汎用メモリ30は、時計レジスタ28が保持する時刻情報を記憶し、更新情報に従って書換えを行う他、必要に応じて時刻情報以外のデータも記憶する。   The timer unit 26 includes a clock register 28 and a general-purpose memory 30 that is a general-purpose memory as a storage unit. The general-purpose memory 30 can be composed of, for example, a RAM (Random Access Memory) or an EEPROM (Electrically Erasable Programmable ROM) which is a nonvolatile memory. The timer unit 26 generates time information such as year, month, day, hour, minute, second, day of the week, century, etc. by using the 1 second signal output from the frequency dividing circuit 38. The generated time information is held in the clock register 28. The general-purpose memory 30 stores time information held by the clock register 28, rewrites according to the update information, and stores data other than the time information as necessary.

OTP−ROM12は、1回だけ書き込みが可能な不揮発性のメモリである。OTP−ROM12は、例えばヒューズROMで構成することができる。書き込まれるデータとしては、上述した時計レジスタ28が保持しているデータ(汎用メモリ30に記憶されたデータ)を読み出し、あるいは書き換えするために必要となる専用のアクセスコードを挙げることができる。アクセスコードの記憶領域としては例えば、X番地にリード用アクセスコード、Z番地にライト用アクセスコードとして定められる。   The OTP-ROM 12 is a nonvolatile memory that can be written only once. The OTP-ROM 12 can be composed of, for example, a fuse ROM. As the data to be written, a dedicated access code necessary for reading or rewriting data held in the clock register 28 (data stored in the general-purpose memory 30) can be used. For example, the access code storage area is defined as a read access code at address X and a write access code at address Z.

アクセス制御部14は、OTP−メモリアクセスコード比較器16と、リード用アクセスコード比較器18、及びライト用アクセスコード比較器20とを有する。OTP−メモリアクセスコード比較器16には、OTP−ROM12に対してリード用アクセスコード、あるいはライト用アクセスコードを書き込むために必要なアクセスコード(以下、ROMアクセスコードと称す)が記録されており、詳細を後述するSPIインターフェース22を介して入力されたROMアクセスコードと、前記記録されているROMアクセスコードとを比較して、両者が一致した場合にはアクセス(読み出しアクセスまたは書き込みアクセス)を適正とみなしてOTP−ROM12へのアクセスを許可し、一致しなかった場合にはアクセスを不正とみなしてOTP−ROM12へのアクセスを拒否する。   The access control unit 14 includes an OTP-memory access code comparator 16, a read access code comparator 18, and a write access code comparator 20. The OTP-memory access code comparator 16 stores an access code (hereinafter referred to as a ROM access code) necessary for writing a read access code or a write access code to the OTP-ROM 12, The ROM access code input via the SPI interface 22 to be described in detail later is compared with the recorded ROM access code. If the two match, the access (read access or write access) is appropriate. Therefore, access to the OTP-ROM 12 is permitted, and if they do not match, the access is regarded as illegal and access to the OTP-ROM 12 is rejected.

また、リード用アクセスコード比較器18は、OTP−ROM12に書き込まれたリード用アクセスコードと、SPIインターフェース22を介して入力されたユーザーアクセスコードとしてのリード用アクセスコードとを比較し、計時部26に記憶されたデータを詳細を後述するデータバッファ24へ読み出すことの適否を判定する。具体的には、SPIインターフェース22を介して入力されたリード用アクセスコードが、OTP−ROM12に記憶されたリード用アクセスコードと一致した場合にアクセスを適正とみなし、一致しなかった場合にはアクセスを不正とみなす。そして、アクセスが適正とみなされた場合には、計時部26に記憶されたデータが読み出され、データバッファ24に一次記憶され、一次記憶されたデータがSPIインターフェース22を介して出力される。なお、アクセスが不正とみなされた場合には、データの読み出しが拒否される。   Further, the read access code comparator 18 compares the read access code written in the OTP-ROM 12 with the read access code as the user access code input via the SPI interface 22, and the time measuring unit 26. It is determined whether or not it is appropriate to read the data stored in the data buffer 24 to be described later in detail. Specifically, when the read access code input via the SPI interface 22 matches the read access code stored in the OTP-ROM 12, the access is regarded as appropriate, and when the read access code does not match, the access is accessed. Is considered illegal. If the access is deemed appropriate, the data stored in the timer unit 26 is read out, temporarily stored in the data buffer 24, and the temporarily stored data is output via the SPI interface 22. If the access is deemed illegal, data reading is rejected.

また、ライト用アクセスコード比較器20は、OTP−ROM12に書き込まれたライト用アクセスコードと、SPIインターフェース22を介して入力されたユーザーアクセスコードとしてのライト用アクセスコードとを比較し、データバッファ24に一次記憶されたデータを計時部26へ書き込むことの適否を判定する。具体的には、SPIインターフェース22を介して入力されたライト用アクセスコードが、OTP−ROM12に記憶されたライト用アクセスコードと一致した場合には、アクセスを適正とみなし、一致しなかった場合にはアクセスを不正とみなす。そして、アクセスが適正とみなされた場合には、データバッファ22に一次記憶されたデータを計時部26に書き込む。なお、アクセスが不正とみなされた場合には、データの書き込みが拒否される。   The write access code comparator 20 compares the write access code written in the OTP-ROM 12 with the write access code as the user access code input via the SPI interface 22, and the data buffer 24. It is determined whether or not it is appropriate to write the data temporarily stored in the timing unit 26. Specifically, when the write access code input via the SPI interface 22 matches the write access code stored in the OTP-ROM 12, the access is regarded as appropriate, and the access code is not matched. Considers access illegal. If the access is deemed appropriate, the data temporarily stored in the data buffer 22 is written into the time measuring unit 26. If the access is deemed illegal, data writing is rejected.

SPIインターフェース22は、シリアル伝送による読み書きを行うことで、信号線を大幅に削減したインターフェースである。SPIインターフェース22に設けられた4つの信号ポートのうち、CEはチップイネーブル信号ポート、CLKはクロック信号ポート、DATA−INは入力データポート、DATA−OUTは出力データポートを示す。   The SPI interface 22 is an interface in which signal lines are greatly reduced by performing reading and writing by serial transmission. Of the four signal ports provided in the SPI interface 22, CE is a chip enable signal port, CLK is a clock signal port, DATA-IN is an input data port, and DATA-OUT is an output data port.

このような構成のリアルタイムクロック10は、システムのコントロールを司るCPU(演算処理装置)40と接続されている。そして、CPU40は、上述したリード用アクセスコードやライト用アクセスコードといったユーザーアクセスコードを書き込む際、任意に生成するようにしても良い。
上記のような構成のリアルタイムクロック10は、電子機器等の実装基板に実装されて用いられる。
The real-time clock 10 having such a configuration is connected to a CPU (arithmetic processing unit) 40 that controls the system. The CPU 40 may arbitrarily generate a user access code such as the above-described read access code or write access code.
The real-time clock 10 having the above configuration is used by being mounted on a mounting board such as an electronic device.

実装基板に実装されたリアルタイムクロック10は、SPIインターフェースを介した電子機器のCPU40からの入力により、OTP−ROM12に対するリード用アクセスコード及びライト用アクセスコードの書き込みが成される。   The real-time clock 10 mounted on the mounting board is written with a read access code and a write access code to the OTP-ROM 12 by an input from the CPU 40 of the electronic device via the SPI interface.

この際、CPU40からはまず、OTP−ROM12に対する書き込みを許可するためのROMアクセスコードが入力される。入力されたROMアクセスコードは、OTP−メモリアクセスコード比較器16によりその適否を判定される。入力されたROMアクセスコードとOTP−メモリアクセスコード比較器16に記録されたROMアクセスコードとが一致した場合には、OTP−ROM12に対するアクセスが許可され、一致しなかった場合には、アクセスが禁止される。   At this time, the CPU 40 first inputs a ROM access code for permitting writing to the OTP-ROM 12. The input ROM access code is judged by the OTP-memory access code comparator 16 as to its suitability. When the input ROM access code and the ROM access code recorded in the OTP-memory access code comparator 16 match, access to the OTP-ROM 12 is permitted, and when they do not match, access is prohibited. Is done.

OTP−メモリアクセスコード比較器16によりROMアクセスコードが認証された場合、SPIインターフェース22を介してCPU40から入力された書き込みデータ、すなわち計時部26内のデータを読み出すためのリード用アクセスコードと、計時部26内のデータを書き換えるためのライト用アクセスコードがOTP−ROM12に書き込まれる。   When the ROM access code is authenticated by the OTP-memory access code comparator 16, the read access code for reading out the write data input from the CPU 40 via the SPI interface 22, that is, the data in the timer unit 26, and the time count A write access code for rewriting data in the unit 26 is written in the OTP-ROM 12.

リード用アクセスコードやライト用アクセスコードは、計時部26に記録されたデータを読み出したり、書き換えたりするために用いられるアクセスコードであり、リード用アクセスコード比較器18やライト用アクセスコード比較器20により比較判定され、各行為のためのアクセスの適否が下される。このため、リード用アクセスコードやライト用アクセスコードがユニークな値としてOTP−ROM12に記録されることで、計時部26に記録されたデータ(具体的には計時部26内部の汎用メモリ30に記録されたデータ)へのアクセスの困難性が増し、耐タンパー性が向上することとなる。なお、OTP−ROM12へのアクセスについて、書き込み用のアクセスコードは広くユーザーに公開しても良いが、読み出し用のアクセスコードについては、非公開、あるいは読み出しを禁止するといった取り決めを行う必要がある。OTP−ROM12へアクセスし、記憶させたリード用アクセスコードやライト用アクセスコードが読み出されてしまっては、タンパー性能が保持されなくなってしまうからである。   The read access code and the write access code are access codes used to read or rewrite data recorded in the time measuring unit 26. The read access code comparator 18 and the write access code comparator 20 Are compared to determine whether access is appropriate for each action. For this reason, the read access code and the write access code are recorded in the OTP-ROM 12 as unique values, so that the data recorded in the timer unit 26 (specifically, recorded in the general-purpose memory 30 in the timer unit 26). The tamper resistance is improved. As for access to the OTP-ROM 12, the access code for writing may be widely disclosed to the user, but it is necessary to make an agreement that the access code for reading is not disclosed or reading is prohibited. This is because if the OTP-ROM 12 is accessed and the stored read access code or write access code is read, the tamper performance cannot be maintained.

計時部26に対するデータの書き込みや、計時部26のデータの読み出しは、データバッファ24を介して成される。すなわち、データの書き込みの場合、SPIインターフェース22を介して入力されたライト用アクセスコードがライト用アクセスコード比較器20により認証されると、データバッファ24に入力されたデータが、指定されたアドレスのレジスタや汎用メモリ30に書き込まれる。また、データの読み出しの場合、SPIインターフェース22を介して入力されたリード用アクセスコードがリード用アクセスコード比較器18により認証されると、指定されたアドレスのデータがデータバッファ24に読み出され、読み出されたデータは、SPIインターフェース22を介してCPU40側へ出力される。   Data writing to the time measuring unit 26 and data reading from the time measuring unit 26 are performed via the data buffer 24. That is, in the case of data writing, when the write access code input via the SPI interface 22 is authenticated by the write access code comparator 20, the data input to the data buffer 24 is stored at the specified address. It is written in a register or general-purpose memory 30. In the case of data reading, when the read access code input via the SPI interface 22 is authenticated by the read access code comparator 18, the data at the designated address is read to the data buffer 24. The read data is output to the CPU 40 side via the SPI interface 22.

本実施形態では例えば、入力信号の最初の4ビットでモードの設定、すなわちリードであるかライトであるかの選択設定を行い、続く4ビットで読み出し、あるいは書き込みを行う汎用メモリ30上のアドレスを指定する。そしてその後は8ビット単位で読み出しデータ、あるいは書き込みデータが入出力されることとなる。なお、読み出しや書き込みを連続して行う場合には、アドレスの指定をオートインクリメントとすると良い。そして、循環時において、アドレスの「F」の後は「0」となる。   In the present embodiment, for example, the mode setting is performed with the first 4 bits of the input signal, that is, the selection is set to read or write, and the address on the general-purpose memory 30 to be read or written with the subsequent 4 bits specify. After that, read data or write data is input / output in units of 8 bits. Note that when reading and writing are continuously performed, the address designation may be set to auto increment. During circulation, the address “F” is followed by “0”.

本実施形態ではこの、モードの設定コードをリード用アクセスコード、またはライト用アクセスコードとしてOTP−ROM12に記録する。
図2(A)に、データ書き込み時における入出力信号を示し、図2(B)に、データ読み出し時における入出力信号を示す。なお、図2には二進数表記で、ライト用アクセスコードを「0001」、リード用アクセスコードを「1001」と定めた場合の例を示す。
In this embodiment, the mode setting code is recorded in the OTP-ROM 12 as a read access code or a write access code.
FIG. 2A shows input / output signals at the time of data writing, and FIG. 2B shows input / output signals at the time of data reading. FIG. 2 shows an example in which the write access code is “0001” and the read access code is “1001” in binary notation.

図2からは、書き込み時も読み出し時も、CEを「Hi」にした状態、すなわちCEポートに所定の電圧を掛けた状態にした後、モード(Mode)コード、すなわちアクセスコードの入力を行っていることを読み取ることができる。   From FIG. 2, the CE is set to “Hi” at the time of writing and reading, that is, after a predetermined voltage is applied to the CE port, a mode code, that is, an access code is input. I can read that.

なお、図2では、アドレス、データの信号については0、1(Low、Hi)を明示していないが、図2(A)の例は、汎用メモリ30におけるアドレスNにデータNを書き込む場合の例であり、図2(B)の例は汎用メモリ30におけるアドレスNに記録されたNというデータを読み出す場合の例である。なお、図2中、Hi−Z(ハイ・インピーダンス)は、回路の出力が電気的に接続されていないような状態、すなわち電気信号が無い状態を意味する。   In FIG. 2, 0 and 1 (Low, Hi) are not clearly shown for the address and data signals, but the example of FIG. 2A shows a case where the data N is written to the address N in the general-purpose memory 30. The example of FIG. 2B is an example in the case of reading data N recorded at the address N in the general-purpose memory 30. In FIG. 2, Hi-Z (high impedance) means a state where the output of the circuit is not electrically connected, that is, a state where there is no electrical signal.

次に、本発明のリアルタイムクロックに係る第2の実施形態について、図3を参照して説明する。なお、本実施形態に係るリアルタイムクロックの殆どの構成は、図1に示した第1の実施形態に係るリアルタイムクロック10と同様である。よって、その機能を同一とする箇所には、図面に100を足した符号を付して、詳細な説明は省略することとする。   Next, a second embodiment according to the real-time clock of the present invention will be described with reference to FIG. Note that most of the configuration of the real-time clock according to the present embodiment is the same as that of the real-time clock 10 according to the first embodiment shown in FIG. Therefore, portions having the same function are denoted by reference numerals obtained by adding 100 to the drawings, and detailed description thereof will be omitted.

本実施形態では、アクセスコード比較エラーカウンタ142を備えるようにしたことを特徴としている。そして、時計レジスタ128には、アクセスコード比較エラーカウンタ142がエラーを検出した際にエラー検出フラグを立てる項目を設けた。このエラー検出フラグは、例えばエラー無検出時に「0」、エラー検出時に「1」となる少なくとも1ビットの情報として、時計レジスタ128に保持することができる。   The present embodiment is characterized in that an access code comparison error counter 142 is provided. The clock register 128 is provided with an item for setting an error detection flag when the access code comparison error counter 142 detects an error. The error detection flag can be held in the clock register 128 as information of at least 1 bit that is “0” when no error is detected and “1” when an error is detected, for example.

このような構成とすることで、汎用メモリ130に対して不正なアクセスが試みられたか否かを認識することができるようになる。なお、その他の構成については、上述した第1の実施形態に係るリアルタイムクロック10と同様である。   With such a configuration, it is possible to recognize whether or not unauthorized access to the general-purpose memory 130 has been attempted. Other configurations are the same as those of the real-time clock 10 according to the first embodiment described above.

次に、本発明のリアルタイムクロックに係る第3の実施形態について、図4を参照して説明する。なお、本実施形態に係るリアルタイムクロックの殆どの構成は、図1に示した第1の実施形態に係るリアルタイムクロックと同様である。よって、その機能を同一とする箇所には、図面に200を足した符号を付して、詳細な説明は省略することとする。   Next, a third embodiment according to the real-time clock of the present invention will be described with reference to FIG. Note that most of the configuration of the real-time clock according to the present embodiment is the same as that of the real-time clock according to the first embodiment shown in FIG. Therefore, portions having the same function are denoted by reference numerals obtained by adding 200 to the drawings, and detailed description thereof will be omitted.

相違点としては、本実施形態に係るリアルタイムクロック110では、シリアルバスとしてIC(登録商標)を用いた点にある。このため、インターフェースとして、ICインターフェース222aを採用している。なお、IC(登録商標)の入出力ポートは、SCL(シリアルクロック)ポートと、SDA(シリアルデータ)ポートの2つとなる。 The difference is that the real-time clock 110 according to the present embodiment uses I 2 C (registered trademark) as a serial bus. For this reason, the I 2 C interface 222a is adopted as the interface. Note that there are two I 2 C (registered trademark) input / output ports: an SCL (serial clock) port and an SDA (serial data) port.

また、本実施形態では、時計レジスタ228に接続されたタイマー回路244や、アラーム回路246を設けている。タイマー回路244、アラーム回路246の各出力信号は、CPU240などの制御部に対する割り込み信号とされる。   In this embodiment, a timer circuit 244 connected to the clock register 228 and an alarm circuit 246 are provided. Each output signal of the timer circuit 244 and the alarm circuit 246 is used as an interrupt signal for a control unit such as the CPU 240.

タイマー回路244やアラーム回路246にはそれぞれ時刻設定機能を持たせ、時計レジスタ228からの時刻信号が入力される。そして、入力された信号が設定された時刻と一致することで、信号を出力する。
このような機能を持たせることで、CPU240が暴走した場合などに、割り込み信号を出力し、暴走を停止させることが可能となる。
Each of the timer circuit 244 and the alarm circuit 246 has a time setting function, and a time signal from the clock register 228 is input. Then, when the input signal coincides with the set time, the signal is output.
By providing such a function, when the CPU 240 runs away, an interrupt signal can be output to stop the runaway.

I2Cインターフェース222aには、通常のロジックデバイスが有するチップセレクト用のポート(第1、第2実施形態でいうCE)が存在しない。このため、I2Cバスを用いたデバイスでは、IC(不図示)内部に機種毎のユニークなデバイスナンバーが記憶されており、通信開始時にデバイスナンバーをI2Cバスによりスレーブアドレスとして送信することで、チップセレクトを行うこととなる。そして受信デバイスは、入力されたスレーブアドレスが一致した場合にのみ、その後の通信に反応することとなる。   The I2C interface 222a does not have a chip select port (CE in the first and second embodiments) of a normal logic device. For this reason, in a device using the I2C bus, a unique device number for each model is stored in an IC (not shown), and by transmitting the device number as a slave address via the I2C bus at the start of communication, chip select Will be performed. The receiving device responds to subsequent communication only when the input slave addresses match.

なお、I2Cインターフェース222aを用いたデータの読み出し、書き出しは、以下の手順に従ってなされる(図5参照)。
まず、CPU240がデータ通信の開始条件を送出する(1)。次に、CPU240がリアルタイムクロック210のスレーブアドレス、及びリードまたはライトを定めるためのコードを送出する(2)。その後、CPU240はリアルタイムクロック210からのアクノリッジを確認する(3)。ここでアクノリッジとは、確認応答を意味する。
Note that reading and writing of data using the I2C interface 222a is performed according to the following procedure (see FIG. 5).
First, the CPU 240 sends a data communication start condition (1). Next, the CPU 240 sends out a slave address of the real-time clock 210 and a code for determining read or write (2). Thereafter, the CPU 240 confirms the acknowledge from the real time clock 210 (3). Acknowledgment here means confirmation response.

アクノリッジを確認した後、CPU240はリアルタイムクロック210から読み出すデータのアドレスを送出し(4)、リアルタイムクロック210からのアクノリッジを確認する(5)。この後再びCPU240が開始条件を送出する(6)。次に、CPU240がリアルタイムクロック210のスレーブアドレスおよびリードまたはロードコードを読み出しモードで選択する(7)。RTC210がアクノリッジの確認を行う(8)。リアルタイムクロック210から(4)で指定したアドレスに記録されたデータが読み出される(9)。CPU240がリアルタイムクロック210へアクノリッジを送出する(10)。必要に応じて(9)、(10)の繰り返しによりデータの読み出しを行う(11)。CPU240が「1」のアクノリッジを送出する(12)。その後CPU240が停止条件を送出する(13)。   After confirming the acknowledge, the CPU 240 sends the address of the data read from the real time clock 210 (4), and confirms the acknowledge from the real time clock 210 (5). Thereafter, the CPU 240 sends out the start condition again (6). Next, the CPU 240 selects the slave address and read or load code of the real-time clock 210 in the read mode (7). The RTC 210 confirms the acknowledge (8). Data recorded at the address specified in (4) is read from the real-time clock 210 (9). The CPU 240 sends an acknowledge to the real time clock 210 (10). If necessary, data is read by repeating (9) and (10) (11). The CPU 240 sends an acknowledge of “1” (12). Thereafter, the CPU 240 sends a stop condition (13).

計時部226への書き込みや読み出しを上記のような工程で行う場合であっても、OTP−ROM112に対してリード用アクセスコードやライト用アクセスコードを記録し、これを利用していることにより耐タンパー性の向上が図られているため、本発明の一部とみなすことができる。   Even when writing to and reading from the time measuring unit 226 is performed in the above-described process, a read access code and a write access code are recorded in the OTP-ROM 112 and are used. Since tampering is improved, it can be regarded as a part of the present invention.

次に、本発明のリアルタイムクロックに係る第4の実施形態について、図6を参照して説明する。なお、本実施形態に係るリアルタイムクロックの殆どの構成は、図4に示した第3の実施形態に係るリアルタイムクロック210と同様である。よって、その機能を同一とする箇所には、図4の符号に100を足した符号を付して、詳細な説明は省略することとする。   Next, a fourth embodiment according to the real-time clock of the present invention will be described with reference to FIG. Note that most of the configuration of the real-time clock according to the present embodiment is the same as that of the real-time clock 210 according to the third embodiment shown in FIG. Therefore, portions having the same function are denoted by reference numerals obtained by adding 100 to the reference numerals in FIG. 4 and detailed description thereof will be omitted.

本実施形態に係るリアルタイムクロック310は、アクセスコード比較エラーカウンタ342を備えるようにしたことを特徴としている。そして、時計レジスタ328には、アクセスコード比較エラーカウンタ342がエラーを検出した際にエラー検出フラグを立てる項目を設けた。   The real-time clock 310 according to the present embodiment is characterized in that an access code comparison error counter 342 is provided. The clock register 328 includes an item for setting an error detection flag when the access code comparison error counter 342 detects an error.

このような構成とすることで、汎用メモリ330に対して不正なアクセスが試みられたか否かを認識することができるようになる。なお、その他の構成については、上述した第3の実施形態に係るリアルタイムクロック210と同様である。   With such a configuration, it is possible to recognize whether or not unauthorized access to the general-purpose memory 330 has been attempted. Other configurations are the same as those of the real-time clock 210 according to the third embodiment described above.

10………リアルタイムクロック、12………OTP−ROM、14………アクセス制御部、16………OTP−メモリアクセスコード比較器、18………リード用アクセスコード比較器、20………ライト用アクセスコード比較器、22………SPIインターフェース、24………データバッファ、26………計時部、28………時計レジスタ、30………汎用メモリ、32………発振器、34………発振回路、36………水晶振動子、38………分周回路、40………CPU。   10... Real-time clock, 12... OTP-ROM, 14... Access control unit, 16 ... OTP-memory access code comparator, 18 .... Read access code comparator, 20. Write access code comparator, 22 ......... SPI interface, 24 ......... Data buffer, 26 ......... Timekeeping unit, 28 ...... Clock register, 30 ......... General memory, 32 ......... Oscillator, 34 ... ...... Oscillator circuit 36... Crystal oscillator 38... Divider circuit 40.

Claims (5)

アクセスコードが記録されるワンタイムプログラマブルメモリと、
時刻情報を生成し、前記時刻情報を保持する時計レジスタを有する計時部と、
少なくとも前記時刻情報を記憶する記憶部と、
外部からのアクセス信号に基づき、前記外部から前記記憶部へのアクセスを制御するアクセス制御部と、
を備え、
前記アクセス制御部は、前記アクセス信号に含まれるユーザーアクセスコードと、前記ワンタイムプログラマブルメモリに記録された前記アクセスコードとを比較し、一致した場合には前記外部から前記記憶部への前記アクセスを許可し、一致しなかった場合には前記アクセスを禁止することを特徴とするリアルタイムクロック。
A one-time programmable memory in which an access code is recorded;
A time counter having a clock register for generating time information and holding the time information;
A storage unit for storing at least the time information;
An access control unit that controls access to the storage unit from the outside, based on an access signal from the outside;
With
The access control unit compares the user access code included in the access signal with the access code recorded in the one-time programmable memory, and if they match, the access to the storage unit from the outside is performed. A real-time clock characterized in that if it does not match, the access is prohibited.
請求項1に記載のリアルタイムクロックであって、
前記ワンタイムプログラマブルメモリに記録される前記アクセスコードは、リード用アクセスコードおよびライト用アクセスコードを含んでいることを特徴とするリアルタイムクロック。
The real-time clock according to claim 1,
The real-time clock, wherein the access code recorded in the one-time programmable memory includes a read access code and a write access code.
請求項1または請求項2に記載のリアルタイムクロックであって、
前記ワンタイムプログラマブルメモリに対しての前記アクセスコードの書き込みの可否を判定するOTP−メモリアクセス制御部を備えたことを特徴とするリアルタイムクロック。
The real-time clock according to claim 1 or 2,
A real-time clock comprising an OTP-memory access control unit for determining whether or not the access code can be written to the one-time programmable memory.
実装基板を備えた電子機器のセキュリティ設定方法であって、
請求項1乃至請求項3のいずれかに記載のリアルタイムクロックを実装基板に実装する実装ステップと、
実装した前記リアルタイムクロックのワンタイムプログラマブルメモリにアクセスコードの書き込みを行う書き込みステップと、
を有することを特徴とする電子機器のセキュリティ設定方法。
A security setting method for an electronic device including a mounting board,
A mounting step of mounting the real-time clock according to any one of claims 1 to 3 on a mounting board;
A writing step of writing an access code to the one-time programmable memory of the mounted real-time clock;
A security setting method for an electronic device, comprising:
請求項4に記載の電子機器のセキュリティ設定方法であって、
前記電子機器は演算処理装置を備え、
前記書き込みステップは、前記アクセスコードを前記演算処理装置によって生成し、生成された前記アクセスコードを前記ワンタイムプログラマブルメモリに書き込むことを特徴とする電子機器のセキュリティ設定方法。
The electronic device security setting method according to claim 4,
The electronic device includes an arithmetic processing unit,
In the writing step, the access code is generated by the arithmetic processing unit, and the generated access code is written in the one-time programmable memory.
JP2009073198A 2009-03-25 2009-03-25 Real-time clock and electronic device security setting method Expired - Fee Related JP5278813B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009073198A JP5278813B2 (en) 2009-03-25 2009-03-25 Real-time clock and electronic device security setting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009073198A JP5278813B2 (en) 2009-03-25 2009-03-25 Real-time clock and electronic device security setting method

Publications (2)

Publication Number Publication Date
JP2010225009A true JP2010225009A (en) 2010-10-07
JP5278813B2 JP5278813B2 (en) 2013-09-04

Family

ID=43042112

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009073198A Expired - Fee Related JP5278813B2 (en) 2009-03-25 2009-03-25 Real-time clock and electronic device security setting method

Country Status (1)

Country Link
JP (1) JP5278813B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017113330A (en) * 2015-12-24 2017-06-29 株式会社オリンピア Game machine
US10432177B2 (en) 2017-01-20 2019-10-01 Seiko Epson Corporation Circuit device, real-time clocking device, electronic apparatus, vehicle, and verification method
US10742221B2 (en) 2017-01-24 2020-08-11 Seiko Epson Corporation Circuit device, oscillator, physical quantity measurement device, electronic apparatus, and vehicle
US10985928B2 (en) 2017-01-24 2021-04-20 Seiko Epson Corporation Circuit device, oscillation device, physical quantity measuring device, electronic apparatus, and vehicle

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002182780A (en) * 2000-12-13 2002-06-26 Seiko Epson Corp Method for controlling real time clock, and real time clock
JP2005165622A (en) * 2003-12-02 2005-06-23 Seiko Epson Corp Clock alteration preventing system and method and program
JP2007293873A (en) * 2001-06-15 2007-11-08 Nokia Corp Method for securing electronic device, security system, and electronic device
JP2008505421A (en) * 2004-06-30 2008-02-21 シリコン・ラボラトリーズ・インコーポレイテッド Microcontroller unit (MCU) with RTC
JP2008117006A (en) * 2006-10-31 2008-05-22 Toshiba Corp Information processor and date and time information change method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002182780A (en) * 2000-12-13 2002-06-26 Seiko Epson Corp Method for controlling real time clock, and real time clock
JP2007293873A (en) * 2001-06-15 2007-11-08 Nokia Corp Method for securing electronic device, security system, and electronic device
JP2005165622A (en) * 2003-12-02 2005-06-23 Seiko Epson Corp Clock alteration preventing system and method and program
JP2008505421A (en) * 2004-06-30 2008-02-21 シリコン・ラボラトリーズ・インコーポレイテッド Microcontroller unit (MCU) with RTC
JP2008117006A (en) * 2006-10-31 2008-05-22 Toshiba Corp Information processor and date and time information change method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017113330A (en) * 2015-12-24 2017-06-29 株式会社オリンピア Game machine
US10432177B2 (en) 2017-01-20 2019-10-01 Seiko Epson Corporation Circuit device, real-time clocking device, electronic apparatus, vehicle, and verification method
US10742221B2 (en) 2017-01-24 2020-08-11 Seiko Epson Corporation Circuit device, oscillator, physical quantity measurement device, electronic apparatus, and vehicle
US10985928B2 (en) 2017-01-24 2021-04-20 Seiko Epson Corporation Circuit device, oscillation device, physical quantity measuring device, electronic apparatus, and vehicle

Also Published As

Publication number Publication date
JP5278813B2 (en) 2013-09-04

Similar Documents

Publication Publication Date Title
US8059814B1 (en) Techniques for carrying out seed or key derivation
US20110234241A1 (en) Method and system for protecting products and technology from integrated circuits which have been subject to tampering, stressing and replacement as well as detecting integrated circuits that have been subject to tampering
US8489899B2 (en) System and method for encrypting and decrypting data
WO2005124537A1 (en) Random number generation device, generation method, generator evaluation method, and random number use method
JP5278813B2 (en) Real-time clock and electronic device security setting method
US6965977B2 (en) Tamper-resistant method and data processing system using the same
CN109445705A (en) Firmware authentication method and solid state hard disk
US7702943B2 (en) Real time clock
JP5876364B2 (en) Semiconductor memory and data reading method
US20050041803A1 (en) On-device random number generator
EP3091468B1 (en) Integrated circuit access
JP5244131B2 (en) Access method to nonvolatile memory for portable watch
US20100127767A1 (en) Integrated Circuit Device Including Noise Filter
JP2000200222A (en) Mimic article preventing device
JP2016045864A (en) Ic module, ic card, and manufacturing method for ic card
JP4853416B2 (en) Event recorder and electronic device equipped with the same
WO2024066533A1 (en) Chip assembly and information processing method thereof, and computer readable medium
JP2010216998A (en) Test mode setting circuit and semiconductor integrated circuit comprising the same
TW202319869A (en) Integrated circuit and electronic apparatus
JP6110965B2 (en) Semiconductor memory
JP2008197810A (en) Information processing device and ic card device
JP4663162B2 (en) Semiconductor device
JP2007064762A (en) Semiconductor device and test mode control circuit
CN113065173A (en) Encryption method and device for protecting processor embedded algorithm and storage medium
CN110930531A (en) Anti-refresh chip and verification method

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20100705

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20100705

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130411

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130509

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5278813

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees