JP5488659B2 - Electronic device and program - Google Patents

Electronic device and program Download PDF

Info

Publication number
JP5488659B2
JP5488659B2 JP2012205224A JP2012205224A JP5488659B2 JP 5488659 B2 JP5488659 B2 JP 5488659B2 JP 2012205224 A JP2012205224 A JP 2012205224A JP 2012205224 A JP2012205224 A JP 2012205224A JP 5488659 B2 JP5488659 B2 JP 5488659B2
Authority
JP
Japan
Prior art keywords
terminal device
information
authentication
time
authentication token
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012205224A
Other languages
Japanese (ja)
Other versions
JP2013037708A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2012205224A priority Critical patent/JP5488659B2/en
Publication of JP2013037708A publication Critical patent/JP2013037708A/en
Application granted granted Critical
Publication of JP5488659B2 publication Critical patent/JP5488659B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は電子機器及びプログラムに関する。 The present invention relates to an electronic device and a program.

近年、パスワード等の機密性を担保する耐タンパ性を有するSAM(Secure Application Module)を備えた端末装置が知られている。例えば、SAMを、端末装置の本体に着脱可能なモジュールとして構成する技術が知られている(例えば、特許文献1参照)。   In recent years, a terminal device including a SAM (Secure Application Module) having tamper resistance that ensures confidentiality of a password or the like is known. For example, a technique for configuring a SAM as a module that can be attached to and detached from a main body of a terminal device is known (see, for example, Patent Document 1).

また、SAMを用いた決済システムも知られている。図16を参照して決済システム100の動作について説明する。図16(A)、(B)にSAM103及び端末装置104を有する電子機器101と、センタサーバ102と、を備えた決済システム100を示す。   A settlement system using SAM is also known. The operation of the payment system 100 will be described with reference to FIG. FIGS. 16A and 16B show a payment system 100 including an electronic device 101 having a SAM 103 and a terminal device 104, and a center server 102. FIG.

SAM103及びセンタサーバ102は、それぞれ認証鍵105を有している。認証鍵105とは、認証に用いられる暗号用又は復号用のための暗号鍵のことをいう。認証とは、センタサーバ102がSAM103の有するデータの使用を端末装置104に許可することをいう。SAM103が有する認証鍵105と、センタサーバ102が有する認証鍵105とを用いて、認証が行われる。認証が得られた(認証OK)場合、端末装置104において、SAM103が有するデータ(例えば、他の鍵106等)の利用が可能となる。これにより、例えば、SAM103が有する他の鍵106を用いて、決済処理等を行うことができる(図16(A)参照)。   The SAM 103 and the center server 102 each have an authentication key 105. The authentication key 105 refers to an encryption key for encryption or decryption used for authentication. Authentication means that the center server 102 permits the terminal device 104 to use data held by the SAM 103. Authentication is performed using the authentication key 105 possessed by the SAM 103 and the authentication key 105 possessed by the center server 102. When the authentication is obtained (authentication OK), the terminal device 104 can use the data (for example, another key 106) included in the SAM 103. Thereby, for example, settlement processing or the like can be performed using another key 106 included in the SAM 103 (see FIG. 16A).

特開2003−16527号公報JP 2003-16527 A

しかしながら、上記の技術では、電子機器が障害から復帰した場合に、センタサーバとの認証を行う手間を要していた。
例えば、認証後、SAM103が有する他の鍵106を用いて決済処理を行っている途中に、電子機器101に落雷による停電が起きたとする。ここで、SAM103及び端末装置104は、連動して電子機器101の電源供給部(図示省略)から電源供給されている。このため、電子機器101に停電が起きると、SAM103に対する電源供給が遮断される。そうすると、SAM103は、センタサーバ102との認証状態(センタサーバ102がSAM103のデータの使用を端末装置104に許可した状態)を忘却してしまう。SAM103がセンタサーバ102との認証状態を忘却すると、他の鍵106は利用不可となる(図16(B)参照)。このため、停電(障害)から復帰した際に、再度、センタサーバ102(認証装置)と通信して認証を行う手間が必要であった。
However, in the above technique, it takes time and effort to authenticate with the center server when the electronic device recovers from the failure.
For example, it is assumed that a power failure due to a lightning strike occurs in the electronic device 101 during the settlement process using another key 106 of the SAM 103 after authentication. Here, the SAM 103 and the terminal device 104 are supplied with power from a power supply unit (not shown) of the electronic device 101 in conjunction with each other. For this reason, when a power failure occurs in the electronic device 101, the power supply to the SAM 103 is cut off. Then, the SAM 103 forgets the authentication state with the center server 102 (the state in which the center server 102 allows the terminal device 104 to use the data of the SAM 103). When the SAM 103 forgets the authentication state with the center server 102, the other keys 106 cannot be used (see FIG. 16B). For this reason, when recovering from a power outage (failure), it is necessary to communicate with the center server 102 (authentication apparatus) again for authentication.

本発明の課題は、障害から復帰した際に、認証を行う手間をなくすことである。   An object of the present invention is to eliminate the trouble of performing authentication when returning from a failure.

請求項記載の発明は、端末装置に接続される電子機器であって、認証情報とデータとを記憶する記憶手段と、前記認証情報に基づいて前記端末装置が認証装置を介して認証許可を得た場合に、前記データを前記端末装置で利用可とするか否を判別する判別手段と、前記判別手段で利用可とされた場合には、前記記憶手段に記憶されたデータを前記端末装置で利用できるように制御し、その利用可を示す許可情報を当該電子機器に記憶すると共に、前記端末装置に前記許可情報を記憶させる第1制御手段と、前記端末装置での障害発生後の復旧時に、その端末装置に記憶された許可情報と当該電子機器に記憶された許可情報とを比較する比較手段と、前記比較手段での比較結果に基づいて、前記記憶手段に記憶されたデータを前記端末装置で再利用可とするか否かを制御する第2制御手段と、を具備したことを特徴とする。

The invention according to claim 1 is an electronic device connected to the terminal device, wherein the storage device stores authentication information and data, and the terminal device permits authentication via the authentication device based on the authentication information. A determination means for determining whether or not the data can be used in the terminal device, and the data stored in the storage means when the determination means enables the data. And the first control means for storing the permission information indicating the use permission in the electronic device and storing the permission information in the terminal device, and the recovery after the occurrence of the failure in the terminal device Sometimes, the comparing means for comparing the permission information stored in the terminal device with the permission information stored in the electronic device, and the data stored in the storage means based on the comparison result in the comparing means On the terminal device A second control means for controlling whether the accessible, characterized by comprising a.

本発明によれば、障害から復帰した際に、認証を行う手間をなくすことができる。   According to the present invention, it is possible to eliminate the trouble of performing authentication when returning from a failure.

本発明に係る決済システムを示す概略図である。It is the schematic which shows the payment system which concerns on this invention. SAMの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of SAM. 端末装置の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a terminal device. センタサーバの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a center server. 第1の端末管理処理、第1の情報処理、第1のSAM使用許可処理を示すフローチャートである。It is a flowchart which shows a 1st terminal management process, 1st information processing, and 1st SAM use permission process. 図5の第1の端末管理処理、第1の情報処理、第1のSAM使用許可処理の続きを示すフローチャートである。6 is a flowchart showing a continuation of the first terminal management process, the first information process, and the first SAM use permission process of FIG. 5. 第2の情報処理、第1の認証トークン比較処理を示すフローチャートである。It is a flowchart which shows 2nd information processing and 1st authentication token comparison processing. 第2の端末管理処理、第3の情報処理、第2のSAM使用許可処理を示すフローチャートである。It is a flowchart which shows a 2nd terminal management process, a 3rd information processing, and a 2nd SAM use permission process. 図8の第2の端末管理処理、第3の情報処理、第2のSAM使用許可処理の続きを示すフローチャートである。10 is a flowchart showing a continuation of the second terminal management process, the third information process, and the second SAM use permission process of FIG. 8. 第4の情報処理、第2の認証トークン比較処理を示すフローチャートである。It is a flowchart which shows 4th information processing and 2nd authentication token comparison processing. 決済システムの構成を示すブロック図である。It is a block diagram which shows the structure of a payment system. タイムサーバの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a time server. 第5の情報処理、第3の認証トークン比較処理を示すフローチャートである。It is a flowchart which shows a 5th information processing and a 3rd authentication token comparison process. 時刻情報送信処理、第6の情報処理、第4の認証トークン比較処理を示すフローチャートである。It is a flowchart which shows a time information transmission process, a 6th information processing, and a 4th authentication token comparison process. 時刻情報送信処理、第6の情報処理、第4の認証トークン比較処理の続を示すフローチャートである。It is a flowchart which shows a continuation of a time information transmission process, a 6th information processing, and a 4th authentication token comparison process. 決済システム100を示すブロック図である。1 is a block diagram showing a payment system 100. FIG.

以下、添付図面を参照して本発明に係る好適な第1の実施の形態、第2の実施の形態、及び第3の実施の形態、及び第4の実施の形態を詳細に説明する。なお、本発明は、図示例に限定されるものではない。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, a first embodiment, a second embodiment, a third embodiment, and a fourth embodiment according to the present invention will be described in detail with reference to the accompanying drawings. The present invention is not limited to the illustrated example.

(第1の実施の形態)
図1〜図7を参照して、本発明に係る第1の実施の形態を説明する。先ず、図1〜図4を参照して本実施の形態の装置構成を説明する。図1に、本実施の形態の決済システム1の構成を示す。
(First embodiment)
A first embodiment according to the present invention will be described with reference to FIGS. First, the apparatus configuration of the present embodiment will be described with reference to FIGS. FIG. 1 shows the configuration of the payment system 1 of the present embodiment.

図1に示すように、決済システム1は、電子機器としてのSAM10と、電子機器としての端末装置30と、認証装置としてのセンタサーバ40と、を備えて構成される。センタサーバ40は、通信ネットワークNを介して端末装置30と通信接続されている。端末装置30は、SAM10と通信接続されている。   As shown in FIG. 1, the payment system 1 includes a SAM 10 as an electronic device, a terminal device 30 as an electronic device, and a center server 40 as an authentication device. The center server 40 is communicatively connected to the terminal device 30 via the communication network N. The terminal device 30 is communicatively connected to the SAM 10.

決済システム1では、例えば、店舗等に、端末装置30、SAM10が設置され、カード会社等のセンタサーバ40に管理される。カード情報を有するクレジットカード等のIC(Integrated Circuit)カードにより顧客が商品購入の決済をする場合に、端末装置30でICカードの情報を読み取り、センタサーバ40に送信する。センタサーバ40は、ICカード認証後に決済処理を行う。本実施の形態では、端末装置30、SAM10の認証を行い、正当な端末装置30、SAM10である場合に、ICカードの認証等を含む決済処理を行う。   In the payment system 1, for example, the terminal device 30 and the SAM 10 are installed in a store or the like, and are managed by a center server 40 such as a card company. When a customer makes a payment for product purchase using an IC (Integrated Circuit) card such as a credit card having card information, the terminal device 30 reads the information on the IC card and transmits it to the center server 40. The center server 40 performs settlement processing after the IC card authentication. In the present embodiment, authentication of the terminal device 30 and the SAM 10 is performed, and when the terminal device 30 and the SAM 10 are valid, settlement processing including IC card authentication and the like is performed.

SAM10は、耐タンパ性を有するモジュールであり、中に記憶しているデータを第三者が読み取り又は変更しようとする異常状態を検出し、異常検出時に、その記憶しているデータを自動的に消去する。また、SAM10は、異常検出時に、SAM10自体の動作を停止させる構成等としてもよい。   The SAM 10 is a tamper-resistant module that detects an abnormal state where a third party reads or changes the data stored therein, and automatically stores the stored data when an abnormality is detected. to erase. The SAM 10 may be configured to stop the operation of the SAM 10 itself when an abnormality is detected.

通信ネットワークNは、例えば、WAN(Wide Area Network)とするが、LAN(Local Area Network)等の通信ネットワークとしてもよく、電話回線、専用線、移動体通信網、通信衛星網、CATV(Cable Television)回線、インターネットプロバイダ等を含めてもよい。   The communication network N is, for example, a WAN (Wide Area Network), but may be a communication network such as a LAN (Local Area Network), such as a telephone line, a dedicated line, a mobile communication network, a communication satellite network, a CATV (Cable Television). ) Lines, Internet providers, etc. may be included.

次いで、SAM10の内部構成を説明する。図2に、SAM10の内部構成を示す。図2に示すように、SAM10は、生成手段、第1の制御手段、暗号化手段、更新手段としてのCPU(Central Processing Unit)11と、暗号演算部12と、RAM(Random Access Memory)13と、異常検出部14と、ROM(Read Only Memory)15と、通信手段としての通信部16と、第1記憶手段としてのEEPROM(Electrically Erasable Programmable Read Only Memory)17と、を備えて構成され、各部がバス18を介して接続される。   Next, the internal configuration of the SAM 10 will be described. FIG. 2 shows the internal configuration of the SAM 10. As shown in FIG. 2, the SAM 10 includes a generation unit, a first control unit, an encryption unit, a CPU (Central Processing Unit) 11 as an update unit, a cryptographic operation unit 12, and a RAM (Random Access Memory) 13. , An abnormality detection unit 14, a ROM (Read Only Memory) 15, a communication unit 16 as a communication unit, and an EEPROM (Electrically Erasable Programmable Read Only Memory) 17 as a first storage unit. Are connected via a bus 18.

CPU11は、SAM10の各部を中央制御する。CPU11は、ROM15やEEPROM17に記憶されているシステムプログラム及び各種アプリケーションプログラムの中から指定されたプログラムをRAM13に展開し、RAM13に展開されたプログラムとの協働で、各種処理を実行する。   The CPU 11 centrally controls each part of the SAM 10. The CPU 11 develops a program designated from the system program and various application programs stored in the ROM 15 and the EEPROM 17 in the RAM 13 and executes various processes in cooperation with the program expanded in the RAM 13.

