JP2015152998A - Printer and control method of the same - Google Patents

Printer and control method of the same Download PDF

Info

Publication number
JP2015152998A
JP2015152998A JP2014024150A JP2014024150A JP2015152998A JP 2015152998 A JP2015152998 A JP 2015152998A JP 2014024150 A JP2014024150 A JP 2014024150A JP 2014024150 A JP2014024150 A JP 2014024150A JP 2015152998 A JP2015152998 A JP 2015152998A
Authority
JP
Japan
Prior art keywords
program
control unit
fiscal data
printer
fiscal
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
JP2014024150A
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 JP2014024150A priority Critical patent/JP2015152998A/en
Publication of JP2015152998A publication Critical patent/JP2015152998A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a printer storing fiscal data and, especially, being capable of effectively detecting an illegal alteration of a program with a relatively simple device configuration, and further to provide the like.SOLUTION: A printer storing fiscal data includes: a storage section storing a start program and a fiscal data control program; a first control section starting by the start program and performing control of the printer by a control program including the fiscal data control program; and a smart card comprising a second control section determining whether or not the fiscal data control program transmitted from the first control section is a legitimate program before the first control section starts the control by the fiscal data control program.

Description

本発明は、フィスカルデータを記憶するプリンター等に関し、特に、プログラムの不正改造を比較的簡素な装置構成で効率的に検出することのできるプリンター及びプリンターの制御方法に関する。   The present invention relates to a printer or the like that stores fiscal data, and more particularly to a printer and a printer control method capable of efficiently detecting unauthorized modification of a program with a relatively simple device configuration.

従来、小売販売業においては、多くの場合、商品販売時の会計用にレジスター(いわゆるレジ)が用いられており、会計の記録としてレシートが印刷されて顧客に渡される。このレシート用のプリンターは、レジと一体となって、又は、レジと接続されて設けられる。   Conventionally, in the retail sales business, a register (so-called cash register) is often used for accounting at the time of sale of goods, and a receipt is printed as a record of accounting and delivered to a customer. The receipt printer is provided integrally with the cash register or connected to the cash register.

このような商品販売に係る会計の記録(売上の情報)は、納税のために正しく保管される必要があるが、国によっては、店主による脱法行為を防止するために、レジのプリンターとしていわゆるフィスカルプリンターを用いる場合がある。   Such accounting records related to product sales (sales information) need to be properly stored for tax payments, but in some countries, so-called Fiscals are used as cash register printers in order to prevent illegal actions by store owners. A printer may be used.

かかるフィスカルプリンターは、各国の法令に従ってその機能や記録する情報が異なるが、通常、プリンター内に設けられた独立のメモリにフィスカルデータ(レシートに出力した情報など売上の情報)を記録し、そこに記録された情報が後に徴税のために用いられる。   Such fiscal printers have different functions and information to be recorded in accordance with the laws and regulations of each country, but usually record fiscal data (sales information such as information output on receipts) in an independent memory provided in the printer. The recorded information is later used for tax collection.

このようなフィスカルプリンターにおいては、脱法行為を防止するために記録したフィスカルデータが改ざんされることを防止することが必要であり、これまでに、フィスカルデータを記憶するメモリの構造、データ自体の暗号化、メモリを収容する筐体等についていくつかの提案がなされている。   In such a fiscal printer, it is necessary to prevent falsification of the recorded fiscal data in order to prevent illegal acts. So far, the structure of the memory for storing the fiscal data and the encryption of the data itself are required. Some proposals have been made on a housing for housing a memory.

下記特許文献1では、フィスカル情報を含むデータを記憶するメモリが実装される基板を収納するケースについての提案がなされている。   In the following Patent Document 1, a case for housing a substrate on which a memory for storing data including fiscal information is mounted is proposed.

特開2011−140203号公報JP 2011-140203 A

しかしながら、フィスカルプリンターのファームウェア(制御プログラム)が不正に改造される虞もあり、プログラムに関しても、このような不正改造されたプログラムを早期に検出し、不正なプログラムが起動しないように措置を講ずる必要がある。   However, there is a risk that the firmware (control program) of the fiscal printer may be tampered with, and it is also necessary to take measures to prevent such a tampered program from being activated at an early stage. There is.

また、このようなプログラムのチェック(検出)には、プリンターの制御部にメインCPUとは別に備えられるサブCPUを用いて当該チェック行うことも考えられるが、全てのプリンターがサブCPUを備える構成であるとは限らない。   In addition, such a program check (detection) may be performed by using a sub CPU provided in the printer control unit separately from the main CPU. However, all printers have a sub CPU. Not always.

そこで、本発明の目的は、フィスカルデータを記憶するプリンターであって、特に、プログラムの不正改造を比較的簡素な装置構成で効率的に検出することのできるプリンター、等を提供することである。   Accordingly, an object of the present invention is to provide a printer that stores fiscal data, and in particular, a printer that can efficiently detect unauthorized modification of a program with a relatively simple device configuration.

上記の目的を達成するために、本発明の一つの側面は、フィスカルデータを記憶するプリンターが、起動プログラムとフィスカルデータ制御プログラムを記憶する記憶部と、前記起動プログラムによって起動し、前記フィスカルデータ制御プログラムを含む制御プログラムによって前記プリンターの制御を行う第1制御部と、前記第1制御部が前記フィスカルデータ制御プログラムによる制御を開始する前に、前記第1制御部から送信される前記フィスカルデータ制御プログラムが正規なプログラムであるか否かを判断する第2制御部を備えたスマートカードと、を有する、ことである。   In order to achieve the above object, according to one aspect of the present invention, a printer that stores fiscal data is activated by the activation program and a storage unit that stores an activation program and a fiscal data control program, and the fiscal data control is performed. A first control unit for controlling the printer by a control program including a program, and the fiscal data control transmitted from the first control unit before the first control unit starts control by the fiscal data control program. And a smart card having a second control unit that determines whether or not the program is a legitimate program.

