JP7170588B2 - Data processing method and data processing system - Google Patents

Data processing method and data processing system Download PDF

Info

Publication number
JP7170588B2
JP7170588B2 JP2019102680A JP2019102680A JP7170588B2 JP 7170588 B2 JP7170588 B2 JP 7170588B2 JP 2019102680 A JP2019102680 A JP 2019102680A JP 2019102680 A JP2019102680 A JP 2019102680A JP 7170588 B2 JP7170588 B2 JP 7170588B2
Authority
JP
Japan
Prior art keywords
data
write
data processing
secret key
encrypted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019102680A
Other languages
Japanese (ja)
Other versions
JP2020197832A (en
Inventor
隆 北川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2019102680A priority Critical patent/JP7170588B2/en
Publication of JP2020197832A publication Critical patent/JP2020197832A/en
Application granted granted Critical
Publication of JP7170588B2 publication Critical patent/JP7170588B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Description

本発明は、データ処理方法、データ処理システム及びデータ処理管理媒体に関する。 The present invention relates to a data processing method, a data processing system and a data processing management medium.

汎用MCU(Micro Control Unit)等を利用する顧客が、そのMCUへのソフトウェアの書き込みを社外工場へ委託することがある。このとき、委託先の社外工場が、別ルートから書き込み対象物である汎用MCUを入手し、当該ソフトウェアを予め定められた個数以上の汎用MCUに対し書き込み処理を行い販売するという、いわゆるオーバープロダクションという問題がある。 A customer who uses a general-purpose MCU (Micro Control Unit) or the like may outsource the writing of software to the MCU to an external factory. At this time, the outsourced factory obtains general-purpose MCUs, which are objects to be written, from another route, writes the software to a predetermined number or more of general-purpose MCUs, and sells them. This is called overproduction. There's a problem.

このようなオーバープロダクションを防止するため、データ書き込み器とライセンスサーバとを接続し、ライセンスサーバでソフトウェアの書き込み回数を管理する方法が考えられる。また、ソフトウェアや端末情報等のデータが外部に流出しないよう、暗号化されたデータや鍵が用いられる。 In order to prevent such overproduction, a method of connecting a data writer and a license server and managing the number of times software is written by the license server is conceivable. In addition, encrypted data and keys are used to prevent data such as software and terminal information from leaking to the outside.

例えば、特許文献1には、システムを構成する機器が情報配信を受けるための正規の機器であるか否かの判断を行なうための認証鍵を管理する鍵管理システムが開示されている。 For example, Patent Literature 1 discloses a key management system that manages an authentication key for determining whether or not a device constituting the system is authorized to receive information distribution.

国際公開第2001/43108号WO2001/43108

ライセンスサーバへのアクセスは、通信ネットワークを経由して行われる。ライセンスサーバへのアクセスは、汎用MCUに対する書き込み処理を行う度に実行されるが、ライセンスサーバのダウンや通信ネットワークの不調等のトラブルが発生した場合、書き込み対象物への書き込み処理を行うことができず、工場の製造ラインがストップしてしまう。 Access to the license server is via a communications network. Access to the license server is executed each time writing to the general-purpose MCU is performed, but if trouble such as the license server going down or a communication network malfunction occurs, writing to the object to be written cannot be performed. The factory production line stops.

その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。 Other problems and novel features will become apparent from the description of the specification and the accompanying drawings.

本明細書には、複数の実施の形態が記載されているが、一実施の形態を述べると、次の通りである。 Although a plurality of embodiments are described in this specification, one embodiment is as follows.

データ処理方法は、書き込み用データの書き込みが行われる書き込み対象物と、書き込み対象物に対する書き込み用データの書き込み処理を行うデータ書き込み器と、書き込み処理の実行回数を管理するデータ処理管理媒体との間で行われるものである。データ処理管理媒体は、データ書き込み器に対し着脱可能である。データ処理方法は、データ書き込み器が、データ処理管理媒体へ書き込み用データの書き込み要求を送信する第1ステップと、データ処理管理媒体が、書き込み要求を受信すると、書き込み処理の実行回数をインクリメントする第2ステップと、データ処理管理媒体が、データ書き込み器へ書き込み用データの書き込み許可を送信する第3ステップと、を含む。第2ステップにおいて、データ処理管理媒体は、実行回数が所定の実行回数上限値に達すると、さらに書き込み要求を受信しても書き込み許可を送信しない。 The data processing method comprises a write object to which write data is written, a data writer that writes the write data to the write object, and a data processing management medium that manages the number of write processing executions. It is done in The data processing management medium is removable from the data writer. The data processing method includes a first step in which the data writer transmits a write request for write data to the data processing management medium; 2, and a third step in which the data processing management medium sends a write permission for the data to be written to the data writer. In the second step, the data processing management medium does not send a write permission even if it receives a write request when the number of executions reaches a predetermined number of executions upper limit.

一実施の形態によれば、オーバープロダクションを防止し、ライセンスサーバを用いることなくデータ書き込み処理を行うことが可能となる。 According to one embodiment, it is possible to prevent overproduction and perform data write processing without using a license server.

本発明の実施の形態1に係るデータ処理システムの構成例を示すブロック図である。1 is a block diagram showing a configuration example of a data processing system according to Embodiment 1 of the present invention; FIG. 本発明の実施の形態1に係るデータ書き込み処理の一例を示すフロー図である。FIG. 4 is a flowchart showing an example of data write processing according to Embodiment 1 of the present invention; 図2の主要な処理と、データ処理システムの各要素における動作とを対応させた図である。FIG. 3 is a diagram that associates the main processes of FIG. 2 with the operations of each element of the data processing system; 本発明の実施の形態2に係るデータ処理システムの構成例を示すブロック図である。It is a block diagram which shows the structural example of the data processing system based on Embodiment 2 of this invention. 本発明の実施の形態2に係るデータ書き込み処理の一例を示すフロー図である。FIG. 10 is a flowchart showing an example of data write processing according to Embodiment 2 of the present invention; 図5の主要な処理と、データ処理システムの各要素における動作とを対応させた図である。FIG. 6 is a diagram that associates the main processing of FIG. 5 with the operation of each element of the data processing system;

以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するためのすべての図において、同一部分には原則として同一の符号を付し、その繰り返しの説明は省略する。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In principle, the same parts are denoted by the same reference numerals in all the drawings for describing the embodiments, and repeated description thereof will be omitted.

(実施の形態1)
<データ処理システムの構成>
図1は、本発明の実施の形態1に係るデータ処理システムの構成例を示すブロック図である。図1に示すように、データ処理システム1は、書き込み対象物10、データ書き込み器20、データ処理管理媒体(以下、「ドングル」とも表記する)30を含む。なお、書き込み対象物10の代表例としては、MCUが挙げられる。MCUには、一般市場で入手可能な汎用MCUも含まれる。そこで、以下では、書き込み対象物10を、汎用MCU10と表記する場合もある。
(Embodiment 1)
<Configuration of data processing system>
FIG. 1 is a block diagram showing a configuration example of a data processing system according to Embodiment 1 of the present invention. As shown in FIG. 1 , the data processing system 1 includes a write target 10 , a data writer 20 and a data processing management medium (hereinafter also referred to as “dongle”) 30 . A representative example of the writing target 10 is an MCU. MCUs also include general-purpose MCUs available on the open market. Therefore, hereinafter, the write target 10 may be referred to as a general-purpose MCU 10 in some cases.

〈データ処理管理媒体〉
データ処理管理媒体であるドングル30は、汎用MCU10へのデータ書き込み回数の管理を行う装置である。図1に示すように、ドングル30は、演算器31、メモリ32、インタフェース33等を備えている。ドングル30は、内部構造が解析されにくく見破られにくい耐タンパー性を有している。
<Data processing management medium>
The dongle 30, which is a data processing management medium, is a device that manages the number of data writes to the general-purpose MCU 10. FIG. As shown in FIG. 1, the dongle 30 includes a calculator 31, a memory 32, an interface 33, and the like. The dongle 30 has a tamper resistance that makes it difficult to analyze the internal structure and find out.

メモリ32は、不揮発性メモリを有し、汎用MCU10に対する書き込み用データの書き込み処理の実行回数CNを格納する。また、メモリ32は、汎用MCU10への書き込み処理の実行回数上限値CNLや秘密鍵(第1秘密鍵)k1等を格納する。また、メモリ32は、ドングル30を動作させるプログラムやパラメータ等を格納する。 The memory 32 has a non-volatile memory and stores the execution count CN of write processing of write data to the general-purpose MCU 10 . In addition, the memory 32 stores the execution count upper limit value CNL of the writing process to the general-purpose MCU 10, a secret key (first secret key) k1, and the like. The memory 32 also stores programs, parameters, etc. for operating the dongle 30 .

メモリ32は、不揮発性メモリで構成されている。不揮発性メモリの少なくとも一部の領域は、外部からのアクセスが禁止されたセキュア領域となっている。例えば、実行回数CN、実行回数上限値CNL及び秘密鍵k1等、書き込み回数の管理上重要な情報はセキュア領域に格納されることが好ましい。セキュア領域へは、ドングル30内の演算器31のみがアクセス可能である。 The memory 32 is composed of non-volatile memory. At least a partial area of the nonvolatile memory is a secure area that prohibits external access. For example, information important for managing the number of writes, such as the number of executions CN, the upper limit of the number of executions CNL, and the secret key k1, is preferably stored in the secure area. Only the calculator 31 in the dongle 30 can access the secure area.

ドングル30は、インタフェース33を介してデータ書き込み器20と接続される。ドングル30及びデータ書き込み器20は、シリアルバス等で互いに接続される。シリアルバスの例として、例えばUSB(Universal Serial Bus)が挙げられる。この場合、インタフェース24、33は、USB規格に準拠した端子で構成され、ドングル30は、USB端子によりデータ書き込み器20と接続される。 Dongle 30 is connected to data writer 20 via interface 33 . The dongle 30 and data writer 20 are connected to each other via a serial bus or the like. Examples of serial buses include USB (Universal Serial Bus). In this case, the interfaces 24 and 33 are configured with terminals conforming to the USB standard, and the dongle 30 is connected to the data writer 20 via the USB terminal.

演算器31は、ドングル30内における各処理を実行する機能ブロックである。詳しくは後述するが、演算器31は、データ書き込み器20から汎用MCU10に対する書き込み用データの書き込み要求を受信すると、実行回数CNをインクリメントし、メモリ32内の実行回数CNを更新する。そして、演算器31は、インタフェース33を介して、データ書き込み器20に書き込み許可を送信する。 A computing unit 31 is a functional block that executes each process in the dongle 30 . Although details will be described later, upon receiving a write request for write data from the data writer 20 to the general-purpose MCU 10 , the calculator 31 increments the number of executions CN and updates the number of executions CN in the memory 32 . The calculator 31 then transmits a write permission to the data writer 20 via the interface 33 .

その際、演算器31は、実行回数CNと実行回数上限値CNLとを比較する。演算器31は、実行回数CNが実行回数上限値CNLに達すると、さらに書き込み要求を受信しても、実行回数CNのインクリメントを行わず、書き込み許可の送信を行わない。すなわち、実行回数上限値CNLの回数分データ書き込み処理が行われると、ドングル30は、動作を停止する。 At that time, the computing unit 31 compares the number of times of execution CN with the upper limit number of times of execution CNL. When the execution count CN reaches the execution count upper limit value CNL, the computing unit 31 does not increment the execution count CN and does not transmit write permission even if it receives a write request. That is, the dongle 30 stops operating when the data write process is performed for the number of execution times upper limit value CNL.

これにより、データ書き込み器20は、ドングル30から書き込み許可を受信できず、汎用MCU10への書き込み用データの書き込みができなくなる。このように、データ書き込み処理の実行回数CNが実行回数上限値CNL以下となるように適切に管理され、オーバープロダクションを防止することが可能となる。 As a result, the data writer 20 cannot receive the write permission from the dongle 30 and cannot write the write data to the general-purpose MCU 10 . In this manner, the execution count CN of the data write process is appropriately managed so as to be equal to or less than the execution count upper limit value CNL, and overproduction can be prevented.

本実施の形態では、ドングル30において、書き込み許可の暗号化が行われる。暗号化を実行するため、演算器31は、図1に示すように、公開鍵暗号鍵生成器31a、AES(Advanced Encryption Standard)暗号化器31bを有している。公開鍵暗号鍵生成器31a、AES暗号化器31bは、ハードウェア又はプログラムの実行により演算器31内に実現される。なお、ハードウェアで構成される公開鍵暗号鍵生成器31a及びAES暗号化器31bは、演算器31の外側に設けられてもよい。 In this embodiment, encryption of write permission is performed in the dongle 30 . In order to perform encryption, the computing unit 31 has a public key cryptographic key generator 31a and an AES (Advanced Encryption Standard) encryptor 31b, as shown in FIG. The public key encryption key generator 31a and the AES encryptor 31b are implemented in the calculator 31 by hardware or program execution. Note that the public key encryption key generator 31a and the AES encryptor 31b configured by hardware may be provided outside the computing unit 31. FIG.

公開鍵暗号鍵生成器31aは、例えば図示しない乱数発生器等を用いて秘密鍵(第2秘密鍵)skと公開鍵(第1公開鍵)pkとからなる一対の鍵ペアを生成する。AES暗号化器31bは、データ書き込み器20から受信した汎用MCU10の識別情報ID及び秘密鍵skを含む書き込み許可を暗号化した暗号文C2を生成する。演算器31は、暗号文C2及び公開鍵pkを、データ書き込み器20へ送信する。演算器31における各処理については、後で詳しく説明する。 The public key cryptographic key generator 31a generates a key pair consisting of a secret key (second secret key) sk and a public key (first public key) pk using, for example, a random number generator (not shown). The AES encryptor 31b generates a ciphertext C2 by encrypting the write permission including the identification information ID of the general-purpose MCU 10 received from the data writer 20 and the secret key sk. The calculator 31 transmits the ciphertext C2 and the public key pk to the data writer 20 . Each processing in the calculator 31 will be described later in detail.

〈データ書き込み器〉
データ書き込み器20は、汎用MCU10への書き込み用データの書き込み処理を行う装置である。図1に示すように、データ書き込み器20は、演算器21、メモリ22、電源回路23、インタフェース24等を備えている。データ書き込み器20は、書き込み処理用の専用品でもよいし、パソコン等の情報処理装置等で構成されてもよい。
<Data writer>
The data writer 20 is a device that writes data for writing to the general-purpose MCU 10 . As shown in FIG. 1, the data writer 20 includes a calculator 21, a memory 22, a power supply circuit 23, an interface 24, and the like. The data writer 20 may be a dedicated product for writing processing, or may be composed of an information processing device such as a personal computer.

メモリ22は、不揮発性メモリを有し、汎用MCU10への書き込み用データ(例えばプログラムP)等を格納する。また、メモリ22は、データ書き込み器20を動作させるプログラムやパラメータ等を格納する。 The memory 22 has a non-volatile memory and stores data for writing to the general-purpose MCU 10 (for example, program P). The memory 22 also stores programs, parameters, etc. for operating the data writer 20 .

電源回路23は、データ書き込み器20内の各部へ供給される電源を制御する機能ブロックである。電源回路23は、図示しない外部電源と接続され、演算器21から供給される信号に従い電源制御を行う。なお、電源回路23は、ドングル30や汎用MCU10へも電源供給行ってもよい。 The power supply circuit 23 is a functional block that controls the power supplied to each part in the data writer 20 . The power supply circuit 23 is connected to an external power supply (not shown) and performs power supply control according to a signal supplied from the calculator 21 . The power supply circuit 23 may also supply power to the dongle 30 and the general-purpose MCU 10 .

演算器21は、データ書き込み器20内の各処理を実行する機能ブロックである。例えば、演算器21は、ドングル30へ汎用MCU10に対する書き込み用データの書き込み要求を送信し、ドングル30から書き込み許可を受信する。例えば、演算器21は、書き込み用データの書き込みが行われる汎用MCU10から各汎用MCUに固有の識別情報IDを読み出し、読み出した識別情報を含む書き込み要求を生成し、ドングル30へ送信する。 A computing unit 21 is a functional block that executes each process in the data writer 20 . For example, the computing unit 21 transmits to the dongle 30 a write request for write data for the general-purpose MCU 10 and receives write permission from the dongle 30 . For example, the calculator 21 reads identification information ID unique to each general-purpose MCU from the general-purpose MCU 10 to which write data is to be written, generates a write request including the read identification information, and transmits the write request to the dongle 30 .

本実施の形態では、データ書き込み器20において、書き込み用データを含むデータの暗号化が行われる。暗号化の処理を行うため、演算器21は、公開鍵暗号暗号化器21aを有している。公開鍵暗号暗号化器21aは、ハードウェア又はプログラムの実行により演算器21内に実現される。なお、ハードウェアで構成される公開鍵暗号暗号化器21aは、演算器21の外側に形成されてもよい。 In this embodiment, the data writer 20 encrypts data including write data. The computing unit 21 has a public key encryption encoder 21a for performing encryption processing. The public key encryption/encryptor 21a is realized in the calculator 21 by hardware or program execution. Note that the public key encryption/encryptor 21a configured by hardware may be formed outside the computing unit 21. FIG.

公開鍵暗号暗号化器21aは、例えば、ドングル30から受信した公開鍵pkを用いて、書き込み用データ(例えばプログラムP)と、読み出した識別情報IDとを含むデータを公開鍵pkを用いて暗号化し、データの暗号文C3を生成する。演算器21は、生成した暗号文C3及び暗号文C2を汎用MCU10へ送信する。 The public key encryption encoder 21a uses the public key pk received from the dongle 30, for example, to encrypt data including write data (for example, program P) and the read identification information ID using the public key pk. to generate the ciphertext C3 of the data. The calculator 21 transmits the generated ciphertext C3 and ciphertext C2 to the general-purpose MCU 10 .

〈書き込み対象物〉
書き込み対象物10には、書き込み用データの書き込みが行われる。書き込み対象物10は、演算器11及びメモリ12を備えている。すでに述べた通り、書き込み対象物10は、一般に入手可能な汎用MCU等である。
<Writing object>
Write data is written on the write target 10 . A write target 10 includes a calculator 11 and a memory 12 . As already mentioned, the writing object 10 is a generally available general-purpose MCU or the like.

メモリ12は、不揮発性メモリを有し、書き込み対象物10の識別情報IDや秘密鍵(第1秘密鍵)k1等を格納する。また、メモリ12は、これらの他、書き込み対象物10の動作用プログラムや設定値等も格納する。識別情報IDは、書き込み対象物10ごとに異なる値に設定される。データ書き込み器20から受信したプログラムP等の書き込み用データは、後述する所定の処理を経てメモリ12にインストールされる。 The memory 12 has a non-volatile memory, and stores identification information ID of the writing target 10, a secret key (first secret key) k1, and the like. In addition to these, the memory 12 also stores an operating program for the write target 10, setting values, and the like. The identification information ID is set to a different value for each writing target 10 . The write data such as the program P received from the data writer 20 is installed in the memory 12 through a predetermined process described later.

演算器11は、書き込み対象物10における各種制御を行う機能ブロックである。演算器11は、公開鍵暗号復号器11a及びAES復号器11bを有する。公開鍵暗号復号器11a及びAES復号器11bは、ハードウェア又はプログラムの実行により演算器11内に実現される。なお、ハードウェアで構成される公開鍵暗号復号器11a及びAES復号器11bは、演算器11の外側に形成されてもよい。 The calculator 11 is a functional block that performs various controls on the writing target 10 . The computing unit 11 has a public key encryption/decryption device 11a and an AES decryption device 11b. The public key encryption/decryption device 11a and the AES decryption device 11b are implemented in the calculator 11 by hardware or program execution. The public key encryption/decryption device 11 a and the AES decryption device 11 b configured by hardware may be formed outside the computing unit 11 .

AES復号器11bは、データ書き込み器20から受信した暗号文C2の復号を行う。具体的に述べると、AES復号器11bは、メモリ12に格納された秘密鍵k1を用いて暗号文C2を復号し、書き込み許可に含まれる秘密鍵sk、及びデータ書き込み処理を行おうとしている書き込み対象物10の識別情報IDを取得する。なお、便宜上、ここで取得した識別情報をID’と表記する。 The AES decryptor 11b decrypts the ciphertext C2 received from the data writer 20. FIG. Specifically, the AES decryptor 11b decrypts the ciphertext C2 using the secret key k1 stored in the memory 12, the secret key sk included in the write permission, and the write The identification information ID of the object 10 is acquired. For the sake of convenience, the identification information obtained here will be referred to as ID'.

公開鍵暗号復号器11aは、データ書き込み器20から受信した暗号文C3の復号を行う。具体的に述べると、公開鍵暗号復号器11aは、暗号文C2の復号により取得した秘密鍵skを用いて暗号文C3を復号し、データに含まれるプログラムP、及びデータ書き込み処理を行おうとしている書き込み対象物10の識別情報IDを取得する。なお、便宜上、ここで取得した識別情報をID”と表記する。 The public key encryption/decryption device 11 a decrypts the ciphertext C3 received from the data writer 20 . Specifically, the public key encryption/decryptor 11a decrypts the ciphertext C3 using the secret key sk obtained by decrypting the ciphertext C2, and attempts to write the program P and the data contained in the data. The identification information ID of the writing target 10 is acquired. For convenience, the identification information obtained here is referred to as "ID".

<データ書き込み処理>
次に、データ処理システム1におけるデータ書き込み処理を詳しく説明する。図2は、本発明の実施の形態1に係るデータ書き込み処理の一例を示すフロー図である。図3は、図2の主要な処理と、データ処理システムの各要素における動作とを対応させた図である。
<Data write processing>
Next, data write processing in the data processing system 1 will be described in detail. FIG. 2 is a flowchart showing an example of data write processing according to Embodiment 1 of the present invention. FIG. 3 is a diagram that associates the main processes of FIG. 2 with the operations of each element of the data processing system.

データ書き込み処理には、例えば図2に示すステップS10~S190が実施される。データ書き込み処理が開始されると(ステップS10)、データ書き込み器20は、汎用MCU10から固有の識別情報IDを読み出す((1)、ステップS20)。具体的に述べると、データ書き込み器20からの指示を受信すると、汎用MCU10の演算器11は、メモリ12に格納している識別情報IDを読み出し、読み出した識別情報IDをデータ書き込み器20へ送信する。なお、データ書き込み処理の開始とともに、識別情報IDが自動的にデータ書き込み器20へ送信されるようにしてもよい。 For the data write process, steps S10 to S190 shown in FIG. 2, for example, are performed. When the data writing process is started (step S10), the data writer 20 reads the unique identification information ID from the general-purpose MCU 10 ((1), step S20). Specifically, upon receiving an instruction from the data writer 20, the calculator 11 of the general-purpose MCU 10 reads the identification information ID stored in the memory 12, and transmits the read identification information ID to the data writer 20. do. The identification information ID may be automatically sent to the data writer 20 when the data writing process is started.

データ書き込み器20は、汎用MCU10から読み出した識別情報IDを書き込み要求としてドングル30へ送信する((2)、ステップS30)。その際、データ書き込み器20は、識別情報IDをメモリ22又は演算器21内のRAM等に格納しておく。 The data writer 20 transmits the identification information ID read from the general-purpose MCU 10 to the dongle 30 as a write request ((2), step S30). At that time, the data writer 20 stores the identification information ID in the memory 22 or the RAM in the calculator 21 or the like.

識別情報IDを受信すると、ドングル30の演算器31は、実行回数CNと実行回数上限値CNLとを比較し、実行回数CNが実行回数上限値CNLであるかどうかを判定する(ステップS40)。具体的に述べると、演算器31は、メモリ32から実行回数CN及び実行回数上限値CNLを読み出し、これらを比較することにより判定を行う。実行回数CNが実行回数上限値CNLである場合(YES)、演算器31は、実行回数が所定の実行回数上限値に達していると判断し、実行回数CNのインクリメントを行うことなく、ドングル30の動作を停止させる(ステップS50)。 Upon receiving the identification information ID, the calculator 31 of the dongle 30 compares the execution count CN with the execution count upper limit value CNL, and determines whether the execution count CN is the execution count upper limit value CNL (step S40). Specifically, the calculator 31 reads out the number of times of execution CN and the upper limit value of the number of times of execution CNL from the memory 32, and makes a determination by comparing them. If the execution count CN is the execution count upper limit value CNL (YES), the arithmetic unit 31 determines that the execution count has reached the predetermined execution count upper limit value, and the dongle 30 is operated without incrementing the execution count CN. is stopped (step S50).

一方、実行回数CNが実行回数上限値CNLより小さい場合(NO)、演算器31は、実行回数CNのインクリメントを行う(ステップS60、(3))。そして、演算器31は、インクリメント後の実行回数CNをメモリ32へ送信し、メモリ32に格納されている実行回数の値を更新する。 On the other hand, when the execution count CN is smaller than the execution count upper limit value CNL (NO), the computing unit 31 increments the execution count CN (step S60, (3)). The calculator 31 then transmits the incremented number of executions CN to the memory 32 and updates the value of the number of executions stored in the memory 32 .

次に、公開鍵暗号鍵生成器31aは、例えば乱数発生器等を用いて一対の鍵ペア(pk、sk)を生成する((4)、ステップS70)。公開鍵pk及び秘密鍵skは、複数ビットで構成される。AES暗号化器31bは、秘密鍵k1を用いて汎用MCU10に対する書き込み許可を暗号化する((5)、ステップS80)。具体的に述べると、まず、演算器31は、公開鍵暗号鍵生成器31aで生成された秘密鍵skと識別情報IDとを並べた平文(sk||ID)を生成する。そして、AES暗号化器31bは、秘密鍵k1を用いて平文(sk||ID)を暗号化することで、暗号文C2=Enc(k1、sk||ID)を生成する。演算器31は、インタフェース33を介して公開鍵pk及び暗号文C2をデータ書き込み器20へ送信する((6)、ステップS90)。 Next, the public key encryption key generator 31a generates a pair of keys (pk, sk) using, for example, a random number generator ((4), step S70). The public key pk and secret key sk are composed of multiple bits. The AES encryptor 31b encrypts the write permission for the general-purpose MCU 10 using the secret key k1 ((5), step S80). Specifically, first, the calculator 31 generates a plaintext (sk||ID) in which the secret key sk generated by the public key encryption key generator 31a and the identification information ID are arranged. Then, the AES encryptor 31b encrypts the plaintext (sk||ID) using the secret key k1 to generate the ciphertext C2=Enc(k1, sk||ID). The calculator 31 transmits the public key pk and the ciphertext C2 to the data writer 20 via the interface 33 ((6), step S90).

次に、データ書き込み器20の公開鍵暗号暗号化器21aは、プログラムP及び汎用MCU10から受信した識別情報IDを含むデータを暗号化し、暗号文C3=PKEnc(pk、P||ID)を生成する((7)、ステップS100)。具体的に述べると、まず、公開鍵暗号暗号化器21aは、プログラムPと識別情報IDとを並べた平文(P||ID)をデータとして生成する。そして、公開鍵暗号暗号化器21aは、ドングル30から受信した公開鍵pkを用いて平文(P||ID)を暗号化することで、暗号文C3=PKEnc(pk、P||ID)を生成する。演算器21は、暗号文C2=Enc(k1、sk||ID)及びC3=PKEnc(pk、P||ID)を汎用MCU10へ送信する((8)、ステップS110)。 Next, the public key encryption encoder 21a of the data writer 20 encrypts the data including the identification information ID received from the program P and the general-purpose MCU 10, and generates a ciphertext C3=PKEnc(pk, P||ID). ((7), step S100). Specifically, first, the public key encryption/encryptor 21a generates plaintext (P||ID) in which the program P and the identification information ID are arranged as data. Then, the public key encryption encryptor 21a encrypts the plaintext (P||ID) using the public key pk received from the dongle 30, thereby converting the ciphertext C3=PKEnc(pk, P||ID) into Generate. The calculator 21 transmits the ciphertext C2=Enc(k1, sk||ID) and C3=PKEnc(pk, P||ID) to the general-purpose MCU 10 ((8), step S110).

汎用MCU10のAES復号器11bは、秘密鍵k1を用いて暗号文C2を復号する((9)、ステップS120)。具体的に述べると、AES復号器11bは、メモリ12から秘密鍵k1を読み出し、読み出した秘密鍵k1を用いて暗号文C2=Enc(k1、sk||ID)を復号する。これにより、AES復号器11bは、秘密鍵sk’及び識別情報ID’を取得する(sk||ID=Dec(k1、C2))。 The AES decryptor 11b of the general-purpose MCU 10 decrypts the ciphertext C2 using the secret key k1 ((9), step S120). Specifically, the AES decryptor 11b reads the secret key k1 from the memory 12 and decrypts the ciphertext C2=Enc(k1, sk||ID) using the read secret key k1. As a result, the AES decoder 11b acquires the secret key sk' and the identification information ID' (sk||ID=Dec(k1, C2)).

なお、ステップS120において取得した秘密鍵及び識別情報を、sk’、ID’と表記している。これにより、取得した秘密鍵とドングル30で生成された秘密鍵とを区別し、取得した識別情報と汎用MCU10が格納する識別情報とを区別する。 The private key and identification information obtained in step S120 are denoted by sk' and ID'. Thereby, the obtained secret key and the secret key generated by the dongle 30 are distinguished, and the obtained identification information and the identification information stored in the general-purpose MCU 10 are distinguished.

ステップS130では、ステップS120で取得した識別情報ID’と、汎用MCU10に格納された識別情報IDとが一致するかどうかが判定される。具体的に述べると、汎用MCU10の演算器11は、メモリ12に格納された識別情報IDを読み出し、読み出した識別情報IDと、ステップS120で取得した識別情報ID’とを比較する。これらの識別情報ID、ID’が互いに異なる場合(NO)、演算器11は、汎用MCU10の動作を停止させる(ステップS140)。 In step S130, it is determined whether the identification information ID' acquired in step S120 and the identification information ID stored in the general-purpose MCU 10 match. Specifically, the calculator 11 of the general-purpose MCU 10 reads the identification information ID stored in the memory 12 and compares the read identification information ID with the identification information ID' obtained in step S120. If the identification information ID and ID' are different from each other (NO), the computing unit 11 stops the operation of the general-purpose MCU 10 (step S140).

一方、これらの識別情報ID、ID’が一致する場合(YES)、公開鍵暗号復号器11aは、ステップS120で取得した秘密鍵sk’を用いて暗号文C3の復号を行い、プログラムP、識別情報を取得する((10)、ステップS150)。 On the other hand, if the identification information ID and ID' match (YES), the public key encryption/decryption device 11a decrypts the ciphertext C3 using the secret key sk' acquired in step S120, and the program P and the identification Information is acquired ((10), step S150).

なお、ステップS150において、秘密鍵sk’による暗号文C3の復号が失敗した場合、演算器11は、汎用MCU10の動作を停止させる。 In step S150, if the decryption of the ciphertext C3 using the secret key sk' fails, the computing unit 11 causes the general-purpose MCU 10 to stop operating.

ステップS160では、ステップS150で取得した識別情報ID”と、汎用MCU10が格納する識別情報IDとが一致するかどうかが判定される。演算器11は、識別情報IDと、ステップS150における復号により取得した識別情報ID”とを比較する。これらの識別情報ID、ID”が互いに異なる場合(NO)、演算器11は、汎用MCU10の動作を停止させる(ステップS170)。 In step S160, it is determined whether or not the identification information ID" obtained in step S150 matches the identification information ID stored in the general-purpose MCU 10. is compared with the identification information ID". If the identification information ID and ID'' are different from each other (NO), the computing unit 11 stops the operation of the general-purpose MCU 10 (step S170).

一方、これらの識別情報ID、ID”が一致する場合(YES)、演算器11は、ステップS150で取得したプログラムPのインストールを行う((11)ステップS180)。プログラムPのインストールが終了すると、データ書き込み処理が完了する(ステップS190)。 On the other hand, if the identification information ID and ID'' match (YES), the computing unit 11 installs the program P acquired in step S150 ((11) step S180). The data write process is completed (step S190).

<本実施の形態による主な効果>
本実施の形態によれば、ドングル30は、データ書き込み器20からプログラム等の書き込み用データの書き込み要求を受信すると、書き込み処理の実行回数CNをインクリメントし、データ書き込み器20へ書き込み用データの書き込み許可を送信する。また、ドングル30は、実行回数CNが所定の実行回数上限値CNLに達すると、さらなる書き込み要求を受信しても書き込み許可を送信しない。この構成によれば、ドングル30は、実行回数を適切に管理し、オーバープロダクションを防止することが可能となる。
<Main effects of the present embodiment>
According to the present embodiment, when the dongle 30 receives a write request for write data such as a program from the data writer 20, the dongle 30 increments the write processing execution count CN, and writes the write data to the data writer 20. Send permission. Further, when the execution count CN reaches the predetermined execution count upper limit value CNL, the dongle 30 does not transmit the write permission even if it receives a further write request. According to this configuration, the dongle 30 can appropriately manage the number of executions and prevent overproduction.

このように、本実施の形態のドングル30を用いることにより、オーバープロダクションの防止、及びライセンスサーバを用いることなくデータ書き込み処理を行うことが可能となる。 Thus, by using the dongle 30 of the present embodiment, it is possible to prevent overproduction and perform data writing processing without using a license server.

また、本実施の形態によれば、データ書き込み器20から送信される書き込み要求、及びドングル30から送信される書き込み許可に、書き込み要求書き込み処理を行おうとしている汎用MCU10から読み出した識別情報IDが含まれる。そして、汎用MCU10は、データ書き込み器20から受信したデータ及び書き込み許可に含まれる識別情報ID’、ID”と、自身が格納している識別情報IDとを比較し、これらが互いに異なる場合には、動作を停止する。 Further, according to the present embodiment, the write request transmitted from the data writer 20 and the write permission transmitted from the dongle 30 contain the identification information ID read from the general-purpose MCU 10 attempting to perform the write request write process. included. Then, the general-purpose MCU 10 compares the identification information ID', ID'' included in the data and write permission received from the data writer 20 with the identification information ID stored in itself, and if they are different from each other, , to stop working.

この構成によれば、識別情報ID’、ID”と、自身が格納している識別情報IDとが一致する場合のみデータ書き込み処理が実行されるので、データ書き込み処理時の安全性が確保される。すなわち、書き込み許可を受けた汎用MCUと書き込み対象の汎用MCUとを一致させることができる。 According to this configuration, the data write process is executed only when the identification information ID', ID" matches the identification information ID stored in itself, so that the safety of the data write process is ensured. That is, it is possible to match the general-purpose MCU that has received write permission with the general-purpose MCU that is the object of writing.

また、本実施の形態によれば、汎用MCU10に対する書き込み許可、プログラムP等の書き込み用データを含むデータは暗号化され、汎用MCU10において暗号文の復号が行われる。具体的に述べると、ドングル30、データ書き込み器20、汎用MCU10間で、公開鍵暗号及び共通鍵暗号を組み合わせた暗号プロトコルを利用することにより、各機器間の通信内容を攻撃者が読み取っても、プログラム等の書き込み用データの取り出し及び不正なインストールが不可能となっている。また、ドングル30で管理されている実行回数CNの改ざんも不可能となっている。このように、ドングル30から汎用MCU10までの経路における通信内容の盗聴を防止でき、データ書き込み処理時の安全性がより一層確保される。 Further, according to the present embodiment, data including write permission for the general-purpose MCU 10 and write data such as the program P is encrypted, and the general-purpose MCU 10 decrypts the ciphertext. Specifically, by using a cryptographic protocol that combines public key cryptography and common key cryptography among the dongle 30, data writer 20, and general-purpose MCU 10, even if an attacker reads the communication content between each device, , it is impossible to take out writing data such as programs and illegally install them. Also, it is impossible to falsify the number of executions CN managed by the dongle 30 . In this way, it is possible to prevent eavesdropping of the contents of communication on the path from the dongle 30 to the general-purpose MCU 10, thereby further ensuring safety during the data writing process.

また、本実施の形態によれば、偽ドングルを作成し、その偽ドングルをデータ書き込み器20に接続しても、格納する秘密鍵が異なるので、データ書き込み器20又は汎用MCU10において、このドングルが偽ドングルであることが検知され、不正なデータ書き込み処理の実行を防止することが可能である。 Further, according to the present embodiment, even if a fake dongle is created and connected to the data writer 20, the secret key to be stored is different. It is possible to detect that it is a fake dongle and prevent execution of unauthorized data writing processing.

また、本実施の形態によれば、ドングル30及び汎用MCU10に共通の秘密鍵k1を格納する。この構成によれば、秘密鍵を読み出す際にサーバとの通信を行う必要がなく、オフラインで処理することが可能となる。 Further, according to the present embodiment, the secret key k1 common to the dongle 30 and the general-purpose MCU 10 is stored. According to this configuration, there is no need to communicate with the server when reading the private key, and processing can be performed offline.

また、本実施の形態によれば、一対の鍵ペア(pk、sk)がドングル30内で生成される。この構成によれば、鍵ペアが外部へ漏れることがないので、鍵ペアを用いた暗号化及び復号の安全性が確保される。 Also, according to the present embodiment, a pair of key pairs (pk, sk) are generated within dongle 30 . According to this configuration, since the key pair is not leaked to the outside, the security of encryption and decryption using the key pair is ensured.

(実施の形態2)
次に、実施の形態2について説明する。なお、以下では、前述の実施の形態で述べた内容と重複する箇所については適宜省略する。図4は、本発明の実施の形態2に係るデータ処理システムの構成例を示すブロック図である。
(Embodiment 2)
Next, Embodiment 2 will be described. In the following description, portions that overlap with the content described in the above embodiments will be omitted as appropriate. FIG. 4 is a block diagram showing a configuration example of a data processing system according to Embodiment 2 of the present invention.

〈データ処理管理媒体〉
メモリ32は、書き込み処理の実行回数CN、実行回数上限値CNL、秘密鍵(第3秘密鍵)k1、秘密鍵(第4秘密鍵)sk等を格納する。また、メモリ32は、ドングル30を動作させるプログラムやパラメータ等を格納する。
<Data processing management medium>
The memory 32 stores the execution count CN of the write process, the execution count upper limit CNL, the secret key (third secret key) k1, the secret key (fourth secret key) sk, and the like. The memory 32 also stores programs, parameters, etc. for operating the dongle 30 .

本実施の形態の演算器31は、実施の形態1における各機能に加え、秘密鍵k1を用いた、秘密鍵(第5秘密鍵)k2、秘密鍵(第6秘密鍵)k3の生成も行う。具体的に述べると、演算器31は、例えば鍵導出関数を用い、秘密鍵k1を入力として秘密鍵k2、k3を出力してもよい。 In addition to the functions of Embodiment 1, the calculator 31 of the present embodiment also generates a secret key (fifth secret key) k2 and a secret key (sixth secret key) k3 using the secret key k1. . Specifically, the arithmetic unit 31 may use a key derivation function, for example, and may output secret keys k2 and k3 with the secret key k1 as an input.

演算器31は、図4に示すように、AES暗号化器31b、MAC生成器31cを備えている。AES暗号化器31b、MAC生成器31cは、ハードウェア又はプログラムの実行により演算器31内に実現される。なお、ハードウェアで構成される場合、AES暗号化器31b、MAC生成器31cは、演算器31の外側に設けられてもよい。 The calculator 31, as shown in FIG. 4, includes an AES encryptor 31b and a MAC generator 31c. The AES encryptor 31b and MAC generator 31c are realized in the calculator 31 by hardware or program execution. Note that the AES encryptor 31b and the MAC generator 31c may be provided outside the arithmetic unit 31 when configured by hardware.

AES暗号化器31bは、例えば秘密鍵k2を用いて、秘密鍵skや識別情報IDを含む書き込み許可を暗号化し、書き込み許可の暗号文C12を生成する。MAC生成器31cは、AES暗号化器31bで暗号化された書き込み許可を用いてメッセージ認証符号(第1メッセージ認証符号)tを生成する。演算器31bは、暗号文C12、メッセージ認証符号tをデータ書き込み器20へ送信する。なお、演算器31bにおける各処理については、後で詳しく説明する。 The AES encryptor 31b encrypts the write permission including the secret key sk and the identification information ID using the secret key k2, for example, and generates a write permission ciphertext C12. The MAC generator 31c generates a message authentication code (first message authentication code) t using the write permission encrypted by the AES encryptor 31b. The arithmetic unit 31b transmits the ciphertext C12 and the message authentication code t to the data writer 20. FIG. Each processing in the calculator 31b will be described in detail later.

〈データ書き込み器〉
データ書き込み器20のメモリ22は、秘密鍵skに対応する公開鍵(第2公開鍵)pkを用いて暗号化されたデータの暗号文C13を格納する。この暗号文C13は、例えば、データ書き込み器20のユーザやソフトウェアベンダにより事前に生成されたものである。この公開鍵pkは、例えばドングル30の製造元のウェブサイトにおいて公開される鍵であり、秘密鍵skに対応する鍵である。言い換えれば、秘密鍵skと、公開鍵pkは、一対の鍵ペアを構成する。ドングル30を用いてデータ書き込み器20のユーザやソフトウェアベンダは、当該ウェブサイトから公開鍵pkを入手した上で、暗号文C13を生成し、メモリ22へ格納しておく。
<Data writer>
The memory 22 of the data writer 20 stores a ciphertext C13 of data encrypted using a public key (second public key) pk corresponding to the secret key sk. This ciphertext C13 is generated in advance by, for example, the user of the data writer 20 or the software vendor. This public key pk is, for example, a key published on the website of the manufacturer of the dongle 30, and is a key corresponding to the secret key sk. In other words, the private key sk and the public key pk form a pair of keys. Using the dongle 30, the user of the data writer 20 or the software vendor obtains the public key pk from the website, generates the ciphertext C13, and stores it in the memory 22. FIG.

このように、本実施の形態ではプログラム等を含むデータの暗号文がメモリ22に事前に準備されるので、演算器21において暗号化を行う必要がない。このため、本実施の形態の演算器21には、公開鍵暗号暗号化器21aは設けられていない。 As described above, in the present embodiment, the ciphertext of data including programs and the like is prepared in the memory 22 in advance, so that the computing unit 21 does not need to perform encryption. Therefore, the public key encryption encoder 21a is not provided in the computing unit 21 of this embodiment.

演算器21は、ドングルから受信した書き込み許可の暗号文C12、メッセージ認証符号t、及びメモリに格納しているデータの暗号文C13を汎用MCU10へ送信する。 The computing unit 21 transmits to the general-purpose MCU 10 the write permission ciphertext C12 received from the dongle, the message authentication code t, and the data ciphertext C13 stored in the memory.

〈書き込み対象物〉
汎用MCU10のメモリ12は、識別情報ID、秘密鍵(第3秘密鍵)k1等を格納する。本実施の形態の演算器11は、実施の形態1における各機能に加え、秘密鍵k1を用いた、秘密鍵(第5秘密鍵)k2、秘密鍵(第6秘密鍵)k3の生成も行う。秘密鍵k2、k3は、ドングル31と同様に、例えば鍵導出関数を用い、秘密鍵k1を入力として出力される。
<Writing object>
The memory 12 of the general-purpose MCU 10 stores identification information ID, secret key (third secret key) k1, and the like. In addition to the functions of Embodiment 1, the calculator 11 of the present embodiment also generates a secret key (fifth secret key) k2 and a secret key (sixth secret key) k3 using the secret key k1. . As with the dongle 31, the secret keys k2 and k3 use, for example, a key derivation function, and are output with the secret key k1 as an input.

演算器11は、公開鍵暗号復号器11a、AES復号器11b、及びMAC検証器11cを備えている。公開鍵暗号復号器11a、AES復号器11b、及びMAC検証器11cは、ハードウェア又はプログラムの実行により演算器11内に実現される。なお、ハードウェアで構成される場合、公開鍵暗号復号器11a、AES復号器11b、及びMAC検証器11cは、演算器11の外側に形成されてもよい。 The computing unit 11 includes a public key decryptor 11a, an AES decryptor 11b, and a MAC verifier 11c. The public key encryption/decryptor 11a, the AES decryptor 11b, and the MAC verifier 11c are implemented in the calculator 11 by hardware or program execution. Note that the public key encryption/decryptor 11 a , the AES decryptor 11 b , and the MAC verifier 11 c may be formed outside the computing unit 11 when configured by hardware.

MAC検証器11cは、データ書き込み器20から受信した書き込み許可の暗号文C12と、演算器11で生成された秘密鍵k3とを用いてメッセージ認証符号(第2メッセージ認証符号)t’を生成する。 The MAC verifier 11c generates a message authentication code (second message authentication code) t' using the write permission ciphertext C12 received from the data writer 20 and the secret key k3 generated by the calculator 11. .

受信したメッセージ認証符号tとMAC検証器11cで生成されたメッセージ認証符号t’とが一致すれば、AES復号器11bは、秘密鍵k2を用いて書き込み許可の暗号文C12の復号を行い、書き込み許可に含まれる秘密鍵sk、及び識別情報を取得する。なお、便宜上、ここで取得した識別情報をID’と表記する。 If the received message authentication code t and the message authentication code t' generated by the MAC verifier 11c match, the AES decoder 11b uses the secret key k2 to decrypt the write permission ciphertext C12, Obtain the secret key sk and the identification information contained in the authorization. For the sake of convenience, the identification information obtained here will be referred to as ID'.

書き込み処理を行おうとしている汎用MCU10が格納する識別情報IDと、暗号文C12から取得した識別情報ID’とが一致する場合、公開鍵暗号復号器11aは、データの暗号文C13を、秘密鍵skを用いて復号し、プログラムPを取得する。 If the identification information ID stored by the general-purpose MCU 10 that is about to perform the write process matches the identification information ID' obtained from the ciphertext C12, the public key encryption/decryption device 11a converts the data ciphertext C13 into the secret key. Decrypt using sk to obtain the program P.

<データ書き込み処理>
次に、本実施の形態のデータ書き込み処理を詳しく説明する。図5は、本発明の実施の形態2に係るデータ書き込み処理の一例を示すフロー図である。図6は、図3の主要な処理と、データ処理システムの各要素における動作とを対応させた図である。
<Data write processing>
Next, the data write processing of this embodiment will be described in detail. FIG. 5 is a flowchart showing an example of data write processing according to Embodiment 2 of the present invention. FIG. 6 is a diagram that associates the main processes of FIG. 3 with the operations of each element of the data processing system.

データ書き込み処理には、例えば図5に示すステップS210~S400が実施される。データ書き込み処理が開始されると(ステップS210)、データ書き込み器20は、汎用MCU10から固有の識別情報IDを読み出す((1)、ステップS220)。ステップS220では、図2のステップS20と同様の処理が実行されるので、詳細な説明は省略する。 Steps S210 to S400 shown in FIG. 5, for example, are performed in the data write process. When the data writing process is started (step S210), the data writer 20 reads the unique identification information ID from the general-purpose MCU 10 ((1), step S220). In step S220, a process similar to that in step S20 of FIG. 2 is executed, so detailed description thereof will be omitted.

データ書き込み器20は、汎用MCU10から読み出した識別情報IDを書き込み要求としてドングル30へ送信する((2)、ステップS230)。なお、ステップS230では、識別情報IDをメモリ22等に格納しておく必要ない。データ書き込み器20において暗号文を生成しないからである。 The data writer 20 transmits the identification information ID read from the general-purpose MCU 10 to the dongle 30 as a write request ((2), step S230). It should be noted that it is not necessary to store the identification information ID in the memory 22 or the like in step S230. This is because the data writer 20 does not generate the ciphertext.

識別情報IDを受信すると、ドングル30の演算器31は、実行回数CNと実行回数上限値CNLとを比較し、実行回数CNが実行回数上限値CNLであるかどうかを判定する(ステップS240)。実行回数CNが実行回数上限値CNLである場合(YES)、演算器31は、実行回数が所定の実行回数上限値に達していると判断し、実行回数CNのインクリメントを行うことなく、ドングル30の動作を停止させる(ステップS250)。一方、実行回数CNが実行回数上限値CNLより小さい場合(NO)、演算器31は、実行回数CNのインクリメントを行う(ステップS260、(3))。ステップS240-S260では、図2のステップS40-S60と同様の処理が実行される。 Upon receiving the identification information ID, the calculator 31 of the dongle 30 compares the execution count CN with the execution count upper limit value CNL, and determines whether the execution count CN is the execution count upper limit value CNL (step S240). If the execution count CN is the execution count upper limit value CNL (YES), the arithmetic unit 31 determines that the execution count has reached the predetermined execution count upper limit value, and the dongle 30 is operated without incrementing the execution count CN. is stopped (step S250). On the other hand, when the execution count CN is smaller than the execution count upper limit value CNL (NO), the computing unit 31 increments the execution count CN (step S260, (3)). In steps S240-S260, processing similar to that of steps S40-S60 in FIG. 2 is performed.

次に、演算器31は、鍵導出関数(KDF)を用い、秘密鍵k1を入力として秘密鍵k2、k3((k2、k3)=KDF(k1))を生成する((4)、ステップS270)。AES暗号化器31bは、秘密鍵k2を用いて書き込み許可を暗号化する((5)、ステップS280)。具体的に述べると、まず、演算器31は、メモリ32から秘密鍵skを読み出し、秘密鍵skと識別情報IDとを並べた書き込み許可の平文(sk||ID)を生成する。そして、AES暗号化器31bは、秘密鍵k2を用いて書き込み許可の平文(sk||ID)を暗号化することで、暗号文C12=Enc(k2、sk||ID)を生成する。 Next, the calculator 31 uses the key derivation function (KDF) to generate secret keys k2 and k3 ((k2, k3)=KDF(k1)) with the secret key k1 as an input ((4), step S270 ). The AES encryptor 31b encrypts the write permission using the secret key k2 ((5), step S280). Specifically, first, the computing unit 31 reads out the secret key sk from the memory 32 and generates a write permission plaintext (sk||ID) in which the secret key sk and the identification information ID are arranged. Then, the AES encryptor 31b generates ciphertext C12=Enc(k2, sk||ID) by encrypting the write permission plaintext (sk||ID) using the secret key k2.

次に、MAC生成器31cは、ステップS270で生成された秘密鍵k3と、書き込み許可の暗号文C12とを用いてメッセージ認証符号t=MAC(k3、C12)を生成する((6)、ステップS290)。 Next, the MAC generator 31c generates a message authentication code t=MAC(k3, C12) using the secret key k3 generated in step S270 and the write permission ciphertext C12 ((6), step S290).

演算器31は、インタフェース33を介して、暗号文C12及びメッセージ認証符号tをデータ書き込み器20へ送信する((7)、ステップS300)。 The calculator 31 transmits the ciphertext C12 and the message authentication code t to the data writer 20 via the interface 33 ((7), step S300).

データ書き込み器20のインタフェース24は、暗号文C12、メッセージ認証符号t、及び暗号文C13を汎用MCU10へ送信する((8)、ステップS310)。 The interface 24 of the data writer 20 transmits the ciphertext C12, the message authentication code t, and the ciphertext C13 to the general-purpose MCU 10 ((8), step S310).

汎用MCU10の演算器11は、鍵導出関数(KDF)を用い、秘密鍵k1を入力として秘密鍵k2、k3((k2、k3)=KDF(k1))を生成する((9)、ステップS320)。 The arithmetic unit 11 of the general-purpose MCU 10 uses the key derivation function (KDF) to generate secret keys k2 and k3 ((k2, k3)=KDF(k1)) with the secret key k1 as an input ((9), step S320 ).

ステップS330では、ドングルで生成されたメッセージ認証符号tと、汎用MCU10で生成されるメッセージ認証符号t’とが一致するかどうかが検証される((10)、ステップS330)。まず、MAC検証器11cは、ステップS310で受信した暗号文C12と、ステップS320で生成された秘密鍵k3とを用いて、メッセージ認証符号t’を生成する。 In step S330, it is verified whether or not the message authentication code t generated by the dongle matches the message authentication code t' generated by the general-purpose MCU 10 ((10), step S330). First, the MAC verifier 11c generates a message authentication code t' using the ciphertext C12 received in step S310 and the secret key k3 generated in step S320.

そして、MAC検証器11cは、ステップS310で受信したメッセージ認証符号tと、生成したメッセージ認証符号t’とを比較し、これらのメッセージ認証符号t、t’が一致するかどうかの検証を行う。検証の結果、これらのメッセージ認証符号t、t’が一致しない場合(NO)、演算器11は、汎用MCU10の動作を停止させる(ステップS340)。 The MAC verifier 11c then compares the message authentication code t received in step S310 with the generated message authentication code t', and verifies whether these message authentication codes t and t' match. As a result of the verification, if these message authentication codes t and t' do not match (NO), the computing unit 11 stops the operation of the general-purpose MCU 10 (step S340).

一方、これらのメッセージ認証符号t、t’が一致する場合(YES)、AES復号器11bは、秘密鍵k2を用いて暗号文C12=Enc(k2、sk||ID)を復号し((11)、ステップS350)、秘密鍵sk及び識別情報ID’を取得する(sk||ID=Dec(k2、C12))。なお、ステップS120において取得した秘密鍵及び識別情報をID’と表記している。これにより、取得した識別情報と汎用MCU10が格納する識別情報とを区別する。ステップS350は、図2のステップS120と類似している。 On the other hand, if these message authentication codes t and t' match (YES), the AES decoder 11b uses the secret key k2 to decrypt the ciphertext C12=Enc(k2, sk||ID) ((11 ), step S350), the secret key sk and identification information ID' are acquired (sk||ID=Dec(k2, C12)). The private key and identification information obtained in step S120 are denoted as ID'. This distinguishes the acquired identification information from the identification information stored in the general-purpose MCU 10 . Step S350 is similar to step S120 of FIG.

ステップS360では、ステップS350で取得した識別情報ID’と、汎用MCU10に格納された識別情報IDとが一致するかどうかが判定される。ステップS360は、図2のステップS130と同様である。これらの識別情報ID、ID’が互いに異なる場合(NO)、演算器11は、汎用MCU10の動作を停止させる(ステップS370)。 In step S360, it is determined whether the identification information ID' acquired in step S350 and the identification information ID stored in the general-purpose MCU 10 match. Step S360 is similar to step S130 in FIG. If the identification information ID and ID' are different from each other (NO), the computing unit 11 stops the operation of the general-purpose MCU 10 (step S370).

一方、これらの識別情報ID、ID’が一致する場合(YES)、公開鍵暗号復号器11aは、ステップS350で取得した秘密鍵skを用いて暗号文C13の復号を行い、プログラムPを取得する((12)、ステップS380)。なお、ステップS380において、秘密鍵skによる暗号文C13の復号が失敗した場合、演算器11は、汎用MCU10の動作を停止させる。 On the other hand, if the identification information ID and ID' match (YES), the public key encryption/decryption device 11a decrypts the ciphertext C13 using the secret key sk obtained in step S350, and obtains the program P. ((12), step S380). Note that in step S380, if the decryption of the ciphertext C13 using the secret key sk fails, the computing unit 11 causes the general-purpose MCU 10 to stop operating.

そして、演算器11は、ステップS380で取得したプログラムPのインストールを行う((13)ステップS390)。プログラムPのインストールが終了すると、データ書き込み処理が完了する(ステップS400)。 Then, the computing unit 11 installs the program P acquired in step S380 ((13) step S390). When the installation of the program P is completed, the data writing process is completed (step S400).

<本実施の形態による主な効果>
本実施の形態では、前述の実施の形態1における各効果に加え、以下の効果が得られる。書き込み許可に含まれる識別情報の比較とともに、書き込み許可の暗号文を用いて生成されるメッセージ認証符号の比較が行われる。この構成によれば、通信路中での通信エラー、故意の改ざん等を防ぎ、システム内での通信の安全性をより向上させることが可能となる。
<Main effects of the present embodiment>
In this embodiment, the following effects are obtained in addition to the effects of the first embodiment described above. A comparison of the identification information contained in the write permission is made along with a comparison of the message authentication code generated using the ciphertext of the write permission. According to this configuration, it is possible to prevent communication errors in the communication path, intentional falsification, etc., and further improve the safety of communication within the system.

また、本実施の形態によれば、ドングル30及び汎用MCUにおいて、鍵導出関数(KDF)、鍵導出関数の入力となる秘密鍵k1を用いて、秘密鍵k2、k3が生成される。この構成によれば、暗号文C12の復号用の秘密鍵(k2)およびMAC検証用の秘密鍵(k3)をドングル30から送信する必要がなくなる。 Further, according to the present embodiment, in the dongle 30 and the general-purpose MCU, secret keys k2 and k3 are generated using a key derivation function (KDF) and a secret key k1 as an input to the key derivation function. This configuration eliminates the need to transmit the secret key (k2) for decryption of the ciphertext C12 and the secret key (k3) for MAC verification from the dongle 30 .

また、本実施の形態によれば、ドングル30内で鍵ペアを作成する必要がないため、図1の公開鍵暗号鍵生成器31aが不要である。公開鍵の生成に必要となる乱数発生器も不要である。また、プログラムPは、データ書き込み器20のユーザやソフトウェアベンダにより事前に生成されるので、プログラムP漏えいの可能性が低減される。また、データ書き込み器20にセキュアな保存領域が不要となる。 Further, according to this embodiment, there is no need to create a key pair within the dongle 30, so the public key encryption key generator 31a of FIG. 1 is not required. A random number generator required for public key generation is also not required. Also, since the program P is generated in advance by the user of the data writer 20 or the software vendor, the possibility of program P leakage is reduced. Also, the data writer 20 does not require a secure storage area.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。 The invention made by the present inventor has been specifically described above based on the embodiment, but the present invention is not limited to the above embodiment, and can be variously modified without departing from the scope of the invention. Needless to say.

以下に、本発明の好ましい態様について付記する。 Preferred embodiments of the present invention are additionally described below.

[付記1]
前記データ処理管理媒体は、第2秘密鍵と、前記第2秘密鍵と対応する第1公開鍵とからなる鍵ペアを生成し、前記第1公開鍵と、前記第2秘密鍵及び前記識別情報を含む暗号化された前記書き込み許可とを前記データ書き込み器へ送信し、
前記データ書き込み器は、受信した前記第1公開鍵を用いて前記データを暗号化し、暗号化された前記データと、暗号化された前記書き込み許可とを前記書き込み対象物へ送信し、
前記書き込み対象物は、暗号化された前記書き込み許可を前記第1秘密鍵を用いて復号して前記第2秘密鍵を取得し、暗号化された前記データを前記第2秘密鍵を用いて復号する、
データ処理システム。
[Appendix 1]
The data processing management medium generates a key pair consisting of a second secret key and a first public key corresponding to the second secret key, and stores the first public key, the second secret key, and the identification information. sending to the data writer the encrypted write permission comprising
The data writer encrypts the data using the received first public key, and transmits the encrypted data and the encrypted write permission to the object to be written;
The write target decrypts the encrypted write permission using the first secret key to obtain the second secret key, and decrypts the encrypted data using the second secret key. do,
data processing system.

[付記2]
前記データは、前記書き込み対象物から読み出された前記識別情報を含み、
前記書き込み対象物は、自身の前記識別情報と、前記データに含まれる前記識別情報とが一致するとき、前記書き込み用データの書き込みを行う、
データ処理システム。
[Appendix 2]
the data includes the identification information read from the write target;
The write target writes the write data when the identification information of itself and the identification information included in the data match.
data processing system.

[付記3]
前記データ処理管理媒体は、第3秘密鍵及び第4秘密鍵を格納し、前記第3秘密鍵を用いて第5秘密鍵及び第6秘密鍵を生成し、前記第5秘密鍵を用いて前記第4秘密鍵を含む前記書き込み許可を暗号化し、暗号化された前記書き込み許可と前記第6秘密鍵とを用いて前記第1メッセージ認証符号を生成し、前記第1メッセージ認証符号及び暗号化された前記書き込み許可を前記データ書き込み器へ送信し、
前記データ書き込み器は、前記第4秘密鍵と対応する第2公開鍵を用いて暗号化された前記データを格納し、前記第1メッセージ認証符号、暗号化された前記書き込み許可、及び暗号化された前記データを前記書き込み対象物へ送信し、
前記書き込み対象物は、前記第3秘密鍵を格納し、前記第3秘密鍵を用いて前記第5秘密鍵及び前記第6秘密鍵を生成し、受信した暗号化された前記書き込み許可と、生成した前記第6秘密鍵とを用いて第2メッセージ認証符号を生成する、
データ処理システム。
[Appendix 3]
The data processing management medium stores a third secret key and a fourth secret key, generates a fifth secret key and a sixth secret key using the third secret key, and uses the fifth secret key to generate the encrypting the write permission including a fourth private key; generating the first message authentication code using the encrypted write permission and the sixth private key; sending said write permission to said data writer;
The data writer stores the data encrypted using the fourth private key and a corresponding second public key, and stores the first message authentication code, the encrypted write permission, and the encrypted write permission. transmitting the data to the writing object;
The write object stores the third secret key, generates the fifth secret key and the sixth secret key using the third secret key, and generates the encrypted write permission received. generating a second message authentication code using the sixth secret key obtained from
data processing system.

[付記4]
前記書き込み対象物は、暗号化された前記書き込み許可を前記第5秘密鍵を用いて復号して前記第4秘密鍵を取得し、暗号化された前記データを前記第4秘密鍵を用いて復号する、
データ処理システム。
[Appendix 4]
The write target decrypts the encrypted write permission using the fifth secret key to obtain the fourth secret key, and decrypts the encrypted data using the fourth secret key. do,
data processing system.

[付記5]
前記データ処理管理媒体及び前記書き込み対象物は、鍵導出関数を用いて、前記第3秘密鍵を入力として前記第5秘密鍵及び第6秘密鍵を取得する、
データ処理システム。
[Appendix 5]
The data processing management medium and the object to be written use a key derivation function to obtain the fifth secret key and the sixth secret key with the third secret key as an input,
data processing system.

[付記6]
前記データ書き込み器及び前記データ処理管理媒体は、シリアルバスで互いに接続される、
データ処理システム。
[Appendix 6]
the data writer and the data processing management medium are connected to each other by a serial bus;
data processing system.

[付記7]
前記データ書き込み器及び前記データ処理管理媒体は、USB端子で互いに接続されている、
データ処理システム。
[Appendix 7]
the data writer and the data processing management medium are connected to each other via a USB terminal;
data processing system.

[付記8]
第2秘密鍵と、前記第2秘密鍵と対応する第1公開鍵とからなる鍵ペアを生成し、前記第1公開鍵と、前記第2秘密鍵及び前記識別情報を含む暗号化された前記書き込み許可とを前記データ書き込み器へ送信する、
データ処理管理媒体。
[Appendix 8]
generating a key pair consisting of a second private key and a first public key corresponding to the second private key; sending a write permission to the data writer;
Data processing management medium.

[付記9]
第3秘密鍵及び第4秘密鍵を格納し、前記第3秘密鍵を用いて第5秘密鍵及び第6秘密鍵を生成し、前記第5秘密鍵を用いて前記第4秘密鍵を含む前記書き込み許可を暗号化し、暗号化された前記書き込み許可と前記第6秘密鍵とを用いて前記第1メッセージ認証符号を生成し、前記第1メッセージ認証符号及び暗号化された前記書き込み許可を前記データ書き込み器へ送信する、
データ処理管理媒体。
[Appendix 9]
storing a third secret key and a fourth secret key; generating a fifth secret key and a sixth secret key using the third secret key; using the fifth secret key to contain the fourth secret key; encrypting a write permission; generating said first message authentication code using said encrypted write permission and said sixth secret key; and transferring said first message authentication code and said encrypted write permission to said data send to the writer,
Data processing management medium.

[付記10]
鍵導出関数を用いて、前記第3秘密鍵を入力として前記第5秘密鍵及び第6秘密鍵を取得する、
データ処理管理媒体。
[Appendix 10]
using a key derivation function to obtain the fifth and sixth secret keys with the third secret key as input;
Data processing management medium.

[付記11]
外部からのアクセスが禁止されたセキュア領域を含むメモリを備えている、
データ処理管理媒体。
[Appendix 11]
Equipped with a memory containing a secure area that prohibits external access,
Data processing management medium.

[付記12]
データ処理管理媒体により書き込み用データの書き込み処理の実行回数が管理されながら、データ書き込み器により前記書き込み用データの前記書き込み処理が実行される書き込み対象物であって、
自身の識別情報と、前記データ処理管理媒体から送信された前記書き込み対象物に対する前記書き込み許可に含まれる識別情報とが一致するとき、前記書き込み用データの書き込みを行う、
書き込み対象物。
[Appendix 12]
A write target on which the write process of the write data is executed by a data writer while the number of execution times of the write process of the write data is managed by a data process management medium,
writing the write data when the identification information of itself and the identification information included in the write permission for the write target transmitted from the data processing management medium match;
object to be written.

[付記13]
前記データ処理管理媒体で暗号化された前記書き込み許可及び前記データ書き込み器で暗号化された前記データをそれぞれ復号する、
書き込み対象物。
[Appendix 13]
decrypting the write permission encrypted on the data processing management medium and the data encrypted on the data writer, respectively;
object to be written.

[付記14]
第1秘密鍵を格納し、前記第1秘密鍵を用いて暗号化された前記書き込み許可を、自身が格納する前記第1秘密鍵を用いて復号する、
書き込み対象物。
[Appendix 14]
storing a first private key, and decrypting the write permission encrypted using the first private key using the first private key stored by itself;
object to be written.

[付記15]
第2秘密鍵及び前記識別情報を含む暗号化された前記書き込み許可を前記第1秘密鍵を用いて復号して前記第2秘密鍵を取得し、前記第2秘密鍵と対応する第1公開鍵を用いて暗号化された前記データを前記第2秘密鍵を用いて復号する、
書き込み対象物。
[Appendix 15]
decrypting the encrypted write permission including a second private key and the identification information using the first private key to obtain the second private key; and a first public key corresponding to the second private key. using the second private key to decrypt the data encrypted using
object to be written.

[付記16]
自身の前記識別情報と、前記データに含まれる前記識別情報とが一致するとき、前記書き込み用データの書き込みを行う、
書き込み対象物。
[Appendix 16]
writing the write data when the identification information of itself and the identification information included in the data match;
object to be written.

[付記17]
受信した暗号化された前記書き込み許可を用いて第2メッセージ認証符号を生成し、前記データ処理管理媒体で生成された第1メッセージ認証符号と前記第2メッセージ認証符号とが一致すれば、暗号化された前記書き込み許可及び暗号化された前記データをそれぞれ復号する、
書き込み対象物。
[Appendix 17]
generating a second message authentication code using the encrypted write permission received, and encrypting if the first message authentication code generated in the data processing management medium and the second message authentication code match; decrypting the encrypted write permission and the encrypted data, respectively;
object to be written.

[付記18]
第3秘密鍵を格納し、前記第3秘密鍵を用いて第5秘密鍵及び第6秘密鍵を生成し、
前記データ管理媒体で生成された第5秘密鍵を用いて暗号化された第4秘密鍵を含む前記書き込み許可と、前記書き込み対象物で生成した前記第6秘密鍵とを用いて第2メッセージ認証符号を生成する、
書き込み対象物。
[Appendix 18]
storing a third secret key, generating a fifth secret key and a sixth secret key using the third secret key;
second message authentication using the write permission including the fourth secret key encrypted using the fifth secret key generated in the data management medium, and the sixth secret key generated in the write object; generate a sign,
object to be written.

[付記19]
前記書き込み対象物は、暗号化された前記書き込み許可を前記第5秘密鍵を用いて復号して前記第4秘密鍵を取得し、前記第4秘密鍵と対応する第2公開鍵を用いて暗号化された前記データを前記第4秘密鍵を用いて復号する、
書き込み対象物。
[Appendix 19]
The write target decrypts the encrypted write permission using the fifth secret key to obtain the fourth secret key, and encrypts the write object using a second public key corresponding to the fourth secret key. decrypting the encrypted data using the fourth private key;
object to be written.

[付記20]
鍵導出関数を用いて、前記第3秘密鍵を入力として前記第5秘密鍵及び第6秘密鍵を取得する、
書き込み対象物。
[Appendix 20]
using a key derivation function to obtain the fifth and sixth secret keys with the third secret key as input;
object to be written.

[付記21]
前記書き込み対象物は、MCUである、
書き込み対象物。
[Appendix 21]
The object to be written is an MCU,
object to be written.

1…データ処理システム、10…汎用MCU(書き込み対象物)、20…データ書き込み器、30…ドングル(データ処理管理媒体)、11、21、31…演算器、12、22、32…メモリ、11a…公開鍵暗号復号器、11b…AES復号器、11c…MAC検証器、21a…公開鍵暗号暗号化器、31a…公開鍵暗号鍵生成器、31b…AES暗号化器、31c…MAC生成器 REFERENCE SIGNS LIST 1 data processing system 10 general-purpose MCU (object to be written) 20 data writer 30 dongle (data processing control medium) 11, 21, 31 calculator 12, 22, 32 memory 11a ... public key encryption/decryptor, 11b... AES decryptor, 11c... MAC verifier, 21a... public key encryption/encryptor, 31a... public key encryption key generator, 31b... AES encryption apparatus, 31c... MAC generator

Claims (13)

書き込み用データの書き込みが行われる書き込み対象物と、
前記書き込み対象物に対する前記書き込み用データの書き込み処理を行うデータ書き込み器と、
前記書き込み処理の実行回数を管理するデータ処理管理媒体と、
の間におけるデータ処理方法であって、
前記データ処理管理媒体は、前記データ書き込み器に対し着脱可能であり、
前記データ書き込み器が、前記データ処理管理媒体へ前記書き込み用データの書き込み要求を送信する第1ステップと、
前記データ処理管理媒体が、書き込み要求を受信すると、前記書き込み処理の前記実行回数をインクリメントする第2ステップと、
前記データ処理管理媒体が、前記データ書き込み器へ前記書き込み用データの書き込み許可を送信する第3ステップと、
を含み、
前記第2ステップにおいて、前記データ処理管理媒体は、前記実行回数が所定の実行回数上限値に達すると、さらに前記書き込み要求を受信しても前記書き込み許可を送信せず、
前記第1ステップにおいて、前記データ書き込み器は、前記書き込み対象物の識別情報を読み出し、読み出した前記識別情報を含む前記書き込み要求を前記データ処理管理媒体へ送信し、
前記第3ステップにおいて、前記データ処理管理媒体は、受信した前記識別情報を含む前記書き込み許可を前記データ書き込み器へ送信し、
前記データ書き込み器が、前記書き込み用データを含むデータ及び受信した前記書き込み許可を前記書き込み対象物へ送信する第4ステップと、
前記書き込み対象物が、自身の識別情報と、前記書き込み許可に含まれる前記識別情報とが一致するとき、前記書き込み用データの書き込みを行う第5ステップと、
をさらに含む、
データ処理方法。
a write target on which write data is written;
a data writer that writes the write data to the write target;
a data processing management medium for managing the number of executions of the write processing;
A data processing method between
The data processing management medium is detachable from the data writer,
a first step in which the data writer transmits a write request for the write data to the data processing management medium;
a second step of incrementing the execution count of the write process when the data processing management medium receives a write request;
a third step in which the data processing management medium transmits a write permission for the write data to the data writer;
including
In the second step, the data processing management medium does not transmit the write permission even if the write request is further received when the execution count reaches a predetermined execution count upper limit;
In the first step, the data writer reads identification information of the object to be written, and transmits the write request including the read identification information to the data processing management medium;
In the third step, the data processing management medium transmits the write permission including the received identification information to the data writer;
a fourth step in which the data writer transmits data including the data to be written and the received write permission to the object to be written;
a fifth step of writing the write data when the write object matches its own identification information with the identification information included in the write permission;
further comprising
Data processing method.
請求項に記載のデータ処理方法において、
前記第3ステップにおいて、前記データ処理管理媒体は、前記書き込み許可を暗号化し、暗号化された前記書き込み許可を前記データ書き込み器へ送信し、
前記第4ステップにおいて、前記データ書き込み器は、前記データを暗号化し、暗号化された前記データ及び暗号化された前記書き込み許可を前記書き込み対象物へ送信し、
前記第5ステップにおいて、前記書き込み対象物は、暗号化された前記書き込み許可及び暗号化された前記データをそれぞれ復号する、
データ処理方法。
In the data processing method according to claim 1 ,
In the third step, the data processing management medium encrypts the write permission and transmits the encrypted write permission to the data writer;
In the fourth step, the data writer encrypts the data, sends the encrypted data and the encrypted write permission to the object to be written;
In the fifth step, the write object decrypts the encrypted write permission and the encrypted data, respectively.
Data processing method.
請求項に記載のデータ処理方法において、
前記データ処理管理媒体及び前記書き込み対象物は、第1秘密鍵をそれぞれ格納し、
前記第3ステップにおいて、前記データ処理管理媒体は、前記第1秘密鍵を用いて前記書き込み許可を暗号化し、
前記第5ステップにおいて、前記書き込み対象物は、暗号化された前記書き込み許可を前記第1秘密鍵を用いて復号する、
データ処理方法。
In the data processing method according to claim 2 ,
the data processing management medium and the writing object each store a first secret key;
In the third step, the data processing management medium encrypts the write permission using the first private key;
In the fifth step, the write object decrypts the encrypted write permission using the first private key.
Data processing method.
請求項に記載のデータ処理方法において、
前記第3ステップにおいて、前記データ処理管理媒体は、第2秘密鍵と、前記第2秘密鍵と対応する第1公開鍵とからなる鍵ペアを生成し、前記第1公開鍵と、前記第2秘密鍵及び前記識別情報を含む暗号化された前記書き込み許可とを前記データ書き込み器へ送信し、
前記第4ステップにおいて、前記データ書き込み器は、受信した前記第1公開鍵を用いて前記データを暗号化し、暗号化された前記データと、暗号化された前記書き込み許可とを前記書き込み対象物へ送信し、
前記第5ステップにおいて、前記書き込み対象物は、暗号化された前記書き込み許可を前記第1秘密鍵を用いて復号して前記第2秘密鍵を取得し、暗号化された前記データを前記第2秘密鍵を用いて復号する、
データ処理方法。
In the data processing method according to claim 3 ,
In the third step, the data processing management medium generates a key pair consisting of a second secret key and a first public key corresponding to the second secret key, and sending to the data writer an encrypted write permission containing a private key and the identification information;
In the fourth step, the data writer encrypts the data using the received first public key, and transmits the encrypted data and the encrypted write permission to the write object. send and
In the fifth step, the write target obtains the second secret key by decrypting the encrypted write permission using the first secret key, and converts the encrypted data to the second secret key. decrypt using the private key,
Data processing method.
請求項に記載のデータ処理方法において、
前記データは、前記書き込み対象物から読み出された前記識別情報を含み、
前記第5ステップにおいて、前記書き込み対象物は、自身の前記識別情報と、前記データに含まれる前記識別情報とが一致するとき、前記書き込み用データの書き込みを行う、
データ処理方法。
In the data processing method according to claim 2 ,
the data includes the identification information read from the write target;
In the fifth step, when the identification information of the write target matches the identification information included in the data, the write data is written.
Data processing method.
請求項に記載のデータ処理方法において、
前記第3ステップにおいて、前記データ処理管理媒体は、暗号化された前記書き込み許可を用いて第1メッセージ認証符号を生成し、生成した前記第1メッセージ認証符号を前記データ書き込み器へ送信し、
前記第4ステップにおいて、前記データ書き込み器は、前記第1メッセージ認証符号を前記書き込み対象物へ送信し、
前記第5ステップにおいて、前記書き込み対象物は、受信した暗号化された前記書き込み許可を用いて第2メッセージ認証符号を生成し、前記第1メッセージ認証符号と前記第2メッセージ認証符号とが一致すれば、暗号化された前記書き込み許可及び暗号化された前記データをそれぞれ復号する、
データ処理方法。
In the data processing method according to claim 2 ,
In the third step, the data processing management medium uses the encrypted write permission to generate a first message authentication code, transmits the generated first message authentication code to the data writer;
In the fourth step, the data writer transmits the first message authentication code to the writing object;
In the fifth step, the write object uses the received encrypted write permission to generate a second message authentication code, and if the first message authentication code and the second message authentication code match. decrypting the encrypted write permissions and the encrypted data, respectively;
Data processing method.
請求項に記載のデータ処理方法において、
前記データ処理管理媒体は、第3秘密鍵及び第4秘密鍵を格納し、
前記第3ステップにおいて、前記データ処理管理媒体は、前記第3秘密鍵を用いて第5秘密鍵及び第6秘密鍵を生成し、前記第5秘密鍵を用いて前記第4秘密鍵を含む前記書き込み許可を暗号化し、暗号化された前記書き込み許可と前記第6秘密鍵とを用いて前記第1メッセージ認証符号を生成し、前記第1メッセージ認証符号及び暗号化された前記書き込み許可を前記データ書き込み器へ送信し、
前記データ書き込み器は、前記第4秘密鍵と対応する第2公開鍵を用いて暗号化された前記データを格納し、
前記第4ステップにおいて、前記データ書き込み器は、前記第1メッセージ認証符号、暗号化された前記書き込み許可、及び暗号化された前記データを前記書き込み対象物へ送信し、
前記書き込み対象物は、前記第3秘密鍵を格納し、
前記第5ステップにおいて、前記書き込み対象物は、前記第3秘密鍵を用いて前記第5秘密鍵及び前記第6秘密鍵を生成し、受信した暗号化された前記書き込み許可と、生成した前記第6秘密鍵とを用いて第2メッセージ認証符号を生成する、
データ処理方法。
In the data processing method according to claim 6 ,
The data processing management medium stores a third secret key and a fourth secret key,
In the third step, the data processing management medium uses the third secret key to generate a fifth secret key and a sixth secret key, and uses the fifth secret key to generate the fourth secret key. encrypting a write permission; generating said first message authentication code using said encrypted write permission and said sixth secret key; and transferring said first message authentication code and said encrypted write permission to said data send to the writer,
the data writer stores the data encrypted using the fourth private key and the corresponding second public key;
In the fourth step, the data writer transmits the first message authentication code, the encrypted write authorization, and the encrypted data to the object to be written;
the write target stores the third secret key;
In the fifth step, the write object uses the third secret key to generate the fifth secret key and the sixth secret key, and the received encrypted write permission and the generated 6 generating a second message authentication code using the private key;
Data processing method.
請求項に記載のデータ処理方法において、
前記第5ステップにおいて、前記書き込み対象物は、暗号化された前記書き込み許可を前記第5秘密鍵を用いて復号して前記第4秘密鍵を取得し、暗号化された前記データを前記第4秘密鍵を用いて復号する、
データ処理方法。
In the data processing method according to claim 7 ,
In the fifth step, the write target obtains the fourth secret key by decrypting the encrypted write permission using the fifth secret key, and converts the encrypted data to the fourth secret key. decrypt using the private key,
Data processing method.
請求項に記載のデータ処理方法において、
前記第3ステップにおいて、前記データ処理管理媒体は、鍵導出関数を用いて、前記第3秘密鍵を入力として前記第5秘密鍵及び第6秘密鍵を取得し、
前記第5ステップにおいて、前記書き込み対象物は、鍵導出関数を用いて、前記第3秘密鍵を入力として前記第5秘密鍵及び第6秘密鍵を取得する、
データ処理方法。
In the data processing method according to claim 7 ,
In the third step, the data processing management medium uses a key derivation function to obtain the fifth secret key and the sixth secret key with the third secret key as an input;
In the fifth step, the write target obtains the fifth secret key and the sixth secret key using the third secret key as an input using a key derivation function.
Data processing method.
書き込み用データの書き込みが行われる書き込み対象物と、
前記書き込み対象物に対する前記書き込み用データの書き込み処理を行うデータ書き込み器と、
前記書き込み処理の実行回数を管理するデータ処理管理媒体と、
を備え、
前記データ処理管理媒体は、前記データ書き込み器に対し着脱可能であり、前記データ書き込み器から前記書き込み用データの書き込み要求を受信すると、前記書き込み処理の前記実行回数をインクリメントし、前記データ書き込み器へ前記書き込み用データの書き込み許可を送信し、前記実行回数が所定の実行回数上限値に達すると、さらに前記書き込み要求を受信しても前記書き込み許可を送信せず、
前記データ書き込み器は、前記書き込み対象物の識別情報を読み出し、読み出した前記識別情報を含む前記書き込み要求を前記データ処理管理媒体へ送信し、
前記データ処理管理媒体は、受信した前記識別情報を含む前記書き込み許可を前記データ書き込み器へ送信し、
前記データ書き込み器は、前記書き込み用データを含むデータ及び受信した前記書き込み許可を前記書き込み対象物へ送信し、
前記書き込み対象物は、自身の識別情報と、前記書き込み許可に含まれる前記識別情報とが一致するとき、前記書き込み用データの書き込みを行う、
データ処理システム。
a write target on which write data is written;
a data writer that writes the write data to the write target;
a data processing management medium for managing the number of executions of the write processing;
with
The data processing management medium is detachable from the data writer, and upon receiving a write request for the write data from the data writer, increments the number of executions of the write process, and transfers the data to the data writer. sending write permission for the write data, and not sending the write permission even if the write request is further received when the execution count reaches a predetermined execution count upper limit;
the data writer reads identification information of the object to be written, and transmits the write request including the read identification information to the data processing management medium;
the data processing management medium transmitting the write permission including the received identification information to the data writer;
The data writer transmits data including the write data and the received write permission to the write target;
The write target writes the write data when the identification information of the write target matches the identification information included in the write permission.
data processing system.
請求項10に記載のデータ処理システムにおいて、
前記データ処理管理媒体は、前記書き込み許可を暗号化し、暗号化された前記書き込み許可を前記データ書き込み器へ送信し、
前記データ書き込み器は、前記データを暗号化し、暗号化された前記データ及び暗号化された前記書き込み許可を前記書き込み対象物へ送信し、
前記書き込み対象物は、暗号化された前記書き込み許可及び暗号化された前記データをそれぞれ復号する、
データ処理システム。
11. The data processing system of claim 10 , wherein
the data processing management medium encrypting the write permission and transmitting the encrypted write permission to the data writer;
the data writer encrypts the data and transmits the encrypted data and the encrypted write permission to the object to be written;
the write object decrypts the encrypted write permissions and the encrypted data, respectively;
data processing system.
請求項11に記載のデータ処理システムにおいて、
前記データ処理管理媒体及び前記書き込み対象物は、第1秘密鍵をそれぞれ格納し、
前記データ処理管理媒体は、前記第1秘密鍵を用いて前記書き込み許可を暗号化し、
前記書き込み対象物は、暗号化された前記書き込み許可を前記第1秘密鍵を用いて復号する、
データ処理システム。
12. The data processing system of claim 11 , wherein
the data processing management medium and the writing object each store a first secret key;
the data processing management medium encrypts the write permission using the first private key;
the write object decrypts the encrypted write permission using the first private key;
data processing system.
請求項11に記載のデータ処理システムにおいて、
前記データ処理管理媒体は、暗号化された前記書き込み許可を用いて第1メッセージ認証符号を生成し、生成した前記第1メッセージ認証符号を前記データ書き込み器へ送信し、
前記データ書き込み器は、前記第1メッセージ認証符号を前記書き込み対象物へ送信し、
前記書き込み対象物は、受信した暗号化された前記書き込み許可を用いて第2メッセージ認証符号を生成し、前記第1メッセージ認証符号と前記第2メッセージ認証符号とが一致すれば、暗号化された前記書き込み許可及び暗号化された前記データをそれぞれ復号する、
データ処理システム。
12. The data processing system of claim 11 , wherein
the data processing management medium generating a first message authentication code using the encrypted write permission, transmitting the generated first message authentication code to the data writer;
said data writer sending said first message authentication code to said writing object;
The write object uses the received encrypted write permission to generate a second message authentication code, and if the first message authentication code and the second message authentication code match, the encrypted decrypting the write permission and the encrypted data, respectively;
data processing system.
JP2019102680A 2019-05-31 2019-05-31 Data processing method and data processing system Active JP7170588B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019102680A JP7170588B2 (en) 2019-05-31 2019-05-31 Data processing method and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019102680A JP7170588B2 (en) 2019-05-31 2019-05-31 Data processing method and data processing system

Publications (2)

Publication Number Publication Date
JP2020197832A JP2020197832A (en) 2020-12-10
JP7170588B2 true JP7170588B2 (en) 2022-11-14

Family

ID=73648021

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019102680A Active JP7170588B2 (en) 2019-05-31 2019-05-31 Data processing method and data processing system

Country Status (1)

Country Link
JP (1) JP7170588B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001312402A (en) 2000-04-28 2001-11-09 Ntt Data Corp Card system, ic card, and recording medium
JP2004318564A (en) 2003-04-17 2004-11-11 Dainippon Printing Co Ltd Ic card and ic card program
JP2010262447A (en) 2009-05-01 2010-11-18 Dainippon Printing Co Ltd Ic chip, and data reading method or the like
JP2014099727A (en) 2012-11-14 2014-05-29 Nippon Telegr & Teleph Corp <Ntt> Key sharing system, key sharing method, and program
US20190095604A1 (en) 2017-09-05 2019-03-28 iStorage Limited Methods and systems of securely transferring data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001312402A (en) 2000-04-28 2001-11-09 Ntt Data Corp Card system, ic card, and recording medium
JP2004318564A (en) 2003-04-17 2004-11-11 Dainippon Printing Co Ltd Ic card and ic card program
JP2010262447A (en) 2009-05-01 2010-11-18 Dainippon Printing Co Ltd Ic chip, and data reading method or the like
JP2014099727A (en) 2012-11-14 2014-05-29 Nippon Telegr & Teleph Corp <Ntt> Key sharing system, key sharing method, and program
US20190095604A1 (en) 2017-09-05 2019-03-28 iStorage Limited Methods and systems of securely transferring data
JP2019068413A (en) 2017-09-05 2019-04-25 アイストレージ リミテッド Method and system fo transferring data safely

Also Published As

Publication number Publication date
JP2020197832A (en) 2020-12-10

Similar Documents

Publication Publication Date Title
JP4763368B2 (en) COMMUNICATION CARD, CONFIDENTIAL INFORMATION PROCESSING SYSTEM, CONFIDENTIAL INFORMATION TRANSFER METHOD, AND PROGRAM
US8677144B2 (en) Secure software and hardware association technique
CN101291224B (en) Method and system for processing data in communication system
CN1985466B (en) Method of delivering direct proof private keys in signed groups to devices using a distribution CD
KR101546204B1 (en) Host device, semiconductor memory device, and authentication method
WO2018090763A1 (en) Method and device for configuring terminal master key
US20130124854A1 (en) Authenticator
US20080148062A1 (en) Method for the secure storing of program state data in an electronic device
US11405202B2 (en) Key processing method and apparatus
CN111401901B (en) Authentication method and device of biological payment device, computer device and storage medium
US20170353315A1 (en) Secure electronic entity, electronic apparatus and method for verifying the integrity of data stored in such a secure electronic entity
US11516194B2 (en) Apparatus and method for in-vehicle network communication
JP2007173999A (en) Authentication system and device to be authenticated
CN101770559A (en) Data protecting device and data protecting method
US11128455B2 (en) Data encryption method and system using device authentication key
CN115208705A (en) Encryption and decryption method and device based on link data self-adaptive adjustment
EP2701101B1 (en) Information processing devices and information processing methods
JP7170588B2 (en) Data processing method and data processing system
JP2003158513A (en) Ic card, its writing method and apparatus, and ic card system
CN111542050B (en) TEE-based method for guaranteeing remote initialization safety of virtual SIM card
CN114223176B (en) Certificate management method and device
CN107682147B (en) Security management method and system for smart card chip operating system file
CN113343215A (en) Embedded software authorization and authentication method and electronic equipment
CN115361140B (en) Method and device for verifying security chip key
CN117118613B (en) Whole vehicle instrument data security protection method, equipment and readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211008

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220722

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220726

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220922

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20221004

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221101

R150 Certificate of patent or registration of utility model

Ref document number: 7170588

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150