CPU11は、第1のSAM使用許可プログラムとの協働により、端末装置30の通信部36及び通信部16を介してセンタサーバ40から認証許可情報としての動作OK信号を受信した際、認証成功情報としての認証トークンを生成する。認証トークンとは、センタサーバ40との認証が成功したことを示す情報のことをいう。本実施の形態では、認証トークンは、乱数により生成される。   When the CPU 11 receives an operation OK signal as authentication permission information from the center server 40 via the communication unit 36 and the communication unit 16 of the terminal device 30 in cooperation with the first SAM use permission program, the authentication success information Generate an authentication token as. The authentication token refers to information indicating that the authentication with the center server 40 is successful. In the present embodiment, the authentication token is generated by a random number.

CPU11は、第1の認証トークン比較プログラムとの協働により、障害から復帰した際、端末装置30のRAM33に認証トークンが記憶されている場合に、RAM33により記憶された認証トークンとEEPROM17により記憶された認証トークンとが一致するか否かを検証し、一致する場合に、センタサーバ40との認証状態を継続させる。
障害とは、例えば、落雷による停電が発生し、SAM10及び端末装置30に電源供給部(図示省略)から電源の供給が遮断された状態のことをいう。認証状態とは、センタサーバ40がSAM10のデータの使用を端末装置30に許可した状態のことをいう。
The CPU 11 stores the authentication token stored in the RAM 33 and the EEPROM 17 when the authentication token is stored in the RAM 33 of the terminal device 30 when the CPU 11 recovers from the failure in cooperation with the first authentication token comparison program. It is verified whether the authentication token matches, and if it matches, the authentication state with the center server 40 is continued.
The failure means, for example, a state in which a power failure occurs due to a lightning strike and power supply to the SAM 10 and the terminal device 30 is interrupted from a power supply unit (not shown). The authentication state means a state where the center server 40 permits the terminal device 30 to use the data of the SAM 10.

また、CPU11は、異常検出部14により異常が検出された場合に、RAM13及びEEPROM17に記憶された情報を破壊(消去)する。また、CPU11は、EEPROM17に記憶された鍵を用いて、暗号演算部12により情報を暗号化又は復号化させる。   The CPU 11 destroys (deletes) information stored in the RAM 13 and the EEPROM 17 when an abnormality is detected by the abnormality detection unit 14. Further, the CPU 11 uses the key stored in the EEPROM 17 to encrypt or decrypt information by the cryptographic operation unit 12.

暗号演算部12は、CPU31の指示により、EEPROM17に記憶された鍵を用いて、各種情報を暗号化し、また暗号化された各種情報を復号化する。   The cryptographic operation unit 12 encrypts various types of information and decrypts the various types of encrypted information using a key stored in the EEPROM 17 according to an instruction from the CPU 31.

RAM13は、揮発性のメモリであり、実行される各種プログラムやこれら各種プログラムに係るデータ等を格納するワークエリアを有し、その情報を一時的に格納する。   The RAM 13 is a volatile memory, has a work area for storing various programs to be executed and data related to these various programs, and temporarily stores the information.

異常検出部14は、例えば、電圧センサ、温度センサ、光センサ等の少なくとも1つを備え、善意又は悪意によらず第三者がSAM10のデータを読み取ろうと又は変更しようとする際の異常電圧、異常温度、異常光量等を検出し、その異常の旨を示す検出信号をCPU11に出力する。   The abnormality detection unit 14 includes, for example, at least one of a voltage sensor, a temperature sensor, an optical sensor, and the like, and an abnormal voltage when a third party tries to read or change the data of the SAM 10 regardless of good or bad intentions, An abnormal temperature, an abnormal light amount, etc. are detected, and a detection signal indicating the abnormality is output to the CPU 11.

ROM15には、書き換えが不要であるデータが予め記憶されている。例えば、SAM10のシステムプログラムである。   The ROM 15 stores data that does not require rewriting in advance. For example, a system program of SAM10.

通信部16は、通信制御部により構成され、有線又は無線で端末装置30と通信接続して情報を送受信する。   The communication unit 16 includes a communication control unit, and communicates with the terminal device 30 in a wired or wireless manner to transmit and receive information.

EEPROM17は、各種プログラム及び各種データを読み出し又は書き込み可能に記憶する不揮発性のメモリである。   The EEPROM 17 is a non-volatile memory that stores various programs and various data in a readable or writable manner.

EEPROM17は、第1のSAM使用許可プログラム、第1の認証トークン比較プログラムと、認証トークンと、鍵と、端末IDと、を記憶する。鍵は、複数の鍵が記憶されている。例えば、センタサーバ40が端末装置30を認証するための鍵であり、電子機器ごとにユニークな鍵(鍵T1)と、端末装置30にあるデータを暗号化または復号化するための鍵(鍵D1)と、カードリーダ38が端末装置30を認証するための鍵(鍵R)と、が記憶されている。端末IDは、電子機器毎にユニークな識別情報である。また、第1のSAM使用プログラム、第1の認証トークン比較プログラムは、ROM15に記憶される構成としてもよい。   The EEPROM 17 stores a first SAM use permission program, a first authentication token comparison program, an authentication token, a key, and a terminal ID. The key stores a plurality of keys. For example, the center server 40 is a key for authenticating the terminal device 30 and is unique to each electronic device (key T1), and a key for encrypting or decrypting data in the terminal device 30 (key D1). ) And a key (key R) for the card reader 38 to authenticate the terminal device 30 is stored. The terminal ID is unique identification information for each electronic device. Further, the first SAM usage program and the first authentication token comparison program may be stored in the ROM 15.

各鍵の暗号化及び復号化には、互いに相応する鍵を用いて行われる。例えば、ある鍵を用いて情報を暗号化した場合に、その鍵に相応する鍵を用いると暗号化された情報の復号化が可能となる。本実施の形態では、暗号化する鍵と、復号化する鍵とが、同一である共通の共通鍵方式で暗号化及び復号化するものとして説明する。しかし、公開鍵方式や、セション鍵方式等の方式で暗号化及び復号化する構成としてもよい。公開鍵方式では、公開鍵と秘密鍵のペアが互いに相応する鍵となる。   Each key is encrypted and decrypted by using corresponding keys. For example, when information is encrypted using a certain key, the encrypted information can be decrypted by using a key corresponding to the key. In the present embodiment, description will be made assuming that encryption and decryption are performed using a common common key scheme in which the key to be encrypted and the key to be decrypted are the same. However, encryption and decryption may be performed using a public key method, a session key method, or the like. In the public key method, a pair of a public key and a secret key is a corresponding key.

次いで、端末装置30の構成を説明する。図3に端末装置30の内部構成を示す。図3に示すように、端末装置30は、CPU31と、入力部32と、第2記憶手段としてのRAM33と、バックアップ電池33Aと、表示部34と、フラッシュメモリ35と、通信手段としての通信部36と、接続部37と、カードリーダ38と、接続部39と、計時部39aと、を備えて構成され、各部がバス39bを介して接続される。   Next, the configuration of the terminal device 30 will be described. FIG. 3 shows an internal configuration of the terminal device 30. As shown in FIG. 3, the terminal device 30 includes a CPU 31, an input unit 32, a RAM 33 as a second storage unit, a backup battery 33A, a display unit 34, a flash memory 35, and a communication unit as a communication unit. 36, a connection unit 37, a card reader 38, a connection unit 39, and a time measuring unit 39a, each of which is connected via a bus 39b.

CPU31、RAM33、フラッシュメモリ35については、SAM10のCPU11、RAM13、EEPROM17の構成と同様であり、異なる部分を主として説明する。   The CPU 31, RAM 33, and flash memory 35 are the same as the configurations of the CPU 11, RAM 13, and EEPROM 17 of the SAM 10, and different portions will be mainly described.

CPU31は、第1の情報プログラムとの協働により、認証トークンをRAM33に記憶させる。また、CPU31は、第2の情報プログラムとの協働により、障害から復帰した際、端末装置30のRAM33に認証トークンが記憶されているか否かを判別する。   The CPU 31 stores the authentication token in the RAM 33 in cooperation with the first information program. Further, the CPU 31 determines whether or not an authentication token is stored in the RAM 33 of the terminal device 30 when the CPU 31 recovers from the failure in cooperation with the second information program.

入力部32は、数字入力キー及び各種機能キーなどを備えたキーパッドを含む構成とし、操作者により各キーが押下された操作信号をCPU31に出力する。   The input unit 32 includes a keypad having numeric input keys and various function keys, and outputs an operation signal indicating that each key has been pressed by the operator to the CPU 31.

RAM33は、認証トークンを記憶する。また、RAM33は、バックアップ時間の間、不揮発性を有する。ここで、バックアップ時間とは、例えば、端末装置30の電源がOFFの状態において、バックアップ電池33AによりRAM33に給電が可能な時間のことをいう。当該バックアップ時間の間、RAM33は、端末装置30の電源がOFFとなっても、不揮発性を有する。また、RAM33は、フラッシュメモリ等の不揮発性のメモリを用いる構成としても良い。   The RAM 33 stores an authentication token. The RAM 33 is non-volatile during the backup time. Here, the backup time refers to, for example, a time during which power can be supplied to the RAM 33 by the backup battery 33A when the terminal device 30 is powered off. During the backup time, the RAM 33 is non-volatile even when the terminal device 30 is powered off. The RAM 33 may be configured to use a non-volatile memory such as a flash memory.

バックアップ電池33Aは、RAM33にバックアップ時間の間、給電を行うバックアップ用の電池である。   The backup battery 33A is a backup battery that supplies power to the RAM 33 during the backup time.

表示部34は、LCD(Liquid Crystal Display)等で構成され、CPU31からの表示信号に従って画面表示を行う。また、入力部32は、表示部34と一体的にタッチパネルを構成することとしてもよい。   The display unit 34 is configured by an LCD (Liquid Crystal Display) or the like, and performs screen display according to a display signal from the CPU 31. Further, the input unit 32 may constitute a touch panel integrally with the display unit 34.

フラッシュメモリ35は、各種プログラム及び各種データを読み出し及び書き込み可能に記憶する不揮発性のメモリである。フラッシュメモリ35は、第1の情報プログラム、第2の情報プログラムと、鍵D1で暗号化された暗号化データd1と、を記憶する。暗号化データd1は、例えば、決済処理に使用されるカード判別データである。カード判別データは、ICカード60の機能を判別したり、ICカードのカード情報のリストを含み、使えないICカードを判定するための情報である。   The flash memory 35 is a non-volatile memory that stores various programs and various data in a readable and writable manner. The flash memory 35 stores a first information program, a second information program, and encrypted data d1 encrypted with the key D1. The encrypted data d1 is, for example, card discrimination data used for payment processing. The card discrimination data is information for discriminating the function of the IC card 60, or including a list of card information of the IC card, and determining an IC card that cannot be used.

通信部36は、通信制御部により構成され、通信ネットワークNを介してセンタサーバ40と情報を送受信する。   The communication unit 36 includes a communication control unit, and transmits / receives information to / from the center server 40 via the communication network N.

接続部37は、ソケット等から構成され、SAM10が接続され、CPU31の指示により、接続されたSAM10と情報を送受信する。   The connection unit 37 includes a socket and the like, is connected to the SAM 10, and transmits / receives information to / from the connected SAM 10 according to an instruction from the CPU 31.

カードリーダ38は、図示しないCPU、RAM、ROM、フラッシュメモリ、接続部等を備える。カードリーダ38において、ROMから読み出されRAMに展開されたプログラムとCPUとの協働で各種処理を実行する。また、接続部は、接続されたICカード60の情報を読み取る。カードリーダ38において、フラッシュメモリには、後述する鍵Rが記憶されており、CPUは、ICカード60から読み出した情報を、鍵Rを使って暗号化し、暗号化した情報を端末装置30を介してSAM10に送信する。   The card reader 38 includes a CPU, RAM, ROM, flash memory, connection unit, and the like (not shown). In the card reader 38, various processes are executed in cooperation with the CPU and the program read from the ROM and expanded in the RAM. The connection unit reads information on the connected IC card 60. In the card reader 38, a key R, which will be described later, is stored in the flash memory. The CPU encrypts information read from the IC card 60 using the key R, and the encrypted information is transmitted via the terminal device 30. To SAM10.

ICカード60は、各顧客が有する決済用の記録媒体としてのカードである。ICカード60は、接触式又は非接触式のカードであり、各ICカードでユニークなカード情報を記憶するICチップを備える。決済用の記録媒体としては、ICカード60に代えて、磁気カード、生体認証カード等、他の記録媒体としてもよい。   The IC card 60 is a card as a payment recording medium possessed by each customer. The IC card 60 is a contact type or non-contact type card, and includes an IC chip that stores unique card information in each IC card. As a recording medium for settlement, instead of the IC card 60, another recording medium such as a magnetic card or a biometric card may be used.

接続部39は、ソケット等から構成され、メモリカード70が接続され、CPU31の指示により、接続されたメモリカード70に記録された各種情報の読み出しや、情報の書き込みを行う。   The connection unit 39 is composed of a socket or the like, to which a memory card 70 is connected, and in accordance with instructions from the CPU 31, various information recorded in the connected memory card 70 is read and information is written.

計時部39aは、図示しない発振回路部から入力される信号を計数して、現在時刻を得る。そして当該現在時刻をCPU31に出力する。   The timer unit 39a counts signals input from an oscillation circuit unit (not shown) to obtain the current time. Then, the current time is output to the CPU 31.

次いで、センタサーバ40の内部構成を説明する。図4に、センタサーバ40の内部構成を示す。図4に示すように、センタサーバ40は、第2の制御手段としてのCPU41と、入力部42と、RAM43と、表示部44と、記憶部45と、認証装置側通信手段としての通信部46と、計時部47と、を備えて構成され、各部がバス48を介して接続される。   Next, the internal configuration of the center server 40 will be described. FIG. 4 shows the internal configuration of the center server 40. As shown in FIG. 4, the center server 40 includes a CPU 41 as a second control unit, an input unit 42, a RAM 43, a display unit 44, a storage unit 45, and a communication unit 46 as an authentication device side communication unit. And a time measuring unit 47, and each unit is connected via a bus 48.

CPU41、RAM43、計時部47については、SAM10のCPU11、RAM13、計時部39aの構成と同様であり、異なる部分を主として説明する。   The CPU 41, the RAM 43, and the timing unit 47 are the same as the configurations of the CPU 11, the RAM 13, and the timing unit 39a of the SAM 10, and different portions will be mainly described.

