JP2014102534A - Information processing device, control method of information processing device, and program - Google Patents

Information processing device, control method of information processing device, and program Download PDF

Info

Publication number
JP2014102534A
JP2014102534A JP2012252010A JP2012252010A JP2014102534A JP 2014102534 A JP2014102534 A JP 2014102534A JP 2012252010 A JP2012252010 A JP 2012252010A JP 2012252010 A JP2012252010 A JP 2012252010A JP 2014102534 A JP2014102534 A JP 2014102534A
Authority
JP
Japan
Prior art keywords
chip
memory
data
password
control unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012252010A
Other languages
Japanese (ja)
Inventor
Yusuke Tamura
佑輔 田村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2012252010A priority Critical patent/JP2014102534A/en
Priority to ARP130104201A priority patent/AR093496A1/en
Priority to CN201310566518.7A priority patent/CN103824028B/en
Priority to BR102013029499-3A priority patent/BR102013029499A2/en
Priority to IT000928A priority patent/ITTO20130928A1/en
Publication of JP2014102534A publication Critical patent/JP2014102534A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Cash Registers Or Receiving Machines (AREA)

Abstract

PROBLEM TO BE SOLVED: To realize high-speed data encryption and also inhibit unauthorized processing.SOLUTION: A fiscal printer 16 comprises: an encryption IC chip 81 which has at least a function for encrypting input data and is equipped with an IC chip storage unit 86; and an encryption IC chip control unit 82 which outputs a control command to the chip and controls the chip to execute processing. The IC chip storage unit 86 stores a password, and also a second SRAM 83 stores the common password. The encryption IC chip control unit 82 outputs a control command including the password to the encryption IC chip 81. The chip performs authentication of the control command on the basis of the password included in the control command and the password stored in the IC chip storage unit 86.

Description

本発明は、フィスカルデータを記憶する情報処理装置、当該情報処理装置の制御方法、及び、プログラムに関する。   The present invention relates to an information processing apparatus that stores fiscal data, a control method for the information processing apparatus, and a program.

従来、商品を販売等する店舗に設けられ、取引に関する情報(売上に関する情報や、課税に関する情報等)を含むフィスカルデータを記憶する情報処理装置(電子式キャッシュレジスター、レシート用のプリンター)が知られている(例えば、特許文献1参照)。   Conventionally, an information processing apparatus (electronic cash register, receipt printer) that is provided in a store that sells products and stores fiscal data including information on transactions (information on sales, information on taxation, etc.) is known. (For example, refer to Patent Document 1).

特開平05−120567号公報Japanese Patent Laid-Open No. 05-120567

上述した情報処理装置のように、フィスカルデータを記憶するものでは、データの信頼性向上、改ざんの防止のため、フィスカルデータやこれに付随するデータを暗号化鍵により暗号化する場合がある。このような場合、高速な暗号化を実現したいとするニーズがある一方、不正な処理が行われることを防止する必要がある。
本発明は、上述した事情に鑑みてなされたものであり、データの暗号化の高速化を実現しつつ、不正な処理が行われることを防止することを目的とする。
In the case of storing fiscal data as in the information processing apparatus described above, the fiscal data and the data accompanying it may be encrypted with an encryption key in order to improve data reliability and prevent falsification. In such a case, there is a need to realize high-speed encryption, but it is necessary to prevent unauthorized processing.
The present invention has been made in view of the above-described circumstances, and an object thereof is to prevent unauthorized processing from being performed while realizing high-speed data encryption.

上記目的を達成するために、本発明は、入力されたデータを暗号化する機能を少なくとも有し、第1のメモリーが実装されたチップと、前記チップに制御コマンドを出力して、前記チップに処理を実行させる制御部と、を備え、前記第1のメモリーに記憶されたパスワードと共通のパスワードが、前記制御部がアクセス可能な第2のメモリーに記憶され、前記制御部は、前記パスワードを含む制御コマンドを前記チップに出力し、前記チップは、前記制御コマンドに含まれる前記パスワード、及び、前記第1のメモリーに記憶された前記パスワードに基づいて、前記制御コマンドの認証を行う機能を有することを特徴とする。
この構成によれば、入力されたデータを暗号化する機能を有する専用のチップにより、各種データの高速な暗号化を実現できる。さらに、チップは、制御部から入力された制御コマンドに含まれるパスワード、及び、実装された第1のメモリーに記憶されたパスワードに基づいて、制御コマンドの認証を行うため、例えば、チップが第三者によって取り外された後、当該第三者により不正なアクセスがあった場合であっても、そのことを検出でき、かつ、対応する適切な処理、例えば、データを利用不可能とする処理等を実行することが可能である。
In order to achieve the above object, the present invention has at least a function of encrypting input data, outputs a control command to the chip on which the first memory is mounted, and the chip. A control unit that executes processing, and a password common to the password stored in the first memory is stored in a second memory accessible by the control unit, and the control unit stores the password A control command including the control command is output to the chip, and the chip has a function of authenticating the control command based on the password included in the control command and the password stored in the first memory. It is characterized by that.
According to this configuration, high-speed encryption of various data can be realized by a dedicated chip having a function of encrypting input data. Further, the chip authenticates the control command based on the password included in the control command input from the control unit and the password stored in the mounted first memory. Even if there is an unauthorized access by the third party after being removed by a person, it is possible to detect this and to perform a corresponding appropriate process, for example, a process for making the data unusable It is possible to execute.

また、本発明は、不正なアクセスを検出する不正検出部をさらに備え、前記不正検出部により不正が検出された場合、前記第2のメモリーに記憶された前記パスワードを無効化することを特徴とする。
この構成によれば、不正なアクセスがあった場合、第2のメモリーに記憶されたパスワードが無効化され、制御部による制御コマンドによってチップを制御できなくなるため、不正な手段によってチップが不正な処理を実行してしまうことを防止できる。
The present invention further includes a fraud detection unit that detects unauthorized access, and invalidates the password stored in the second memory when the fraud detection unit detects fraud. To do.
According to this configuration, if there is an unauthorized access, the password stored in the second memory is invalidated, and the chip cannot be controlled by the control command from the control unit. Can be prevented from being executed.

また、本発明は、前記不正検出部により不正が検出された場合、前記第2のメモリーに記憶された前記パスワードを上書きし、また、揮発性メモリーにより構成された前記第2のメモリーに供給される電力を遮断して前記パスワードを消去ことにより、前記第2のメモリーに記憶された前記パスワードを無効化することを特徴とする。
この構成によれば、第2のメモリーに記憶されたパスワードを的確に無効化できる。
In the present invention, when fraud is detected by the fraud detector, the password stored in the second memory is overwritten and supplied to the second memory constituted by a volatile memory. The password stored in the second memory is invalidated by cutting off the power and deleting the password.
According to this configuration, the password stored in the second memory can be accurately invalidated.

また、本発明は、前記チップは、公開鍵暗号方式に係る秘密鍵及び公開鍵を生成する機能を有し、当該機能により生成された前記秘密鍵を前記第1のメモリーに記憶することを特徴とする。
ここで、秘密鍵は、例えば、フィスカルデータに係るデジタル署名を生成する際に利用するものであり、不正な手段によって第三者に取得されることを防止しなければならない。そして上記構成によれば、チップは、制御部から入力された制御コマンドに含まれるパスワード、及び、実装された第1のメモリーに記憶されたパスワードに基づいて、制御コマンドの認証を行うため、不正な制御コマンドにより、秘密鍵が取得されることを防止できる。
In the present invention, the chip has a function of generating a secret key and a public key according to a public key cryptosystem, and stores the secret key generated by the function in the first memory. And
Here, the secret key is used, for example, when generating a digital signature relating to fiscal data, and must be prevented from being obtained by a third party by unauthorized means. According to the above configuration, the chip authenticates the control command based on the password included in the control command input from the control unit and the password stored in the mounted first memory. It is possible to prevent the secret key from being acquired by a simple control command.

また、上記目的を達成するために、本発明は、入力されたデータを暗号化する機能を少なくとも有し、第1のメモリーが実装されたチップと、前記チップに制御コマンドを出力して、前記チップに処理を実行させる制御部と、を備える情報処理装置の制御方法であって、前記第1のメモリーにパスワードを記憶すると共に、前記制御部がアクセス可能な第2のメモリーに共通の前記パスワードを記憶し、前記制御部により、前記パスワードを含む制御コマンドを前記チップに出力し、前記チップにより、前記制御コマンドに含まれる前記パスワード、及び、前記第1のメモリーに記憶された前記パスワードに基づいて、前記制御コマンドの認証を行うことを特徴とする。
この制御方法によれば、入力されたデータを暗号化する機能を有する専用のチップにより、各種データの高速な暗号化を実現できる。さらに、チップは、制御部から入力された制御コマンドに含まれるパスワード、及び、実装された第1のメモリーに記憶されたパスワードに基づいて、制御コマンドの認証を行うため、例えば、チップが第三者によって取り外された後、当該第三者により不正なアクセスがあった場合であっても、そのことを検出でき、かつ、対応する適切な処理、例えば、データを利用不可能とする処理等を実行することが可能である。
In order to achieve the above object, the present invention has at least a function of encrypting input data, outputs a control command to the chip on which the first memory is mounted, and the chip. A control unit that causes a chip to execute a process, wherein the password is stored in the first memory and is shared by a second memory accessible by the control unit The control unit outputs a control command including the password to the chip, and the chip includes the password included in the control command and the password stored in the first memory. Then, the control command is authenticated.
According to this control method, high-speed encryption of various data can be realized by a dedicated chip having a function of encrypting input data. Further, the chip authenticates the control command based on the password included in the control command input from the control unit and the password stored in the mounted first memory. Even if there is an unauthorized access by the third party after being removed by a person, it is possible to detect this and to perform a corresponding appropriate process, for example, a process for making the data unusable It is possible to execute.

また、上記目的を達成するために、本発明は、入力されたデータを暗号化する機能を少なくとも有し、第1のメモリーが実装されたチップと、前記チップに制御コマンドを出力して、前記チップに処理を実行させる制御部と、を備え、前記第1のメモリーに記憶されたパスワードと共通のパスワードが、前記制御部がアクセス可能な第2のメモリーに記憶された情報処理装置の前記チップ、及び、前記制御部により実行されるプログラムであって、前記制御部に、前記パスワードを含む制御コマンドを前記チップに出力させ、前記チップに、前記制御コマンドに含まれる前記パスワード、及び、前記第1のメモリーに記憶された前記パスワードに基づいて、前記制御コマンドの認証を行わせることを特徴とする。
このプログラムによれば、入力されたデータを暗号化する機能を有する専用のチップにより、各種データの高速な暗号化を実現できる。さらに、チップは、制御部から入力された制御コマンドに含まれるパスワード、及び、実装された第1のメモリーに記憶されたパスワードに基づいて、制御コマンドの認証を行うため、例えば、チップが第三者によって取り外された後、当該第三者により不正なアクセスがあった場合であっても、そのことを検出でき、かつ、対応する適切な処理、例えば、データを利用不可能とする処理等を実行することが可能である。
In order to achieve the above object, the present invention has at least a function of encrypting input data, outputs a control command to the chip on which the first memory is mounted, and the chip. A control unit that causes the chip to execute processing, and the chip of the information processing apparatus in which a password common to the password stored in the first memory is stored in a second memory accessible by the control unit And a program executed by the control unit, causing the control unit to output a control command including the password to the chip, and causing the chip to output the password included in the control command, and the first The control command is authenticated based on the password stored in one memory.
According to this program, high-speed encryption of various data can be realized by a dedicated chip having a function of encrypting input data. Further, the chip authenticates the control command based on the password included in the control command input from the control unit and the password stored in the mounted first memory. Even if there is an unauthorized access by the third party after being removed by a person, it is possible to detect this and to perform a corresponding appropriate process, for example, a process for making the data unusable It is possible to execute.