更に、上記発明において、一つの好ましい態様は、前記第2制御部は、前記判断の結果を前記第1制御部へ返答し、前記第1制御部は、前記フィスカルデータ制御プログラムが正規なプログラムである場合には、当該フィスカルデータ制御プログラムによる制御を開始し、前記フィスカルデータ制御プログラムが正規なプログラムでない場合には、当該フィスカルデータ制御プログラムによる制御を開始しない、ことを特徴とする。   Further, in the above invention, according to one preferable aspect, the second control unit returns a result of the determination to the first control unit, and the first control unit is a program in which the fiscal data control program is a regular program. In some cases, control by the fiscal data control program is started, and when the fiscal data control program is not a regular program, control by the fiscal data control program is not started.

更に、上記発明において、好ましい態様は、前記第2制御部は、前記フィスカルデータ制御プログラムが正規なプログラムでない場合に、当該第2制御部を動作不能状態とする、ことを特徴とする。   Furthermore, in the above invention, a preferred aspect is characterized in that the second control unit disables the second control unit when the fiscal data control program is not a regular program.

更に、上記発明において、一つの好ましい態様は、前記第2制御部は、正規な前記フィスカルデータ制御プログラムのコードに基づく正規情報を予め記憶し、前記第1制御部から前記フィスカルデータ制御プログラムが送信された際に、当該フィスカルデータ制御プログラムのコードに基づいて実情報を生成し、当該実情報が前記正規情報と一致すれば前記フィスカルデータ制御プログラムが正規なプログラムであると判断し、前記実情報が前記正規情報と一致しなければ前記フィスカルデータ制御プログラムが正規なプログラムでないと判断する、ことを特徴とする。   Furthermore, in the above invention, one preferable aspect is that the second control unit stores in advance regular information based on a code of the regular fiscal data control program, and the fiscal data control program transmits from the first control unit. When the actual information is generated based on the code of the fiscal data control program, and the actual information matches the regular information, the fiscal data control program is determined to be a regular program, and the actual information If it does not match the regular information, it is determined that the fiscal data control program is not a regular program.

更に、上記発明において、一つの好ましい態様は、前記正規情報は、前記第2制御部が、前記フィスカルデータ制御プログラムのコードを所定の方法で暗号化又は要約化し予め記憶した情報であり、前記実情報は、前記第2制御部が、前記第1制御部から前記フィスカルデータ制御プログラムが送信された際に、当該フィスカルデータ処理プログラムのコードを前記所定の方法で暗号化又は要約化して情報である、ことを特徴とする。   Furthermore, in the above-mentioned invention, one preferable aspect is that the regular information is information stored in advance by the second control unit by encrypting or summarizing the code of the fiscal data control program by a predetermined method. The information is information obtained by encrypting or summarizing the code of the fiscal data processing program by the predetermined method when the fiscal data control program is transmitted from the first control unit. It is characterized by that.

更に、上記発明において、一つの好ましい態様は、前記所定の方法は、ハッシュ関数にコードを与えることである、ことを特徴とする。   Furthermore, in the above invention, one preferable aspect is that the predetermined method is to give a code to a hash function.

更に、上記発明において、一つの好ましい態様は、前記第2制御部は、前記プリンターの電源が投入された際に前記判断を行う、ことを特徴とする。   Furthermore, in the above invention, one preferable aspect is characterized in that the second control unit makes the determination when the printer is turned on.

上記の目的を達成するために、本発明の別の側面は、フィスカルデータを記憶するプリンターの制御方法において、前記プリンターに、起動プログラムとフィスカルデータ制御プログラムを記憶する記憶部と、前記起動プログラムによって起動し、前記フィスカルデータ制御プログラムによって前記プリンターの制御を行う第1制御部と、第2制御部を含むスマートカードと、が備えられ、前記第1制御部が、前記フィスカルデータ制御プログラムによる制御を開始する前に、前記フィスカルデータ制御プログラムを前記第2制御部に送信し、前記第2制御部が、前記送信されたフィスカルデータ制御プログラムが正規なプログラムであるか否かを判断する、ことである。   In order to achieve the above object, according to another aspect of the present invention, in a printer control method for storing fiscal data, the printer includes a storage unit for storing a startup program and a fiscal data control program, and the startup program. A first control unit that starts and controls the printer by the fiscal data control program; and a smart card that includes a second control unit, wherein the first control unit performs control by the fiscal data control program. Before starting, the fiscal data control program is transmitted to the second control unit, and the second control unit determines whether or not the transmitted fiscal data control program is a regular program. is there.

本発明の更なる目的及び、特徴は、以下に説明する発明の実施の形態から明らかになる。   Further objects and features of the present invention will become apparent from the embodiments of the invention described below.

本発明を適用したフィスカルプリンターの実施の形態例に係る構成図である。1 is a configuration diagram according to an embodiment of a fiscal printer to which the present invention is applied. FIG. セキュア制御部23等の機能構成図である。It is a functional block diagram of the secure control part 23 grade | etc.,. フィスカルプリンター2の起動から停止までの処理手順を例示したフローチャートである。6 is a flowchart illustrating a processing procedure from starting to stopping of the fiscal printer 2.

以下、図面を参照して本発明の実施の形態例を説明する。しかしながら、かかる実施の形態例が、本発明の技術的範囲を限定するものではない。なお、図において、同一又は類似のものには同一の参照番号又は参照記号を付して説明する。   Embodiments of the present invention will be described below with reference to the drawings. However, such an embodiment does not limit the technical scope of the present invention. In the drawings, the same or similar elements are denoted by the same reference numerals or reference symbols.