CPU41は、第1の端末管理プログラムとの協働で、暗号化端末ID及び端末IDを端末装置30から受信し、暗号化端末IDを鍵T1で復号化する。そして、CPU41は、復号化した端末ID及び受信した端末IDが一致し且つ許可情報が許可であるか否かを判別し、端末IDが一致し許可情報が許可である場合に認証許可情報(動作OK信号)を鍵T1で暗号化して端末装置30に送信する。   The CPU 41 receives the encrypted terminal ID and the terminal ID from the terminal device 30 in cooperation with the first terminal management program, and decrypts the encrypted terminal ID with the key T1. Then, the CPU 41 determines whether or not the decrypted terminal ID and the received terminal ID match and the permission information is permission. If the terminal ID matches and the permission information is permission, the authentication permission information (operation OK signal) is encrypted with the key T 1 and transmitted to the terminal device 30.

入力部42は、カーソルキー、文字、数字入力キー及び各種機能キーなどを備えたキーボードを含む構成とし、操作者により各キーが押下された操作信号をCPU41に出力する。また、入力部42は、マウス等のポインティングデバイスを含み、位置入力信号を受け付けてCPU41に出力することとしてもよい。   The input unit 42 includes a keyboard having cursor keys, characters, numeric input keys, various function keys, and the like, and outputs an operation signal when each key is pressed by the operator to the CPU 41. The input unit 42 may include a pointing device such as a mouse, and may receive a position input signal and output it to the CPU 41.

表示部44は、LCD、CRT(Cathode Ray Tube)等で構成され、CPU41からの表示信号に従って画面表示を行う。   The display unit 44 is composed of an LCD, a CRT (Cathode Ray Tube) or the like, and performs screen display according to a display signal from the CPU 41.

記憶部45は、磁気記憶媒体を有するHDD(Hard Disk Drive)等により構成され、各種プログラム及び各種データを記録媒体から読み出し及び書き込み可能に記憶する。   The storage unit 45 is configured by an HDD (Hard Disk Drive) having a magnetic storage medium, and stores various programs and various data so that they can be read and written from the recording medium.

また、記憶部45は、第1の端末管理プログラムと、鍵T1と、認証テーブル(図示省略)と、を記憶する。認証テーブルは、ログインIDと、端末IDと、鍵情報と、許可情報と、を有する。ログインIDは、電子機器毎にユニークなログインIDである。端末IDは、電子機器毎にユニークな端末IDである。鍵情報は、電子機器毎の認証用の鍵を特定する情報である。許可情報は、電子機器の動作が許可されているか否かを示す情報である。   In addition, the storage unit 45 stores a first terminal management program, a key T1, and an authentication table (not shown). The authentication table has a login ID, a terminal ID, key information, and permission information. The login ID is a unique login ID for each electronic device. The terminal ID is a unique terminal ID for each electronic device. The key information is information that specifies an authentication key for each electronic device. The permission information is information indicating whether or not the operation of the electronic device is permitted.

通信部46は、モデム、TA(Terminal Adapter)、ルータ、ネットワークカード等により構成され、接続される通信ネットワークN上の端末装置30等の外部機器と情報を送受信する。   The communication unit 46 includes a modem, a TA (Terminal Adapter), a router, a network card, and the like, and transmits / receives information to / from an external device such as the terminal device 30 on the connected communication network N.

次に、図5〜図7を参照して、決済システム1の動作を説明する。図5に第1の端末管理処理、第1の情報処理、第1のSAM使用許可処理の流れを示す。図6に、図5の第1の端末管理処理、第1の情報処理、第1のSAM使用許可処理の続きの流れを示す。また、各処理の実行前に、ログインIDを用いた端末装置30からセンタサーバ40へのログイン処理が行われるものとするが、その説明を省略する。   Next, the operation of the payment system 1 will be described with reference to FIGS. FIG. 5 shows a flow of the first terminal management process, the first information process, and the first SAM use permission process. FIG. 6 shows the subsequent flow of the first terminal management process, the first information process, and the first SAM use permission process of FIG. In addition, a login process from the terminal device 30 to the center server 40 using the login ID is performed before each process is executed, but the description thereof is omitted.

センタサーバ40で実行される第1の端末管理処理を説明する。センタサーバ40において、例えば、通信部46を介して、暗号化端末IDと、端末IDと、が端末装置30から受信開始されたことをトリガとして、記憶部45から読み出されて適宜RAM43に展開された第1の端末管理プログラムとCPU11との協働で、第1の端末管理処理が実行される。   A first terminal management process executed by the center server 40 will be described. In the center server 40, for example, when the reception of the encrypted terminal ID and the terminal ID from the terminal device 30 is started via the communication unit 46, the data is read from the storage unit 45 and expanded in the RAM 43 as appropriate. The first terminal management process is executed in cooperation with the first terminal management program and the CPU 11.

先ず、ステップS11において、通信部46を介して、暗号化端末IDと、端末IDと、が端末装置30から受信され、記憶部45から認証テーブル(図示省略)が読み出される。そして、認証テーブルが参照され、受信した端末IDに対応する鍵が特定され、特定された鍵(鍵T1)が記憶部45から読み出される。そして、読み出された鍵T1を用いて暗号化端末IDが復号化される(ステップS11)。   First, in step S <b> 11, the encrypted terminal ID and the terminal ID are received from the terminal device 30 via the communication unit 46, and an authentication table (not shown) is read from the storage unit 45. Then, the authentication table is referred to, the key corresponding to the received terminal ID is specified, and the specified key (key T1) is read from the storage unit 45. Then, the encrypted terminal ID is decrypted using the read key T1 (step S11).

そして、復号化した端末IDと、受信した端末IDとが比較され、同一であるか否かにより、ステップS11の復号がOKであるか否かが判別される(ステップS12)。復号OKである場合(ステップS12;YES)、認証テーブルが参照され、対応する端末IDの許可情報が許可であるか否かが判別される(ステップS13)。   Then, the decrypted terminal ID and the received terminal ID are compared, and it is determined whether or not the decryption in step S11 is OK depending on whether or not they are the same (step S12). If it is decryption OK (step S12; YES), it is determined whether or not the permission information of the corresponding terminal ID is permission by referring to the authentication table (step S13).

許可されている場合(ステップS13;YES)、電子機器動作OK(認証許可)の旨の動作OK信号が生成されて、動作OKの端末(端末装置30)に対応する鍵(鍵T1)を用いて動作OK信号(認証を許可する情報である認証許可信号)が暗号化され、暗号化OK信号として通信部46を介して端末装置30に送信され(ステップS14)、第1の端末管理処理が終了する。   If permitted (step S13; YES), an operation OK signal indicating electronic device operation OK (authentication permission) is generated, and a key (key T1) corresponding to the terminal (terminal device 30) of the operation OK is used. The operation OK signal (authentication permission signal which is information for permitting authentication) is encrypted and transmitted as an encrypted OK signal to the terminal device 30 via the communication unit 46 (step S14), and the first terminal management process is performed. finish.

復号OKでない場合(ステップS12;NO)、又は許可されていない場合(ステップS13;NO)、電子機器動作拒否(認証拒否)の旨の拒否信号が生成されて、動作拒否の端末(端末装置30)に対応する鍵(鍵T1)を用いて拒否信号が暗号化され、暗号化拒否信号として通信部46を介して端末装置30に送信され(ステップS15)、第1の端末管理処理が終了する。拒否情報は、端末装置30にSAM10のデータの使用を伴う動作を拒否する旨の信号である。   If the decryption is not OK (step S12; NO), or if it is not permitted (step S13; NO), a reject signal indicating that the electronic device operation is rejected (authentication reject) is generated, and the terminal rejects the operation (terminal device 30). ) Is rejected using the key (key T1) corresponding to), and is transmitted as an encryption rejection signal to the terminal device 30 via the communication unit 46 (step S15), and the first terminal management process ends. . The refusal information is a signal indicating that the terminal device 30 is refrained from an operation involving the use of the SAM 10 data.

次いで、端末装置30で実行される第1の情報処理を説明する。端末装置30において、例えば、電源投入されたことをトリガとして、フラッシュメモリ35から読み出されて適宜RAM33に展開された第1の情報プログラムとCPU31との協働で、第1の情報処理が実行される。   Next, the first information processing executed by the terminal device 30 will be described. In the terminal device 30, for example, the first information processing is executed by the cooperation of the CPU 31 and the first information program read from the flash memory 35 and appropriately expanded in the RAM 33 with the power-on as a trigger. Is done.

先ず、ステップS21において、接続部37を介して、SAM10に端末IDの要求が送信され、その端末IDがSAM10から受信される(ステップS21)。そして、接続部37を介して、受信された端末IDが暗号化のためにSAM10に送出(送信)され、暗号化端末IDをSAM10から受信する(ステップS22)。そして、ステップS11に対応して、通信部36を介して、端末IDと、暗号化端末IDとがセンタサーバ40へ送信される(ステップS23)。   First, in step S21, a request for a terminal ID is transmitted to the SAM 10 via the connection unit 37, and the terminal ID is received from the SAM 10 (step S21). Then, the received terminal ID is transmitted (transmitted) to the SAM 10 for encryption via the connection unit 37, and the encrypted terminal ID is received from the SAM 10 (step S22). And corresponding to step S11, terminal ID and encryption terminal ID are transmitted to the center server 40 via the communication part 36 (step S23).

そして、ステップS14又はS15に対応して、通信部36を介して、暗号化OK信号又は暗号化拒否信号をセンタサーバ40から受信して、接続部37を介して、暗号化OK信号又は暗号化拒否信号がSAM10に送信される(ステップS24)。   Corresponding to step S14 or S15, an encrypted OK signal or an encryption refusal signal is received from the center server 40 via the communication unit 36, and an encrypted OK signal or encrypted via the connection unit 37. A rejection signal is transmitted to the SAM 10 (step S24).

そして、ステップS38に対応して、接続部37を介して認証トークンをSAM10から受信して、認証トークンがRAM33に保管(記憶)される(ステップS25)。   Corresponding to step S38, an authentication token is received from the SAM 10 via the connection unit 37, and the authentication token is stored (stored) in the RAM 33 (step S25).

そして、フラッシュメモリ35、カードリーダ38に記憶され、SAM10に記憶される鍵で暗号化された所望のプログラム及びデータの少なくとも一つが読み出され、接続部37を介して、暗号化されたプログラム及びデータの少なくとも一つがSAM10に送信され、復号化されたプログラム及びデータがSAM10から受信される(ステップS26)。そして、復号化されたプログラム及びデータを用いて各種処理が実行される(ステップS27)。   Then, at least one of the desired program and data stored in the flash memory 35 and the card reader 38 and encrypted with the key stored in the SAM 10 is read out, and the encrypted program and At least one of the data is transmitted to the SAM 10, and the decrypted program and data are received from the SAM 10 (step S26). Various processes are executed using the decrypted program and data (step S27).

ステップS26,S27では、例えば、カードリーダ38によりICカード60から読み出されたカード情報が、鍵Rで暗号化されて端末装置30に送信される。そして、入力部32で暗証番号等の暗証情報が入力される。端末装置30において、鍵Rで暗号化されたカード情報がSAM10に送信される。SAM10でカード情報が鍵Rで復号化され、端末装置30に送信される。そして、ステップS27で、復号化されたカード情報と、暗証番号とがSAM10に送信されて鍵T1で暗号化される。   In steps S26 and S27, for example, card information read from the IC card 60 by the card reader 38 is encrypted with the key R and transmitted to the terminal device 30. Then, password information such as a password is input at the input unit 32. In the terminal device 30, the card information encrypted with the key R is transmitted to the SAM 10. The card information is decrypted with the key R by the SAM 10 and transmitted to the terminal device 30. In step S27, the decrypted card information and the password are transmitted to the SAM 10 and encrypted with the key T1.

また、ステップS26,S27では、例えば、フラッシュメモリ35に記憶された使用していないカード情報の暗号化データd1がSAM10に送信される。SAM10で暗号化データd1が鍵D1で復号化され、その復号化データを用いて、上記鍵Rで復号化されたカード情報が使用していないものであるか判別され、使用していないものである場合に、そのICカード60の決済が禁止に設定される。   Further, in steps S26 and S27, for example, the encrypted data d1 of card information that is not used and is stored in the flash memory 35 is transmitted to the SAM 10. The SAM 10 decrypts the encrypted data d1 with the key D1, and using the decrypted data, it is determined whether the card information decrypted with the key R is unused or not. In some cases, settlement of the IC card 60 is prohibited.

ステップS27の実行後、認証トークンがRAM33から削除される(ステップS28)。そして、セキュリティを守るため、復号化されたプログラム及びデータの少なくとも一つが消去され(ステップS29)、第1の情報処理が終了する。   After execution of step S27, the authentication token is deleted from the RAM 33 (step S28). In order to protect security, at least one of the decrypted program and data is erased (step S29), and the first information processing ends.

次いで、SAM10で実行される第1のSAM使用許可処理を説明する。SAM10において、例えば、ステップS21に対応して、通信部16を介して、端末ID要求を端末装置30から受信開始したことをトリガとして、EEPROM17から読み出されて適宜RAM13に展開された第1のSAM使用許可プログラムとCPU11との協働で、第1のSAM使用許可処理が実行される。   Next, the first SAM use permission process executed by the SAM 10 will be described. In the SAM 10, for example, corresponding to step S21, the first read out from the EEPROM 17 and appropriately expanded in the RAM 13 is triggered by the start of reception of the terminal ID request from the terminal device 30 via the communication unit 16. The first SAM use permission process is executed in cooperation with the SAM use permission program and the CPU 11.

先ず、通信部16を介して、端末ID要求が端末装置30から受信され、EEPROM17から端末IDが読み出されて端末装置30に送信される(ステップS31)。そして、ステップS22に対応して、通信部16を介して、端末IDが端末装置30から受信され、EEPROM17から端末装置30認証用の鍵(鍵T1)が読み出され、端末IDが読み出した鍵で暗号演算部12を介して暗号化され暗号化端末IDとして端末装置30に送信される(ステップS32)。   First, a terminal ID request is received from the terminal device 30 via the communication unit 16, and the terminal ID is read from the EEPROM 17 and transmitted to the terminal device 30 (step S31). Corresponding to step S22, the terminal ID is received from the terminal device 30 via the communication unit 16, the key for authenticating the terminal device 30 (key T1) is read from the EEPROM 17, and the key from which the terminal ID is read. Is encrypted via the cryptographic operation unit 12 and transmitted to the terminal device 30 as an encrypted terminal ID (step S32).