本発明によれば、データの暗号化の高速化を実現しつつ、不正な処理が行われることを防止できる。   According to the present invention, it is possible to prevent unauthorized processing while realizing high-speed data encryption.

本実施形態に係る情報処理システムの構成を示す図である。It is a figure which shows the structure of the information processing system which concerns on this embodiment. フィスカルプリンターの動作を示すフローチャートである。It is a flowchart which shows operation | movement of a fiscal printer.

以下、図面を参照して本発明の実施形態について説明する。
図1は、本実施形態に係る情報処理システム1の構成を示す図である。
図1に示すように、情報処理システム1は、フィスカルプリンター16(情報処理装置)を備えており、このフィスカルプリンター16にホストコンピューター15、及び、フィスカルデータ読出装置40が接続可能な構成となっている。
フィスカルプリンター16は、ホストコンピューター15の制御の下、レシートを発行すると共に、ホストコンピューター15から入力されたフィスカル情報(フィスカルデータ)を記憶する。
フィスカル情報(フィスカルデータ)とは、商品等の販売取引に関する情報(売上に関する情報や課税額等に関する情報)であって、記憶すべき情報として予め定められた情報のことである。このフィスカル情報は、例えば、政府等の国家機関による店舗からの税金の徴収に際し、国家機関が当該店舗における取引の実態を把握するために参照する情報として利用される。従って、フィスカル情報が改ざんされることを防止する必要がある。本実施形態では、フィスカル情報(フィスカルデータ)として、後述する書込レシートデータ54、及び、日計売上データ53の2種類のデータが存在する。
なお、以下の説明では、フィスカルプリンター16が出力するレシートは、店舗のレジカウンターにおいて顧客による会計に際して発行されるレシートであり、必ず、購入した商品ごとの小計金額T1(商品ごとに、商品の単価と購入数量の積によって算出される金額。)と、合計金額T2(小計金額T1の和によって算出される金額。)、及び、支払金額T3(合計金額T2に消費税等の税を加味して算出される金額。)が記録されているものとする。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram illustrating a configuration of an information processing system 1 according to the present embodiment.
As shown in FIG. 1, the information processing system 1 includes a fiscal printer 16 (information processing device), and a host computer 15 and a fiscal data reading device 40 can be connected to the fiscal printer 16. Yes.
The fiscal printer 16 issues a receipt under the control of the host computer 15 and stores fiscal information (fiscal data) input from the host computer 15.
Fiscal information (fiscal data) refers to information relating to sales transactions of products and the like (information relating to sales, information relating to taxation, etc.), which is information predetermined as information to be stored. This fiscal information is used, for example, as information to be referred to by the national institution for grasping the actual state of the transaction at the store when the national institution such as the government collects taxes from the store. Therefore, it is necessary to prevent falsification of the fiscal information. In the present embodiment, there are two types of data, that is, later-described writing receipt data 54 and daily sales data 53 as fiscal information (fiscal data).
In the following description, the receipt output by the fiscal printer 16 is a receipt issued at the checkout counter of the store at the time of customer accounting, and is always a subtotal amount T1 for each purchased product (the unit price of the product for each product). And the total amount T2 (the amount calculated by the sum of the subtotal amounts T1), and the payment amount T3 (consumption tax etc. is added to the total amount T2) It is assumed that the calculated amount is recorded.

図1に示すように、フィスカルプリンター16は、管理基板20、プリンター基板21、及び、サブ基板22の3つの基板を備えている。
管理基板20には、メイン制御部25(制御部)と、PCコネクター26aと、フィスカルコネクター26bと、通信IC27と、ROM28と、第1SRAM29と、RTC30と、EJメモリー31と、EJメモリー制御部32と、バッファーIC33と、暗号化モジュール80と、が実装されている。
メイン制御部25は、フィスカルプリンター16の各部を中枢的に制御するものであり、CPUやその他の周辺回路を備えている。PCコネクター26aは、フィスカルプリンター16の通常使用時においてホストコンピューター15が接続されるコネクターである。ホストコンピューター15は、PCコネクター26aを介してフィスカルプリンター16にレシートの発行に係る動作を行わせる制御コマンドを出力し、また、フィスカル情報として、後述する日計売上データ53を出力する。フィスカルコネクター26bは、フィスカルデータ読出装置40が接続されるコネクターである。フィスカルデータ読出装置40とは、後述するEJメモリー31や、フィスカルメモリー50に記憶されたデータを読み出すための装置であり、例えば国家機関(政府等)に係る者等の、特別な許可を得た者だけが所持し得る。上述したホストコンピューター15はPCコネクター26aに接続された状態が維持されるが、フィスカルデータ読出装置40は、ホストコンピューター15と異なり、データの読み出しが行われる際に、適宜、フィスカルコネクター26bに接続される。
As shown in FIG. 1, the fiscal printer 16 includes three substrates: a management substrate 20, a printer substrate 21, and a sub substrate 22.
The management board 20 includes a main control unit 25 (control unit), a PC connector 26a, a fiscal connector 26b, a communication IC 27, a ROM 28, a first SRAM 29, an RTC 30, an EJ memory 31, and an EJ memory control unit 32. A buffer IC 33 and an encryption module 80 are mounted.
The main control unit 25 centrally controls each unit of the fiscal printer 16 and includes a CPU and other peripheral circuits. The PC connector 26 a is a connector to which the host computer 15 is connected during normal use of the fiscal printer 16. The host computer 15 outputs a control command for causing the fiscal printer 16 to perform an operation related to the receipt issuance via the PC connector 26a, and outputs daily sales data 53 described later as fiscal information. The fiscal connector 26b is a connector to which the fiscal data reading device 40 is connected. The fiscal data reading device 40 is a device for reading data stored in the EJ memory 31 and the fiscal memory 50, which will be described later, and has obtained special permission from, for example, a person related to a national organization (government, etc.). Only a person can have it. The host computer 15 described above is maintained connected to the PC connector 26a. However, unlike the host computer 15, the fiscal data reading device 40 is appropriately connected to the fiscal connector 26b when data is read. The

通信IC27は、PCコネクター26a及びフィスカルコネクター26bに接続され、メイン制御部25の制御の下、ホストコンピューター15や、フィスカルデータ読出装置40との間でデータの送受信を行う。ROM28は、メイン制御部25が各種制御を行うための制御プログラム(ファームウェア)等の各種データを不揮発的に記憶する。第1SRAM29は、メイン制御部25のCPUのワークエリアとして機能する揮発性のメモリーであり、各種データを一時的に記憶する。RTC30(Real-time clock:リアルタイムクロック)は、現在日時(年月日、時刻)を示すデータをメイン制御部25に出力する。第1SRAM29、RTC30には、フィスカルプリンター16の電源がオフされた場合であっても、図示せぬ電池からバックアップ用の電力が供給される。
EJメモリー31は、NAND型フラッシュメモリーであり、大容量のデータを記憶可能である。特に、本実施形態では、EJメモリー31は、MLCタイプのNAND型フラッシュメモリーである。
周知の通り、MLCタイプのNAND型フラッシュメモリーは、SLCタイプのものと比較して、低コストで大容量化が可能である。従って、後に明らかとなるとおり、頻繁に書込みに係る処理が発生する可能性があり、かつ、記憶されるデータのサイズが増大するペースが速い可能性がある書込レシートデータ54を記憶するメモリーとして適している。
EJメモリー31において、書込レシートデータ54及びこれに付随するデータが書き込まれる記憶領域は、1つのアドレスに対して1度しかデータを書き込めないメモリーとして機能する。これにより、EJメモリー31に書き込まれたフィスカルデータが後から編集されることが防止され、EJメモリー31に記憶されたフィスカルデータ対する改ざんが防止されている。EJメモリー制御部32は、CPUを備え、メイン制御部25の制御の下、EJメモリー31に対してデータの読み書き、消去を行う。バッファーIC33は、EJメモリー31に対するデータの読み出し、書き込みの効率を向上するために設けられたバッファーを制御する。
これらEJメモリー31、EJメモリー制御部32、及び、バッファーIC33は、エポキシ樹脂によって管理基板20に封止されており、EJメモリー31が管理基板20から物理的に取り外された上で、EJメモリー31に記憶されたデータが改ざんされることが防止されている。
The communication IC 27 is connected to the PC connector 26a and the fiscal connector 26b, and transmits / receives data to / from the host computer 15 and the fiscal data reading device 40 under the control of the main control unit 25. The ROM 28 stores various data such as a control program (firmware) for the main control unit 25 to perform various controls in a nonvolatile manner. The first SRAM 29 is a volatile memory that functions as a work area for the CPU of the main control unit 25, and temporarily stores various data. The RTC 30 (Real-time clock) outputs data indicating the current date and time (year / month / day, time) to the main control unit 25. The first SRAM 29 and the RTC 30 are supplied with backup power from a battery (not shown) even when the power of the fiscal printer 16 is turned off.
The EJ memory 31 is a NAND flash memory and can store a large amount of data. In particular, in the present embodiment, the EJ memory 31 is an MLC type NAND flash memory.
As is well known, an MLC type NAND flash memory can be increased in capacity at a lower cost than an SLC type. Therefore, as will be apparent later, as a memory for storing the write receipt data 54 that may frequently cause processing related to writing, and that the size of the stored data may increase rapidly. Is suitable.
In the EJ memory 31, the storage area in which the write receipt data 54 and the data associated therewith are written functions as a memory in which data can be written only once per address. As a result, the fiscal data written in the EJ memory 31 is prevented from being edited later, and the fiscal data stored in the EJ memory 31 is prevented from being falsified. The EJ memory control unit 32 includes a CPU, and reads, writes, and erases data with respect to the EJ memory 31 under the control of the main control unit 25. The buffer IC 33 controls a buffer provided to improve the efficiency of reading and writing data to the EJ memory 31.
The EJ memory 31, the EJ memory control unit 32, and the buffer IC 33 are sealed to the management board 20 by an epoxy resin, and the EJ memory 31 is physically removed from the management board 20. The data stored in is prevented from being falsified.