図1は、本発明を適用したフィスカルプリンターの実施の形態例に係る構成図である。図1に示すフィスカルプリンター2が本発明を適用したプリンターであり、当該プリンターでは、プリンターの正規なフィスカルデータ制御プログラム(ファームウェア)のハッシュ値を予め記憶しており、起動時に、いわゆるスマートカードで構成されるセキュア制御部23が、その時点で記憶されているフィスカルデータ制御プログラム212が起動される前に、そのハッシュ値を求めて上記記憶された正規なハッシュ値と比較し、当該フィスカルデータ制御プログラム212が正規なものであるか否かを判断する。これにより、フィスカルプリンターにおけるプログラムの不正改造を比較的簡素な装置構成により効率的に検出することが可能になる。その結果、不正なプログラムの起動を防止でき、フィスカルデータの改ざん等の不正行為を効果的に防止できる。   FIG. 1 is a configuration diagram according to an embodiment of a fiscal printer to which the present invention is applied. A fiscal printer 2 shown in FIG. 1 is a printer to which the present invention is applied. The printer stores a hash value of a regular fiscal data control program (firmware) of the printer in advance, and is configured with a so-called smart card at startup. The secure control unit 23 to be executed obtains the hash value and compares it with the stored normal hash value before the fiscal data control program 212 stored at that time is started. It is determined whether or not 212 is regular. This makes it possible to efficiently detect unauthorized modification of the program in the fiscal printer with a relatively simple device configuration. As a result, it is possible to prevent activation of an unauthorized program, and to effectively prevent unauthorized acts such as falsification of fiscal data.

図1に示すように、本実施の形態例に係るフィスカルプリンター2は、そのホスト装置であるホストコンピューター1と接続され、店舗等のレジなどに配置される。そして、ホストコンピューター1は、POSシステムのレジスターとして具現化され、フィスカルプリンター2は当該レジスターによる会計処理の後にレシートの印刷を実行する。また、フィスカルプリンター2は、各会計処理の情報(各レシートに含まれる情報)、日計の売上情報等をフィスカルデータとして記憶する。記憶されたフィスカルデータは、徴税等のために利用される。   As shown in FIG. 1, a fiscal printer 2 according to the present embodiment is connected to a host computer 1 that is a host device, and is disposed at a cash register of a store or the like. The host computer 1 is embodied as a register of the POS system, and the fiscal printer 2 prints a receipt after the accounting process by the register. Further, the fiscal printer 2 stores information on each accounting process (information included in each receipt), daily sales information, and the like as fiscal data. The stored fiscal data is used for tax collection and the like.

ホストコンピューター1は、顧客に対して会計処理をする度にそのレシートの印刷データをフィスカルプリンター2に送信してレシートの印刷を指示すると共に、その日の販売終了後に日計の売上情報等をフィスカルプリンター2に送信する。   The host computer 1 sends the receipt print data to the Fiscal Printer 2 every time an accounting process is performed for the customer, instructs the printing of the receipt, and displays the daily sales information etc. 2 to send.

図1に示すフィスカルデータ読出装置3は、フィスカルプリンター2に記憶されるフィスカルデータを読み出す装置であり、政府等の特別な許可を得た者が所有する。当該フィスカルデータ読出装置3を用いて読み出されたフィスカルデータは、徴税等のために用いられる。また、フィスカルデータ読出装置3を用いずに、通信ネットワークを介して政府等のサーバーにホストコンピューター1又はフィスカルプリンター2からフィスカルデータを送信する構成としてもよい。   A fiscal data reading device 3 shown in FIG. 1 is a device that reads fiscal data stored in the fiscal printer 2 and is owned by a person who has obtained special permission from the government or the like. The fiscal data read using the fiscal data reading device 3 is used for tax collection and the like. Further, the fiscal data may be transmitted from the host computer 1 or the fiscal printer 2 to a server such as the government via a communication network without using the fiscal data reading device 3.

次に、フィスカルプリンター2は、図1に示すような概略構成を備えるが、図示されていないものとして、通信インターフェース、操作装置、表示装置等を備えている。   Next, the fiscal printer 2 has a schematic configuration as shown in FIG. 1, but includes a communication interface, an operation device, a display device, and the like, which are not shown.

まず、ROM21は、当該フィスカルプリンター2の制御プログラム(ファームウェア)を記憶している。   First, the ROM 21 stores a control program (firmware) for the fiscal printer 2.

メイン制御部22(第1制御部)は、CPU、RAM、その他の周辺回路を備え、フィスカルプリンター2の各部を中枢的に制御する部分である。具体的には、ホストコンピューター1からの指示に従って、印刷処理の指示、フィスカルデータの記憶処理の指示など
を実行する。当該メイン制御部22によるこれらの制御処理は、上記ROM21に記憶される制御プログラムを読み込んで、当該プログラムに従ってCPUが動作することによって実行される。また、メイン制御部22は、次に説明するセキュア制御部23の判断結果に基づいて制御処理の起動・不起動を決定する。
The main control unit 22 (first control unit) includes a CPU, a RAM, and other peripheral circuits, and is a part that centrally controls each unit of the fiscal printer 2. Specifically, in accordance with an instruction from the host computer 1, an instruction for print processing, an instruction for storage processing of fiscal data, and the like are executed. These control processes by the main control unit 22 are executed by reading a control program stored in the ROM 21 and operating the CPU according to the program. Further, the main control unit 22 determines whether or not to start the control process based on the determination result of the secure control unit 23 described below.