そして、ステップS24に対応して、通信部16を介して、暗号化OK信号又は暗号化拒否信号が端末装置30から受信され、鍵(鍵T1)で暗号演算部12を介して復号化される(ステップS33)。そして、ステップS33で復号化された信号がOK信号であるか否かにより、端末装置30の動作がOKであるか否かが判別される(ステップS34)。端末装置30の動作がOKである場合(ステップS34;YES)、SAM10のデータが使用許可に設定される(ステップS35)。SAM10のデータの使用許可の旨の信号は、端末装置30に送信される構成としてもよい。   Corresponding to step S24, the encrypted OK signal or the encryption refusal signal is received from the terminal device 30 through the communication unit 16, and is decrypted through the cryptographic operation unit 12 with the key (key T1). (Step S33). Then, whether or not the operation of the terminal device 30 is OK is determined based on whether or not the signal decoded in step S33 is an OK signal (step S34). When the operation of the terminal device 30 is OK (step S34; YES), the data of the SAM 10 is set to use permission (step S35). A signal indicating permission to use data of the SAM 10 may be transmitted to the terminal device 30.

そして、乱数が生成され、生成された乱数が認証トークンとして設定される(ステップS36)。ステップS36の実行後、認証トークンがEEPROM17に保管(記憶)される(ステップS37)。そして、通信部16を介して認証トークンが端末装置30に出力(送信)される(ステップS38)。   Then, a random number is generated, and the generated random number is set as an authentication token (step S36). After execution of step S36, the authentication token is stored (stored) in the EEPROM 17 (step S37). Then, the authentication token is output (transmitted) to the terminal device 30 via the communication unit 16 (step S38).

そして、ステップS26に対応して、通信部16を介して、暗号化されたプログラム及びデータの少なくとも一つが端末装置30から受信され、EEPROM17から鍵R又は鍵D1が読み出される。そして、暗号化されたプログラム及びデータの少なくとも一つが暗号演算部12を介して鍵(鍵R又は鍵D1)で復号化されて端末装置30に送信される(ステップS39)。ステップS39の実行後、認証トークンがEEPROM17から削除され(ステップS40)、第1のSAM使用許可処理が終了する。   Corresponding to step S26, at least one of the encrypted program and data is received from the terminal device 30 via the communication unit 16, and the key R or the key D1 is read from the EEPROM 17. Then, at least one of the encrypted program and data is decrypted with the key (key R or key D1) via the cryptographic operation unit 12 and transmitted to the terminal device 30 (step S39). After execution of step S39, the authentication token is deleted from the EEPROM 17 (step S40), and the first SAM use permission process ends.

ステップS33で復号化された信号が拒否信号である、又は復号に失敗し、端末装置30の動作がOKでない場合(ステップS34;NO)、SAM10のデータ使用禁止が設定され(ステップS41)、第1のSAM使用許可処理が終了する。SAM10のデータの使用不許可の旨の信号は、端末装置30に送信される構成としてもよい。   If the signal decoded in step S33 is a refusal signal or decoding fails and the operation of the terminal device 30 is not OK (step S34; NO), data use prohibition of the SAM 10 is set (step S41). 1 SAM use permission processing ends. The signal indicating that the use of the SAM 10 data is not permitted may be transmitted to the terminal device 30.

センタサーバ40が許可を出していない場合に鍵D1,Rを使用できないため、端末装置30のCPU31は、鍵D1,Rを用いた動作を行うことができない。このため、悪意を持って端末装置30からクレジットカード等の番号を盗もうとしても、端末装置30は動作しないので悪意から防御することが可能である。   Since the keys D1 and R cannot be used when the center server 40 has not given permission, the CPU 31 of the terminal device 30 cannot perform an operation using the keys D1 and R. For this reason, even if an attempt is made to steal a number such as a credit card from the terminal device 30 with malicious intent, the terminal device 30 does not operate and can be protected from malicious intent.

次いで、図7を参照して、障害から復帰した際の決済システム1の動作を説明する。図7に、第2の情報処理、第1の認証トークン比較処理の流れを示す。   Next, the operation of the payment system 1 when returning from a failure will be described with reference to FIG. FIG. 7 shows the flow of the second information processing and the first authentication token comparison process.

端末装置30で実行される第2の情報処理を説明する。例えば、第1の情報処理のステップS25において、認証トークンがRAM33に記憶された後に、停電等によりSAM10及び端末装置30への電源の供給が遮断し、所定時間経過後に電源の供給が復帰したとする。この場合、電源復帰されたこと等をトリガとして、フラッシュメモリ35から読み出されて適宜RAM33に展開された第2の情報プログラムとCPU31との協働で、第2の情報処理が実行される。   The second information processing executed by the terminal device 30 will be described. For example, in step S25 of the first information processing, after the authentication token is stored in the RAM 33, the power supply to the SAM 10 and the terminal device 30 is interrupted due to a power failure or the like, and the power supply is restored after a predetermined time has elapsed. To do. In this case, the second information processing is executed in cooperation with the CPU 31 and the second information program read from the flash memory 35 and appropriately developed in the RAM 33, triggered by the power return.

先ず、RAM33に認証トークンが記憶(残存)されているか否かが判別される(ステプS51)。認証トークンが残存されていないと判別された場合(ステップS51;NO)、通常処理へ移行される(ステップS52)。認証トークンが残存されていると判別された場合(ステップS51;YES)、接続部37を介して認証トークンがSAM10に送出される(ステップS53)。   First, it is determined whether or not the authentication token is stored (remaining) in the RAM 33 (step S51). When it is determined that no authentication token remains (step S51; NO), the process proceeds to normal processing (step S52). When it is determined that the authentication token remains (step S51; YES), the authentication token is sent to the SAM 10 via the connection unit 37 (step S53).

そして、ステップS67に対応して、接続部37を介して認証トークンをSAM10から受信して、受信した認証トークンがRAM33に保管(記憶)される(ステップS54)。   Corresponding to step S67, an authentication token is received from the SAM 10 via the connection unit 37, and the received authentication token is stored (stored) in the RAM 33 (step S54).

ステップS55〜S58は、第1の情報処理のステップS26〜S29と同様である。ステップS58の実行後、第2の情報処理が終了する。   Steps S55 to S58 are the same as steps S26 to S29 of the first information processing. After the execution of step S58, the second information processing ends.

次いで、SAM10で実行される第1の認証トークン比較処理を説明する。例えば、ステップS53に対応して、通信部16を介して、認証トークンを端末装置30から受信開始したことをトリガとして、EEPROM17から読み出されて適宜RAM13に展開された第1の認証トークン比較プログラムとCPU11との協働で、第1の認証トークン比較処理が実行される。   Next, a first authentication token comparison process executed by the SAM 10 will be described. For example, corresponding to step S53, the first authentication token comparison program read from the EEPROM 17 and appropriately expanded in the RAM 13 triggered by the start of reception of the authentication token from the terminal device 30 via the communication unit 16 The first authentication token comparison process is executed in cooperation with the CPU 11.

先ず、通信部16を介して、認証トークンが端末装置30から受信され、EEPROM17から認証トークンが読み出され、受信した認証トークンと、EEPROM17から読み出した認証トークンとの比較が行われる(ステップS61)。比較は、乱数が一致するか否かにより行われる。   First, an authentication token is received from the terminal device 30 via the communication unit 16, the authentication token is read from the EEPROM 17, and the received authentication token is compared with the authentication token read from the EEPROM 17 (step S61). . The comparison is performed based on whether the random numbers match.

そして、受信した認証トークンと、EEPROM17から読み出した認証トークンとが同一であるか否かにより、比較OKであるか否かが判別される(ステップS62)。比較OKである場合(ステップS62;YES)、ステップS63に移行される。比較OKでない場合(ステップS62;NO)、ステップS64に移行される。ステップS63、ステップS64は、それぞれ第1のSAM使用許可処理のステップS35、ステップS41と同様である。   Then, whether or not the comparison is OK is determined based on whether or not the received authentication token is the same as the authentication token read from the EEPROM 17 (step S62). If the comparison is OK (step S62; YES), the process proceeds to step S63. If the comparison is not OK (step S62; NO), the process proceeds to step S64. Step S63 and step S64 are the same as step S35 and step S41 of the first SAM use permission process, respectively.

ステップS63の実行後、新たな乱数が生成され、生成された乱数が認証トークンとして設定されることにより認証トークンが更新される(ステップS65)。   After execution of step S63, a new random number is generated, and the generated random number is set as an authentication token to update the authentication token (step S65).

ステップS66〜S69は、第1のSAM使用許可処理のステップS37〜S40と同様である。ステップS69の実行後、認証トークン比較処理は終了する。   Steps S66 to S69 are the same as steps S37 to S40 of the first SAM use permission process. After execution of step S69, the authentication token comparison process ends.

以上、本実施の形態によれば、障害から復帰した際に、EEPROM17に記憶された認証トークンとRAM33に記憶された認証トークンとが一致する場合に、センタサーバ40との認証状態を継続する。これにより、障害から復帰した際、認証を行う手間をなくすことができる。例えば、電子機器(SAM10及び端末装置30)がノイズなどによる電源不安定状況から復帰した場合や、電池寿命による電池交換後に復帰した場合などにおいて、センタサーバ40との認証を再度行う手間をなくすことができる。また、センタサーバ40との認証を行う必要がないので、センタサーバ40との通信不通の問題を考慮する必要がない。   As described above, according to the present embodiment, when the authentication token stored in the EEPROM 17 matches the authentication token stored in the RAM 33 when returning from the failure, the authentication state with the center server 40 is continued. As a result, it is possible to eliminate the trouble of performing authentication when returning from a failure. For example, when the electronic device (SAM 10 and terminal device 30) recovers from a power supply unstable state due to noise or the like, or when the electronic device (SAM 10 and terminal device 30) recovers after battery replacement due to battery life, it eliminates the trouble of performing authentication with the center server 40 again. Can do. In addition, since it is not necessary to perform authentication with the center server 40, it is not necessary to consider the problem of communication interruption with the center server 40.

また、認証トークンを新しい乱数を用いた認証トークンに更新する。これにより、古い認証トークンの再利用が不可能となるので、認証トークンの脆弱性を回避することができる。   Also, the authentication token is updated to an authentication token using a new random number. As a result, the old authentication token cannot be reused, and the vulnerability of the authentication token can be avoided.

また、従来、管理者のみが知っているパスワードで認証を行っている場合に障害が発生すると、管理者が現場にいなければ再認証を行うことができなかった。しかし、本発明の構成であれば、再認証を行う必要がないので、管理者がいないことにより処理(例えば、決済処理)の機能が停止することを防止することができる。   Conventionally, if a failure occurs when authentication is performed with a password that only the administrator knows, re-authentication cannot be performed unless the administrator is at the site. However, according to the configuration of the present invention, it is not necessary to perform re-authentication, and therefore it is possible to prevent the function of processing (for example, settlement processing) from being stopped due to the absence of an administrator.

また、不揮発のメモリ(RAM33、EEPROM17)に記憶された認証トークンを比較することにより認証状態を継続させるので、例えば、停電になったとしても電子機器の処理を継続させることができる。   Further, since the authentication state is continued by comparing the authentication tokens stored in the non-volatile memory (RAM 33, EEPROM 17), for example, even if a power failure occurs, the processing of the electronic device can be continued.

(第2の実施の形態)
図8〜図10を参照して、本発明に係る第2の実施の形態を説明する。本実施の形態の装置構成は、第1の実施の形態と同様であり、同様な部分には同一の符号を付し、その詳細な説明を援用する。以下、異なる部分について説明する。
(Second Embodiment)
A second embodiment according to the present invention will be described with reference to FIGS. The apparatus configuration of the present embodiment is the same as that of the first embodiment, and the same reference numerals are given to the same parts, and the detailed description thereof is used. Hereinafter, different parts will be described.

CPU11は、第2のSAM使用許可プログラムとの協働により、端末装置30の通信部36及び通信部16を介して動作OK信号とともに、認証時刻情報をセンタサーバ40から受信した場合に、当該受信した認証時刻情報を含めて認証トークンを生成する。認証時刻情報とは、認証を許可した時刻を示す情報である。本実施の形態では、認証時刻情報は、センタサーバ時刻情報に該当する。センタサーバ時刻情報は、計時部47により計時された時刻情報である。   The CPU 11 receives the authentication time information from the center server 40 together with the operation OK signal via the communication unit 36 and the communication unit 16 of the terminal device 30 in cooperation with the second SAM use permission program. An authentication token is generated including the authentication time information. The authentication time information is information indicating the time when authentication is permitted. In the present embodiment, the authentication time information corresponds to the center server time information. The center server time information is time information timed by the time measuring unit 47.

また、CPU11は、第2の認証トークン比較プログラムとの協働により、計時部39aにより計時された第1の時刻情報としての端末装置時刻情報と認証トークンに含まれる認証時刻情報との差分時間を算出する。そして、CPU11は、算出した差分時間が予め定められた時間以内か否かを検証し、予め定められた時間以内であり、且つ、EEPROM17に記憶された認証トークンとRAM33に記憶された認証トークンとが一致する場合に、センタサーバ40との認証状態を継続させる。   In addition, the CPU 11 cooperates with the second authentication token comparison program to calculate a difference time between the terminal device time information as the first time information timed by the time measuring unit 39a and the authentication time information included in the authentication token. calculate. Then, the CPU 11 verifies whether or not the calculated difference time is within a predetermined time, and is within the predetermined time, and the authentication token stored in the EEPROM 17 and the authentication token stored in the RAM 33 If they match, the authentication state with the center server 40 is continued.

EEPROM17は、第2のSAM使用許可プログラム及び第2の認証トークン比較プログラムを記憶する。フラッシュメモリ35は、第3の情報プログラム及び第4の情報プログラムを記憶する。記憶部45は、第2の端末管理プログラムを記憶する。   The EEPROM 17 stores a second SAM use permission program and a second authentication token comparison program. The flash memory 35 stores a third information program and a fourth information program. The storage unit 45 stores a second terminal management program.