暗号化モジュール80は、暗号用ICチップ81(チップ)と、暗号用ICチップ制御部82(制御部)と、第2SRAM83(第2のメモリー)と、を備えている。
暗号用ICチップ81は、後述する各種処理を実行可能な制御回路を有するICチップ処理部85(制御部)と、EEPROMによって構成されたICチップ記憶部86(第1のメモリー)と、が実装されている。ICチップ処理部85の機能、及び、ICチップ記憶部86に記憶されるデータについては後述する。
暗号用ICチップ制御部82は、メイン制御部25と信号通信可能に接続されており、メイン制御部25と協働して、又は、単独で、暗号用ICチップ81に制御コマンドを出力して暗号用ICチップ81に処理を実行させることにより、暗号用ICチップ81を制御する。また、暗号用ICチップ制御部82は、メイン制御部25を起動させる前に、当該メイン制御部25で動作するファームウェアが不正に改変されていないかどうかを確認するための処理を実行する機能を有している。
第2SRAM83に記憶されるデータについては後述する。
通信モジュール37は、電話網やインターネット等のネットワークを介して、政府等が管理するサーバー装置等の外部機器通信するためのモジュールである。外部機器との通信するときの規格は、GPRSの規格等、何であってもよい。
管理基板20に実装された不正検出部35については、後述する。
The encryption module 80 includes an encryption IC chip 81 (chip), an encryption IC chip control unit 82 (control unit), and a second SRAM 83 (second memory).
The encryption IC chip 81 includes an IC chip processing unit 85 (control unit) having a control circuit capable of executing various processes described later, and an IC chip storage unit 86 (first memory) configured by an EEPROM. Has been. The function of the IC chip processing unit 85 and the data stored in the IC chip storage unit 86 will be described later.
The encryption IC chip control unit 82 is connected to the main control unit 25 so as to be capable of signal communication, and outputs a control command to the encryption IC chip 81 in cooperation with the main control unit 25 or independently. The encryption IC chip 81 is controlled by causing the encryption IC chip 81 to execute processing. Further, the encryption IC chip control unit 82 has a function of executing a process for confirming whether or not the firmware operating in the main control unit 25 has been tampered with before the main control unit 25 is activated. Have.
The data stored in the second SRAM 83 will be described later.
The communication module 37 is a module for communicating with an external device such as a server device managed by the government or the like via a network such as a telephone network or the Internet. The standard for communication with an external device may be anything such as a GPRS standard.
The fraud detection unit 35 mounted on the management board 20 will be described later.

また、プリンター基板21には、プリンター制御部45が実装されており、プリンター制御部45は、ホストコンピューター15が出力した制御コマンドに基づいて、記録機構46を制御して、レシートを発行する。
記録機構46は、ロール紙の印刷面に熱を与えることにより画像を記録するサーマルヘッド46aや、ロール紙を搬送する搬送機構46b、所定の位置でロール紙を切断する切断機構46c等を備えており、プリンター制御部45の制御の下、これら機構や装置を動作させて、レシートを発行する。
プリンター基板21には、プリンター側コネクター42が設けられ、管理基板20には、管理側コネクター43が設けられており、これらプリンター側コネクター42と、管理側コネクター43とが接続されることにより、管理基板20と、プリンター基板21とが接続される。
本実施形態では、レシートの発行に際し、まず、フィスカルプリンター16に接続されたホストコンピューター15が、制御コマンドを生成し、生成した制御コマンドをPCコネクター26aを介してメイン制御部25に出力する。制御コマンドが入力されたメイン制御部25は、入力された制御コマンドをプリンター制御部45に出力する。
In addition, a printer control unit 45 is mounted on the printer substrate 21, and the printer control unit 45 controls the recording mechanism 46 based on a control command output from the host computer 15 and issues a receipt.
The recording mechanism 46 includes a thermal head 46a that records an image by applying heat to the printing surface of the roll paper, a transport mechanism 46b that transports the roll paper, a cutting mechanism 46c that cuts the roll paper at a predetermined position, and the like. Under the control of the printer control unit 45, these mechanisms and devices are operated to issue a receipt.
The printer board 21 is provided with a printer-side connector 42, and the management board 20 is provided with a management-side connector 43. By connecting the printer-side connector 42 and the management-side connector 43, management is performed. The substrate 20 and the printer substrate 21 are connected.
In this embodiment, when a receipt is issued, first, the host computer 15 connected to the fiscal printer 16 generates a control command and outputs the generated control command to the main control unit 25 via the PC connector 26a. The main control unit 25 to which the control command is input outputs the input control command to the printer control unit 45.

サブ基板22には、フィスカルメモリー50と、フィスカルメモリー制御部51とが実装されている。
フィスカルメモリー50は、シリアルバスを採用した素子を利用した、いわゆるシリアルフラッシュメモリーである。周知の通り、シリアルフラッシュメモリーは、NAND型フラッシュメモリーと比較して、記憶したデータの信頼性が高く、かつ、データの書込み可能回数が多い、という特徴がある。
フィスカルメモリー50には、フィスカル書込日時データ52、及び、日計売上データ53が記憶されるが、これらについては後述する。フィスカルメモリー50において、日計売上データ53及びこれに付随するデータが書き込まれる記憶領域は、1つのアドレスに対して1度しかデータを書き込めないメモリーとして機能する。これにより、フィスカルメモリー50に書き込まれたフィスカルデータが後から編集されることが防止され、フィスカルメモリー50に記憶されたフィスカルデータ対する改ざんが防止されている。
フィスカルメモリー制御部51は、プログラム可能な論理回路を書き込んだデバイスであるCPLD(Complex programmable logic device)を備え、メイン制御部25の制御の下、フィスカルメモリー50に対してデータの読み書き、消去を行う。
これらフィスカルメモリー50、及び、フィスカルメモリー制御部51は、エポキシ樹脂によってサブ基板22に封止されており、例えば、フィスカルメモリー50がサブ基板22から物理的に取り外された上で、フィスカルメモリー50に記憶されたデータが改ざんされることが防止されている。
A fiscal memory 50 and a fiscal memory control unit 51 are mounted on the sub-board 22.
The fiscal memory 50 is a so-called serial flash memory using an element employing a serial bus. As is well known, the serial flash memory is characterized in that the stored data is more reliable and the number of times data can be written is larger than that of the NAND flash memory.
Fiscal memory 50 stores fiscal writing date / time data 52 and daily sales data 53, which will be described later. In the fiscal memory 50, the storage area in which the daily sales data 53 and data associated therewith are written functions as a memory in which data can be written only once per address. Thereby, the fiscal data written in the fiscal memory 50 is prevented from being edited later, and the fiscal data stored in the fiscal memory 50 is prevented from being falsified.
The fiscal memory control unit 51 includes a CPLD (Complex programmable logic device) which is a device in which a programmable logic circuit is written, and reads / writes data from / to the fiscal memory 50 under the control of the main control unit 25. .
The fiscal memory 50 and the fiscal memory control unit 51 are sealed to the sub-board 22 by an epoxy resin. For example, the fiscal memory 50 is physically removed from the sub-board 22 and then stored in the fiscal memory 50. Tampering with stored data is prevented.

次いで、EJメモリー31に記憶される書込レシートデータ54、及び、フィスカルメモリー50に記憶される日計売上データ53について説明する。上述したように、これらデータは、フィスカルデータに該当する。
書込レシートデータ54とは、フィスカルプリンター16によって発行されるレシートに記録される情報を示すデータであって、記憶すべきデータとして予め定められているデータのことである。例えば、レシートに、顧客が購入した商品毎に、商品を示す情報や、商品の単価を示す情報、当該商品を購入した個数を示す情報、各商品の購入に係る代金を示す情報、全ての商品の総購入代金を示す情報等が記録されている場合であって、これら情報を示すデータが記憶すべきデータとして予め定められている場合、これら情報を示すデータが書込レシートデータ54に該当する。
上述したように、本実施形態では、フィスカルプリンター16によってレシートを発行する場合、ホストコンピューター15によって制御コマンドが生成され、この制御コマンドがメイン制御部25に出力され、さらに、制御コマンドがメイン制御部25からプリンター制御部45に出力される。その際、メイン制御部25は、制御コマンドから、書込レシートデータ54として記憶すべき情報を抽出し、抽出したこれら情報に基づいて書込レシートデータ54を生成し、生成した書込レシートデータ54を、EJメモリー制御部32を制御して、EJメモリー31に記憶する。
本実施形態では、書込レシートデータ54には、レシートにおける小計金額T1と、合計金額T2と、支払金額T3が含まれている。すなわち、上述したように、本実施形態に係るフィスカルプリンター16が発行するレシートには、小計金額T1と、合計金額T2、及び、支払金額T3が記録されているが、メイン制御部25は、制御コマンドから、少なくともこれら3つの情報を抽出し、書込レシートデータ54としてEJメモリー31に記憶する。
Next, the write receipt data 54 stored in the EJ memory 31 and the daily sales data 53 stored in the fiscal memory 50 will be described. As described above, these data correspond to fiscal data.
The write receipt data 54 is data indicating information recorded on a receipt issued by the fiscal printer 16 and is data predetermined as data to be stored. For example, on the receipt, for each product purchased by the customer, information indicating the product, information indicating the unit price of the product, information indicating the number of the product purchased, information indicating the purchase price of each product, all products In the case where information indicating the total purchase price is recorded, and data indicating these information is predetermined as data to be stored, the data indicating these information corresponds to the write receipt data 54 .
As described above, in the present embodiment, when a receipt is issued by the fiscal printer 16, a control command is generated by the host computer 15, this control command is output to the main control unit 25, and the control command is further transmitted to the main control unit. 25 to the printer control unit 45. At that time, the main control unit 25 extracts information to be stored as the write receipt data 54 from the control command, generates the write receipt data 54 based on the extracted information, and generates the generated write receipt data 54. Is stored in the EJ memory 31 by controlling the EJ memory control unit 32.
In the present embodiment, the written receipt data 54 includes a subtotal amount T1, a total amount T2, and a payment amount T3 in the receipt. That is, as described above, the receipt issued by the fiscal printer 16 according to the present embodiment records the subtotal amount T1, the total amount T2, and the payment amount T3. At least these three pieces of information are extracted from the command and stored in the EJ memory 31 as write receipt data 54.

ここで、メイン制御部25は、EJメモリー31に書込レシートデータ54を書き込む際、RTC30から現在日時(日付+時刻)を示すデータを取得し、取得したデータに基づいて日時を示すデータであるEJ書込日時データ55を生成し、書込レシートデータ54と、EJ書込日時データ55とを対応付けて書き込む。つまり、書込レシートデータ54のそれぞれは、EJメモリー31に書き込まれた日時を示すデータであるEJ書込日時データ55と対応づけてEJメモリー31に記憶される。
さらに、メイン制御部25は、書込レシートデータ54を書き込む際、書込レシートデータ54を元データとして生成されたデジタル署名たるEJデジタル署名56を、書込レシートデータ54と対応付けて書き込む。つまり、書込レシートデータ54のそれぞれは、各データに基づいて生成されるEJデジタル署名56と対応付けてEJメモリー31に記憶される。EJデジタル署名56を生成する手段については後述する。
フィスカルデータ読出装置40や、その他のフィスカルプリンター16に記憶されたフィスカルデータの調査、検査を行う装置(例えば、政府が管理するサーバー装置)は、各フィスカルプリンター16がEJデジタル署名56を生成する際に使用するハッシュ関数を管理すると共に、EJデジタル署名56を生成する際に利用した秘密鍵(後述するEJデジタル署名用秘密鍵KA1)に対応する公開鍵を管理しており、ある1のフィスカルプリンター16に係る書込レシートデータ54と、対応するEJデジタル署名56とに基づいて、書込レシートデータ54に対する改ざんを検出可能である。
なお、EJ書込日時データ55と、書込レシートデータ54とを対応づけて記憶する理由の1つは、国によっては、法律や、規則によりそのことが義務づけられているからである。
以上のように、書込レシートデータ54は、レシートの発行に応じて生成されるため、頻繁に書込みに係る処理が発生する可能性があり、かつ、記憶されるデータのサイズが増大するペースが速い可能性がある。
Here, when the main control unit 25 writes the write receipt data 54 in the EJ memory 31, the main control unit 25 acquires data indicating the current date and time (date + time) from the RTC 30, and indicates the date based on the acquired data. The EJ writing date / time data 55 is generated, and the writing receipt data 54 and the EJ writing date / time data 55 are written in association with each other. That is, each of the write receipt data 54 is stored in the EJ memory 31 in association with the EJ write date / time data 55 which is data indicating the date / time written in the EJ memory 31.
Further, when writing the write receipt data 54, the main control unit 25 writes an EJ digital signature 56, which is a digital signature generated using the write receipt data 54 as original data, in association with the write receipt data 54. That is, each of the write receipt data 54 is stored in the EJ memory 31 in association with the EJ digital signature 56 generated based on each data. A means for generating the EJ digital signature 56 will be described later.
An apparatus (for example, a server apparatus managed by the government) that examines and inspects fiscal data stored in the fiscal data reading device 40 and other fiscal printers 16, when each fiscal printer 16 generates the EJ digital signature 56. And a public key corresponding to a secret key (EJ digital signature secret key KA1, which will be described later) used when generating the EJ digital signature 56. 16 and the corresponding EJ digital signature 56 can detect tampering with the write receipt data 54.
Note that one reason for storing the EJ writing date / time data 55 and the writing receipt data 54 in association with each other is that, depending on the country, this is required by law or regulation.
As described above, since the write receipt data 54 is generated in response to the issuance of the receipt, there is a possibility that a process related to writing may occur frequently and the size of the stored data increases. It may be fast.