セキュア制御部23(第2制御部)は、フィスカルプリンター2における不正を防止し、適正なフィスカルデータの取り扱いを確保するための処理を実行する。具体的には、ROM21に記憶される制御プログラムが正規のものであるか否かの判断、フィスカルデータの暗号化、フィスカルデータへのデジタル署名の付加等の処理を実行する。また、セキュア制御部23は、いわゆるスマートカードで構成されている。スマートカードとは、ICカード(ICC:Integrated Circuit Card)、チップカードとも呼ばれ、データの記録や演算のための集積回路を組み込んだカードのことであり、ここでは、カード内で演算処理が可能なカードを意味する。従って、セキュア制御部23(スマートカード)は、RAM、ROM、EPROMなどの半導体メモリとCPUなどのプロセッサーを備えている。なお、スマートカードは、第三者にとってその内部構成が理解しづらく、不正行為に対して一般的に安全とされている。   The secure control unit 23 (second control unit) executes processing for preventing fraud in the fiscal printer 2 and ensuring proper handling of fiscal data. Specifically, processing such as determination of whether or not the control program stored in the ROM 21 is authentic, encryption of fiscal data, and addition of a digital signature to the fiscal data is executed. The secure control unit 23 is configured with a so-called smart card. A smart card is also called an IC card (ICC: Integrated Circuit Card) or chip card, and is a card that incorporates an integrated circuit for data recording and calculation. Here, calculation processing is possible within the card. Means a good card. Therefore, the secure control unit 23 (smart card) includes a semiconductor memory such as RAM, ROM, EPROM, and a processor such as a CPU. Smart cards are generally safe against fraud because it is difficult for third parties to understand the internal configuration.

次に、EJ(エレクトリックジャーナル)メモリ制御部24は、メイン制御部22の制御の下でEJメモリ25へのデータの読み書きを制御する部分である。EJメモリ制御部24は、CPUを備え、セキュア制御部23で暗号化等のセキュア処理が実行されたフィスカルデータをEJメモリ25に記憶する。このEJメモリ25に記憶されるフィスカルデータは、ホストコンピューター1で会計処理が行われる度に発行されるレシートに含まれる情報であり、例えば、顧客が購入した商品毎に、商品コード、商品単価、購入個数、商品代金、商品の総購入代金などの情報である。   Next, an EJ (electric journal) memory control unit 24 is a part that controls reading and writing of data to the EJ memory 25 under the control of the main control unit 22. The EJ memory control unit 24 includes a CPU, and stores fiscal data on which secure processing such as encryption has been executed by the secure control unit 23 in the EJ memory 25. Fiscal data stored in the EJ memory 25 is information included in a receipt issued every time accounting processing is performed by the host computer 1. For example, for each product purchased by a customer, a product code, a product unit price, This is information such as the number of purchases, product price, and total purchase price of the product.

EJメモリ25は、このようなレシートに係るフィスカルデータを記憶する部分であり、例えば、フラッシュメモリで構成される。なお、EJメモリ25への記憶処理は、レシートの発行の度に行われる。   The EJ memory 25 is a part that stores fiscal data relating to such a receipt, and is constituted by a flash memory, for example. The storage process in the EJ memory 25 is performed every time a receipt is issued.

次に、フィスカルメモリ制御部26は、メイン制御部22の制御の下でフィスカルメモリ27へのデータの読み書きを制御する部分である。フィスカルメモリ制御部26は、CPUを備え、セキュア制御部23で暗号化等のセキュア処理が実行されたフィスカルデータをフィスカルメモリ27に記憶する。このフィスカルメモリ27に記憶されるフィスカルデータは、日計売上データであり、例えば、店舗の1日毎の総売上データである。   Next, the fiscal memory control unit 26 is a part that controls the reading and writing of data to the fiscal memory 27 under the control of the main control unit 22. The fiscal memory control unit 26 includes a CPU, and stores fiscal data in which secure processing such as encryption is executed by the secure control unit 23 in the fiscal memory 27. The fiscal data stored in the fiscal memory 27 is daily sales data, for example, total sales data for each day of the store.

フィスカルメモリ27は、このように日計売上に係るフィスカルデータを記憶する部分であり、例えば、フラッシュメモリで構成される。なお、フィスカルメモリ27への記憶処理は、その日の営業終了時などに行われる。   The fiscal memory 27 is a part for storing fiscal data relating to daily sales in this way, and is constituted by, for example, a flash memory. Note that the storage process in the fiscal memory 27 is performed at the end of the business day.

次に、印刷制御部28は、いわゆるプリンターのコントローラーであり、ホストコンピューター1から送信される印刷データに基づいて印刷実行部29にレシートの印刷を行わせる。図示していないが、印刷制御部28は、CPU、RAM、ROM、ASIC等で構成される。   Next, the print control unit 28 is a so-called printer controller, and causes the print execution unit 29 to print a receipt based on print data transmitted from the host computer 1. Although not shown, the print control unit 28 includes a CPU, a RAM, a ROM, an ASIC, and the like.

印刷実行部29は、レシートの印刷を実行する部分であり、印刷方式が感熱用紙を用いたサーマル方式である場合には、発熱素子を備えたサーマルヘッド、プラテン、用紙の搬送装置等で構成される。   The print execution unit 29 is a part that executes printing of a receipt. When the printing method is a thermal method using thermal paper, the print execution unit 29 includes a thermal head including a heating element, a platen, a paper transport device, and the like. The

図2は、セキュア制御部23等の機能構成図を示している。図2に示されるように、ROM21(記憶部)には、上述した制御プログラムとしてブートプログラム211(起動
プログラム)とフィスカルデータ制御プログラム212(アプリケーションプログラム)が記憶される。ブートプログラム211は、メイン制御部22のブート部221用のプログラムであり、フィスカルデータ制御プログラム212は、メイン制御部22のフィスカルデータ制御部222用のプログラムである。
FIG. 2 shows a functional configuration diagram of the secure control unit 23 and the like. As shown in FIG. 2, the ROM 21 (storage unit) stores a boot program 211 (startup program) and a fiscal data control program 212 (application program) as the above-described control programs. The boot program 211 is a program for the boot unit 221 of the main control unit 22, and the fiscal data control program 212 is a program for the fiscal data control unit 222 of the main control unit 22.