図8〜図10を参照して、決済システム1の動作を説明する。図8に第2の端末管理処理、第3の情報処理、第2のSAM使用許可処理の流れを示す。図9に第2の端末管理処理、第3の情報処理、第2のSAM使用許可処理の流れの続きを示す。   The operation of the payment system 1 will be described with reference to FIGS. FIG. 8 shows a flow of the second terminal management process, the third information process, and the second SAM use permission process. FIG. 9 shows a continuation of the flow of the second terminal management process, the third information process, and the second SAM use permission process.

センタサーバ40で実行される第2の端末管理処理を説明する。例えば、通信部46を介して、暗号化端末IDと、端末IDと、が端末装置30から受信開始されたことをトリガとして、記憶部45から読み出されて適宜RAM43に展開された第2の端末管理プログラムとCPU41との協働で、第2の端末管理プログラムが実行される。   The second terminal management process executed by the center server 40 will be described. For example, when the reception of the encrypted terminal ID and the terminal ID from the terminal device 30 is triggered via the communication unit 46, the second read out from the storage unit 45 and appropriately expanded in the RAM 43 In cooperation with the terminal management program and the CPU 41, the second terminal management program is executed.

ステップS71〜S73は、第1の端末管理処理のステップS11〜S13と同様である。ステップS73において、許可されていると判別された場合(ステップS73;YES)、暗号化OK信号及びセンタサーバ時刻情報が通信部46を介して端末装置30に送信される(ステップS74)。ステップS74の実行後、第2の端末管理処理が終了する。   Steps S71 to S73 are the same as steps S11 to S13 of the first terminal management process. In step S73, when it is determined that it is permitted (step S73; YES), the encrypted OK signal and the center server time information are transmitted to the terminal device 30 via the communication unit 46 (step S74). After execution of step S74, the second terminal management process ends.

ステップS75は、第1の端末管理処理のステップS15と同様である。ステップS75の実行後、第2の端末管理処理が終了する。   Step S75 is the same as step S15 of the first terminal management process. After execution of step S75, the second terminal management process ends.

次いで、端末装置30で実行される第3の情報処理を説明する。端末装置30において、例えば、電源投入されたことをトリガとして、フラッシュメモリ35から読み出されて適宜RAM33に展開された第3の情報プログラムとCPU11との協働で、第3の情報処理が実行される。   Next, the third information processing executed by the terminal device 30 will be described. In the terminal device 30, for example, the third information processing is executed in cooperation with the CPU 11 and the third information program read from the flash memory 35 and appropriately expanded in the RAM 33 with the power-on as a trigger. Is done.

先ず、接続部37を介して端末装置時刻情報がSAM10に送出される(ステップS81)。端末装置時刻情報は、計時部39aで計時された時刻情報である。ステップS82〜ステップS84は、第1の情報処理のステップS21〜ステップS23と同様である。   First, terminal device time information is sent to the SAM 10 via the connection unit 37 (step S81). The terminal device time information is time information timed by the time measuring unit 39a. Steps S82 to S84 are the same as steps S21 to S23 of the first information processing.

ステップS84の実行後、接続部37を介して暗号化信号(暗号化OK信号又は暗号化拒否信号)及びセンタサーバ時刻情報をセンタサーバ40から受信して、接続部37を介して暗号化信号及びセンタサーバ時刻情報がSAM10に送出される(ステップS85)。   After execution of step S84, the encrypted signal (encrypted OK signal or encryption refusal signal) and center server time information are received from the center server 40 via the connection unit 37, and the encrypted signal and The center server time information is sent to the SAM 10 (step S85).

そして、ステップS107に対応して、接続部37を介してSAM10からSAM時刻情報を受信して、受信したSAM時刻情報に端末装置時刻情報が較正される(ステップS86)。ここで、受信したSAM時刻情報はセンタサーバ時刻情報に設定されている。すなわち、端末装置時刻情報がセンタサーバ時刻情報に設定される。   Then, corresponding to step S107, SAM time information is received from the SAM 10 via the connection unit 37, and the terminal device time information is calibrated to the received SAM time information (step S86). Here, the received SAM time information is set in the center server time information. That is, the terminal device time information is set in the center server time information.

ステップS87〜ステップS91は、第1の情報処理のステップS25〜ステップS29と同様である。ステップS91の実行後、第3の情報処理は終了する。   Steps S87 to S91 are the same as steps S25 to S29 of the first information processing. After the execution of step S91, the third information process ends.

次いで、SAM10で実行される第2のSAM使用許可処理を説明する。SAM10において、例えば、ステップS81に対応して、通信部16を介して、端末装置時刻情報を端末装置30から受信開始したことをトリガとして、EEPROM17から読み出されて適宜RAM13に展開された第2のSAM使用許可プログラムとCPU11との協働で、第2のSAM使用許可処理が実行される。   Next, a second SAM use permission process executed by the SAM 10 will be described. In the SAM 10, for example, in response to step S81, the second read out from the EEPROM 17 and appropriately expanded in the RAM 13 is triggered by the start of reception of the terminal device time information from the terminal device 30 via the communication unit 16. The second SAM use permission process is executed in cooperation with the SAM use permission program and the CPU 11.

先ず、通信部16を介して、端末装置時刻情報が端末装置30から受信され、受信された端末装置時刻情報がSAM時刻情報として設定される(ステップS101)。SAM時刻情報は、例えば、EEPROM17に格納される。   First, terminal device time information is received from the terminal device 30 via the communication unit 16, and the received terminal device time information is set as SAM time information (step S101). The SAM time information is stored in the EEPROM 17, for example.

ステップ102〜ステップS103は、第1のSAM使用許可処理のステップS31〜ステップS32と同様である。ステップS103の実行後、ステップS85に対応して、通信部16を介して暗号化信号及びセンタサーバ時刻情報が端末装置30から受信され、暗号化信号(暗号化OK信号又は暗号化拒否信号)及びセンタサーバ時刻情報が鍵(鍵T1)で暗号演算部12を介して復号化される(ステップS104)。   Steps 102 to S103 are the same as steps S31 to S32 of the first SAM use permission process. After execution of step S103, corresponding to step S85, the encrypted signal and the center server time information are received from the terminal device 30 via the communication unit 16, and the encrypted signal (encrypted OK signal or encrypted rejection signal) and The center server time information is decrypted with the key (key T1) via the cryptographic operation unit 12 (step S104).

ステップS105、ステップS106、ステップS114は、第1のSAM使用許可処理のステップS34、ステップS35、ステップS41と同様である。ステップS106の実行後、SAM時刻情報が較正される(ステップS107)。すなわち、SAM時刻情報がセンタサーバ時刻情報に設定される。較正されたSAM時刻情報は、通信部16を介して端末装置30に送信される。   Step S105, step S106, and step S114 are the same as step S34, step S35, and step S41 of the first SAM use permission process. After execution of step S106, the SAM time information is calibrated (step S107). That is, the SAM time information is set as the center server time information. The calibrated SAM time information is transmitted to the terminal device 30 via the communication unit 16.

そして、乱数が生成される(ステップS108)。そして、乱数とSAM時刻情報とが認証トークンとして設定される(ステップS109)。ここで、SAM時刻情報はセンタサーバ時刻情報に該当する。すなわち、乱数とセンタサーバ時刻情報とが認証トークンとして設定される。   A random number is generated (step S108). A random number and SAM time information are set as an authentication token (step S109). Here, the SAM time information corresponds to the center server time information. That is, a random number and center server time information are set as an authentication token.

ステップS109の実行後、認証トークンがEEPROM17に保管される(ステップS110)。そして、認証トークンが鍵(鍵B)で暗号化され、暗号化された認証トークンが通信部16を介して端末装置30に出力(送信)される(ステップS111)。ここで、鍵Bとは、認証トークンを暗号化又は復号化するための鍵のことをいう。   After execution of step S109, the authentication token is stored in the EEPROM 17 (step S110). Then, the authentication token is encrypted with the key (key B), and the encrypted authentication token is output (transmitted) to the terminal device 30 via the communication unit 16 (step S111). Here, the key B refers to a key for encrypting or decrypting an authentication token.

ステップS112〜ステップS113は、第1のSAM使用許可処理のステップS39〜ステップS40と同様である。ステップS113の実行後、第2のSAM使用許可処理は終了する。   Steps S112 to S113 are the same as steps S39 to S40 of the first SAM use permission process. After execution of step S113, the second SAM use permission process ends.

次いで、図10を参照して、障害から復帰した際の決済システム1の動作を説明する。図10に、第4の情報処理、第2の認証トークン比較処理の流れを示す。   Next, the operation of the payment system 1 when returning from a failure will be described with reference to FIG. FIG. 10 shows a flow of the fourth information processing and the second authentication token comparison process.

端末装置30で実行される第4の情報処理を説明する。例えば、第3の情報処理のステップS87において、認証トークンがRAM33に記憶された後に、停電により電源の供給が遮断したとする。そして、所定時間経過後に電源の供給が復帰したとする。この場合、電源の供給が復帰されたこと等をトリガとして、フラッシュメモリ35から読み出されて適宜RAM33に展開された第2の情報処理プログラムとCPU31との協働で、第4の情報処理が実行される。   The 4th information processing performed with terminal unit 30 is explained. For example, in step S87 of the third information processing, after the authentication token is stored in the RAM 33, the power supply is interrupted due to a power failure. It is assumed that the supply of power is restored after a predetermined time has elapsed. In this case, the fourth information processing is performed in cooperation with the CPU 31 and the second information processing program read from the flash memory 35 and appropriately expanded in the RAM 33, triggered by the return of power supply or the like. Executed.

先ず、接続部37を介して端末装置時刻情報がSAM10に送出される(ステップS121)。ステップS122〜ステップS129は、第2の情報処理の第ステップS51〜ステップS58と同様である。ステップS129の実行後、第4の情報処理は終了する。   First, terminal device time information is sent to the SAM 10 via the connection unit 37 (step S121). Steps S122 to S129 are the same as steps S51 to S58 of the second information processing. After the execution of step S129, the fourth information process ends.

次いで、SAM10で実行される第2の認証トークン比較処理を説明する。例えば、ステップS121に対応して、通信部16を介して端末装置30から端末装置時刻情報を受信開始したことをトリガとして、EEPROM17から読み出されて適宜RAM13に展開された第2の認証トークン比較プログラムと、CPU11との協働で第2の認証トークン比較処理が実行される。   Next, a second authentication token comparison process executed by the SAM 10 will be described. For example, in response to step S121, the second authentication token comparison read out from the EEPROM 17 and appropriately expanded in the RAM 13 is triggered by the start of reception of the terminal device time information from the terminal device 30 via the communication unit 16. A second authentication token comparison process is executed in cooperation with the program and the CPU 11.

先ず、通信部16を介して端末装置時刻情報が受信される。そして、SAM時刻情報が受信した端末装置時刻情報に設定される(ステップS131)。そして、ステップS124に対応して、通信部16を介して端末装置30から認証トークンが受信され、受信した認証トークンが鍵(鍵B)で復号される(ステップS132)。   First, terminal device time information is received via the communication unit 16. Then, the SAM time information is set to the received terminal device time information (step S131). Corresponding to step S124, an authentication token is received from the terminal device 30 via the communication unit 16, and the received authentication token is decrypted with a key (key B) (step S132).

そして、EEPROM17に記憶した認証トークンと、復号された認証トークンと、が一致するか否かが比較される(ステップS133)。具体的には、EEPROM17に記憶した認証トークンに含まれる乱数と、復号された認証トークンに含まれる乱数と、が一致するか否かが比較される。そして、認証トークンの発行時刻(認証時刻情報)は予め定められた時間以内であるか否かが検証される(ステップS134)。具体的には、ステップS131でSAM時刻情報として設定された端末装置時刻情報と、ステップS109で設定された認証トークンに含まれるセンタサーバ時刻情報と、の差分時間が算出される。そして、算出された差分時間が予め定められた時間以内か否かが検証される。予め定められた時間は、認証トークンの有効期限に該当する。また、予め定められた時間は、任意の時間(例えば、24時間)であり、EEPROM17に記憶されている。   Then, it is compared whether or not the authentication token stored in the EEPROM 17 matches the decrypted authentication token (step S133). Specifically, it is compared whether or not the random number included in the authentication token stored in the EEPROM 17 matches the random number included in the decrypted authentication token. Then, it is verified whether or not the authentication token issuance time (authentication time information) is within a predetermined time (step S134). Specifically, the difference time between the terminal device time information set as the SAM time information in step S131 and the center server time information included in the authentication token set in step S109 is calculated. Then, it is verified whether or not the calculated difference time is within a predetermined time. The predetermined time corresponds to the expiration date of the authentication token. Further, the predetermined time is an arbitrary time (for example, 24 hours) and is stored in the EEPROM 17.

そして、EEPROM17に記憶した認証トークンと、復号された認証トークンとが同一であるか否か、及び認証トークンの発行時刻は予め定められた時間以内であるか否かにより、検証OKか否かが判別される(ステップS135)。   Whether the verification token is OK or not depends on whether the authentication token stored in the EEPROM 17 is the same as the decrypted authentication token, and whether the authentication token issuance time is within a predetermined time. A determination is made (step S135).

ステップS136〜ステップS137は、第1の認証トークン比較処理のステップS63〜ステップS64と同様である。ステップS137の実行後、新しい乱数が生成される(ステップS138)。そして、新しい乱数と、ステップS131でSAM時刻情報として設定された端末装置時刻情報と、が認証トークンとして設定される(ステップS139)。すなわち、認証トークンが新しい乱数及び端末装置時刻情報を含んだ認証トークンに更新される。そして、認証トークンがEEPROM17に保管される(ステップS140)。   Steps S136 to S137 are the same as steps S63 to S64 of the first authentication token comparison process. After execution of step S137, a new random number is generated (step S138). Then, the new random number and the terminal device time information set as the SAM time information in step S131 are set as the authentication token (step S139). That is, the authentication token is updated to an authentication token including a new random number and terminal device time information. Then, the authentication token is stored in the EEPROM 17 (step S140).

そして、認証トークンが鍵(鍵B)を用いて暗号化され、暗号化された認証トークンが通信部16を介して端末装置30に出力される(ステップS141)。ステップS142〜ステップS143は、第1の認証トークン比較処理のステップS68〜ステップS69と同様である。ステップS143の実行後、第2の認証トークン比較処理は終了する。   Then, the authentication token is encrypted using the key (key B), and the encrypted authentication token is output to the terminal device 30 via the communication unit 16 (step S141). Steps S142 to S143 are the same as steps S68 to S69 of the first authentication token comparison process. After execution of step S143, the second authentication token comparison process ends.