日計売上データ53とは、フィスカルプリンター16によるレシートの発行が行われた会計によって得た「1日」の総売上のことである。「1日」とは、本実施形態では、情報処理システム1が適用された店舗における開店から閉店までの期間のことである。つまり、集計データは、レシートに含まれる会計情報を集計した情報に関するデータである。
ホストコンピューター15は、レジカウンターにおいて行われる会計ごとにフィスカルプリンター16を制御してレシートを発行すると共に、会計ごとの売上金額(=レシートにおける支払金額T3)を累積的に記憶する。そして、ホストコンピューター15は、店舗の閉店後、所定のタイミング(例えば、担当者の指示があったタイミングや、所定の時刻に至ったタイミング)で、累積的に記憶した会計ごとの売上金額に基づいて、対応するフィスカルプリンター16に係る「1日」における総売上を計算し、計算した総売上に基づいて、日計売上データ53を生成し、生成した日計売上データ53をメイン制御部25に出力する。日計売上データ53が入力されると、メイン制御部25は、フィスカルメモリー制御部51を制御し、フィスカルメモリー50に日計売上データ53を書き込む。
ここで、メイン制御部25は、フィスカルメモリー50に日計売上データ53を書き込む際、RTC30に現在日時を示すデータを出力させ、このデータに基づいて、書き込みを行った日時を取得し、取得した日時を示すデータであるフィスカル書込日時データ52(集計データ)と、日計売上データ53とを対応づけた状態で、フィスカルメモリー50に日計売上データ53を書き込む。つまり、日計売上データ53のそれぞれは、フィスカルメモリー50に書き込まれた日時を示すデータであるフィスカル書込日時データ52と対応づけてフィスカルメモリー50に記憶される。
さらに、メイン制御部25は、日計売上データ53を書き込む際、日計売上データ53を元データとして生成されたデジタル署名たるフィスカルデジタル署名58を、日計売上データ53と対応付けて書き込む。つまり、日計売上データ53のそれぞれは、各データに基づいて生成されるフィスカルデジタル署名58と対応付けてフィスカルメモリー50に記憶される。フィスカルデジタル署名58を生成する手段については後述する。
フィスカルデータ読出装置40や、その他のフィスカルプリンター16に記憶されたフィスカルデータの調査、検査を行う装置(例えば、政府が管理するサーバー装置)は、フィスカルデジタル署名58を利用して、日計売上データ53にタイする改ざんを検出可能である。
このように、本実施形態では、フィスカル書込日時データ52と、日計売上データ53とを対応づけて記憶するが、これは、国によっては、法律や、規則によりそのことが義務づけられているからである。
The daily sales data 53 is the total sales of “1 day” obtained by the accounting in which the receipt is issued by the fiscal printer 16. In the present embodiment, “one day” is a period from opening to closing in a store to which the information processing system 1 is applied. That is, the total data is data related to information obtained by totaling the accounting information included in the receipt.
The host computer 15 controls the fiscal printer 16 for each transaction performed at the checkout counter and issues a receipt, and cumulatively stores the sales amount for each transaction (= payment amount T3 in the receipt). Then, after closing the store, the host computer 15 is based on the sales amount for each transaction stored cumulatively at a predetermined timing (for example, when a person in charge has instructed or at a predetermined time). The total sales for “one day” related to the corresponding fiscal printer 16 are calculated, and the daily sales data 53 is generated based on the calculated total sales. The generated daily sales data 53 is stored in the main control unit 25. Output. When the daily sales data 53 is input, the main control unit 25 controls the fiscal memory control unit 51 to write the daily sales data 53 into the fiscal memory 50.
Here, when writing the daily sales data 53 to the fiscal memory 50, the main control unit 25 causes the RTC 30 to output data indicating the current date and time, and acquires and acquires the date and time of writing based on this data. The daily sales data 53 is written in the fiscal memory 50 in a state where the fiscal writing date / time data 52 (aggregated data), which is data indicating the date / time, and the daily sales data 53 are associated with each other. That is, each of the daily sales data 53 is stored in the fiscal memory 50 in association with the fiscal writing date / time data 52 which is data indicating the date / time written in the fiscal memory 50.
Further, when writing the daily sales data 53, the main control unit 25 writes a fiscal digital signature 58, which is a digital signature generated using the daily sales data 53 as original data, in association with the daily sales data 53. That is, each of the daily sales data 53 is stored in the fiscal memory 50 in association with the fiscal digital signature 58 generated based on each data. Means for generating the fiscal digital signature 58 will be described later.
A device (for example, a server device managed by the government) that investigates and inspects fiscal data stored in the fiscal data reading device 40 and other fiscal printers 16 uses the fiscal digital signature 58 to generate daily sales data. It is possible to detect tampering with 53.
As described above, in the present embodiment, the fiscal writing date / time data 52 and the daily sales data 53 are stored in association with each other, but this is required by law or regulation in some countries. Because.

一方、ホストコンピューター15は、ホスト制御部44を備えている。ホスト制御部44は、CPUや、ROM、RAM、その他の周辺回路を備え、ホストコンピューター15の各部を中枢的に制御するものであり、アプリケーション実行部44a、及び、プリンタードライバー実行部44bを備えている。
アプリケーション実行部44aは、ホストコンピューター15が備える所定の記憶部に記憶されたアプリケーションプログラムを読み出して実行することにより、発行するレシートに記録すべき情報を含んだアプリ出力データを生成し、生成したアプリ出力データをプリンタードライバー実行部44bに出力する。例えば、アプリケーション実行部44aは、図示せぬバーコードリーダーからの入力値に基づいて、顧客が購入した商品の商品コードを特定するとともに、所定のデータベースにアクセスし、商品コードを利用して当該商品の単価や、商品名を取得する等して、上述した小計金額、合計金額、及び、支払金額を含む各種情報を取得し、取得した情報に基づいて、アプリ出力データを生成する。
プリンタードライバー実行部44bは、ホストコンピューター15が備える所定の記憶部に記憶されたプリンタードライバーを読み出して実行することにより、アプリケーション実行部44aから入力されたアプリ出力データに基づいて、フィスカルプリンター16のコマンド仕様に準拠して、フィスカルプリンター16にレシートの発行に係る一連の動作を行わせる制御コマンドを生成し、フィスカルプリンター16に出力する。
制御コマンドには、例えば、画像の記録の開始を指示するコマンドや、サーマルヘッド46aを駆動させることを指示するコマンド、ロール紙を搬送方向に所定量だけ送ることを指示するコマンド、切断機構46cによりロール紙の切断を指示するコマンド等の各種コマンドが含まれている。
On the other hand, the host computer 15 includes a host control unit 44. The host control unit 44 includes a CPU, ROM, RAM, and other peripheral circuits, and centrally controls each unit of the host computer 15, and includes an application execution unit 44a and a printer driver execution unit 44b. Yes.
The application execution unit 44a reads out and executes an application program stored in a predetermined storage unit included in the host computer 15, thereby generating application output data including information to be recorded in a receipt to be issued. The output data is output to the printer driver execution unit 44b. For example, the application execution unit 44a specifies a product code of a product purchased by a customer based on an input value from a bar code reader (not shown), accesses a predetermined database, and uses the product code to Various information including the subtotal amount, the total amount, and the payment amount are acquired by acquiring the unit price and the product name, and the application output data is generated based on the acquired information.
The printer driver execution unit 44b reads out and executes a printer driver stored in a predetermined storage unit included in the host computer 15, thereby executing a command of the fiscal printer 16 based on the application output data input from the application execution unit 44a. In accordance with the specification, a control command for causing the fiscal printer 16 to perform a series of operations related to the receipt issuance is generated and output to the fiscal printer 16.
The control command includes, for example, a command for instructing start of image recording, a command for instructing to drive the thermal head 46a, a command for instructing to feed a roll paper by a predetermined amount in the transport direction, and a cutting mechanism 46c. Various commands such as a command for instructing cutting of the roll paper are included.