メイン制御部22には、機能構成として、ブート部221とフィスカルデータ制御部222が備えられる。ブート部221は、フィスカルプリンター2の起動処理を行う部分であり、フィスカルデータ制御部222は、メイン制御部22が実行する上述した各処理を行う部分である。   The main control unit 22 includes a boot unit 221 and a fiscal data control unit 222 as functional configurations. The boot unit 221 is a part that performs a startup process of the fiscal printer 2, and the fiscal data control unit 222 is a part that performs the above-described processes executed by the main control unit 22.

セキュア制御部23には、機能構成として、送受信部231、ハッシュ計算部232、正規ハッシュ値記憶部234、及び判断部233等が備えられる。なお、図2には、セキュア制御部23が行うフィスカルデータの暗号処理等に係る機能構成は示していない。   The secure control unit 23 includes a transmission / reception unit 231, a hash calculation unit 232, a normal hash value storage unit 234, a determination unit 233, and the like as functional configurations. Note that FIG. 2 does not show a functional configuration related to fiscal data encryption processing performed by the secure control unit 23.

送受信部231は、メイン制御部231との通信を司る部分であり、ハッシュ計算部232は、フィスカルデータ制御プログラム212のコード(データ)からハッシュ値(以降、現ハッシュ値(実情報)と呼ぶ)を計算する部分である。判断部233は、当該計算されたハッシュ値と予め求められた正規のプログラムのハッシュ値に基づいて、フィスカルデータ制御プログラム212が正規のプログラムであるか否かを判断する部分である。正規ハッシュ値記憶部234は、上記正規のプログラムのハッシュ値、より具体的には、フィスカルデータ制御プログラム212としてROM21に記憶され、フィスカルデータ制御部222の動作を制御するプログラムとして正しいプログラムのコードをハッシュ値にしたもの(以降、正規ハッシュ値(正規情報)と呼ぶ)、を記憶する部分である。なお、現ハッシュ値と正規ハッシュ値は同一のハッシュ関数を用いて求められる。なお、正規ハッシュ値は、フィスカルプリンター2の製造時や設置時などに予めセキュア制御部23に記憶させておく。   The transmission / reception unit 231 is a part responsible for communication with the main control unit 231, and the hash calculation unit 232 is a hash value (hereinafter referred to as current hash value (real information)) from the code (data) of the fiscal data control program 212. Is the part that calculates The determination unit 233 is a part that determines whether or not the fiscal data control program 212 is a regular program based on the calculated hash value and a hash value of a regular program that is obtained in advance. The normal hash value storage unit 234 stores the hash value of the normal program, more specifically, the ROM 21 as the fiscal data control program 212, and the correct program code as a program for controlling the operation of the fiscal data control unit 222. This is a part for storing a hash value (hereinafter referred to as a normal hash value (normal information)). The current hash value and the normal hash value are obtained using the same hash function. The regular hash value is stored in advance in the secure control unit 23 when the fiscal printer 2 is manufactured or installed.

以上説明したような構成を有する本実施の形態例に係るフィスカルプリンター2では、起動時における制御プログラムの不正検出処理に特徴があり、以下、当該処理を中心に起動から停止までの処理内容について説明する。図3は、フィスカルプリンター2の起動から停止までの処理手順を例示したフローチャートである。   The fiscal printer 2 according to the present embodiment having the above-described configuration is characterized by control program fraud detection processing at the time of startup, and the processing contents from startup to stop will be described below focusing on this processing. To do. FIG. 3 is a flowchart illustrating a processing procedure from starting to stopping of the fiscal printer 2.

まず、フィスカルプリンター2の電源が投入(ONに)されると(図3のステップS1)、メイン制御部22はROM21のブートプログラム211をワーキングメモリに読み込み、ブート部221が起動する(図3のステップS2)。   First, when the power of the fiscal printer 2 is turned on (turned on) (step S1 in FIG. 3), the main control unit 22 reads the boot program 211 of the ROM 21 into the working memory, and the boot unit 221 is activated (FIG. 3). Step S2).

次に、ブート部221は、ROM21のフィスカルデータ制御プログラム212を読み出して、フィスカルデータ制御部222を起動せずに(起動する前に)、当該フィスカルデータ制御プログラム212のコード(データ)をセキュア制御部23に送信する(図3のステップS3)。   Next, the boot unit 221 reads the fiscal data control program 212 in the ROM 21 and securely controls the code (data) of the fiscal data control program 212 without starting the fiscal data control unit 222 (before starting up). It transmits to the part 23 (step S3 of FIG. 3).

セキュア制御部23では、送受信部231がフィスカルデータ制御プログラム212のコードを受信して、当該コードをハッシュ計算部232に渡す。ハッシュ計算部232は、受け取ったフィスカルデータ制御プログラム212のコードのハッシュ値(現ハッシュ値)を計算する(図3のステップS4)。具体的には、フィスカルデータ制御プログラム212のコードを所定のハッシュ関数に与え、その結果値を現ハッシュ値とする。   In the secure control unit 23, the transmission / reception unit 231 receives the code of the fiscal data control program 212 and passes the code to the hash calculation unit 232. The hash calculator 232 calculates a hash value (current hash value) of the code of the received fiscal data control program 212 (step S4 in FIG. 3). Specifically, the code of the fiscal data control program 212 is given to a predetermined hash function, and the result value is set as the current hash value.