以上、本実施の形態によれば、端末装置時刻情報とセンタサーバ時刻情報との差分時間を算出し、算出した差分時間が予め定められた時間以内であり、且つ、EEPROM17に記憶された認証トークンとRAM33に記憶された認証トークンとが一致する場合に、センタサーバ40との認証状態を継続する。これにより、認証トークンの有効期限に基づいて、認証状態を継続するか否かを検証できるので、認証トークンの安全性を高めることができる。   As described above, according to the present embodiment, the difference time between the terminal device time information and the center server time information is calculated, and the calculated difference time is within a predetermined time, and the authentication token stored in the EEPROM 17 And the authentication token stored in the RAM 33 match, the authentication state with the center server 40 is continued. Accordingly, it is possible to verify whether or not to continue the authentication state based on the expiration date of the authentication token, so that the security of the authentication token can be improved.

また、暗号鍵(鍵B)を用いて認証トークンを暗号化させる。これにより、悪意のあるSAM10内の鍵の解析の試みを確実に防御できる。また、暗号鍵(鍵B)により、耐タンパ手段(SAM10)と端末装置30との認証トークンの暗号鍵(鍵B)の組み合わせが特定されるので、認証トークンの妥当性を確認することができる。   Also, the authentication token is encrypted using the encryption key (key B). As a result, an attempt to analyze the key in the malicious SAM 10 can be surely prevented. Further, since the combination of the encryption key (key B) of the authentication token between the tamper resistant means (SAM 10) and the terminal device 30 is specified by the encryption key (key B), the validity of the authentication token can be confirmed. .

また、認証トークンを新しい乱数及び端末装置時刻情報を含んだ認証トークンに更新する。これにより、古い認証トークンの再利用が不可能となるので、認証トークンの脆弱性を回避することができる。   Also, the authentication token is updated to an authentication token including a new random number and terminal device time information. As a result, the old authentication token cannot be reused, and the vulnerability of the authentication token can be avoided.

(第3の実施の形態)
図11〜図13を参照して、第3の実施の形態を説明する。本実施の形態の装置構成において、第1の実施の形態の装置構成と同様の部分は、同一の符号を付し、その詳細な説明を援用する。以下、異なる部分について説明する。先ず、図11を参照して、本実施の形態の装置構成を説明する。図11に決済システム2の構成を示す。
(Third embodiment)
A third embodiment will be described with reference to FIGS. In the device configuration of the present embodiment, the same parts as those of the device configuration of the first embodiment are denoted by the same reference numerals, and the detailed description thereof is incorporated. Hereinafter, different parts will be described. First, the apparatus configuration of the present embodiment will be described with reference to FIG. FIG. 11 shows the configuration of the payment system 2.

図11に示すように、決済システム2は、SAM10と、端末装置30と、センタサーバ40と、タイムサーバ50と、通信ネットワークNと、を備えて構成される。   As shown in FIG. 11, the payment system 2 includes a SAM 10, a terminal device 30, a center server 40, a time server 50, and a communication network N.

タイムサーバ50は、時刻を計時するサーバ装置である。タイムサーバ50は、通信ネットワークNを介して端末装置30と通信接続される。   The time server 50 is a server device that measures time. The time server 50 is communicatively connected to the terminal device 30 via the communication network N.

図12に示すように、タイムサーバ50は、CPU51と、入力部52と、RAM53と、表示部54と、記憶部55と、通信部56と、計時部57と、を備えて構成される。CPU51と、入力部52と、RAM53と、表示部54と、記憶部55と、通信部56と、計時部57とは、センタサーバ40のCPU41と、入力部42と、RAM43と、表示部44と、記憶部45と、通信部46と、計時部47とそれぞれ同様である。   As shown in FIG. 12, the time server 50 includes a CPU 51, an input unit 52, a RAM 53, a display unit 54, a storage unit 55, a communication unit 56, and a time measuring unit 57. The CPU 51, the input unit 52, the RAM 53, the display unit 54, the storage unit 55, the communication unit 56, and the time measuring unit 57 are the CPU 41 of the center server 40, the input unit 42, the RAM 43, and the display unit 44. The storage unit 45, the communication unit 46, and the time measuring unit 47 are the same.

CPU51は、時刻情報送信プログラムとの協働により通信部56を介して署名付きタイムサーバ時刻情報を送信する。タイムサーバ時刻情報とは、計時部57により計時された時刻である。署名とは、タイムサーバ時刻情報から一定の法則で割り出した固定長のデータ(ハッシュ値)を、鍵(鍵C)で暗号化した情報のことをいう。鍵Cとは、タイムサーバ時刻情報のハッシュ値を暗号化又は復号化するための鍵のことをいう。また、記憶部55は時刻情報送信プログラムを記憶する。   The CPU 51 transmits signed time server time information via the communication unit 56 in cooperation with the time information transmission program. The time server time information is the time measured by the time measuring unit 57. The signature refers to information obtained by encrypting fixed-length data (hash value) calculated from time server time information according to a certain rule with a key (key C). The key C is a key for encrypting or decrypting the hash value of the time server time information. The storage unit 55 stores a time information transmission program.

CPU11は、第3の認証トークン比較プログラムとの協働により、端末装置30の通信部36及び通信部16を介してタイムサーバ50で計時された第2の時刻情報としてのタイムサーバ時刻情報をタイムサーバ50から定期的又は不定期に受信する。そして、CPU11は、受信したタイムサーバ時刻情報と認証トークンに含まれる認証時刻情報との差分時間を算出し、算出した差分時間が予め定められた時間以内か否かを検証し、予め定められた時間以内であり、且つ、EEPROM17に記憶された認証トークンとRAM33に記憶された認証トークンとが一致する場合に、センタサーバ40との認証状態を継続させる。本実施の形態では、認証時刻情報は、センタサーバ時刻情報に該当する。   The CPU 11 performs time server time information as second time information measured by the time server 50 via the communication unit 36 and the communication unit 16 of the terminal device 30 in cooperation with the third authentication token comparison program. Receive from the server 50 regularly or irregularly. Then, the CPU 11 calculates a difference time between the received time server time information and the authentication time information included in the authentication token, verifies whether the calculated difference time is within a predetermined time, and is determined in advance. If it is within the time and the authentication token stored in the EEPROM 17 matches the authentication token stored in the RAM 33, the authentication state with the center server 40 is continued. In the present embodiment, the authentication time information corresponds to the center server time information.

EEPROM17は、第3の認証トークン比較プログラムを記憶する。フラッシュメモリ35は、第5の情報プログラムを記憶する。   The EEPROM 17 stores a third authentication token comparison program. The flash memory 35 stores a fifth information program.

次いで、決済システム2の動作を説明する。図13に、時刻情報送信処理、第5の情報処理、第3の認証トークン比較処理の流れを示す。なお、図13に示す各処理の前に、センタサーバ40において第2の端末管理処理、端末装置30において第3の情報処理、SAM10において第2のSAM使用許可処理が予め実行されているものとして、以下説明する。   Next, the operation of the payment system 2 will be described. FIG. 13 shows the flow of time information transmission processing, fifth information processing, and third authentication token comparison processing. Before each process shown in FIG. 13, it is assumed that the second terminal management process is performed in the center server 40, the third information process is performed in the terminal apparatus 30, and the second SAM use permission process is performed in the SAM 10. This will be described below.

タイムサーバ50で実行される時刻情報送信処理について説明する。タイムサーバ50において、例えば、通信部56を介して端末装置30の電源の供給が復帰されたことを示す信号を端末装置30から受信開始したことをトリガとして、記憶部55から読み出されて適宜RAM53に展開された時刻情報送信プログラムと、CPU51との協働で、時刻情報送信処理が実行される。   The time information transmission process executed by the time server 50 will be described. In the time server 50, for example, the time server 50 is read from the storage unit 55 as triggered by the start of receiving from the terminal device 30 a signal indicating that the power supply of the terminal device 30 has been restored via the communication unit 56. A time information transmission process is executed in cooperation with the time information transmission program developed in the RAM 53 and the CPU 51.

先ず、通信部56を介して署名付きのタイムサーバ時刻情報が端末装置30に送信される(ステップS151)。ステップS151の実行後、時刻情報送信処理は終了する。   First, time server time information with a signature is transmitted to the terminal device 30 via the communication unit 56 (step S151). After execution of step S151, the time information transmission process ends.

次いで、端末装置30で実行される第5の情報処理について説明する。例えば、第3の情報処理のステップS87において、認証トークンがRAM33に記憶された後に、停電により電源の供給が遮断したとする。そして、所定時間経過後に電源の供給が復帰したとする。この場合、電源の供給が復帰されたこと等をトリガとして、フラッシュメモリ35から読み出されて適宜RAM33に展開された第5の情報処理プログラムとCPU11との協働で、第5の情報処理が実行される。   Next, fifth information processing executed by the terminal device 30 will be described. For example, in step S87 of the third information processing, after the authentication token is stored in the RAM 33, the power supply is interrupted due to a power failure. It is assumed that the supply of power is restored after a predetermined time has elapsed. In this case, the fifth information processing is performed by the cooperation of the CPU 11 and the fifth information processing program read from the flash memory 35 and appropriately developed in the RAM 33, triggered by the return of power supply or the like. Executed.

先ず、通信部36を介して署名付きタイムサーバ時刻情報が受信される。そして、接続部37を介して受信した署名付きタイムサーバ時刻情報がSAM10に送出される(ステップS161)。   First, time server time information with a signature is received via the communication unit 36. Then, the signed time server time information received via the connection unit 37 is sent to the SAM 10 (step S161).

ステップS162〜ステップS169は、第4の情報処理のステップS122〜ステップS129と同様である。ステップS169の実行後、第5の情報処理は終了する。   Steps S162 to S169 are the same as steps S122 to S129 of the fourth information processing. After execution of step S169, the fifth information process ends.

次いで、SAM10で実行される第3の認証トークン比較処理について説明する。例えば、ステップS161に対応して、通信部16を介して端末装置30から署名付きタイムサーバ時刻情報を受信開始したことをトリガとして、EEPROM17から読み出されて適宜RAM13に展開された第3の認証トークン比較プログラムと、CPU11との協働で第3の認証トークン比較処理が実行される。   Next, a third authentication token comparison process executed by the SAM 10 will be described. For example, in response to step S161, the third authentication read from the EEPROM 17 and appropriately expanded in the RAM 13 is triggered by the start of reception of the signed time server time information from the terminal device 30 via the communication unit 16. A third authentication token comparison process is executed in cooperation with the token comparison program and the CPU 11.

先ず、通信部16を介して端末装置30から署名付きタイムサーバ時刻情報が受信される。そして、受信した署名チェックの後、SAM時刻情報がタイムサーバ時刻情報に設定される(ステップS181)。署名チェックとは、鍵(鍵C)で復号化したハッシュ値と、受信したタイムサーバ時刻情報から算出したハッシュ値とを比較することをいう。署名チェックが確認された上で(復号化したハッシュ値と、算出したハッシュ値とが一致したと確認された上で)、SAM時刻情報がタイムサーバ時刻情報に設定される。また、このとき、署名付きタイムサーバ時刻情報は、定期又は不定期に受信される。   First, time server time information with a signature is received from the terminal device 30 via the communication unit 16. Then, after the received signature check, the SAM time information is set as the time server time information (step S181). The signature check refers to comparing the hash value decrypted with the key (key C) with the hash value calculated from the received time server time information. After the signature check is confirmed (after confirming that the decrypted hash value and the calculated hash value match), the SAM time information is set in the time server time information. At this time, the signed time server time information is received regularly or irregularly.

ステップS182〜ステップS183は、第2の認証トークン比較処理のステップS132〜S133と同様である。ステップS183の実行後、認証トークンの発行時刻は予め定められた時刻以内であるか否かが検証される(ステップS184)。具体的には、ステップS181でSAM時刻情報として設定されたタイムサーバ時刻情報と、第2のSAM使用許可処理のステップS109で設定された認証トークンに含まれるセンタサーバ時刻情報と、の差分時間が算出される。そして、算出された差分時間が予め定められた時間(認証トークンの有効期限)以内か否かが検証される。   Steps S182 to S183 are the same as steps S132 to S133 of the second authentication token comparison process. After execution of step S183, it is verified whether or not the authentication token issuance time is within a predetermined time (step S184). Specifically, the difference time between the time server time information set as the SAM time information in step S181 and the center server time information included in the authentication token set in step S109 of the second SAM use permission process. Calculated. Then, it is verified whether or not the calculated difference time is within a predetermined time (the validity period of the authentication token).

ステップS185〜ステップS188は、第2の認証トークン比較処理のステップS135〜ステップS138と同様である。ステップS188の実行後、新しい乱数と、ステップS181でSAM時刻情報として設定されたタイムサーバ時刻情報と、が認証トークンとして設定される(ステップS189)。すなわち、認証トークンが新しい乱数及びタイムサーバ時刻情報を含んだ認証トークンに更新される。ステップS190〜ステップS193は、第2の認証トークン比較処理のステップS140〜ステップS143と同様である。ステップS193の実行後、第3の認証トークン比較処理が終了する。   Steps S185 to S188 are the same as steps S135 to S138 of the second authentication token comparison process. After execution of step S188, a new random number and time server time information set as SAM time information in step S181 are set as authentication tokens (step S189). That is, the authentication token is updated to an authentication token including a new random number and time server time information. Steps S190 to S193 are the same as steps S140 to S143 of the second authentication token comparison process. After execution of step S193, the third authentication token comparison process ends.

以上、本実施の形態によれば、タイムサーバ時刻情報とセンタサーバ時刻情報との差分時間を算出し、算出した差分時間が予め定められた時間以内であり、且つ、EEPROM17に記憶された認証トークンとRAM33に記憶された認証トークンとが一致する場合に、センタサーバ40との認証状態を継続する。これにより、認証トークンの有効期限に基づいて、認証状態を継続するか否かを検証できるので、認証トークンの安全性を高めることができる。また、タイムサーバ時刻情報を不定期に受信できるので、時刻精度の高いタイムサーバ時刻情報を用いて認証状態を継続するか否かを検証することができる。   As described above, according to the present embodiment, the difference time between the time server time information and the center server time information is calculated, and the calculated difference time is within a predetermined time and the authentication token stored in the EEPROM 17 And the authentication token stored in the RAM 33 match, the authentication state with the center server 40 is continued. Accordingly, it is possible to verify whether or not to continue the authentication state based on the expiration date of the authentication token, so that the security of the authentication token can be improved. In addition, since the time server time information can be received irregularly, it is possible to verify whether or not to continue the authentication state using the time server time information with high time accuracy.