次に、デジタル署名たるEJデジタル署名56、及び、フィスカルデジタル署名58を生成する手段について説明する。
ある1の書込レシートデータ54について、EJデジタル署名56を生成する場合、メイン制御部25は、当該1の書込レシートデータ54を元データとして所定のハッシュ関数に基づいてハッシュ値を求め、求めたハッシュ値を暗号用ICチップ制御部82に出力する。
暗号用ICチップ制御部82は、メイン制御部25から入力されたハッシュ値について、当該ハッシュ値を、EJデジタル署名用秘密鍵KA1を利用して暗号化させてEJデジタル署名56を生成させ、さらに、生成させたEJデジタル署名56を出力させる旨の制御コマンドを生成して、暗号用ICチップ81のICチップ処理部85に出力する。
当該制御コマンドが入力されると、ICチップ処理部85は、ICチップ記憶部86に事前に記憶されているEJデジタル署名用秘密鍵KA1を利用して、ハッシュ値を暗号化する。EJデジタル署名用秘密鍵KA1は、公開鍵暗号方式に係る秘密鍵であるが、当該秘密鍵が生成され、ICチップ記憶部86に記憶されるときの処理については後述する。秘密鍵たるEJデジタル署名用秘密鍵KA1によって暗号化されたハッシュ値がEJデジタル署名56である。
ここで、暗号用ICチップ81は、ICチップ記憶部86に記憶された特定の鍵によって、データを暗号化する専用の回路、専用のプログラムが組み込まれたチップである。従って、データの暗号化に係る処理について非常に高速に実行できる。
EJデジタル署名56を生成すると、ICチップ処理部85は、生成したEJデジタル署名56を、暗号用ICチップ制御部82に出力する。
暗号用ICチップ制御部82は、ICチップ処理部85から入力されたEJデジタル署名56をメイン制御部25に出力し、メイン制御部25は、入力されたEJデジタル署名56を書込レシートデータ54と対応付けてEJメモリー31に記憶する。
以上、EJデジタル署名56を生成する手段について説明したが、フィスカルデジタル署名58についても同様の手段により生成される。すなわち、フィスカルデジタル署名58を生成するための秘密鍵たるフィスカルデジタル署名用秘密鍵KA2が事前にICチップ記憶部86に記憶されており、ICチップ処理部85は、当該秘密鍵を利用して、フィスカルデジタル署名58を生成して、出力する。
なお、上記例では、メイン制御部25がハッシュ値を算出していたが、ハッシュ値の算出を暗号用ICチップ制御部82が行う構成であってもよく、また、ICチップ処理部85が行う構成であってもよい。
Next, means for generating the EJ digital signature 56 and the fiscal digital signature 58 as digital signatures will be described.
When the EJ digital signature 56 is generated for a certain write receipt data 54, the main control unit 25 obtains a hash value based on a predetermined hash function using the one write receipt data 54 as original data. The hash value is output to the cryptographic IC chip control unit 82.
The encryption IC chip control unit 82 encrypts the hash value input from the main control unit 25 using the EJ digital signature private key KA1 to generate the EJ digital signature 56, and Then, a control command for outputting the generated EJ digital signature 56 is generated and output to the IC chip processing unit 85 of the encryption IC chip 81.
When the control command is input, the IC chip processing unit 85 encrypts the hash value by using the EJ digital signature private key KA1 stored in advance in the IC chip storage unit 86. The EJ digital signature secret key KA1 is a secret key related to the public key cryptosystem, and processing when the secret key is generated and stored in the IC chip storage unit 86 will be described later. The hash value encrypted with the EJ digital signature secret key KA 1, which is a secret key, is the EJ digital signature 56.
Here, the encryption IC chip 81 is a chip in which a dedicated circuit for encrypting data and a dedicated program are incorporated using a specific key stored in the IC chip storage unit 86. Therefore, the process related to data encryption can be executed at a very high speed.
When the EJ digital signature 56 is generated, the IC chip processing unit 85 outputs the generated EJ digital signature 56 to the encryption IC chip control unit 82.
The encryption IC chip control unit 82 outputs the EJ digital signature 56 input from the IC chip processing unit 85 to the main control unit 25, and the main control unit 25 writes the input EJ digital signature 56 to the write receipt data 54. And stored in the EJ memory 31.
While the means for generating the EJ digital signature 56 has been described above, the fiscal digital signature 58 is also generated by the same means. That is, a fiscal digital signature secret key KA2, which is a secret key for generating the fiscal digital signature 58, is stored in advance in the IC chip storage unit 86, and the IC chip processing unit 85 uses the secret key, A fiscal digital signature 58 is generated and output.
In the above example, the main control unit 25 calculates the hash value. However, the encryption IC chip control unit 82 may calculate the hash value, and the IC chip processing unit 85 may perform the calculation. It may be a configuration.

次に、EJデジタル署名56や、フィスカルデジタル署名58を生成する際に使用する秘密鍵を生成する処理、その他の付随する処理を行う際のフィスカルプリンター16の動作について説明する。
図2は、上記動作を説明するためのフローチャートであり、(A)は暗号用ICチップ制御部82の動作を、(B)はICチップ処理部85の動作をそれぞれ示している。
まず、暗号用ICチップ制御部82は、所定の事象が発生したことをトリガーとして、ステップSA2以下の処理を開始する(ステップSA1)。本実施形態では、フィスカルプリンター16の出荷後、ユーザーにより初めて当該プリンターの電源が投入されたことが、トリガーの1つなる。この他、ユーザーによって明示の指示があった場合や、所定の初期化が行われ場合等にも、当該事象をトリガーとして、暗号用ICチップ制御部82によってステップSA2以下の処理が開始される。
次いで、暗号用ICチップ制御部82は、認証用パスワードPW(パスワード)を生成する(ステップSA2)。この認証用パスワードPWは、暗号用ICチップ制御部82から、暗号用ICチップ81のICチップ処理部85に出力される制御コマンドの認証に利用されるパスワードである。後に明らかとなるとおり、暗号用ICチップ制御部82は、制御コマンドのフォーマットに準拠して、制御コマンドに認証用パスワードPWを含めた上で、制御コマンドをICチップ処理部85に出力し、一方、ICチップ処理部85は、制御コマンドに含まれる認証用パスワードPWと、ICチップ記憶部86に記憶された認証用パスワードPWとに基づいて、制御コマンドの認証を行う。
次いで、暗号用ICチップ制御部82は、ステップSA2において生成した認証用パスワードPWを、ICチップ記憶部86の所定の記憶領域に記憶させる制御コマンドを生成して、ICチップ処理部85に出力する(ステップSA3)。当該制御コマンドが入力されると、ICチップ処理部85は、当該制御コマンドに基づいて、認証用パスワードPWをICチップ記憶部86に記憶する(ステップSB1)。
次いで、暗号用ICチップ制御部82は、ステップSA2において生成した認証用パスワードPWを、第2SRAM83の所定の記憶領域に記憶する(ステップSA4)。
なお、本実施形態では、認証用パスワードPWを生成する機能を暗号用ICチップ制御部82が有しているが、当該機能をICチップ処理部85が有する構成であってもよく、また、メイン制御部25が有する構成であってもよい。
Next, the operation of the fiscal printer 16 when performing processing for generating a secret key used when generating the EJ digital signature 56 and the fiscal digital signature 58 and other accompanying processing will be described.
2A and 2B are flowcharts for explaining the above-described operation. FIG. 2A shows the operation of the encryption IC chip control unit 82, and FIG. 2B shows the operation of the IC chip processing unit 85.
First, the cryptographic IC chip control unit 82 starts the processing from step SA2 onward when a predetermined event has occurred (step SA1). In the present embodiment, one of the triggers is that the user turns on the printer for the first time after shipping the fiscal printer 16. In addition, when there is an explicit instruction from the user or when a predetermined initialization is performed, the cryptographic IC chip control unit 82 starts processing from step SA2 onward using the event as a trigger.
Next, the encryption IC chip control unit 82 generates an authentication password PW (password) (step SA2). The authentication password PW is a password used for authentication of a control command output from the encryption IC chip control unit 82 to the IC chip processing unit 85 of the encryption IC chip 81. As will be apparent later, the cryptographic IC chip control unit 82 outputs the control command to the IC chip processing unit 85 after including the authentication password PW in the control command in accordance with the format of the control command. The IC chip processing unit 85 authenticates the control command based on the authentication password PW included in the control command and the authentication password PW stored in the IC chip storage unit 86.
Next, the encryption IC chip control unit 82 generates a control command for storing the authentication password PW generated in step SA <b> 2 in a predetermined storage area of the IC chip storage unit 86, and outputs the control command to the IC chip processing unit 85. (Step SA3). When the control command is input, the IC chip processing unit 85 stores the authentication password PW in the IC chip storage unit 86 based on the control command (step SB1).
Next, the encryption IC chip control unit 82 stores the authentication password PW generated in step SA2 in a predetermined storage area of the second SRAM 83 (step SA4).
In this embodiment, the encryption IC chip control unit 82 has a function of generating the authentication password PW. However, the IC chip processing unit 85 may have the function. The structure which the control part 25 has may be sufficient.

次いで、暗号用ICチップ制御部82は、EJデジタル署名56を生成するための秘密鍵であるEJデジタル署名用秘密鍵KA1、及び、対応する公開鍵である公開鍵KB1を生成させ、さらに、フィスカルデジタル署名58を生成するための秘密鍵であるフィスカルデジタル署名用秘密鍵KA2、及び、対応する公開鍵である公開鍵KB2を生成させる旨の制御コマンドを生成し、ICチップ処理部85に出力する(ステップSA5)。暗号用ICチップ制御部82は、当該制御コマンドに、所定のフォーマットに準拠して、認証用パスワードPWを含める。
当該制御コマンドが入力されると、ICチップ処理部85は、当該制御コマンドの認証を行う(ステップSB2)。具体的には、ICチップ記憶部86は、制御コマンドに含まれる認証用パスワードPWと、ICチップ記憶部86に記憶されている認証用パスワードPWが一致するか否かを判別し、一致する場合は認証に成功したと判別し、一方、一致しない場合は認証に失敗したと判別する。
このように、本実施形態では、ICチップ処理部85は、暗号用ICチップ制御部82から入力された制御コマンドについて、認証用パスワードPWに基づいて、認証を行う。このため、暗号用ICチップ81が第三者によって不正の手段により取り外された後、当該第三者により制御コマンドを利用した不正なアクセスがあった場合であっても、不正を検出でき、かつ、対応する適切な処理、例えば、データを利用不可能とする処理等を実行することが可能である。以下では、ステップSB2において認証が成功したものとして説明を進める。
次いで、ICチップ処理部85は、RSA暗号方式等の所定の公開鍵暗号方式に準拠したEJデジタル署名用秘密鍵KA1、及び、公開鍵KB1の鍵ペア、及び、フィスカルデジタル署名用秘密鍵KA2、及び、公開鍵KB2の鍵ペアを生成する(ステップSB3)。
ここで、本実施形態では、異なる種類のフィスカルデータ(書込レシートデータ54、及び、日計売上データ53)については、異なる秘密鍵を用いて対応するデジタル署名を生成する構成となっている。これは、以下の理由による。すなわち、仮に、第三者が不正の手段によって、いずれか1つのフィスカルデータ、例えば、書込レシートデータ54を取得したとする。この場合、書込レシートデータ54に対する改ざんが可能となる可能性がある一方、日計売上データ53に対する改ざんは不可能である。そして、書込レシートデータ54に対してのみ改ざんが行われた場合は、書込レシートデータ54と、日計売上データ53とに不整合が生じる。このため、当該不整合を検出する手段を実装することにより、書込レシートデータ54に対する改ざんを検出可能である。すなわち、異なる種類のフィスカルデータについては、異なる秘密鍵を用いて対応するデジタル署名を生成する構成とすることにより、何らかの改ざんが行われた場合に、そのことが検出できる可能性を高めている。また、このことが改ざんに対する抑止力となっている。
なお、本例では、フィスカルプリンター16が記憶するフィスカルデータは、書込レシートデータ54、及び、日計売上データ53の2種類であるが、3種類以上のフィスカルデータを記憶する構成であってもよいことは勿論である。この場合、フィスカルデータの種類ごとに、デジタル署名生成用の秘密鍵が生成されることとなるため、秘密鍵に係るデータのサイズは、非常に大きくなる場合がある。
また、暗号用ICチップ81は、秘密鍵、公開鍵を生成する処理を実行する専用の回路、専用のプログラムが組み込まれたチップである。従って、当該処理について非常に高速に実行できる。
2つの鍵ペアの生成が完了すると、ICチップ処理部85は、その旨、暗号用ICチップ制御部82に通知する(ステップSB4)。
Next, the encryption IC chip control unit 82 generates an EJ digital signature secret key KA1 that is a secret key for generating the EJ digital signature 56, and a public key KB1 that is a corresponding public key. A control command for generating a fiscal digital signature private key KA2 that is a private key for generating the digital signature 58 and a public key KB2 that is a corresponding public key is generated and output to the IC chip processing unit 85. (Step SA5). The encryption IC chip control unit 82 includes the authentication password PW in the control command according to a predetermined format.
When the control command is input, the IC chip processing unit 85 authenticates the control command (step SB2). Specifically, the IC chip storage unit 86 determines whether or not the authentication password PW included in the control command matches the authentication password PW stored in the IC chip storage unit 86. Determines that the authentication has succeeded. On the other hand, if they do not match, it determines that the authentication has failed.
As described above, in this embodiment, the IC chip processing unit 85 authenticates the control command input from the encryption IC chip control unit 82 based on the authentication password PW. For this reason, even if the cryptographic IC chip 81 is removed by an unauthorized means by a third party and unauthorized access using the control command is performed by the third party, the unauthorizedness can be detected, and Corresponding appropriate processing, for example, processing for making the data unusable can be executed. In the following, the description will be made assuming that the authentication is successful in step SB2.
Next, the IC chip processing unit 85 includes an EJ digital signature private key KA1 and a public key KB1 key pair compliant with a predetermined public key encryption method such as the RSA encryption method, and a fiscal digital signature private key KA2, And a key pair of the public key KB2 is generated (step SB3).
Here, in the present embodiment, for different types of fiscal data (write receipt data 54 and daily sales data 53), corresponding digital signatures are generated using different secret keys. This is due to the following reason. That is, suppose that a third party obtains any one piece of fiscal data, for example, the write receipt data 54 by an unauthorized means. In this case, the written receipt data 54 may be altered, while the daily sales data 53 cannot be altered. If the falsification is performed only on the written receipt data 54, a mismatch occurs between the written receipt data 54 and the daily sales data 53. For this reason, it is possible to detect falsification with respect to the write receipt data 54 by implementing means for detecting the inconsistency. In other words, with respect to different types of fiscal data, a configuration in which a corresponding digital signature is generated using a different secret key increases the possibility that it can be detected if any tampering is performed. This also serves as a deterrent against tampering.
In this example, there are two types of fiscal data stored in the fiscal printer 16; the written receipt data 54 and the daily sales data 53. However, even if the configuration stores three or more types of fiscal data. Of course it is good. In this case, since a secret key for generating a digital signature is generated for each type of fiscal data, the size of the data related to the secret key may be very large.
The encryption IC chip 81 is a chip in which a dedicated circuit for executing processing for generating a secret key and a public key and a dedicated program are incorporated. Therefore, the process can be executed at a very high speed.
When the generation of the two key pairs is completed, the IC chip processing unit 85 notifies the encryption IC chip control unit 82 to that effect (step SB4).