次に、計算された現ハッシュ値がハッシュ計算部232から判断部233に渡され、判断部233がROM21に記憶されているフィスカルデータ制御プログラム212が正規のプログラムであるか否かを判断する(図3のステップS5)。具体的には、受け取った
現ハッシュ値と正規ハッシュ値記憶部234に記憶される正規ハッシュ値を比較し、両者が一致していればROM21に記憶されているフィスカルデータ制御プログラム212が正規のプログラムであると判断し、両者が一致していなければROM21に記憶されているフィスカルデータ制御プログラム212が正規のプログラムではないと判断する。
Next, the calculated current hash value is transferred from the hash calculation unit 232 to the determination unit 233, and the determination unit 233 determines whether the fiscal data control program 212 stored in the ROM 21 is a legitimate program ( Step S5 in FIG. Specifically, the received current hash value is compared with the normal hash value stored in the normal hash value storage unit 234, and if they match, the fiscal data control program 212 stored in the ROM 21 is the normal program. If they do not match, it is determined that the fiscal data control program 212 stored in the ROM 21 is not a regular program.

上記判断の結果、現ハッシュ値と正規ハッシュ値が一致していれば(図3のステップS5の「一致」)、判断部233は、ROM21に記憶されているフィスカルデータ制御プログラム212が正規のプログラムである旨の情報を、送受信部231を介してメイン制御部22に送信し、上記フィスカルデータ制御プログラム212の受信に対する応答を行う(図3のステップS6)。   As a result of the determination, if the current hash value matches the normal hash value (“match” in step S5 in FIG. 3), the determination unit 233 determines that the fiscal data control program 212 stored in the ROM 21 is a normal program. Is transmitted to the main control unit 22 via the transmission / reception unit 231, and a response to the reception of the fiscal data control program 212 is made (step S6 in FIG. 3).

当該応答を受けたメイン制御部22では、ブート部221がフィスカルデータ制御プログラム212をワーキングメモリに読み込んでフィスカルデータ制御部222を起動する(図3のステップS7)。   In the main control unit 22 that has received the response, the boot unit 221 reads the fiscal data control program 212 into the working memory and activates the fiscal data control unit 222 (step S7 in FIG. 3).

これにより、フィスカルプリンター2が処理可能に起動されることになるので、フィスカルデータ制御部222の制御の下、各部が動作してフィスカルプリンター2の通常処理が実行される。具体的には、ホストコンピューター1から送信される印刷データに従ったレシートの印刷処理、レシートに係るフィスカルデータの記憶処理等が繰り返し実行される。そして、営業時間が終了し、日計売上に係るフィスカルデータの記憶処理等が完了すると、処理がステップS12に移行する。   As a result, the fiscal printer 2 is activated in a processable manner, so that the respective units operate under the control of the fiscal data control unit 222 and normal processing of the fiscal printer 2 is executed. Specifically, the receipt printing process according to the print data transmitted from the host computer 1, the storage process of the fiscal data related to the receipt, and the like are repeatedly executed. When the business hours end and the storage processing of fiscal data related to daily sales is completed, the process proceeds to step S12.

一方、上記判断(S5)において、現ハッシュ値と正規ハッシュ値が不一致であれば(図3のステップS5の「不一致」)、判断部233は、セキュア制御部23をロック状態、すなわち、動作不能状態とする(図3のステップS9)。   On the other hand, if the current hash value and the normal hash value do not match in the determination (S5) (“mismatch” in step S5 in FIG. 3), the determination unit 233 locks the secure control unit 23, that is, cannot operate. The state is set (step S9 in FIG. 3).

その後、判断部233は、ROM21に記憶されているフィスカルデータ制御プログラム212が正規のプログラムでない旨の情報を、送受信部231を介してメイン制御部22に送信し、上記フィスカルデータ制御プログラム212の受信に対する応答を行う(図3のステップS10)。   Thereafter, the determination unit 233 transmits information that the fiscal data control program 212 stored in the ROM 21 is not a legitimate program to the main control unit 22 via the transmission / reception unit 231, and receives the fiscal data control program 212. Is responded to (step S10 in FIG. 3).

当該応答を受けたメイン制御部22では、ブート部221がフィスカルデータ制御部222を起動させない(図3のステップS11)。これにより、フィスカルプリンター2は電源投入後、起動しない状態となる。その後、処理がステップS12に移行する。   In the main control unit 22 that has received the response, the boot unit 221 does not activate the fiscal data control unit 222 (step S11 in FIG. 3). As a result, the fiscal printer 2 is not activated after the power is turned on. Thereafter, the process proceeds to step S12.

ステップS12では、フィスカルプリンター2の起動を停止するために電源を切る、又は、フィスカルプリンター2が起動できない状態であるので電源を切る、状況となるので、フィスカルプリンター2の電源が切られる(OFFにされる)。   In step S12, the power is turned off to stop the start of the fiscal printer 2, or the power is turned off because the fiscal printer 2 cannot be started, so the power of the fiscal printer 2 is turned off (turned off). )

以上により、フィスカルプリンター2の動作が終了する。   Thus, the operation of the fiscal printer 2 is completed.

なお、上述の説明では、フィスカルデータ制御プログラム212が正規のプログラムであるか否かをチェックするために、ハッシュ値(ハッシュ関数)を用いたが、これは一例であって他の暗号化技術、要約化技法を用いてもよい。   In the above description, a hash value (hash function) is used to check whether the fiscal data control program 212 is a legitimate program. However, this is merely an example, and other encryption techniques, Summarization techniques may be used.

また、スマートカードで構成されるセキュア制御部23は、フィスカルプリンター2に対して着脱式としてもよい。この場合には、特定の管理者が当該スマートカードを管理し、店舗の開店時に当該スマートカードをフィスカルプリンター2に取付け、閉店後、当該スマートカードをフィスカルプリンター2から取り外すようにする。また、未使用時には、安全な場所に保管する。   Further, the secure control unit 23 configured with a smart card may be detachable from the fiscal printer 2. In this case, a specific administrator manages the smart card, attaches the smart card to the fiscal printer 2 when the store is opened, and removes the smart card from the fiscal printer 2 after the store is closed. Store in a safe place when not in use.