また、認証トークンを新しい乱数及びタイムサーバ時刻情報を含んだ認証トークンに更新する。これにより、古い認証トークンの再利用が不可能となるので、認証トークンの脆弱性を回避することができる。   Also, the authentication token is updated to an authentication token including a new random number and time server time information. As a result, the old authentication token cannot be reused, and the vulnerability of the authentication token can be avoided.

また、タイムサーバ時刻情報の署名チェックを行うので、時間の改ざんのないことを保障することができる。さらに、タイムサーバ時刻情報を含めて認証トークンの更新を行うので、改ざんのないことが保障された時刻情報を用いて認証トークンの更新を行うことができる。   Further, since the signature check of the time server time information is performed, it is possible to ensure that the time has not been altered. Furthermore, since the authentication token is updated including the time server time information, the authentication token can be updated using the time information that is guaranteed not to be falsified.

(第4の実施の形態)
図14及び図15を参照して、第4の実施の形態を説明する。本実施の形態の装置構成において、第1の実施の形態及び第3の実施の形態の装置構成と同様の部分は、同一の符号を付し、その詳細な説明を援用する。以下、異なる部分について説明する。
(Fourth embodiment)
A fourth embodiment will be described with reference to FIGS. 14 and 15. In the device configuration of the present embodiment, the same parts as those of the device configuration of the first embodiment and the third embodiment are denoted by the same reference numerals, and the detailed description thereof is incorporated. Hereinafter, different parts will be described.

センタサーバ40のCPU41は、正当性確認プログラムとの協働により、通信部46を介して決済処理に関する決済データ及び認証トークンを端末装置30から受信し、認証時刻情報と受信した認証トークンに含まれるタイムサーバ時刻情報との差分時間を算出し、算出した差分時間が予め定められた時間以内か否かを検証し、予め定められた時間以内でない場合に、端末装置30を無効にする。本実施の形態では、認証時刻情報は、センタサーバ時刻情報に該当する。   The CPU 41 of the center server 40 receives the payment data and the authentication token related to the payment process from the terminal device 30 through the communication unit 46 in cooperation with the validity confirmation program, and is included in the authentication time information and the received authentication token. A difference time with the time server time information is calculated, whether or not the calculated difference time is within a predetermined time is verified, and if it is not within the predetermined time, the terminal device 30 is invalidated. In the present embodiment, the authentication time information corresponds to the center server time information.

端末装置30のフラッシュメモリ35は、第6の情報プログラムを記憶する。SAM10のEEPROM17は、第4の認証トークン比較プログラムを記憶する。センタサーバ40の記憶部45は正当性確認プログラム記憶する。   The flash memory 35 of the terminal device 30 stores a sixth information program. The EEPROM 17 of the SAM 10 stores a fourth authentication token comparison program. The storage unit 45 of the center server 40 stores a validity confirmation program.

次いで、決済システム2の動作を説明する。図14に、時間情報送信処理、正当性確認処理、第6の情報処理、第4の認証トークン比較処理の流れを示す。図15に、時間情報送信処理、正当性確認処理、第6の情報処理、第4の認証トークン比較処理の流れの続きを示す。なお、図14及び図15に示す各処理の前に、センタサーバ40において第2の端末管理処理、端末装置30において第3の情報処理、SAM10において第2のSAM使用許可処理が予め実行されているものとして、以下説明する。   Next, the operation of the payment system 2 will be described. FIG. 14 shows a flow of time information transmission processing, validity confirmation processing, sixth information processing, and fourth authentication token comparison processing. FIG. 15 shows a continuation of the flow of the time information transmission process, the validity confirmation process, the sixth information process, and the fourth authentication token comparison process. 14 and 15, a second terminal management process is executed in the center server 40, a third information process is executed in the terminal device 30, and a second SAM use permission process is executed in the SAM 10 in advance. This will be described below.

本実施の形態のタイムサーバ50における時間情報送信処理は、第3の実施の形態における時間情報送信処理と同様である。   The time information transmission process in the time server 50 of this embodiment is the same as the time information transmission process in the third embodiment.

センタサーバ40で実行される正当性確認処理について説明する。例えば、ステップS222に対応して、通信部46を介して端末装置10からデータを受信開始したことをトリガとして、記憶部45から読み出されて適宜RAM43に展開された正当性確認プログラムとCPU41との協働で、正当性確認処理が実行される。   The validity confirmation process executed by the center server 40 will be described. For example, in response to step S222, with the trigger of the start of reception of data from the terminal device 10 via the communication unit 46, the validity check program read from the storage unit 45 and appropriately expanded in the RAM 43, and the CPU 41, The validity confirmation process is executed in cooperation with

先ず、ステップS222に対応して、通信部46を介して端末装置30からデータが受信される(ステップS201)。データとは、決済データ、認証トークン、及び署名のことをいう。決済データとは、カード番号、暗証番号、決済金額のことをいう。認証トークンは、第4の認証トークン比較処理のステップS239で更新された認証トークン(新しい乱数及びタイムサーバ時刻情報を含んだ認証トークン)に該当する。署名とは、決済データ及び認証トークンをまとめたハッシュ値を鍵(鍵X)で暗号化した情報である。また、決済データ及び認証トークンは、鍵(鍵Y)で暗号化されており、暗号化された決済データ及び認証トークンが受信される。ステップS201において、データが受信されると、暗号化された決済データ及び認証トークンが鍵Yで復号化され、復号化された決済データ及び認証トークンからハッシュ値が算出される。そして、算出されたハッシュ値と、鍵(X)で復号化された署名のハッシュ値と、の比較(署名チェック)が行われる。ここで、鍵Xとは、決済データ及び認証トークンをまとめたハッシュ値を暗号化又は復号化するための鍵のことをいう。鍵Yとは、決済データ及び認証トークンを暗号化又は復号化するための鍵のことをいう。   First, corresponding to step S222, data is received from the terminal device 30 via the communication unit 46 (step S201). Data refers to payment data, an authentication token, and a signature. The payment data means a card number, a password, and a payment amount. The authentication token corresponds to the authentication token (authentication token including new random number and time server time information) updated in step S239 of the fourth authentication token comparison process. The signature is information obtained by encrypting a hash value obtained by collecting payment data and an authentication token with a key (key X). Further, the payment data and the authentication token are encrypted with a key (key Y), and the encrypted payment data and the authentication token are received. In step S201, when data is received, the encrypted payment data and authentication token are decrypted with the key Y, and a hash value is calculated from the decrypted payment data and authentication token. Then, a comparison (signature check) is performed between the calculated hash value and the hash value of the signature decrypted with the key (X). Here, the key X refers to a key for encrypting or decrypting a hash value obtained by collecting payment data and an authentication token. The key Y is a key for encrypting or decrypting the payment data and the authentication token.

そして、データの正当性がOKであるか否かが判別される(ステップS202)。具体的には、第2の端末管理処理のステップS74で設定された認証時刻情報であるセンタサーバ時刻情報と、受信したデータの認証トークンに含まれるタイムサーバ時刻情報と、の差分時間が算出される。すなわち、センタサーバ40により認証がされた時間から決済処理が行われた時までの時間(差分時間)が算出される。そして、算出された差分時間が予め定められた時間(データの有効期限)以内であるか否かが判別される。差分時間が予め定められた時間以内である場合は、データの正当性OKと検証(判別)される。すなわち、データの有効期限は過ぎていないと判別される。差分時間が予め定められた時間以内でない場合は、データの正当性がない(NG)と判別される。すなわち、データの有効期限は過ぎていると判別される。   Then, it is determined whether or not the validity of the data is OK (step S202). Specifically, the difference time between the center server time information, which is the authentication time information set in step S74 of the second terminal management process, and the time server time information included in the authentication token of the received data is calculated. The That is, the time (difference time) from the time when the authentication is performed by the center server 40 to the time when the settlement process is performed is calculated. Then, it is determined whether or not the calculated difference time is within a predetermined time (data expiration date). When the difference time is within a predetermined time, it is verified (determined) that the data is valid. That is, it is determined that the data expiration date has not passed. If the difference time is not within a predetermined time, it is determined that the data is not valid (NG). That is, it is determined that the data expiration date has passed.

データの正当性がOKである場合(ステップS202;OK)、正常処理へ移行される(ステップS204)。データの正当性がOKでない場合(ステップS202;NG)、通信部46を介して端末を無効化する無効化信号が端末装置30に送信される(ステップS203)。ステップS203及びステップS204の実行後、正当性確認処理は終了する。   If the validity of the data is OK (step S202; OK), the process proceeds to normal processing (step S204). When the validity of the data is not OK (step S202; NG), an invalidation signal for invalidating the terminal is transmitted to the terminal device 30 via the communication unit 46 (step S203). After the execution of step S203 and step S204, the validity confirmation process ends.

次いで、端末装置30で実行される第6の情報処理について説明する。例えば、第3の情報処理のステップS87において、認証トークンがRAM33に記憶された後に、停電により電源の供給が遮断したとする。そして、所定時間経過後に電源の供給が復帰したとする。この場合、電源の供給が復帰されたこと等をトリガとして、フラッシュメモリ35から読み出されて適宜RAM33に展開された第6の情報プログラムとCPU31との協働で、第6の情報処理が実行される。   Next, sixth information processing executed by the terminal device 30 will be described. For example, in step S87 of the third information processing, after the authentication token is stored in the RAM 33, the power supply is interrupted due to a power failure. It is assumed that the supply of power is restored after a predetermined time has elapsed. In this case, the sixth information processing is executed by the cooperation of the CPU 31 and the sixth information program that is read from the flash memory 35 and appropriately developed in the RAM 33, triggered by the return of power supply or the like. Is done.

ステップS211〜ステップS217は、第5の情報処理のステップS161〜ステップS167と同様である。   Steps S211 to S217 are the same as steps S161 to S167 of the fifth information processing.

ステップS217の実行後、接続部37を介して処理結果(決済データ)がSAM10に送出される(ステップS218)。そして、ステップS244に対応して、接続部37を介してデータが受信される。そして、受信されたデータがフラッシュメモリ35に保管される(ステップS219)。   After execution of step S217, the processing result (settlement data) is sent to the SAM 10 via the connection unit 37 (step S218). In response to step S244, data is received via the connection unit 37. The received data is stored in the flash memory 35 (step S219).

ステップS220〜ステップS221は、第5の情報処理のステップS168〜ステップS169と同様である。ステップS221の実行後、通信部36を介してデータがセンタサーバ40へ送信される(ステップS222)。   Steps S220 to S221 are the same as steps S168 to S169 of the fifth information processing. After step S221 is executed, data is transmitted to the center server 40 via the communication unit 36 (step S222).

そして、ステップS203;NGに対応して、通信部36を介してセンタサーバ40から無効化信号が受信され、端末装置30が無効化される(ステップS223)。ステップS223の実行後、第6の情報処理は終了する。   Then, corresponding to NG in step S203, an invalidation signal is received from the center server 40 via the communication unit 36, and the terminal device 30 is invalidated (step S223). After the execution of step S223, the sixth information process ends.

次いで、SAM10で実行される第4の認証トークン比較処理について説明する。例えば、ステップS211に対応して、通信部16を介して端末装置30から署名付きタイムサーバ時刻情報を受信開始したことをトリガとして、EEPROM17から読み出されて適宜RAM13に開された第4の認証トークン比較プログラムと、CPU11との協働で第4の認証トークン比較処理が実行される。   Next, a fourth authentication token comparison process executed by the SAM 10 will be described. For example, corresponding to step S211, the fourth authentication read from the EEPROM 17 and appropriately opened in the RAM 13 is triggered by the start of reception of the signed time server time information from the terminal device 30 via the communication unit 16. A fourth authentication token comparison process is executed in cooperation with the token comparison program and the CPU 11.

ステップS231〜ステップS242は、第3の認証トークン比較処理のステップS181〜ステップS192と同様である。ステップS242の実行後、通信部16を介して端末装置30から決済データが受信される(ステップS243)。そして、受信された決済データと、ステップS239で設定された認証トークンと、がまとめて鍵Xで署名される(ステップS244)。また、このとき、鍵Yで決済データ及び認証トークンが暗号化される。そして、通信部16を介してデータが端末装置30に送信される。   Steps S231 to S242 are the same as steps S181 to S192 of the third authentication token comparison process. After execution of step S242, payment data is received from the terminal device 30 via the communication unit 16 (step S243). The received payment data and the authentication token set in step S239 are collectively signed with the key X (step S244). At this time, the settlement data and the authentication token are encrypted with the key Y. Then, the data is transmitted to the terminal device 30 via the communication unit 16.

ステップS245は、第3の認証トークン比較処理のステップS193と同様である。ステップS245の実行後、通信部16を介して端末装置30から無効化信号を受信したか否かが判別される(ステップS246)。無効化信号を受信していないと判別された場合(ステップS246;NO)、ステップS246に移行される。無効化信号を受信したと判別された場合、EEPROM17に記憶されている鍵(例えば、鍵T1、B、C、D、R、X、Y等)が無効化される(ステップS247)。ステップS247の実行後、第4の認証トークン比較処理は終了する。   Step S245 is the same as step S193 of the third authentication token comparison process. After execution of step S245, it is determined whether an invalidation signal has been received from the terminal device 30 via the communication unit 16 (step S246). When it is determined that the invalidation signal has not been received (step S246; NO), the process proceeds to step S246. If it is determined that the invalidation signal has been received, the keys (eg, keys T1, B, C, D, R, X, Y, etc.) stored in the EEPROM 17 are invalidated (step S247). After execution of step S247, the fourth authentication token comparison process ends.