当該通知を受けると、暗号用ICチップ制御部82は、生成した鍵のうち、秘密鍵(EJデジタル署名用秘密鍵KA1、及び、フィスカルデジタル署名用秘密鍵KA2)については、ICチップ記憶部86に記憶させ、一方、公開鍵(公開鍵KB1、及び、公開鍵KB2については、)については、ICチップ記憶部86に記憶させることなく送信させる旨の制御コマンドを生成し、ICチップ処理部85に出力する(ステップSA6)。この制御コマンドには、認証用パスワードPWが含まれている。
当該制御コマンドが入力されると、ICチップ処理部85は、当該制御コマンドの認証を行った上で(ステップSB5)、当該制御コマンドに基づいて、EJデジタル署名用秘密鍵KA1、及び、フィスカルデジタル署名用秘密鍵KA2をICチップ記憶部86に記憶する(ステップSB6)。なお、ICチップ記憶部86は、物理的、ソフトウェア的な不正な手段によってデータにアクセスされることが防止される構成、構造となっている。さらに、ICチップ処理部85は、公開鍵KB1、及び、公開鍵KB2を暗号用ICチップ制御部82に出力する(ステップSB7)。
公開鍵KB1、及び、公開鍵KB2を取得すると、暗号用ICチップ制御部82は、これら公開鍵を、第2SRAM83に記憶する(ステップSA7)。
このように、本実施形態では、暗号用ICチップ81の機能により生成された秘密鍵、及び、公開鍵のうち、秘密鍵を、暗号用ICチップ81(チップ)に実装されたICチップ記憶部86(第1のメモリー)に記憶する一方、公開鍵(データの暗号化に利用する鍵に係るデータ以外のデータ)を、第2SRAM83に記憶する。これにより、生成された公開鍵、換言すれば、データの暗号化に利用しない鍵については、ICチップ記憶部86とは異なる第2SRAM83に記憶されるため、ICチップ記憶部86に公開鍵を記憶したことに起因した容量不足により、ICチップ記憶部86に秘密鍵を記憶できないといった事態が生じることを防止でき、効率のよい暗号化を実現できる。特に、本実施形態では、フィスカルデータの種類ごとに秘密鍵、及び、公開鍵が生成されるが、フィスカルデータの種類が多く、従って、秘密鍵に係るデータ、及び、公開鍵に係るデータのサイズが大きい場合であっても、ICチップ記憶部86に秘密鍵を記憶できないといった事態が生じることを防止でき、効率のよい暗号化を実現できる。
Upon receiving the notification, the encryption IC chip control unit 82 uses the IC chip storage unit 86 for the secret keys (EJ digital signature secret key KA1 and fiscal digital signature secret key KA2) among the generated keys. On the other hand, for the public key (for the public key KB1 and the public key KB2), a control command for transmitting the public key without storing it in the IC chip storage unit 86 is generated, and the IC chip processing unit 85 (Step SA6). This control command includes an authentication password PW.
When the control command is input, the IC chip processing unit 85 authenticates the control command (step SB5), and then, based on the control command, the EJ digital signature private key KA1 and the fiscal digital The signature private key KA2 is stored in the IC chip storage unit 86 (step SB6). The IC chip storage unit 86 has a configuration and structure that prevents data from being accessed by unauthorized physical and software means. Further, the IC chip processing unit 85 outputs the public key KB1 and the public key KB2 to the encryption IC chip control unit 82 (step SB7).
When the public key KB1 and the public key KB2 are acquired, the cryptographic IC chip control unit 82 stores these public keys in the second SRAM 83 (step SA7).
As described above, in the present embodiment, among the secret key generated by the function of the encryption IC chip 81 and the public key, the IC chip storage unit in which the secret key is mounted on the encryption IC chip 81 (chip). While storing in 86 (first memory), the public key (data other than the data relating to the key used for data encryption) is stored in the second SRAM 83. As a result, the generated public key, in other words, the key not used for data encryption is stored in the second SRAM 83 different from the IC chip storage unit 86, so the public key is stored in the IC chip storage unit 86. It is possible to prevent a situation in which the secret key cannot be stored in the IC chip storage unit 86 due to a shortage of capacity due to the above, and efficient encryption can be realized. In particular, in the present embodiment, a secret key and a public key are generated for each type of fiscal data. However, there are many types of fiscal data, and therefore, the size of the data related to the secret key and the data related to the public key. Even when the value is large, it is possible to prevent a situation in which the secret key cannot be stored in the IC chip storage unit 86 and to realize efficient encryption.

次に、不正検出部35、及び、関連する部材の機能について説明する。
不正検出部35は、第三者によるフィスカルメモリー50に対する不正のアクセスを検出する機能ブロックである。
当該不正検出部35は、物理的なアクセス、ソフトウェア的なアクセスにかかわらず、不正なアクセスを所定の手段によって検出する。以下、具体例を挙げて不正検出部35の機能を説明する。
例えば、不正検出部35は、フィスカルプリンター16のカバー、その他の部品、装置が不正の手段により取り外された場合に、その旨の信号が入力される構成となっており、当該信号の入力により、不正のアクセスを検出する。
また例えば、不正検出部35は、PCコネクター26aや、フィスカルコネクター26b、通信モジュール37を介して入力されるデータを監視し、不正なデータの入力があれば、不正のアクセスがあったものと判別する。
また例えば、不正検出部35には、傾きセンサーや、振動センサー等が接続され、フィスカルプリンター16の設置後、所定の閾値以上の傾きが検出された場合や、所定の閾値以上の振動が検出された場合に、不正のアクセスを検出する。
また例えば、不正検出部35には、GPSセンサーが搭載され、フィスカルプリンター16が所定の範囲を超えて移動した場合に、不正のアクセスを検出する。
以上、具体例を挙げて不正検出部35の構成を説明したが、当該構成はこれに限らず、既存の全ての不正を検出する手段を適用可能である。
Next, functions of the fraud detector 35 and related members will be described.
The fraud detection unit 35 is a functional block that detects unauthorized access to the fiscal memory 50 by a third party.
The fraud detector 35 detects unauthorized access by a predetermined means regardless of physical access or software access. Hereinafter, the function of the fraud detector 35 will be described with a specific example.
For example, the fraud detection unit 35 is configured to receive a signal to that effect when the cover of the fiscal printer 16, other components, or the device is removed by unauthorized means. Detect unauthorized access.
Further, for example, the fraud detection unit 35 monitors data input through the PC connector 26a, the fiscal connector 26b, and the communication module 37, and if there is an input of illegal data, it is determined that there has been an unauthorized access. To do.
In addition, for example, an inclination sensor, a vibration sensor, or the like is connected to the fraud detection unit 35. After the fiscal printer 16 is installed, an inclination greater than a predetermined threshold is detected, or vibration greater than a predetermined threshold is detected. If this happens, an unauthorized access is detected.
For example, the fraud detection unit 35 is equipped with a GPS sensor, and detects fraudulent access when the fiscal printer 16 moves beyond a predetermined range.
The configuration of the fraud detection unit 35 has been described above by giving a specific example. However, the configuration is not limited thereto, and any existing means for detecting fraud can be applied.