以上説明したように、本実施の形態例におけるフィスカルプリンター2では、実体的な処理を行うフィスカルデータ制御プログラム212が起動する前に、スマートカードで構成されるセキュア制御部23が、フィスカルデータ制御プログラム212が正規なものであるか否かを判断する。従って、不正なプログラムを検出でき、その不正なプログラムが起動することを未然に防ぐことができる。また、セキュア制御部23が、スマートカードで構成されるため、第三者がその内部を解読することは難しく、その点においても不正行為を防止でき、且つ、装置構成も比較的簡素なものにすることができる。   As described above, in the fiscal printer 2 according to the present embodiment, the secure control unit 23 composed of a smart card is operated by the fiscal data control program before the fiscal data control program 212 that performs substantial processing is started. It is determined whether or not 212 is regular. Therefore, an unauthorized program can be detected, and the unauthorized program can be prevented from starting. In addition, since the secure control unit 23 is configured with a smart card, it is difficult for a third party to decipher the inside of the secure control unit 23. In this respect, it is possible to prevent fraud, and the device configuration is relatively simple. can do.

また、フィスカルデータ制御プログラム212が不正なプログラムであると判断された際に、メイン制御部22のフィスカルデータ制御部222とセキュア制御部23の両方が動作しない状態となるので、不正行為を確実に防止することができる。   Further, when it is determined that the fiscal data control program 212 is an unauthorized program, both the fiscal data control unit 222 and the secure control unit 23 of the main control unit 22 are not operated, so that illegal acts can be reliably ensured. Can be prevented.

また、不正なプログラムの検出にハッシュ値を用いるので、ほぼ確実に不正なプログラムを検出できる。   In addition, since the hash value is used for detecting an illegal program, the illegal program can be detected almost certainly.

なお、本発明は、フィスカルプリンターでないプリンターにも応用することができる。   The present invention can also be applied to a printer that is not a fiscal printer.

本発明の保護範囲は、上記の実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶものである。   The protection scope of the present invention is not limited to the above-described embodiment, but covers the invention described in the claims and equivalents thereof.

1 ホストコンピューター、 2 フィスカルプリンター、 3 フィスカルデータ読出装置、 21 ROM、 22 メイン制御部、 23 セキュア制御部(スマートカード)、 24 EJメモリ制御部、 25 EJメモリ、 26 フィスカルメモリ制御部、 27 フィスカルメモリ、 28 印刷制御部、 29 印刷実行部、 211
ブートプログラム、 212 フィスカルデータ制御プログラム、 221 ブート部、 222 フィスカルデータ制御部、 231 送受信部、 232 ハッシュ計算部、 233 判断部、 234 正規ハッシュ値記憶部
1 Host computer, 2 Fiscal printer, 3 Fiscal data reading device, 21 ROM, 22 Main control unit, 23 Secure control unit (smart card), 24 EJ memory control unit, 25 EJ memory, 26 Fiscal memory control unit, 27 Fiscal memory 28 print control unit, 29 print execution unit, 211
Boot program, 212 Fiscal data control program, 221 Boot unit, 222 Fiscal data control unit, 231 Transmission / reception unit, 232 Hash calculation unit, 233 Judgment unit, 234 Normal hash value storage unit

Claims (8)

フィスカルデータを記憶するプリンターであって、
起動プログラムとフィスカルデータ制御プログラムを記憶する記憶部と、
前記起動プログラムによって起動し、前記フィスカルデータ制御プログラムを含む制御プログラムによって前記プリンターの制御を行う第1制御部と、
前記第1制御部が前記フィスカルデータ制御プログラムによる制御を開始する前に、前記第1制御部から送信される前記フィスカルデータ制御プログラムが正規なプログラムであるか否かを判断する第2制御部を備えたスマートカードと、を有する
ことを特徴とするプリンター。
A printer that stores fiscal data,
A storage unit for storing a startup program and a fiscal data control program;
A first control unit that is activated by the activation program and that controls the printer by a control program including the fiscal data control program;
A second control unit for determining whether or not the fiscal data control program transmitted from the first control unit is a regular program before the first control unit starts control by the fiscal data control program; And a smart card equipped with the printer.
請求項1において、
前記第2制御部は、前記判断の結果を前記第1制御部へ返答し、
前記第1制御部は、前記フィスカルデータ制御プログラムが正規なプログラムである場合には、当該フィスカルデータ制御プログラムによる制御を開始し、前記フィスカルデータ制御プログラムが正規なプログラムでない場合には、当該フィスカルデータ制御プログラムによる制御を開始しない
ことを特徴とするプリンター。
In claim 1,
The second control unit returns the result of the determination to the first control unit,
The first control unit starts control by the fiscal data control program when the fiscal data control program is a legitimate program, and when the fiscal data control program is not a legitimate program, the first control unit A printer characterized by not starting control by a control program.
請求項1あるいは2において、
前記第2制御部は、前記フィスカルデータ制御プログラムが正規なプログラムでない場合に、当該第2制御部を動作不能状態とする
ことを特徴とするプリンター。
In claim 1 or 2,
The printer, wherein the second control unit disables the second control unit when the fiscal data control program is not a regular program.
請求項1乃至3のいずれか1項において、
前記第2制御部は、正規な前記フィスカルデータ制御プログラムのコードに基づく正規情報を予め記憶し、前記第1制御部から前記フィスカルデータ制御プログラムが送信された際に、当該フィスカルデータ制御プログラムのコードに基づいて実情報を生成し、当該実情報が前記正規情報と一致すれば前記フィスカルデータ制御プログラムが正規なプログラムであると判断し、前記実情報が前記正規情報と一致しなければ前記フィスカルデータ制御プログラムが正規なプログラムでないと判断する
ことを特徴とするプリンター。
In any one of Claims 1 thru | or 3,
The second control unit stores in advance regular information based on the code of the regular fiscal data control program, and when the fiscal data control program is transmitted from the first control unit, the code of the fiscal data control program If the actual information matches the regular information, it is determined that the fiscal data control program is a regular program. If the actual information does not match the regular information, the fiscal data is determined. A printer characterized by determining that the control program is not a legitimate program.
請求項4において、
前記正規情報は、前記第2制御部が、前記フィスカルデータ制御プログラムのコードを所定の方法で暗号化又は要約化し予め記憶した情報であり、
前記実情報は、前記第2制御部が、前記第1制御部から前記フィスカルデータ制御プログラムが送信された際に、当該フィスカルデータ処理プログラムのコードを前記所定の方法で暗号化又は要約化して情報である
ことを特徴とするプリンター。
In claim 4,
The regular information is information stored in advance by the second control unit by encrypting or summarizing the code of the fiscal data control program by a predetermined method,
The actual information is obtained by encrypting or summarizing the code of the fiscal data processing program by the predetermined method when the fiscal data control program is transmitted from the first control unit. The printer characterized by being.
請求項5において、
前記所定の方法は、ハッシュ関数にコードを与えることである
ことを特徴とするプリンター。
In claim 5,
The printer is characterized in that the predetermined method is to give a code to a hash function.
請求項1乃至6のいずれか1項において、
前記第2制御部は、前記プリンターの電源が投入された際に前記判断を行う
ことを特徴とするプリンター。
In any one of Claims 1 thru | or 6,
The printer according to claim 2, wherein the second control unit performs the determination when the printer is powered on.
フィスカルデータを記憶するプリンターの制御方法であって、
前記プリンターに、起動プログラムとフィスカルデータ制御プログラムを記憶する記憶部と、前記起動プログラムによって起動し、前記フィスカルデータ制御プログラムによって前記プリンターの制御を行う第1制御部と、第2制御部を含むスマートカードと、が備えられ、
前記第1制御部が、前記フィスカルデータ制御プログラムによる制御を開始する前に、前記フィスカルデータ制御プログラムを前記第2制御部に送信し、
前記第2制御部が、前記送信されたフィスカルデータ制御プログラムが正規なプログラムであるか否かを判断する
ことを特徴とするプリンターの制御方法。
A printer control method for storing fiscal data,
Smart including a storage unit that stores a startup program and a fiscal data control program in the printer, a first control unit that is started by the startup program and controls the printer by the fiscal data control program, and a second control unit A card, and
Before the first control unit starts control by the fiscal data control program, the fiscal data control program is transmitted to the second control unit,
The printer control method, wherein the second control unit determines whether or not the transmitted fiscal data control program is a regular program.
JP2014024150A 2014-02-12 2014-02-12 Printer and control method of the same Pending JP2015152998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014024150A JP2015152998A (en) 2014-02-12 2014-02-12 Printer and control method of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014024150A JP2015152998A (en) 2014-02-12 2014-02-12 Printer and control method of the same