以上、本実施の形態によれば、センタサーバ時刻情報とタイムサーバ時刻情報との差分時間を算出し、算出した差分時間が予め定められた時間以内か否かを検証する。これにより、センタサーバ40により認証がされた時刻から決済処理が行われた時刻までの時間(差分時間)を推定し、データの正当性を検討するので、データの安定性を高めることができる。また、差分時間が予め定められた時間以内でない場合(すなわち、データの有効期限が過ぎている場合)に、端末装置30を無効(端末装置30の利用停止)にするので、第三者による端末装置30の無断利用等の被害が広がることを防止することができる。   As described above, according to the present embodiment, the difference time between the center server time information and the time server time information is calculated, and it is verified whether or not the calculated difference time is within a predetermined time. As a result, the time (difference time) from the time when the authentication is performed by the center server 40 to the time when the settlement process is performed is estimated and the validity of the data is examined, so that the stability of the data can be improved. In addition, when the difference time is not within a predetermined time (that is, when the expiration date of the data has passed), the terminal device 30 is invalidated (use of the terminal device 30 is stopped). It is possible to prevent damage such as unauthorized use of the device 30 from spreading.

また、認証トークンを新しい乱数及びタイムサーバ時刻情報を含んだ認証トークンに更新する。これにより、古い認証成功情報の再利用が不可能となるので、認証成功情報の脆弱性を回避することができる。   Also, the authentication token is updated to an authentication token including a new random number and time server time information. As a result, the old authentication success information cannot be reused, so that the vulnerability of the authentication success information can be avoided.

なお、上記各実施の形態における記述は、本発明に係る電子機器、決済システム、及びプログラムの一例であり、これに限定されるものではない。   The description in each of the above embodiments is an example of the electronic device, the payment system, and the program according to the present invention, and is not limited to this.

例えば、上記第1の実施の形態では、認証トークンを暗号化することなく端末装置30へ出力(送信)することとしたが、暗号化した認証トークンを端末装置30へ送信することとしてもよい。   For example, in the first embodiment, the authentication token is output (transmitted) to the terminal device 30 without being encrypted. However, the encrypted authentication token may be transmitted to the terminal device 30.

また、上記第3の実施の形態及び第4の実施の形態では、タイムサーバ50は、センタサーバ40と異なる構成としたがこれに限定されるものではない。例えば、センタサーバ40にタイムサーバ50を含む構成としてもよい。   Moreover, in the said 3rd Embodiment and 4th Embodiment, although the time server 50 was set as the different structure from the center server 40, it is not limited to this. For example, the center server 40 may include the time server 50.

また、上記第3の実施の形態及び第4の実施の形態では、認証時刻情報をセンタサーバ時刻情報としたがこれに限定されるものではない。例えば、認証時刻情報をタイムサーバ時刻情報としてもよい。この場合、センタサーバ40から動作OK信号が端末装置30へ送信されると同時にタイムサーバ50から通信部56を介して端末装置、SAM10へタイムサーバ時刻情報が送信されることとなる。SAM10は、通信部16を介して認証成功時刻に該当するタイムサーバ時刻情報を受信すると、当該タイムサーバ時刻情報含めて認証トークンを生成する。そして、障害から復旧した際に、SAM時刻情報として設定されたタイムサーバ時刻情報と、生成された認証トークンに含まれるタイムサーバ時刻情報と、の差分時間を算出し、算出時間が予め定められた時間(認証トークンの有効期限)以内であるか否かを検証する。この場合、時間精度は、タイムサーバ50からタイムサーバ時刻情報を受信する間隔のみで決まる。   In the third embodiment and the fourth embodiment, the authentication time information is the center server time information, but the present invention is not limited to this. For example, the authentication time information may be time server time information. In this case, an operation OK signal is transmitted from the center server 40 to the terminal device 30, and at the same time, time server time information is transmitted from the time server 50 to the terminal device and the SAM 10 via the communication unit 56. When the SAM 10 receives time server time information corresponding to the authentication success time via the communication unit 16, the SAM 10 generates an authentication token including the time server time information. Then, when recovering from the failure, the time difference between the time server time information set as the SAM time information and the time server time information included in the generated authentication token is calculated, and the calculation time is predetermined. Verify whether it is within the time (authentication token expiration date). In this case, the time accuracy is determined only by the interval at which the time server time information is received from the time server 50.

その他、上記の実施の形態における決済システムの細部構成及び詳細動作に関しても、本発明の趣旨を逸脱しない範囲で適宜変更可能である。   In addition, the detailed configuration and detailed operation of the payment system in the above embodiment can be changed as appropriate without departing from the spirit of the present invention.

1,2 決済システム
10 端末装置
11,31,41 CPU
12 暗号演算部
13,33,43 RAM
14 異常検出部
15 ROM
16,36,46 通信部
17 EEPROM
18,39b,48 バス
30 端末装置
32,42 入力部
33A バックアップ電池
34,44 表示部
35 フラッシュメモリ
37 接続部
38 カードリーダ
39 接続部
39a,47 計時部
40 センタサーバ
45 記憶部
50 タイムサーバ
60 ICカード
70 メモリカード
100 決済端末
N 通信ネットワーク
1, 2 Payment system 10 Terminal device 11, 31, 41 CPU
12 Cryptographic operation unit 13, 33, 43 RAM
14 Anomaly detector 15 ROM
16, 36, 46 Communication unit 17 EEPROM
18, 39b, 48 Bus 30 Terminal device 32, 42 Input unit 33A Backup battery 34, 44 Display unit 35 Flash memory 37 Connection unit 38 Card reader 39 Connection unit 39a, 47 Timekeeping unit 40 Center server 45 Storage unit 50 Time server 60 IC Card 70 Memory card 100 Payment terminal N Communication network

Claims (7)

端末装置に接続される電子機器であって、
認証情報とデータとを記憶する記憶手段と、
前記認証情報に基づいて前記端末装置が認証装置を介して認証許可を得た場合に、前記データを前記端末装置で利用可とするか否を判別する判別手段と、
前記判別手段で利用可とされた場合には、前記記憶手段に記憶されたデータを前記端末装置で利用できるように制御し、その利用可を示す許可情報を当該電子機器に記憶すると共に、前記端末装置に前記許可情報を記憶させる第1制御手段と、
前記端末装置での障害発生後の復旧時に、その端末装置に記憶された許可情報と当該電子機器に記憶された許可情報とを比較する比較手段と、
前記比較手段での比較結果に基づいて、前記記憶手段に記憶されたデータを前記端末装置で再利用可とするか否かを制御する第2制御手段と、
を具備したことを特徴とする電子機器。
An electronic device connected to a terminal device,
Storage means for storing authentication information and data;
A determination means for determining whether or not the data can be used in the terminal device when the terminal device obtains authentication permission via the authentication device based on the authentication information;
When it is made available by the determination means, the data stored in the storage means is controlled so that it can be used by the terminal device, and permission information indicating the availability is stored in the electronic device, and First control means for storing the permission information in a terminal device;
Comparing means for comparing the permission information stored in the terminal device with the permission information stored in the electronic device at the time of recovery after a failure occurs in the terminal device;
Second control means for controlling whether or not the data stored in the storage means can be reused in the terminal device based on the comparison result in the comparison means;
An electronic apparatus comprising:
前記比較手段での比較で前記各許可情報が一致すると判別され、前記第2制御手段で前記データの再利用可と制御された場合に、前記認証装置での認証許可を得ることなく前記記憶手段に記憶されたデータの利用を可とする新規の許可情報を発行して記憶する第3制御手段と、
を更に具備したことを特徴とする請求項に記載の電子機器。
The storage means without obtaining the authentication permission in the authentication device when it is determined in the comparison by the comparison means that the permission information matches, and the second control means controls the data to be reusable. Third control means for issuing and storing new permission information that permits the use of the data stored in
The electronic apparatus according to claim 1 , further comprising:
前記記憶手段に記憶されたデータを利用した所定処理が前記端末装置において終了した後は、前記許可情報を削除する削除手段と、
を更に具備したことを特徴とする請求項1又は2に記載の電子機器。
After a predetermined process using the data stored in the storage means ends in the terminal device, a deletion means for deleting the permission information;
The electronic device according to claim 1 or 2, wherein, further provided with the.
前記記憶手段に記憶される前記データは、前記端末装置で所定処理を実行する際に必要となる鍵のデータである、
ことを特徴とする請求項1〜3の何れかに記載の電子機器。
The data stored in the storage means is key data required when executing predetermined processing in the terminal device.
The electronic device according to claim 1 , wherein the electronic device is an electronic device.
前記許可情報は、その許可情報を発行した時刻情報を記憶し、
前記比較手段は、前記端末装置に記憶された許可情報の時刻情報と当該電子機器に記憶された許可情報の時刻情報とを更に比較する、
ことを特徴とする請求項1〜4の何れかに記載の電子機器。
The permission information stores time information when the permission information is issued,
The comparing means further compares the time information of the permission information stored in the terminal device and the time information of the permission information stored in the electronic device;
The electronic device according to claim 1 , wherein the electronic device is an electronic device.
前記比較手段は、前記端末装置に記憶された許可情報と当該電子機器に記憶された許可情報とが一致するか否かを比較し、更に前記端末装置に記憶された許可情報の時刻情報と当該電子機器に記憶された許可情報の時刻情報との時間差が所定時間以内であるか否かを比較する、
ことを特徴とする請求項に記載の電子機器。
The comparing means compares whether the permission information stored in the terminal device matches the permission information stored in the electronic device, and further compares the time information of the permission information stored in the terminal device with the time information Compare whether the time difference with the time information of the permission information stored in the electronic device is within a predetermined time,
The electronic device according to claim 5 , wherein:
端末装置に接続される電子機器のコンピュータを制御するためのプログラムであって、
前記コンピュータを、
認証情報とデータとを記憶する記憶手段、
前記認証情報に基づいて前記端末装置が認証装置を介して認証許可を得た場合に、前記データを前記端末装置で利用可とするか否を判別する判別手段、
前記判別手段で利用可とされた場合には、前記記憶手段に記憶されたデータを前記端末装置で利用できるように制御し、その利用可を示す許可情報を当該電子機器に記憶すると共に、前記端末装置に前記許可情報を記憶させる第1制御手段、
前記端末装置での障害発生後の復旧時に、その端末装置に記憶された許可情報と当該電子機器に記憶された許可情報とを比較する比較手段、
前記比較手段での比較結果に基づいて、前記記憶手段に記憶されたデータを前記端末装置で再利用可とするか否かを制御する第2制御手段、
として機能させるようにしたコンピュータ読み取り可能なプログラム。
A program for controlling a computer of an electronic device connected to a terminal device,
The computer,
Storage means for storing authentication information and data;
A determination unit that determines whether or not the data can be used in the terminal device when the terminal device obtains authentication permission via the authentication device based on the authentication information;
When it is made available by the determination means, the data stored in the storage means is controlled so that it can be used by the terminal device, and permission information indicating the availability is stored in the electronic device, and First control means for storing the permission information in a terminal device;
Comparison means for comparing the permission information stored in the terminal device with the permission information stored in the electronic device at the time of recovery after the occurrence of a failure in the terminal device,
Second control means for controlling whether or not the data stored in the storage means can be reused in the terminal device based on the comparison result in the comparison means;
A computer-readable program designed to function as a computer.
JP2012205224A 2012-09-19 2012-09-19 Electronic device and program Active JP5488659B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012205224A JP5488659B2 (en) 2012-09-19 2012-09-19 Electronic device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012205224A JP5488659B2 (en) 2012-09-19 2012-09-19 Electronic device and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007224206A Division JP5092629B2 (en) 2007-08-30 2007-08-30 Electronic device, payment system and program

Publications (2)

Publication Number Publication Date
JP2013037708A JP2013037708A (en) 2013-02-21
JP5488659B2 true JP5488659B2 (en) 2014-05-14

Family

ID=47887209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012205224A Active JP5488659B2 (en) 2012-09-19 2012-09-19 Electronic device and program

Country Status (1)

Country Link
JP (1) JP5488659B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10078748B2 (en) * 2015-11-13 2018-09-18 Microsoft Technology Licensing, Llc Unlock and recovery for encrypted devices

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0836606A (en) * 1994-07-22 1996-02-06 Omron Corp Card processing system
JP2003296277A (en) * 2002-03-29 2003-10-17 Fuji Xerox Co Ltd Network device, authentication server, network system, and authentication method
JP2004040717A (en) * 2002-07-08 2004-02-05 Matsushita Electric Ind Co Ltd Equipment authentication system
US7650515B2 (en) * 2006-02-06 2010-01-19 Panasonic Corporation Secure processing device, method and program

Also Published As

Publication number Publication date
JP2013037708A (en) 2013-02-21

Similar Documents

Publication Publication Date Title
CN100386740C (en) Systems and methods for detecting a security breach in a computer system
JP4893411B2 (en) Terminal device and program
US8219806B2 (en) Management system, management apparatus and management method
US20040255119A1 (en) Memory device and passcode generator
JPH0844805A (en) Security managing method for card type storage medium, card type storage medium and transaction device for card type storage medium
JP2005235159A (en) Secure remote access system
JP5092629B2 (en) Electronic device, payment system and program
CN110795126A (en) Firmware safety upgrading system
CN107133512B (en) POS terminal control method and device
JP2012009938A (en) Information processing device and program
JP2009253783A (en) Mobile terminal, data protection method and program for data protection
JP5183517B2 (en) Information processing apparatus and program
TW201843594A (en) Secure integrated-circuit state management
JP5488659B2 (en) Electronic device and program
JP6738636B2 (en) How to allow spinning machine equipment functions
CN1716850B (en) Method and system for secure verification of a set-top-box chip
JP4885168B2 (en) External media control method, system and apparatus
JP4303768B2 (en) Security management method for card type storage device, card type storage device, and transaction device for card type storage device
KR20090041473A (en) Authentication server for validating product authenticity using otp electronic tag and method therefor
CN115017468A (en) License authentication device and license authentication method
JP4893410B2 (en) Terminal device
JP6138599B2 (en) Authentication system and authentication method
KR102378989B1 (en) System and method for verifying vulnerability test results in consideration of industrial control system operating environment
JP4573350B2 (en) IC card, IC card security system, IC card transport safety ensuring method, control program, and readable recording medium
JP5386860B2 (en) Payment system, payment processing apparatus, validity verification apparatus, validity verification request processing program, validity verification processing program, and validity verification method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131002

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131016

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131211

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140210

R150 Certificate of patent or registration of utility model

Ref document number: 5488659

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150