不正検出部35により不正なアクセスが検出された場合、その旨の信号が、不正検出部35から暗号用ICチップ制御部82に出力される構成となっている。
不正を検出した旨の信号が入力されると暗号用ICチップ制御部82は、以下の処理を行う。すなわち、暗号用ICチップ制御部82は、第2SRAM83にアクセスし、認証用パスワードPWが記憶された記憶領域を、他のデータ(NULLデータであってもよく、他の意味をなさないデータであってもよい。)によって上書きし、認証用パスワードPWを無効化する。
このように、本実施形態では、フィスカルプリンター16に対する不正なアクセスが検出された場合、第2SRAM83に記憶された認証用パスワードPWが無効化される。これにより、以下の効果を奏する。
すなわち、第2SRAM83に記憶された認証用パスワードPWが無効化されると、暗号用ICチップ制御部82が出力した制御コマンドについて、ICチップ処理部85における認証が成功しない状態となる。これにより、暗号用ICチップ制御部82から制御コマンドを出力して、ICチップ処理部85に何らかの処理を実行させることが不可能となる。このため、第三者が不正の目的を持って、ICチップ処理部85に制御コマンドを出力して、秘密鍵を出力させたり、秘密鍵を改変したりすることが不可能となる。つまり、ICチップ記憶部86に記憶されたデータに対する第三者による不正なアクセスが防止される。
なお、認証用パスワードPWを無効化する手段としては、認証用パスワードPWを上書きする手段のみならず、例えば、不正検出部35により不正が検出された場合、揮発性メモリーたる第2SRAM83に対する電力の供給を遮断して、認証用パスワードPWを消去する手段であってもよい。
When unauthorized access is detected by the unauthorized detection unit 35, a signal to that effect is output from the unauthorized detection unit 35 to the cryptographic IC chip control unit 82.
When a signal indicating that fraud has been detected is input, the cryptographic IC chip controller 82 performs the following processing. That is, the encryption IC chip control unit 82 accesses the second SRAM 83, and stores the storage area in which the authentication password PW is stored as other data (may be NULL data or other meaningless data. The authentication password PW is invalidated.
Thus, in this embodiment, when an unauthorized access to the fiscal printer 16 is detected, the authentication password PW stored in the second SRAM 83 is invalidated. Thereby, the following effects are produced.
That is, when the authentication password PW stored in the second SRAM 83 is invalidated, the IC chip processing unit 85 is not successfully authenticated for the control command output by the encryption IC chip control unit 82. As a result, it becomes impossible to output a control command from the cryptographic IC chip control unit 82 and cause the IC chip processing unit 85 to execute some processing. For this reason, it becomes impossible for a third party to output a control command to the IC chip processing unit 85 for an unauthorized purpose, to output a secret key, or to modify the secret key. That is, unauthorized access by a third party to the data stored in the IC chip storage unit 86 is prevented.
The means for invalidating the authentication password PW is not only a means for overwriting the authentication password PW. For example, when fraud is detected by the fraud detection unit 35, power is supplied to the second SRAM 83 which is a volatile memory. May be a means for erasing the authentication password PW.

以上説明したように、本実施形態に係るフィスカルプリンター16は、データの暗号化に利用する鍵を生成する機能、及び、入力されたデータを暗号化する機能を少なくとも有し、ICチップ記憶部86(第1のメモリー)が実装された暗号用ICチップ81(チップ)と、暗号用ICチップ81の機能により生成された鍵をICチップ記憶部86に記憶する一方、鍵に係るデータ以外のデータの少なくとも一部を、ICチップ記憶部86と異なる第2SRAM83(第2のメモリー)に記憶する暗号用ICチップ制御部82(制御部)と、を備える。
この構成によれば、入力されたデータを暗号化する機能を有する専用のチップにより、各種データの高速な暗号化を実現できる。さらに、暗号化に利用する鍵については、ICチップ記憶部86に記憶する一方、暗号化に利用する鍵に係るデータ以外のデータの少なくとも一部については、ICチップ記憶部86とは異なる第2SRAM83に記憶されるため、ICチップ記憶部86の容量不足により、鍵に係るデータがICチップ記憶部86に記憶できないといった事態が生じることを抑制でき、効率のよい暗号化を実現できる。
As described above, the fiscal printer 16 according to the present embodiment has at least a function of generating a key used for data encryption and a function of encrypting input data, and the IC chip storage unit 86. The encryption IC chip 81 (chip) on which (first memory) is mounted and the key generated by the function of the encryption IC chip 81 are stored in the IC chip storage unit 86, while data other than the data related to the key Are included in a second SRAM 83 (second memory) different from the IC chip storage unit 86, and an encryption IC chip control unit 82 (control unit).
According to this configuration, high-speed encryption of various data can be realized by a dedicated chip having a function of encrypting input data. Further, the key used for encryption is stored in the IC chip storage unit 86, while at least a part of data other than the data related to the key used for encryption is different from the IC chip storage unit 86. Therefore, it is possible to suppress the occurrence of a situation in which the data related to the key cannot be stored in the IC chip storage unit 86 due to the lack of the capacity of the IC chip storage unit 86, thereby realizing efficient encryption.

また、本実施形態では、暗号用ICチップ81は、データの暗号化に利用する鍵を生成する機能として、公開鍵暗号方式に係る秘密鍵及び公開鍵を生成する機能を有している。そして、メイン制御部25は、暗号用ICチップ81の機能により生成された秘密鍵をICチップ記憶部86に記憶する一方、当該チップの機能により生成された公開鍵を第2SRAM83に記憶する。
この構成によれば、チップは、公開鍵暗号方式に係る秘密鍵及び公開鍵を生成する機能を有している。そして、当該機能により生成された公開鍵、換言すれば、データの暗号化に利用しない鍵については、ICチップ記憶部86とは異なる第2SRAM83に記憶されるため、ICチップ記憶部86に公開鍵を記憶したことに起因した容量不足により、ICチップ記憶部86に秘密鍵を記憶できないといった事態が生じることを防止でき、効率のよい暗号化を実現できる。
In this embodiment, the cryptographic IC chip 81 has a function of generating a secret key and a public key related to a public key cryptosystem as a function of generating a key used for data encryption. The main control unit 25 stores the secret key generated by the function of the encryption IC chip 81 in the IC chip storage unit 86, and stores the public key generated by the function of the chip in the second SRAM 83.
According to this configuration, the chip has a function of generating a secret key and a public key related to the public key cryptosystem. Then, since the public key generated by the function, in other words, the key not used for data encryption is stored in the second SRAM 83 different from the IC chip storage unit 86, the public key is stored in the IC chip storage unit 86. It is possible to prevent a situation in which the secret key cannot be stored in the IC chip storage unit 86 due to a shortage of capacity due to storing the password, and efficient encryption can be realized.

また、本実施形態に係るフィスカルプリンター16は、異なる種類のフィスカルデータを記憶し、暗号用ICチップ81により、フィスカルデータの種類ごとに、秘密鍵及び公開鍵の鍵ペアを生成する。
この構成によれば、異なるフィスカルデータのそれぞれに秘密鍵を生成し、秘密鍵が複数存在し、従って、秘密鍵に係るデータ、及び、公開鍵に係るデータのサイズが大きい場合であっても、公開鍵はICチップ記憶部86に記憶されないため、ICチップ記憶部86に公開鍵を記憶したことに起因した容量不足により、ICチップ記憶部86に秘密鍵を記憶できないといった事態が生じることを防止でき、効率のよい暗号化を実現できる。
In addition, the fiscal printer 16 according to the present embodiment stores different types of fiscal data, and the encryption IC chip 81 generates a key pair of a secret key and a public key for each type of fiscal data.
According to this configuration, a secret key is generated for each of different fiscal data, and there are a plurality of secret keys. Therefore, even when the size of the data related to the secret key and the data related to the public key is large, Since the public key is not stored in the IC chip storage unit 86, it is possible to prevent a situation in which the secret key cannot be stored in the IC chip storage unit 86 due to insufficient capacity due to the storage of the public key in the IC chip storage unit 86. And efficient encryption can be realized.

また、本実施形態に係るフィスカルプリンター16は、入力されたデータを暗号化する機能を少なくとも有し、ICチップ記憶部86が実装された暗号用ICチップ81と、暗号用ICチップ81に制御コマンドを出力して、当該チップに処理を実行させる暗号用ICチップ制御部82(制御部)と、を備えている。そして、フィスカルプリンター16は、ICチップ記憶部86に認証用パスワードPWを記憶すると共に、暗号用ICチップ制御部82がアクセス可能な第2SRAM83に共通の認証用パスワードPWを記憶する。さらに、暗号用ICチップ制御部82は、認証用パスワードPWを含む制御コマンドを暗号用ICチップ81に出力し、暗号用ICチップ81は、制御コマンドに含まれる認証用パスワードPW、及び、ICチップ記憶部86に記憶された認証用パスワードPWに基づいて、制御コマンドの認証を行う機能を有する。
この構成によれば、入力されたデータを暗号化する機能を有する専用のチップにより、各種データの高速な暗号化を実現できる。さらに、暗号用ICチップ81は、暗号用ICチップ制御部82から入力された制御コマンドに含まれるパスワード、及び、実装されたICチップ記憶部86に記憶されたパスワードに基づいて、制御コマンドの認証を行うため、例えば、チップが第三者によって取り外された後、当該第三者により不正なアクセスがあった場合であっても、そのことを検出でき、かつ、対応する適切な処理、例えば、データを利用不可能とする処理等を実行することが可能である。
Further, the fiscal printer 16 according to the present embodiment has at least a function of encrypting input data, and the encryption IC chip 81 on which the IC chip storage unit 86 is mounted and the control command to the encryption IC chip 81. And an encryption IC chip control unit 82 (control unit) that causes the chip to execute processing. The fiscal printer 16 stores the authentication password PW in the IC chip storage unit 86 and also stores the common authentication password PW in the second SRAM 83 accessible by the encryption IC chip control unit 82. Further, the encryption IC chip control unit 82 outputs a control command including the authentication password PW to the encryption IC chip 81, and the encryption IC chip 81 includes the authentication password PW included in the control command and the IC chip. Based on the authentication password PW stored in the storage unit 86, the control command is authenticated.
According to this configuration, high-speed encryption of various data can be realized by a dedicated chip having a function of encrypting input data. Further, the encryption IC chip 81 authenticates the control command based on the password included in the control command input from the encryption IC chip control unit 82 and the password stored in the mounted IC chip storage unit 86. For example, even if there is unauthorized access by a third party after the chip has been removed by a third party, this can be detected and a corresponding appropriate process, for example, It is possible to execute processing for making data unusable.

また、本実施形態に係るフィスカルプリンター16は、不正なアクセスを検出する不正検出部35をさらに備えており、不正検出部35により不正が検出された場合、第2SRAM83に記憶された認証用パスワードPWを無効化する。
この構成によれば、不正なアクセスがあった場合、第2SRAM83に記憶された認証用パスワードPWが無効化され、暗号用ICチップ制御部82による制御コマンドによって暗号用ICチップ81を制御できなくなるため、不正な手段によって当該チップが不正な処理を実行してしまうことを防止できる。
The fiscal printer 16 according to the present embodiment further includes a fraud detection unit 35 that detects unauthorized access. When the fraud detection unit 35 detects fraud, the authentication password PW stored in the second SRAM 83 is provided. Disable.
According to this configuration, when there is an unauthorized access, the authentication password PW stored in the second SRAM 83 is invalidated, and the encryption IC chip 81 cannot be controlled by the control command from the encryption IC chip control unit 82. Therefore, it is possible to prevent the chip from executing unauthorized processing by unauthorized means.

また、本実施形態では、不正検出部35により不正が検出された場合、第2SRAM83に記憶された認証用パスワードPWを上書きし、また、揮発性メモリーにより構成された第2SRAM83に供給される電力を遮断することにより、第2SRAM83に記憶された認証用パスワードPWを無効化する。
この構成によれば、第2SRAM83に記憶されたパスワードを的確に無効化できる。
In the present embodiment, when fraud is detected by the fraud detector 35, the authentication password PW stored in the second SRAM 83 is overwritten, and the power supplied to the second SRAM 83 configured by a volatile memory is used. By blocking, the authentication password PW stored in the second SRAM 83 is invalidated.
According to this configuration, the password stored in the second SRAM 83 can be invalidated accurately.

また、本実施形態では、暗号用ICチップ81は、公開鍵暗号方式に係る秘密鍵及び公開鍵を生成する機能を有し、当該機能により生成された前記秘密鍵をICチップ記憶部86に記憶する。
この構成によれば、暗号用ICチップ81は、暗号用ICチップ制御部82から入力された制御コマンドに含まれる認証用パスワードPW、及び、実装されたICチップ記憶部86に記憶された認証用パスワードPWに基づいて、制御コマンドの認証を行うため、不正な制御コマンドにより、秘密鍵が取得されることを防止できる。
In this embodiment, the encryption IC chip 81 has a function of generating a secret key and a public key related to the public key cryptosystem, and stores the secret key generated by the function in the IC chip storage unit 86. To do.
According to this configuration, the encryption IC chip 81 includes the authentication password PW included in the control command input from the encryption IC chip control unit 82 and the authentication password stored in the mounted IC chip storage unit 86. Since the control command is authenticated based on the password PW, it is possible to prevent the secret key from being acquired by an unauthorized control command.

なお、上述した実施の形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形および応用が可能である。
例えば、本実施形態では、暗号用ICチップ制御部82が、暗号用ICチップ81の機能により生成された秘密鍵をICチップ記憶部86に記憶する一方、鍵に係るデータ以外のデータの少なくとも一部(公開鍵)を、第2SRAM83に記憶する処理を行っていた。しかしながら、当該処理を、ICチップ処理部85が行ってもよく、メイン制御部25が行ってもよく、また、各機能ブロックが協働して行ってもよい。この場合、処理を行う主体、又は、主体の組合せが「制御部」として機能する。
例えば、上述した実施形態では、フィスカル情報(フィスカルデータ)として、書込レシートデータ54と、フィスカル書込日時データ52とを例示したが、フィスカル情報がこれらデータに限られないことは言うまでもない。また例えば、図1に示す各機能ブロックはハードウェアとソフトウェアの協働により任意に実現可能であり、特定のハードウェア構成を示唆するものではない。また、各機能ブロックの機能を、外部接続される別の装置に持たせるようにしてもよく、また、説明した各種動作について、外部接続される記憶媒体に記憶させたプログラムを実行することにより、実行するようにしてもよい。
The above-described embodiment is merely an aspect of the present invention, and can be arbitrarily modified and applied within the scope of the present invention.
For example, in this embodiment, the encryption IC chip control unit 82 stores the secret key generated by the function of the encryption IC chip 81 in the IC chip storage unit 86, while at least one of data other than the data related to the key. The part (public key) is stored in the second SRAM 83. However, the processing may be performed by the IC chip processing unit 85, the main control unit 25, or each functional block may cooperate. In this case, a subject that performs processing or a combination of subjects functions as a “control unit”.
For example, in the above-described embodiment, the write receipt data 54 and the fiscal writing date / time data 52 are exemplified as the fiscal information (fiscal data), but it goes without saying that the fiscal information is not limited to these data. Further, for example, each functional block shown in FIG. 1 can be arbitrarily realized by cooperation of hardware and software, and does not suggest a specific hardware configuration. In addition, the function of each functional block may be provided in another externally connected device, and for the various operations described, by executing a program stored in an externally connected storage medium, You may make it perform.

1…情報処理システム、15…ホストコンピューター、16…フィスカルプリンター(情報処理装置)、25…メイン制御部(制御部)、35…不正検出部、53…日計売上データ(フィスカルデータ)、54…書込レシートデータ(フィスカルデータ)、80…暗号化モジュール、81…暗号用ICチップ(チップ)、82…暗号用ICチップ制御部(制御部)、83…第2SRAM(第2のメモリー)、85…ICチップ処理部(制御部)、86…ICチップ記憶部(第1のメモリー)。   DESCRIPTION OF SYMBOLS 1 ... Information processing system, 15 ... Host computer, 16 ... Fiscal printer (information processing apparatus), 25 ... Main control part (control part), 35 ... Fraud detection part, 53 ... Daily sales data (fiscal data), 54 ... Write receipt data (fiscal data), 80 ... encryption module, 81 ... encryption IC chip (chip), 82 ... encryption IC chip control unit (control unit), 83 ... second SRAM (second memory), 85 ... IC chip processing unit (control unit), 86 ... IC chip storage unit (first memory).

Claims (6)

入力されたデータを暗号化する機能を少なくとも有し、第1のメモリーが実装されたチップと、
前記チップに制御コマンドを出力して、前記チップに処理を実行させる制御部と、を備え、
前記第1のメモリーに記憶されたパスワードと共通のパスワードが、前記制御部がアクセス可能な第2のメモリーに記憶され、
前記制御部は、前記パスワードを含む制御コマンドを前記チップに出力し、
前記チップは、前記制御コマンドに含まれる前記パスワード、及び、前記第1のメモリーに記憶された前記パスワードに基づいて、前記制御コマンドの認証を行う機能を有することを特徴とする情報処理装置。
A chip having at least a function of encrypting input data and mounted with a first memory;
A control unit that outputs a control command to the chip and causes the chip to execute processing,
A password common to the password stored in the first memory is stored in a second memory accessible by the control unit;
The control unit outputs a control command including the password to the chip,
The information processing apparatus, wherein the chip has a function of authenticating the control command based on the password included in the control command and the password stored in the first memory.
不正なアクセスを検出する不正検出部をさらに備え、
前記不正検出部により不正が検出された場合、前記第2のメモリーに記憶された前記パスワードを無効化することを特徴とする請求項1に記載の情報処理装置。
It further includes a fraud detector that detects unauthorized access,
The information processing apparatus according to claim 1, wherein when the fraud is detected by the fraud detection unit, the password stored in the second memory is invalidated.
前記不正検出部により不正が検出された場合、前記第2のメモリーに記憶された前記パスワードを上書きし、また、揮発性メモリーにより構成された前記第2のメモリーに供給される電力を遮断して前記パスワードを消去ことにより、前記第2のメモリーに記憶された前記パスワードを無効化することを特徴とする請求項2に記載の情報処理装置。   When fraud is detected by the fraud detector, the password stored in the second memory is overwritten, and the power supplied to the second memory constituted by a volatile memory is cut off. The information processing apparatus according to claim 2, wherein the password stored in the second memory is invalidated by deleting the password. 前記チップは、公開鍵暗号方式に係る秘密鍵及び公開鍵を生成する機能を有し、当該機能により生成された前記秘密鍵を前記第1のメモリーに記憶することを特徴とする請求項1ないし3のいずれかに記載の情報処理装置。   The chip has a function of generating a secret key and a public key related to a public key cryptosystem, and stores the secret key generated by the function in the first memory. 4. The information processing apparatus according to any one of 3. 入力されたデータを暗号化する機能を少なくとも有し、第1のメモリーが実装されたチップと、前記チップに制御コマンドを出力して、前記チップに処理を実行させる制御部と、を備える情報処理装置の制御方法であって、
前記第1のメモリーにパスワードを記憶すると共に、前記制御部がアクセス可能な第2のメモリーに共通の前記パスワードを記憶し、
前記制御部により、前記パスワードを含む制御コマンドを前記チップに出力し、
前記チップにより、前記制御コマンドに含まれる前記パスワード、及び、前記第1のメモリーに記憶された前記パスワードに基づいて、前記制御コマンドの認証を行うことを特徴とする情報処理装置の制御方法。
Information processing comprising: a chip having at least a function of encrypting input data and having a first memory mounted thereon; and a control unit that outputs a control command to the chip and causes the chip to execute processing An apparatus control method comprising:
Storing a password in the first memory, and storing the common password in a second memory accessible by the control unit;
The control unit outputs a control command including the password to the chip,
A control method for an information processing apparatus, wherein the control command is authenticated by the chip based on the password included in the control command and the password stored in the first memory.
入力されたデータを暗号化する機能を少なくとも有し、第1のメモリーが実装されたチップと、前記チップに制御コマンドを出力して、前記チップに処理を実行させる制御部と、を備え、前記第1のメモリーに記憶されたパスワードと共通のパスワードが、前記制御部がアクセス可能な第2のメモリーに記憶された情報処理装置の前記チップ、及び、前記制御部により実行されるプログラムであって、
前記制御部に、前記パスワードを含む制御コマンドを前記チップに出力させ、
前記チップに、前記制御コマンドに含まれる前記パスワード、及び、前記第1のメモリーに記憶された前記パスワードに基づいて、前記制御コマンドの認証を行わせることを特徴とするプログラム。
A chip having at least a function of encrypting input data and having a first memory mounted thereon; and a control unit that outputs a control command to the chip and causes the chip to execute a process. A password that is common to the password stored in the first memory is a program executed by the chip of the information processing apparatus stored in the second memory accessible by the control unit and the control unit. ,
Causing the control unit to output a control command including the password to the chip;
A program for causing the chip to authenticate the control command based on the password included in the control command and the password stored in the first memory.
JP2012252010A 2012-11-16 2012-11-16 Information processing device, control method of information processing device, and program Pending JP2014102534A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2012252010A JP2014102534A (en) 2012-11-16 2012-11-16 Information processing device, control method of information processing device, and program
ARP130104201A AR093496A1 (en) 2012-11-16 2013-11-14 INFORMATION PROCESSING DEVICE, APPLIANCE CONTROL METHOD AND STORAGE MEDIA
CN201310566518.7A CN103824028B (en) 2012-11-16 2013-11-14 The control method of information processor and information processor
BR102013029499-3A BR102013029499A2 (en) 2012-11-16 2013-11-14 INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING APPARATUS CONTROL METHOD AND STORAGE
IT000928A ITTO20130928A1 (en) 2012-11-16 2013-11-15 APPARATUS FOR PROCESSING INFORMATION, COMMAND PROCEDURE OF THE DEVICE FOR PROCESSING INFORMATION AND MEANS OF STORAGE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012252010A JP2014102534A (en) 2012-11-16 2012-11-16 Information processing device, control method of information processing device, and program

Publications (1)

Publication Number Publication Date
JP2014102534A true JP2014102534A (en) 2014-06-05

Family

ID=51025030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012252010A Pending JP2014102534A (en) 2012-11-16 2012-11-16 Information processing device, control method of information processing device, and program

Country Status (1)

Country Link
JP (1) JP2014102534A (en)

Similar Documents

Publication Publication Date Title
EP3811562B1 (en) Method, computer program product and apparatus for creating, registering, and verifying digitally sealed assets
RU2607620C2 (en) Smart card reader with secure logging feature
TWI436372B (en) Flash memory storage system, and controller and method for anti-falsifying data thereof
KR20130132893A (en) Device for and method of handling sensitive data
JP2002281019A (en) Portable information storage medium and method for authenticating the same
CN109445705A (en) Firmware authentication method and solid state hard disk
RU2302660C1 (en) Fiscal recorder
KR20220086135A (en) Block chain-based power transaction operation system
JP3684179B2 (en) Memory card with security function
CN1107990A (en) Anti-fake biller, identifier and their anbi-fake, identifying method
RU2207617C1 (en) Method and electronic cryptographic module for information protection and authenticity control
CN103824028B (en) The control method of information processor and information processor
JP2014102534A (en) Information processing device, control method of information processing device, and program
RU2605914C1 (en) Method of processing data on cash calculations and/or calculations with use of payment cards during control-teller machines operation with functions of fixation and transmitting information and fiscal data server operator
JP2014102535A (en) Information processing device, control method of information processing device, and program
CN109508770A (en) A kind of card-type credentials write comments on a document device, system and method for controlling security
JP2014115803A (en) Information processor, control method of information processor, and program
JP4039061B2 (en) IC card issuing device and IC card issuing method
JP2011123781A (en) Electronic apparatus and method of controlling the same
JP2014103435A (en) Information processing device, control method of information processing device, and program
JP4601329B2 (en) Electronic authentication device primary issuing device, electronic authentication device issuing system, electronic authentication device secondary issuing device, electronic authentication device primary issuing method, electronic authentication device issuing method, and electronic authentication device secondary issuing method
JP2017033492A (en) Information processing apparatus, information processing system, and control method of information processing apparatus
US11856112B2 (en) System, server device, and storage device
TWM578053U (en) System for generating signing documents sequentially providing the signature for the signing party
US11902434B2 (en) Crum chip and smart card

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20150108