Publications (1)

Publication Number Publication Date
JP2015152998A true JP2015152998A (en) 2015-08-24

Family

ID=53895217

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014024150A Pending JP2015152998A (en) 2014-02-12 2014-02-12 Printer and control method of the same

Country Status (1)

Country Link
JP (1) JP2015152998A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019018459A (en) * 2017-07-18 2019-02-07 キヤノン株式会社 Information processing device, and control method of information processing device
JP2020088490A (en) * 2018-11-19 2020-06-04 キヤノン株式会社 Information processing device capable of detecting tampering with software

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019018459A (en) * 2017-07-18 2019-02-07 キヤノン株式会社 Information processing device, and control method of information processing device
US11205002B2 (en) 2017-07-18 2021-12-21 Canon Kabushiki Kaisha Information processing apparatus and method for controlling information processing apparatus
JP2020088490A (en) * 2018-11-19 2020-06-04 キヤノン株式会社 Information processing device capable of detecting tampering with software
US11443111B2 (en) 2018-11-19 2022-09-13 Canon Kabushiki Kaisha Information processing apparatus capable of detecting alteration in software
JP7278753B2 (en) 2018-11-19 2023-05-22 キヤノン株式会社 Information processing equipment capable of detecting falsification of software

Similar Documents

Publication Publication Date Title
JP5310318B2 (en) Receipt printing apparatus, receipt printing apparatus control method, and program
EP2596955B1 (en) Printer and control method thereof
US20080313453A1 (en) Boot Validation in Imaging Devices
WO2005096240A1 (en) Value information management system, recording medium, printer device, account adjusting device, electronic data printing method, and computer program
JP2004334402A (en) Check processor, program, record medium, pos terminal, and pos system
JP6124034B2 (en) Transaction processing apparatus, transaction processing method, program, and transaction processing system
JP2015125480A (en) Commodity sales data processor and program
JP2015152998A (en) Printer and control method of the same
US20130133958A1 (en) Apparatus, Method and System for Generating an Optical Code with Authenticatable Information
US10078829B2 (en) Information processing device, transaction processing system, and recording device
US10089836B2 (en) Transaction processing apparatus, transaction processing method, program and transaction processing system
US20180322586A1 (en) Commodity sales data processing apparatus and method for preventing unfair behavior
JP2015152996A (en) Printer and control method of the same
JP2013084032A (en) Credit card settlement system and settlement method
JP2013084032A5 (en)
JP6672593B2 (en) Information processing apparatus and program
JP6920800B2 (en) Payment device, program and logging method
JP2010284902A (en) Method for controlling printing processor, printing processor, print material, and program
CN111361310A (en) RFID-based carbon ribbon authenticity identification method and device, printer and storage medium
JP6699771B2 (en) Accounting processing control method and register system
JP2015032136A (en) Fiscal register terminal, fiscal register system, program for register, and sale recording method
JP2015016594A (en) Sheet processing apparatus, image forming apparatus, image reading apparatus and decoloring apparatus
US20160379198A1 (en) Commodity sales data processing apparatus
JP5386542B2 (en) Payment apparatus and program
JP7125011B2 (en) Information processing system and license protection method

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20160617

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20160627