JP2011150560A - System and method for protecting software, software conversion method and program - Google Patents

System and method for protecting software, software conversion method and program Download PDF

Info

Publication number
JP2011150560A
JP2011150560A JP2010011660A JP2010011660A JP2011150560A JP 2011150560 A JP2011150560 A JP 2011150560A JP 2010011660 A JP2010011660 A JP 2010011660A JP 2010011660 A JP2010011660 A JP 2010011660A JP 2011150560 A JP2011150560 A JP 2011150560A
Authority
JP
Japan
Prior art keywords
software
terminal
tamper resistant
variable
result
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
JP2010011660A
Other languages
Japanese (ja)
Inventor
Kazuhide Fukushima
和英 福島
Shinsaku Kiyomoto
晋作 清本
Toshiaki Tanaka
俊昭 田中
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.)
KDDI Corp
Original Assignee
KDDI 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 KDDI Corp filed Critical KDDI Corp
Priority to JP2010011660A priority Critical patent/JP2011150560A/en
Publication of JP2011150560A publication Critical patent/JP2011150560A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To safely execute software on a terminal by cooperating the terminal storing the software with a tamper resistant device. <P>SOLUTION: The terminal processes only encoded data on a program and transmits a processing result to the tamper resistant device. The tamper resistant device verifies the received processing result, and when the processing result is valid, performs decoding processing and transmits the decoded result to the terminal. Then, the software in the terminal outputs a value received from the tamper resistant device as a result. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、ソフトウェアを格納する端末と耐タンパ装置とを連携させて、端末に格納されたソフトウェアを保護するソフトウェア保護システム、ソフトウェア保護方法、ソフトウェア変換方法およびプログラムに関する。   The present invention relates to a software protection system, a software protection method, a software conversion method, and a program for protecting software stored in a terminal by linking a terminal that stores software and a tamper resistant device.

ソフトウェアには、価値のあるアルゴリズムおよびコンテンツの暗号鍵等、利用者に対して秘密にすべき情報が含まれる場合がある。一方では、ソフトウェアを解析するための技術(RE:Reverse Engineering)が数多く開発されている。このため、これらの技術によりソフトウェアが解析されると、不正者が秘密情報を入手するという脅威が考えられる。この脅威に対し、ソフトウェアの仕様を保ったまま、ソフトウェアの解析を困難にする難読化という技術がある。   The software may include information that should be kept secret to the user, such as valuable algorithms and content encryption keys. On the other hand, many techniques (RE: Reverse Engineering) for analyzing software have been developed. For this reason, when software is analyzed by these techniques, there is a threat that an unauthorized person obtains confidential information. For this threat, there is a technique called obfuscation that makes it difficult to analyze software while keeping the software specifications.

この一例として、プログラム中の変数を演算装置によって線形変換して符号化を施す符号化方法であって、符号化を施すn個(但し、nは正整数)の変数を任意に選択し、m×nの行列(但し、mは、m≧nの正整数)およびm次元の任意のベクトルを生成する。そして、生成した行列およびベクトルを変換鍵として前記n個の変数を線形変換して同時にm個の整数に符号化する。これにより、元のプログラムで用いられている変数の個数、ならびに当該変数間の参照・代入関係を秘匿し、かつ、秘密鍵の候補数を多くして耐性の高いプログラムの難読化を行う技術が開示されている(例えば、特許文献1参照。)。   As an example of this, there is an encoding method in which a variable in a program is linearly converted by an arithmetic unit and encoded, and n variables (where n is a positive integer) to be encoded are arbitrarily selected, and m An xn matrix (where m is a positive integer satisfying m ≧ n) and an arbitrary vector of m dimensions are generated. Then, using the generated matrix and vector as conversion keys, the n variables are linearly converted and simultaneously encoded into m integers. This makes it possible to conceal the number of variables used in the original program and the reference / substitution relationship between the variables and obfuscate highly resistant programs by increasing the number of secret key candidates. (For example, refer to Patent Document 1).

また、外部の耐タンパ装置により、実行順序を制御してプログラムの難読化を行うことも考えられる。   It is also conceivable to obfuscate the program by controlling the execution order with an external tamper resistant device.

特開2006−079347号公報JP 2006-079347 A

しかしながら、前者の方法では、端末上のソフトウェア単体を変換する方法であるため、実行に必要なデータがすべてソフトウェア自身に含まれ、不正コピーの防止には、有効ではないという問題がある。一方で、後者の方法では、ソフトウェア単体では、動作しないため、不正コピーの防止には適用できるが、耐タンパ装置が保持する処理の実行順序は、固定データであるため、ソフトウェアの任意の箇所に特定の文字列を出力する命令を追加し実行することにより、処理順序が攻撃者に露呈する可能性がある。   However, since the former method is a method of converting a single piece of software on a terminal, all the data necessary for execution is included in the software itself, and there is a problem that it is not effective in preventing unauthorized copying. On the other hand, in the latter method, the software alone does not operate, so it can be applied to prevent unauthorized copying. However, the execution order of the processing held by the tamper resistant device is fixed data, so it can be applied to any part of the software. By adding and executing a command for outputting a specific character string, the processing order may be exposed to the attacker.

そこで、本発明は、上述の課題に鑑みてなされたものであり、ソフトウェアを格納する端末と耐タンパ装置とを連携させることにより、端末上のソフトウェアを安全に実行できるソフトウェア保護システム、ソフトウェア保護方法、ソフトウェア変換方法およびプログラムを提供することを目的とする。   Accordingly, the present invention has been made in view of the above-described problems, and a software protection system and a software protection method capable of safely executing software on a terminal by linking a terminal that stores software and a tamper-resistant device. An object of the present invention is to provide a software conversion method and program.

本発明は、上記の課題を解決するために以下の事項を提案している。   The present invention proposes the following items in order to solve the above problems.

(1)本発明は、端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムであって、前記端末が、前記ソフトウェア上の符号化されたデータのみを処理する処理手段と、該処理結果を前記耐タンパ装置に送信する処理結果送信手段と、を備え、前記耐タンパ装置が、前記受信した処理結果を検証する検証手段と、該処理結果が正当であるときに、復号処理を行う復号処理手段と、該復号処理を行った結果を前記端末に送信する復号処理結果送信手段と、を備え、前記端末内のソフトウェアが、前記耐タンパ装置から受信した値を結果として出力することを特徴とするソフトウェア保護システムを提案している。   (1) The present invention is a software protection system for protecting software that includes a terminal and a tamper-proof device, operates on the terminal, and returns a calculation result as a numerical value. Processing means for processing only the converted data, and processing result transmission means for transmitting the processing result to the tamper resistant apparatus, and the tamper resistant apparatus verifies the received processing result, A decoding processing means for performing a decoding process when the processing result is valid, and a decoding process result transmitting means for transmitting the result of the decoding process to the terminal, wherein the software in the terminal includes A software protection system is proposed that outputs the value received from the tamper resistant device as a result.

この発明によれば、端末の処理手段は、ソフトウェア上の符号化されたデータのみを処理する。端末の処理結果送信手段は、その処理結果を耐タンパ装置に送信する。耐タンパ装置の検証手段は、受信した処理結果を検証する。耐タンパ装置の復号処理手段は、その処理結果が正当であるときに、復号処理を行う。耐タンパ装置の復号処理結果送信手段は、その復号処理を行った結果を端末に送信する。そして、端末内のソフトウェアは、耐タンパ装置から受信した値を結果として出力する。したがって、端末上のソフトウェアは、符号化されたデータのみを処理するため、安全性が向上する。また、ソフトウェアと耐タンパ装置間でやりとりされるデータは、入力に依存して異なるため、ソフトウェアを動作させて通信内容を盗聴する攻撃に対しても耐性を持つ。さらに、ソフトウェア単体では動作しないため、ソフトウェアの不正コピーの防止に関しても有効である。   According to the present invention, the processing means of the terminal processes only the encoded data on the software. The processing result transmission means of the terminal transmits the processing result to the tamper resistant device. The verification means of the tamper resistant device verifies the received processing result. The decryption processing means of the tamper resistant apparatus performs decryption processing when the processing result is valid. The decoding process result transmission means of the tamper resistant apparatus transmits the result of the decoding process to the terminal. Then, the software in the terminal outputs the value received from the tamper resistant device as a result. Therefore, since the software on the terminal processes only the encoded data, the safety is improved. In addition, since the data exchanged between the software and the tamper-resistant device differs depending on the input, the data is resistant to an attack that eavesdrops on communication contents by operating the software. Furthermore, since the software alone does not operate, it is effective in preventing unauthorized copying of software.

(2)本発明は、(1)のソフトウェア保護システムについて、前記耐タンパ装置の検証手段が、符号化されたデータを格納するための変数が所定の関係式を満たすか否かを検証することを特徴とするソフトウェア保護システムを提案している。   (2) In the software protection system according to (1), the verification means of the tamper resistant apparatus verifies whether or not the variable for storing the encoded data satisfies a predetermined relational expression. We propose a software protection system characterized by

この発明によれば、耐タンパ装置の検証手段が、符号化されたデータを格納するための変数が所定の関係式を満たすか否かを検証する。一般に、耐タンパ装置は、入力が正当なものであるか否かを検証する必要があるが、端末上のソフトウェアに存在するすべてのデータを解析可能と仮定すると、ソフトウェアと耐タンパ装置との間で、認証鍵を安全に共有することは不可能であるが、本発明によれば、耐タンパ装置に入力されるデータの正当性を正確に検証することができる。   According to this invention, the verification means of the tamper resistant apparatus verifies whether or not the variable for storing the encoded data satisfies the predetermined relational expression. In general, a tamper resistant device needs to verify whether the input is valid or not. However, assuming that all data existing in the software on the terminal can be analyzed, the tamper resistant device is not connected between the software and the tamper resistant device. Thus, it is impossible to securely share the authentication key, but according to the present invention, it is possible to accurately verify the validity of the data input to the tamper resistant device.

(3)本発明は、端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムであって、前記端末が、前記ソフトウェアを変換する変換手段と、該変換したソフトウェアを送信する変換ソフトウェア送信手段と、を備え、前記耐タンパ装置が、受信したソフトウェアからすべての符号化変数を取得する取得手段と、該取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する検証手段と、正当である場合に、変数の値を復号する復号手段と、該復号した値を前記端末内のソフトウェアに返送する返送手段と、を備えたことを特徴とするソフトウェア保護システムを提案している。   (3) The present invention is a software protection system for protecting software that includes a terminal and a tamper-proof device, operates on the terminal, and returns a calculation result as a numerical value. The terminal converts the software. Conversion means, and conversion software transmission means for transmitting the converted software, wherein the tamper resistant apparatus acquires all the encoded variables from the received software, and all the acquired encoded variables Depending on whether or not the non-trivial relational expression is satisfied, a verification means for verifying the correctness, a decoding means for decoding the value of the variable if it is valid, and the decoded value to the software in the terminal The present invention proposes a software protection system including a return means for returning.

この発明によれば、端末の変換手段は、ソフトウェアを変換する。端末の変換ソフトウェア送信手段は、変換したソフトウェアを送信する。耐タンパ装置の取得手段は、受信したソフトウェアからすべての符号化変数を取得する。耐タンパ装置の検証手段は、取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する。耐タンパ装置の復号手段は、正当である場合に、変数の値を復号する。耐タンパ装置の返送手段は、復号した値を端末内のソフトウェアに返送する。したがって、ソフトウェアを変換することによって、ソフトウェアを格納する端末と耐タンパ装置とを連携させ、端末上のソフトウェアを安全に実行できる。   According to this invention, the conversion means of the terminal converts software. The converted software transmission means of the terminal transmits the converted software. The acquisition means of the tamper resistant device acquires all the encoding variables from the received software. The tamper resistant device verification means verifies the validity of all the obtained encoded variables depending on whether or not the non-trivial relational expression is satisfied. The decoding means of the tamper resistant device decodes the value of the variable when it is valid. The return means of the tamper resistant device returns the decrypted value to the software in the terminal. Therefore, by converting the software, the terminal storing the software and the tamper resistant apparatus can be linked to execute the software on the terminal safely.

(4)本発明は、(3)のソフトウェア保護システムについて、前記変換手段が、符号化の対象となる変数を選択する選択手段と、該選択した符号化変数からm個の符号化変数を決定する符号化変数決定手段と、符号化ルールおよび復号化ルールを決定するルール決定手段と、ソフトウェア内の符号化変数を他の符号化変数に置き換える置き換え手段と、変換したソフトウェアを正しく実行できるように修正する修正手段と、を備えたことを特徴とするソフトウェア保護システムを提案している。   (4) According to the present invention, in the software protection system of (3), the converting unit selects a variable to be encoded, and determines m encoded variables from the selected encoded variable. An encoding variable determining means that performs encoding, a rule determining means that determines an encoding rule and a decoding rule, a replacement means that replaces the encoding variable in the software with another encoding variable, and the converted software so that it can be executed correctly The present invention proposes a software protection system including a correcting means for correcting.

この発明によれば、選択手段は、符号化の対象となる変数を選択し、符号化変数決定手段は、選択した符号化変数からm個の符号化変数を決定する。そして、ルール決定手段が、符号化ルールおよび復号化ルールを決定し、置き換え手段が、ソフトウェア内の符号化変数を他の符号化変数に置き換え、修正手段が変換したソフトウェアを正しく実行できるように修正する。したがって、ソフトウェアを変換することによって、ソフトウェアを格納する端末と耐タンパ装置とを連携させ、端末上のソフトウェアを安全に実行できる。   According to this invention, the selection means selects a variable to be encoded, and the encoding variable determination means determines m encoding variables from the selected encoding variable. Then, the rule determining unit determines the encoding rule and the decoding rule, and the replacing unit replaces the encoding variable in the software with another encoding variable, and the correction unit corrects the converted software so that it can be executed correctly. To do. Therefore, by converting the software, the terminal storing the software and the tamper resistant apparatus can be linked to execute the software on the terminal safely.

(5)本発明は、(4)のソフトウェア保護システムについて、前記置き換え手段が、代入が行われている対象変数を置換する第1の置換手段と、参照が行われている対象変数を置換する第2の置換手段と、を備えたことを特徴とするソフトウェア保護システムを提案している。   (5) According to the present invention, in the software protection system of (4), the replacement unit replaces the first replacement unit that replaces the target variable to which the substitution is performed, and the target variable to which the reference is performed. And a software protection system characterized by comprising a second replacement means.

この発明によれば、第1の置換手段は、代入が行われている対象変数を置換し、第2の置換手段は、参照が行われている対象変数を置換する。これにより、効果的に難読化を実行することができる。   According to this invention, the first replacement unit replaces the target variable for which substitution is performed, and the second replacement unit replaces the target variable for which reference is performed. Thereby, obfuscation can be performed effectively.

(6)本発明は、(4)のソフトウェア保護システムについて、前記修正手段が、符号化変数およびこれらの変数の値を退避するための一次変数の定義を追加する追加手段と、前記第1の置換手段で置換した代入命令を実行できる命令列に変換する変換手段と、実行結果を出力する命令の直前に、前記耐タンパ装置に符号化変数の値を送付し、復号した変数の値を取得する命令を追加する命令追加手段と、を備えたことを特徴とするソフトウェア保護システムを提案している。   (6) In the software protection system according to (4), the correction unit includes an adding unit that adds a definition of a primary variable for saving an encoding variable and values of these variables, and the first A conversion unit that converts the substitution instruction replaced by the replacement unit into an instruction sequence that can be executed, and an encoded variable value is sent to the tamper resistant device immediately before the instruction that outputs the execution result, and the decoded variable value is obtained And a software protection system characterized by comprising a command adding means for adding a command to be executed.

この発明によれば、追加手段は、符号化変数およびこれらの変数の値を退避するための一次変数の定義を追加し、変換手段は、第1の置換手段で置換した代入命令を実行できる命令列に変換する。そして、命令追加手段は、実行結果を出力する命令の直前に、耐タンパ装置に符号化変数の値を送付し、復号した変数の値を取得する命令を追加する。したがって、この処理により、難読化を図りつつ、実行可能なソフトウェアとすることができる。   According to this invention, the adding means adds the definitions of the primary variables for saving the encoded variables and the values of these variables, and the converting means is an instruction that can execute the assignment instruction replaced by the first replacing means. Convert to column. The instruction adding means sends the value of the encoded variable to the tamper resistant apparatus immediately before the instruction that outputs the execution result, and adds an instruction for acquiring the value of the decoded variable. Therefore, by this processing, it is possible to obtain executable software while obfuscating.

(7)本発明は、(1)から(6)のソフトウェア保護システムについて、前記耐タンパ装置がCPUであることを特徴とするソフトウェア保護システムを提案している。   (7) The present invention proposes a software protection system according to (1) to (6), wherein the tamper resistant device is a CPU.

この発明によれば、耐タンパ装置がCPUである。したがって、最も簡便な装置として、CPUを耐タンパ装置として用いることができる。   According to the present invention, the tamper resistant device is a CPU. Therefore, the CPU can be used as a tamper resistant device as the simplest device.

(8)本発明は、端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法であって、前記端末が、前記プログラム上の符号化されたデータのみを処理する第1のステップと、前記端末が、該処理結果を前記耐タンパ装置に送信する第2のステップと、前記耐タンパ装置が、前記受信した処理結果を検証する第3のステップと、前記耐タンパ装置が、該処理結果が正当であるときに、復号処理を行う第4のステップと、前記耐タンパ装置が、該復号処理を行った結果を前記端末に送信する第5のステップと、前記端末内のソフトウェアが、前記耐タンパ装置から受信した値を結果として出力する第5のステップと、を備えたことを特徴とするソフトウェア保護方法を提案している。   (8) The present invention is a software protection method in a software protection system for protecting software that includes a terminal and a tamper-proof device, operates on the terminal, and returns a calculation result as a numerical value. A first step of processing only encoded data on a program; a second step of the terminal transmitting the processing result to the tamper resistant device; and a processing result received by the tamper resistant device. A third step of verifying the above, a fourth step in which the tamper resistant apparatus performs a decoding process when the processing result is valid, and a result of the decoding process performed by the tamper resistant apparatus in the A fifth step of transmitting to the terminal, and a fifth step in which the software in the terminal outputs the value received from the tamper resistant device as a result. It has proposed a software protection method that.

この発明によれば、端末が、プログラム上の符号化されたデータのみを処理し、端末が、処理結果を耐タンパ装置に送信する。耐タンパ装置は、受信した処理結果を検証し、耐タンパ装置が、処理結果が正当であるときに、復号処理を行い、耐タンパ装置が、復号処理を行った結果を前記端末に送信する。そして、端末内のソフトウェアが、耐タンパ装置から受信した値を結果として出力する。したがって、端末上のソフトウェアは、符号化されたデータのみを処理するため、安全性が向上する。また、ソフトウェアと耐タンパ装置間でやりとりされるデータは、入力に依存して異なるため、ソフトウェアを動作させて通信内容を盗聴する攻撃に対しても耐性を持つ。さらに、ソフトウェア単体では動作しないため、ソフトウェアの不正コピーの防止に関しても有効である。   According to the present invention, the terminal processes only the encoded data on the program, and the terminal transmits the processing result to the tamper resistant apparatus. The tamper resistant device verifies the received processing result, and when the processing result is valid, the tamper resistant device performs a decoding process, and the tamper resistant device transmits the result of the decoding process to the terminal. Then, the software in the terminal outputs the value received from the tamper resistant device as a result. Therefore, since the software on the terminal processes only the encoded data, the safety is improved. In addition, since the data exchanged between the software and the tamper-resistant device differs depending on the input, the data is resistant to an attack that eavesdrops on communication contents by operating the software. Furthermore, since the software alone does not operate, it is effective in preventing unauthorized copying of software.

(9)本発明は、端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法であって、前記端末が、前記ソフトウェアを変換する第1のステップと、前記端末が、該変換したソフトウェアを送信する第2のステップと、前記耐タンパ装置が、受信したソフトウェアからすべての符号化変数を取得する第3のステップと、前記耐タンパ装置が、該取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する第4のステップと、前記耐タンパ装置が、正当である場合に、変数の値を復号する第5のステップと、前記耐タンパ装置が、該復号した値を前記端末内のソフトウェアに返送する第6のステップと、を備えたことを特徴とするソフトウェア保護方法を提案している。   (9) The present invention is a software protection method in a software protection system for protecting software that includes a terminal and a tamper-proof device, operates on the terminal, and returns a calculation result as a numerical value. A first step of converting software; a second step in which the terminal transmits the converted software; and a third step in which the tamper resistant apparatus acquires all encoding variables from the received software. When the tamper resistant device is valid, a fourth step of verifying the validity of the tamper resistant device according to whether or not all the obtained encoded variables satisfy a non-trivial relational expression In addition, a fifth step of decoding the value of the variable, and a sixth step of the tamper resistant apparatus returning the decoded value to the software in the terminal, It has proposed a software protection method which is characterized in that there was example.

この発明によれば、端末が、ソフトウェアを変換し、端末が、変換したソフトウェアを送信する。耐タンパ装置は、受信したソフトウェアからすべての符号化変数を取得し、取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証し、正当である場合に、変数の値を復号する。そして、耐タンパ装置が、復号した値を端末内のソフトウェアに返送する。したがって、ソフトウェアを変換することによって、ソフトウェアを格納する端末と耐タンパ装置とを連携させ、端末上のソフトウェアを安全に実行できる。   According to the present invention, the terminal converts the software, and the terminal transmits the converted software. The tamper resistant device acquires all the encoded variables from the received software, verifies the validity by checking whether all the acquired encoded variables satisfy the non-trivial relational expression, and Decode the value of the variable. Then, the tamper resistant device returns the decrypted value to the software in the terminal. Therefore, by converting the software, the terminal storing the software and the tamper resistant apparatus can be linked to execute the software on the terminal safely.

(10)本発明は、端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法をコンピュータに実行させるためのプログラムであって、前記端末が、前記プログラム上の符号化されたデータのみを処理する第1のステップと、前記端末が、該処理結果を前記耐タンパ装置に送信する第2のステップと、前記耐タンパ装置が、前記受信した処理結果を検証する第3のステップと、前記耐タンパ装置が、該処理結果が正当であるときに、復号処理を行う第4のステップと、前記耐タンパ装置が、該復号処理を行った結果を前記端末に送信する第5のステップと、前記端末内のソフトウェアが、前記耐タンパ装置から受信した値を結果として出力する第5のステップと、をコンピュータに実行させるためのプログラムを提案している。   (10) The present invention is a program for causing a computer to execute a software protection method in a software protection system for protecting software that includes a terminal and a tamper-proof device and that operates on the terminal and returns a calculation result as a numerical value. A first step in which the terminal processes only the encoded data on the program; a second step in which the terminal transmits the processing result to the tamper resistant device; and the tamper resistant A third step in which the device verifies the received processing result, a fourth step in which the tamper resistant device performs a decoding process when the processing result is valid, and the tamper resistant device A fifth step of transmitting the result of the decoding process to the terminal, and the software in the terminal outputs the value received from the tamper resistant device as a result A fifth step, the proposed program to be executed by a computer.

この発明によれば、端末が、プログラム上の符号化されたデータのみを処理し、端末が、処理結果を耐タンパ装置に送信する。耐タンパ装置は、受信した処理結果を検証し、耐タンパ装置が、処理結果が正当であるときに、復号処理を行い、耐タンパ装置が、復号処理を行った結果を前記端末に送信する。そして、端末内のソフトウェアが、耐タンパ装置から受信した値を結果として出力する。したがって、端末上のソフトウェアは、符号化されたデータのみを処理するため、安全性が向上する。また、ソフトウェアと耐タンパ装置間でやりとりされるデータは、入力に依存して異なるため、ソフトウェアを動作させて通信内容を盗聴する攻撃に対しても耐性を持つ。さらに、ソフトウェア単体では動作しないため、ソフトウェアの不正コピーの防止に関しても有効である。   According to the present invention, the terminal processes only the encoded data on the program, and the terminal transmits the processing result to the tamper resistant apparatus. The tamper resistant device verifies the received processing result, and when the processing result is valid, the tamper resistant device performs a decoding process, and the tamper resistant device transmits the result of the decoding process to the terminal. Then, the software in the terminal outputs the value received from the tamper resistant device as a result. Therefore, since the software on the terminal processes only the encoded data, the safety is improved. In addition, since the data exchanged between the software and the tamper-resistant device differs depending on the input, the data is resistant to an attack that eavesdrops on communication contents by operating the software. Furthermore, since the software alone does not operate, it is effective in preventing unauthorized copying of software.

(11)本発明は、端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法をコンピュータに実行させるためのプログラムであって、前記端末が、前記ソフトウェアを変換する第1のステップと、前記端末が、該変換したソフトウェアを送信する第2のステップと、前記耐タンパ装置が、受信したソフトウェアからすべての符号化変数を取得する第3のステップと、前記耐タンパ装置が、該取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する第4のステップと、前記耐タンパ装置が、正当である場合に、変数の値を復号する第5のステップと、前記耐タンパ装置が、該復号した値を前記端末内のソフトウェアに返送する第6のステップと、をコンピュータに実行させるためのプログラムを提案している。   (11) The present invention is a program for causing a computer to execute a software protection method in a software protection system for protecting software that includes a terminal and a tamper-proof device, and that operates on the terminal and returns a calculation result as a numerical value. A first step in which the terminal converts the software; a second step in which the terminal transmits the converted software; and the tamper resistant apparatus receives all encoded variables from the received software. A third step of acquiring the anti-tamper device, a fourth step of verifying the validity of the tamper-proof device according to whether or not all of the acquired encoded variables satisfy a non-trivial relational expression, A fifth step of decoding the value of the variable when the tamper device is valid, and the tamper resistant device sends the decoded value to the terminal We propose a program to execute a sixth step of returning to the software, to a computer.

この発明によれば、端末が、ソフトウェアを変換し、端末が、変換したソフトウェアを送信する。耐タンパ装置は、受信したソフトウェアからすべての符号化変数を取得し、取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証し、正当である場合に、変数の値を復号する。そして、耐タンパ装置が、復号した値を端末内のソフトウェアに返送する。したがって、ソフトウェアを変換することによって、ソフトウェアを格納する端末と耐タンパ装置とを連携させ、端末上のソフトウェアを安全に実行できる。   According to the present invention, the terminal converts the software, and the terminal transmits the converted software. The tamper resistant device acquires all the encoded variables from the received software, verifies the validity by checking whether all the acquired encoded variables satisfy the non-trivial relational expression, and Decode the value of the variable. Then, the tamper resistant device returns the decrypted value to the software in the terminal. Therefore, by converting the software, the terminal storing the software and the tamper resistant apparatus can be linked to execute the software on the terminal safely.

本発明によれば、端末上のソフトウェアは、符号化されたデータのみを処理するため、安全性が向上するという効果がある。また、ソフトウェアと耐タンパ装置間でやりとりされるデータは、入力に依存して異なるため、ソフトウェアを動作させて通信内容を盗聴する攻撃に対しても耐性を持つ。さらに、ソフトウェア単体では動作しないため、ソフトウェアの不正コピーの防止に関しても有効である。   According to the present invention, since the software on the terminal processes only encoded data, there is an effect that safety is improved. In addition, since the data exchanged between the software and the tamper-resistant device differs depending on the input, the data is resistant to an attack that eavesdrops on communication contents by operating the software. Furthermore, since the software alone does not operate, it is effective in preventing unauthorized copying of software.

本発明のソフトウェア保護システムの構成を示す図である。It is a figure which shows the structure of the software protection system of this invention. 第1の実施形態に係る端末の構成を示す図である。It is a figure which shows the structure of the terminal which concerns on 1st Embodiment. 第1の実施形態に係る耐タンパ装置の構成を示す図である。It is a figure which shows the structure of the tamper resistant apparatus which concerns on 1st Embodiment. 第1の実施形態に係るソフトウェア保護システムの処理フローである。It is a processing flow of the software protection system which concerns on 1st Embodiment. 第2の実施形態に係る端末の構成を示す図である。It is a figure which shows the structure of the terminal which concerns on 2nd Embodiment. 第2の実施形態に係る耐タンパ装置の構成を示す図である。It is a figure which shows the structure of the tamper resistant apparatus which concerns on 2nd Embodiment. 第2の実施形態に係る変換部の詳細な構成を示す図である。It is a figure which shows the detailed structure of the conversion part which concerns on 2nd Embodiment. 第2の実施形態に係る置き換え部の詳細な構成を示す図である。It is a figure which shows the detailed structure of the replacement part which concerns on 2nd Embodiment. 第2の実施形態に係る修正部の詳細な構成を示す図である。It is a figure which shows the detailed structure of the correction part which concerns on 2nd Embodiment. 第2の実施形態に係るソフトウェア保護システムの処理フローである。It is a processing flow of the software protection system which concerns on 2nd Embodiment. 実施例に係る元のソフトウェアのソースコードを例示した図である。It is the figure which illustrated the source code of the original software which concerns on an Example. 実施例に係る変換されたソフトウェアのソースコードを例示した図である。It is the figure which illustrated the source code of the converted software concerning an example. 実施例に係る耐タンパ装置の処理内容を例示した図である。It is the figure which illustrated the processing content of the tamper resistant apparatus which concerns on an Example.

以下、本発明の実施形態について、図面を用いて、詳細に説明する。
なお、本実施形態における構成要素は適宜、既存の構成要素等との置き換えが可能であり、また、他の既存の構成要素との組合せを含む様々なバリエーションが可能である。したがって、本実施形態の記載をもって、特許請求の範囲に記載された発明の内容を限定するものではない。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
Note that the constituent elements in the present embodiment can be appropriately replaced with existing constituent elements and the like, and various variations including combinations with other existing constituent elements are possible. Therefore, the description of the present embodiment does not limit the contents of the invention described in the claims.

<ソフトウェア保護システムの構成>
図1に示すように、本発明のソフトウェア保護システムは、端末100と、端末上で動作するソフトウェア101と、耐タンパ装置200とから構成されている。このシステムにおいては、端末100と耐タンパ装置200とが連携して、ソフトウェアを保護する。なお、耐タンパ装置200としては、例えば、CPU等を用いてもよい。
<Configuration of software protection system>
As shown in FIG. 1, the software protection system according to the present invention includes a terminal 100, software 101 operating on the terminal, and a tamper resistant apparatus 200. In this system, the terminal 100 and the tamper resistant apparatus 200 cooperate to protect software. As the tamper resistant apparatus 200, for example, a CPU or the like may be used.

<第1の実施形態>
図1から図4を用いて、本発明の第1の実施形態について、説明する。
<First Embodiment>
A first embodiment of the present invention will be described with reference to FIGS.

<端末の構成>
本実施形態に係る端末100は、図2に示すように、処理部102と、処理結果送信部103と、受信部104と、出力部105とから構成されている。
<Terminal configuration>
As illustrated in FIG. 2, the terminal 100 according to the present embodiment includes a processing unit 102, a processing result transmission unit 103, a reception unit 104, and an output unit 105.

処理部102は、ソフトウェア上の符号化されたデータのみを処理する。処理結果送信部103は、処理結果を耐タンパ装置200に送信する。受信部104は、耐タンパ装置200から復号処理結果を受信する。出力部105は、受信した値を結果として出力する。   The processing unit 102 processes only encoded data on software. The processing result transmission unit 103 transmits the processing result to the tamper resistant apparatus 200. The receiving unit 104 receives the decoding process result from the tamper resistant apparatus 200. The output unit 105 outputs the received value as a result.

<耐タンパ装置の構成>
本実施形態に係る耐タンパ装置200は、図3に示すように、受信部201と、検証部202と、復号処理部203と、結果送信部204とから構成されている。
<Configuration of tamper resistant device>
As shown in FIG. 3, the tamper resistant apparatus 200 according to the present embodiment includes a reception unit 201, a verification unit 202, a decryption processing unit 203, and a result transmission unit 204.

受信部201は、端末100での処理結果を受信する。検証部202は、受信した処理結果を検証する。復号処理部203は、処理結果が正当であるときに、復号処理を行う。結果送信部204は、復号処理を行った結果を端末100に送信する。   The receiving unit 201 receives a processing result in the terminal 100. The verification unit 202 verifies the received processing result. The decryption processing unit 203 performs decryption processing when the processing result is valid. The result transmission unit 204 transmits the result of the decoding process to the terminal 100.

<ソフトウェア保護システムの処理>
図4を用いて、本実施形態に係るソフトウェア保護システムの処理について説明する。
<Processing of software protection system>
Processing of the software protection system according to the present embodiment will be described with reference to FIG.

端末100が、ソフトウェア上の符号化されたデータのみを処理し(ステップS101)、その処理結果を耐タンパ装置200に送信する(ステップS102)。   The terminal 100 processes only the encoded data on the software (step S101), and transmits the processing result to the tamper resistant apparatus 200 (step S102).

耐タンパ装置200は、受信した処理結果を検証し(ステップS103)、その処理結果が正当であるときに、復号処理を行う(ステップS104)。また、復号処理を行った結果を端末100に送信する(ステップS105)。一方、端末100内のソフトウェア101が、耐タンパ装置200から受信した値を結果として出力する(ステップS106)。   The tamper resistant apparatus 200 verifies the received processing result (step S103), and performs decryption processing when the processing result is valid (step S104). Further, the result of the decoding process is transmitted to the terminal 100 (step S105). On the other hand, the software 101 in the terminal 100 outputs the value received from the tamper resistant apparatus 200 as a result (step S106).

したがって、本実施形態によれば、端末上のソフトウェアは、符号化されたデータのみを処理するため、安全性が向上する。また、ソフトウェアと耐タンパ装置間でやりとりされるデータは、入力に依存して異なるため、ソフトウェアを動作させて通信内容を盗聴する攻撃に対しても耐性を持つ。さらに、ソフトウェア単体では動作しないため、ソフトウェアの不正コピーの防止に関しても有効である。   Therefore, according to the present embodiment, the software on the terminal processes only the encoded data, so that safety is improved. In addition, since the data exchanged between the software and the tamper-resistant device differs depending on the input, the data is resistant to an attack that eavesdrops on communication contents by operating the software. Furthermore, since the software alone does not operate, it is effective in preventing unauthorized copying of software.

<第2の実施形態>
図5から図9を用いて、本発明の第2の実施形態について説明する。
<Second Embodiment>
A second embodiment of the present invention will be described with reference to FIGS.

<端末の構成>
本実施形態に係る端末100は、図5に示すように、変換部301と、送信部302とから構成されている。
<Terminal configuration>
As illustrated in FIG. 5, the terminal 100 according to the present embodiment includes a conversion unit 301 and a transmission unit 302.

変換部301は、ソフトウェア101を変換する。送信部302は、変換したソフトウェアを送信する。なお、変換部301の処理の詳細については、後述する。   The conversion unit 301 converts the software 101. The transmission unit 302 transmits the converted software. Details of the processing of the conversion unit 301 will be described later.

<耐タンパ装置の構成>
本実施形態に係る耐タンパ装置200は、図6に示すように、取得部401と、検証部402と、復号部403と、返送部404とから構成されている。
<Configuration of tamper resistant device>
As shown in FIG. 6, the tamper resistant apparatus 200 according to the present embodiment includes an acquisition unit 401, a verification unit 402, a decryption unit 403, and a return unit 404.

取得部401は、受信したソフトウェアからすべての符号化変数を取得する。検証部402は、その取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する。   The acquisition unit 401 acquires all the encoded variables from the received software. The verification unit 402 verifies the correctness depending on whether or not all the obtained encoded variables satisfy a non-trivial relational expression.

復号部403は、検証結果が正当である場合に、変数の値を復号する。返送部404は、その復号した値を端末100内のソフトウェア101に返送する。   The decrypting unit 403 decrypts the value of the variable when the verification result is valid. The return unit 404 returns the decrypted value to the software 101 in the terminal 100.

<変換部の内部構成>
図7に示すように、変換部301は、さらに、選択部310と、符号化変数決定部320と、ルール決定部330と、置き換え部340と、修正部350とから構成されている。
<Internal configuration of conversion unit>
As illustrated in FIG. 7, the conversion unit 301 further includes a selection unit 310, an encoding variable determination unit 320, a rule determination unit 330, a replacement unit 340, and a correction unit 350.

なお、以下では、対象ソフトウェアには、N個の変数、x、x、・・・、xが含まれているものとし、変数xに格納される値が実行結果として出力されているものと仮定して、一般性を失わないものとする。また、実行結果を格納する変数が複数存在する場合も、1つの変数に実行結果を格納するソフトウェアが複数存在するものとみなすことで、個々のソフトウェアについて同様に扱うことができる。さらに、以下では、符号化の対象は、すべて32ビットの変数であるとする。 In the following, it is assumed that the target software includes N variables, x 1 , x 2 ,..., X n, and the value stored in the variable x 1 is output as the execution result. It is assumed that there is no loss of generality. Further, even when there are a plurality of variables for storing execution results, it is possible to treat each piece of software in the same way by assuming that there are a plurality of software for storing execution results in one variable. Furthermore, in the following, it is assumed that all the encoding targets are 32-bit variables.

選択部310は、符号化の対象とするn個の変数x、x、・・・、xを選択する。ここで、実行結果が格納される変数xは、符号化対象として選択する必要がある。また、個数nは、任意であり、安全性を高くする場合には、より大きな値を選択し、実行効率を高くする場合には、より小さな値を選択する。但し、以下の変数は、符号化対象から除外するものとする。1)利用者の入力が直接書き込まれる変数。2)アドレス演算子により当該変数のアドレスが取得されている変数。 The selection unit 310 selects n variables x 1 , x 2 ,..., X n to be encoded. Here, the variable x 1 to the execution result is stored, it is necessary to select as the encoding target. The number n is arbitrary, and a larger value is selected when the safety is increased, and a smaller value is selected when the execution efficiency is increased. However, the following variables are excluded from encoding targets. 1) Variable in which user input is directly written. 2) A variable whose address is obtained by an address operator.

符号化変数決定部320は、m個の符号化変数y、y、・・・、yを決定する。ここで、個数mは、符号化対象変数の個数nよりも大きく設定する。なお、安全性を高くする場合には、より大きな値を選択し、実行効率を高くする場合には、より小さな値を選択する。 The encoding variable determination unit 320 determines m encoding variables y 1 , y 2 ,..., Y m . Here, the number m is set larger than the number n of encoding target variables. Note that a larger value is selected to increase safety, and a smaller value is selected to increase execution efficiency.

ルール決定部330は、m行n列のプール行列Aとm次元の整数型ベクトルbを任意に決定する。但し、行列Aは、ランクがnとなるように選択する。行列Aと整数型ベクトルbとにより、以下の関係式数1を構成する。   The rule determining unit 330 arbitrarily determines an m-by-n pool matrix A and an m-dimensional integer vector b. However, the matrix A is selected so that the rank is n. The following relational expression number 1 is constituted by the matrix A and the integer type vector b.

Figure 2011150560
Figure 2011150560

上式の各行を符号化ルールとすると、数2のようになる。   If each row of the above equation is an encoding rule, Equation 2 is obtained.

Figure 2011150560
Figure 2011150560

次に、符号化ルールを未知変数x、x、・・・、xに対する連立方程式とみなし、解くことにより、数3を得る。 Next, the encoding rule is regarded as a simultaneous equation for unknown variables x 1 , x 2 ,..., X n and solved to obtain Equation 3.

Figure 2011150560
Figure 2011150560

この各式を復号ルールとする。なお、上記の連立方程式を解く過程では、n個の符号化ルールが使われる。使われなかった符号化ルールに含まれる変数x、x、・・・、xを復号ルールを用いて符号化変数に置き換えることで、m−n個の非自明な関係式が得られる。ここで、符号化変数y、y、・・・、yは、常にこれらの関係式をみたす。 Each of these expressions is used as a decryption rule. In the process of solving the above simultaneous equations, n coding rules are used. By replacing the variables x 1 , x 2 ,..., X n included in the coding rules that are not used with the coding variables using the decoding rules, mn non-trivial relational expressions are obtained. . Here, the encoding variables y 1 , y 2 ,..., Y m always satisfy these relational expressions.

置き換え部340は、プログラム内の符号化対象変数x、x、・・・、xを、符号化変数y、y、・・・、yで置き換える、まず、代入が行われている変数を符号化変数に置き換え、次に、参照が行われている変数を符号化変数に置き換える、ただし、変数xに格納された実行結果を出力する命令は、ここでの置き換えの対象外とする。 Replacement unit 340, coded variables x 1, x 2 in the program, ..., and x n, encoding the variable y 1, y 2, ..., replaced by y m, first, assignment is performed Is replaced with the encoded variable, and then the variable being referenced is replaced with the encoded variable. However, the instruction that outputs the execution result stored in the variable x 1 is the target of replacement here. It is outside.

具体的には、図8に示す第1の置換部341が代入命令x←fを以下、数4に示す命令に置き換える。 Specifically, the first replacement unit 341 shown in FIG. 8 replaces the assignment instruction x i ← f with the instruction shown in Equation 4 below.

Figure 2011150560
Figure 2011150560

これにより、右辺の関数e、e、・・・、eにおいては、代入が行われる対象変数xが、式fに置換されている。 Thus, the right side of the function e 1, e 2, · · ·, in e m, target variable x i which assignment is performed is replaced in equation f.

また、図8に示す第2の置換部342は、上記の処理で得られた命令列において、参照されている対象変数x、x、・・・、xを、それぞれ、復号ルールd、d、・・・、dで置き換え、式を整理する。 Also, the second replacement unit 342 shown in FIG. 8 converts the target variables x 1 , x 2 ,..., X n referred to in the instruction sequence obtained by the above processing into the decryption rule d. 1, d 2, ···, replaced by d n, to organize the expression.

修正部350は、変換したソフトウェアを正しく実行できるようにするため、修正する。具体的には、図9に示す追加部351が符号化変数y、y、・・・、yおよびこれらの変数の値を退避するための一時変数t、t、・・・、tの定義を追加する。 The correction unit 350 corrects the converted software so that it can be executed correctly. Specifically, the adding unit 351 shown in FIG. 9 stores the encoded variables y 1 , y 2 ,..., Y m and the values of these variables as temporary variables t 1 , t 2 ,. , T m definition is added.

また、図9に示す変換部352は、第1の置換部341で変換した命令を逐次実行できる命令列に変換する。つまり、数5に示す命令列を数6に示す命令列に変更する。このように、更新前の符号化変数の値を一時変数に退避しておくことで、更新後の符号化変数の値を順次計算できる。ここで、関数e´、e´、・・・、e´は、それぞれ、関数e、e、・・・、eにおいて、符号化変数y、y、・・・、yを一時変数t、t、・・・、tで置き換えたものである。 Also, the conversion unit 352 illustrated in FIG. 9 converts the instruction converted by the first replacement unit 341 into an instruction sequence that can be sequentially executed. That is, the instruction sequence shown in Equation 5 is changed to the instruction sequence shown in Equation 6. In this way, by saving the value of the encoded variable before update in the temporary variable, the value of the encoded variable after update can be calculated sequentially. Here, the function e 1 ', e 2', ···, e m ' , respectively, the function e 1, e 2, · · ·, in e m, encoded variables y 1, y 2, · · · , Y m are replaced with temporary variables t 1 , t 2 ,..., T m .

Figure 2011150560
Figure 2011150560

Figure 2011150560
Figure 2011150560

さらに、図9に示す命令追加部353は、実行結果を出力する命令の直前に、耐タンパ装置に符号化変数y、y、・・・、yの値を送付し、復号した変数xの値を取得する命令を追加する。 Furthermore, instruction adding unit 353 shown in FIG. 9, the execution result to the immediately preceding instruction for outputting, coding variables y 1, y 2 in the tamper-resistant device, ..., and sends the value of y m, decoded variable to add a command to retrieve the value of x 1.

<ソフトウェア保護システムの処理>
図10を用いて、本実施形態に係るソフトウェア保護システムの処理について説明する。
<Processing of software protection system>
Processing of the software protection system according to the present embodiment will be described using FIG.

端末100が、ソフトウェア101を変換し(ステップS201)、その変換したソフトウェアを送信する(ステップS202)。   The terminal 100 converts the software 101 (step S201), and transmits the converted software (step S202).

耐タンパ装置200は、受信したソフトウェアからすべての符号化変数を取得し(ステップS203)、その取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する(ステップS204)。そして、正当である場合に、変数の値を復号し(ステップS205)、該復号した値を端末100内のソフトウェア101に返送する(ステップS206)。   The tamper resistant apparatus 200 acquires all the encoded variables from the received software (step S203), and verifies the correctness depending on whether or not all the acquired encoded variables satisfy the non-trivial relational expression. (Step S204). If it is valid, the value of the variable is decrypted (step S205), and the decrypted value is returned to the software 101 in the terminal 100 (step S206).

したがって、本実施形態によれば、ソフトウェアを変換することによって、ソフトウェアを格納する端末と耐タンパ装置とを連携させ、端末上のソフトウェアを安全に実行できる。   Therefore, according to the present embodiment, by converting the software, the terminal storing the software and the tamper resistant device can be linked to execute the software on the terminal safely.

<実施例>
実施例として、フィボナッチ数列の第n項を求めるプログラムを対象として、ソースコードの変換例を示す。ここで、図11は、変換前のソースコードであり、変換後のソース
コードを図12に、耐タンパ装置における処理内容(C言語による擬似コード)を図13に示す。
<Example>
As an embodiment, a source code conversion example will be shown for a program for obtaining the nth term of the Fibonacci sequence. Here, FIG. 11 shows the source code before conversion, FIG. 12 shows the source code after conversion, and FIG. 13 shows the processing content (pseudo code in C language) in the tamper resistant apparatus.

ここで、変数の符号化に用いたルールは、数7に示すとおりであり、符号化変数は、数8に示す関係式を満たす。ここで、耐タンパ装置は、ソフトウェアから受け取った符号化変数の値がこの関係式を満たすことを確認し、満たしている場合にのみ正当な復号処理を行う。   Here, the rules used for encoding the variables are as shown in Expression 7, and the encoding variables satisfy the relational expression shown in Expression 8. Here, the tamper resistant apparatus confirms that the value of the encoding variable received from the software satisfies this relational expression, and performs a valid decoding process only when the relational expression is satisfied.

Figure 2011150560
Figure 2011150560

Figure 2011150560
Figure 2011150560

なお、ソフトウェア保護システムの処理をコンピュータ読み取り可能な記録媒体に記録し、この記録媒体に記録されたプログラムを端末および耐タンパ装置に読み込ませ、実行することによって本発明のソフトウェア保護システムを実現することができる。ここでいうコンピュータシステムとは、OSや周辺装置等のハードウェアを含む。   Note that the software protection system of the present invention is realized by recording the processing of the software protection system on a computer-readable recording medium, causing the terminal and the tamper-proof device to read and execute the program recorded on the recording medium. Can do. The computer system here includes an OS and hardware such as peripheral devices.

また、「コンピュータシステム」は、WWW(World Wide Web)システムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されても良い。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。   Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW (World Wide Web) system is used. The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.

また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組合せで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。   The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.

以上、この発明の実施形態につき、図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the embodiments, and includes designs and the like that do not depart from the gist of the present invention.

100;端末
101;ソフトウェア
102;処理部
103;処理結果送信部
104;受信部
105;出力部
200;耐タンパ装置
201;受信部
202;検証部
203;復号処理部
204;結果送信部
301;変換部
302;送信部
310;選択部
320;符号化変数決定部
330;ルール決定部
340;置き換え部
341;第1の置換部
342;第2の置換部
350;修正部
351;追加部
352;変換部
353;命令追加部
401;取得部
402;検証部
403;復号部
404;返送部
DESCRIPTION OF SYMBOLS 100; Terminal 101; Software 102; Processing part 103; Processing result transmission part 104; Reception part 105; Output part 200; Tamper-proof device 201; Reception part 202; Verification part 203; Decoding processing part 204; Unit 302; transmission unit 310; selection unit 320; coding variable determination unit 330; rule determination unit 340; replacement unit 341; first replacement unit 342; second replacement unit 350; correction unit 351; addition unit 352; Unit 353; instruction addition unit 401; acquisition unit 402; verification unit 403; decryption unit 404; return unit

Claims (11)

端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムであって、
前記端末が、
前記ソフトウェア上の符号化されたデータのみを処理する処理手段と、
該処理結果を前記耐タンパ装置に送信する処理結果送信手段と、
を備え、
前記耐タンパ装置が、
前記受信した処理結果を検証する検証手段と、
該処理結果が正当であるときに、復号処理を行う復号処理手段と、
該復号処理を行った結果を前記端末に送信する復号処理結果送信手段と、
を備え、
前記端末内のソフトウェアが、前記耐タンパ装置から受信した値を結果として出力することを特徴とするソフトウェア保護システム。
A software protection system for protecting software that consists of a terminal and a tamper-proof device, operates on the terminal, and returns the calculation result as a numerical value.
The terminal is
Processing means for processing only encoded data on the software;
Processing result transmitting means for transmitting the processing result to the tamper resistant apparatus;
With
The tamper resistant device is
Verification means for verifying the received processing result;
Decryption processing means for performing decryption processing when the processing result is valid;
Decoding processing result transmitting means for transmitting the result of the decoding processing to the terminal;
With
The software in the terminal outputs the value received from the tamper resistant device as a result.
前記耐タンパ装置の検証手段が、符号化されたデータを格納するための変数が所定の関係式を満たすか否かを検証することを特徴とする請求項1に記載のソフトウェア保護システム。   2. The software protection system according to claim 1, wherein the tamper resistant device verification means verifies whether or not a variable for storing encoded data satisfies a predetermined relational expression. 端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムであって、
前記端末が、
前記ソフトウェアを変換する変換手段と、
該変換したソフトウェアを送信する変換ソフトウェア送信手段と、
を備え、
前記耐タンパ装置が、
受信したソフトウェアからすべての符号化変数を取得する取得手段と、
該取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する検証手段と、
正当である場合に、変数の値を復号する復号手段と、
該復号した値を前記端末内のソフトウェアに返送する返送手段と、
を備えたことを特徴とするソフトウェア保護システム。
A software protection system for protecting software that consists of a terminal and a tamper-proof device, operates on the terminal, and returns the calculation result as a numerical value.
The terminal is
Conversion means for converting the software;
Conversion software transmission means for transmitting the converted software;
With
The tamper resistant device is
An acquisition means for acquiring all encoding variables from the received software;
Verification means for verifying the correctness according to whether or not all the obtained encoded variables satisfy a non-trivial relational expression;
Decryption means for decrypting the value of the variable if it is valid;
Return means for returning the decrypted value to the software in the terminal;
A software protection system characterized by comprising:
前記変換手段が、
符号化の対象となる変数を選択する選択手段と、
該選択した符号化変数からm個の符号化変数を決定する符号化変数決定手段と、
符号化ルールおよび復号化ルールを決定するルール決定手段と、
ソフトウェア内の符号化変数を他の符号化変数に置き換える置き換え手段と、
変換したソフトウェアを正しく実行できるように修正する修正手段と、
を備えたことを特徴とする請求項3に記載のソフトウェア保護システム。
The converting means is
A selection means for selecting a variable to be encoded;
Encoding variable determining means for determining m encoding variables from the selected encoding variable;
Rule determining means for determining an encoding rule and a decoding rule;
Replacement means for replacing the encoded variable in the software with another encoded variable;
Correction means for correcting the converted software so that it can be executed correctly,
The software protection system according to claim 3, further comprising:
前記置き換え手段が、
代入が行われている対象変数を置換する第1の置換手段と、
参照が行われている対象変数を置換する第2の置換手段と、
を備えたことを特徴とする請求項4に記載のソフトウェア保護システム。
The replacement means comprises:
First replacement means for replacing a target variable for which substitution is performed;
A second replacement means for replacing the target variable being referred to;
The software protection system according to claim 4, further comprising:
前記修正手段が、
符号化変数およびこれらの変数の値を退避するための一次変数の定義を追加する追加手段と、
前記第1の置換手段で置換した代入命令を実行できる命令列に変換する変換手段と、
実行結果を出力する命令の直前に、前記耐タンパ装置に符号化変数の値を送付し、復号した変数の値を取得する命令を追加する命令追加手段と、
を備えたことを特徴とする請求項4に記載のソフトウェア保護システム。
The correcting means is
Additional means for adding encoding variables and primary variable definitions for saving the values of these variables;
Conversion means for converting the substitution instruction substituted by the first substitution means into an instruction sequence that can be executed;
Instruction adding means for sending an encoded variable value to the tamper resistant device and adding an instruction for acquiring a decoded variable value immediately before the instruction for outputting the execution result;
The software protection system according to claim 4, further comprising:
前記耐タンパ装置がCPUであることを特徴とする請求項1から請求項6に記載のソフトウェア保護システム。   7. The software protection system according to claim 1, wherein the tamper resistant device is a CPU. 端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法であって、
前記端末が、前記ソフトウェア上の符号化されたデータのみを処理する第1のステップと、
前記端末が、該処理結果を前記耐タンパ装置に送信する第2のステップと、
前記耐タンパ装置が、前記受信した処理結果を検証する第3のステップと、
前記耐タンパ装置が、該処理結果が正当であるときに、復号処理を行う第4のステップと、
前記耐タンパ装置が、該復号処理を行った結果を前記端末に送信する第5のステップと、
前記端末内のソフトウェアが、前記耐タンパ装置から受信した値を結果として出力する第6のステップと、
を備えたことを特徴とするソフトウェア保護方法。
A software protection method in a software protection system for protecting software consisting of a terminal and a tamper-proof device, operating on the terminal, and returning a calculation result as a numerical value,
A first step in which the terminal processes only encoded data on the software;
A second step in which the terminal transmits the processing result to the tamper resistant device;
A third step in which the tamper resistant device verifies the received processing result;
A fourth step in which the tamper resistant apparatus performs a decoding process when the processing result is valid;
A fifth step in which the tamper resistant apparatus transmits a result of the decoding process to the terminal;
A sixth step in which the software in the terminal outputs the value received from the tamper resistant device as a result;
A software protection method comprising:
端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法であって、
前記端末が、前記ソフトウェアを変換する第1のステップと、
前記端末が、該変換したソフトウェアを送信する第2のステップと、
前記耐タンパ装置が、受信したソフトウェアからすべての符号化変数を取得する第3のステップと、
前記耐タンパ装置が、該取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する第4のステップと、
前記耐タンパ装置が、正当である場合に、変数の値を復号する第5のステップと、
前記耐タンパ装置が、該復号した値を前記端末内のソフトウェアに返送する第6のステップと、
を備えたことを特徴とするソフトウェア保護方法。
A software protection method in a software protection system for protecting software consisting of a terminal and a tamper-proof device, operating on the terminal, and returning a calculation result as a numerical value,
A first step in which the terminal converts the software;
A second step in which the terminal transmits the converted software;
A third step in which the tamper resistant device acquires all encoding variables from the received software;
A fourth step in which the tamper resistant apparatus verifies the correctness according to whether or not all the obtained encoded variables satisfy a non-trivial relational expression;
A fifth step of decoding the value of the variable if the tamper resistant device is valid;
A sixth step in which the tamper resistant device returns the decrypted value to software in the terminal;
A software protection method comprising:
端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法をコンピュータに実行させるためのプログラムであって、
前記端末が、前記プログラム上の符号化されたデータのみを処理する第1のステップと、
前記端末が、該処理結果を前記耐タンパ装置に送信する第2のステップと、
前記耐タンパ装置が、前記受信した処理結果を検証する第3のステップと、
前記耐タンパ装置が、該処理結果が正当であるときに、復号処理を行う第4のステップと、
前記耐タンパ装置が、該復号処理を行った結果を前記端末に送信する第5のステップと、
前記端末内のソフトウェアが、前記耐タンパ装置から受信した値を結果として出力する第5のステップと、
をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute a software protection method in a software protection system for protecting software that consists of a terminal and a tamper-proof device, operates on the terminal, and returns a calculation result as a numerical value,
A first step in which the terminal processes only encoded data on the program;
A second step in which the terminal transmits the processing result to the tamper resistant device;
A third step in which the tamper resistant device verifies the received processing result;
A fourth step in which the tamper resistant apparatus performs a decoding process when the processing result is valid;
A fifth step in which the tamper resistant apparatus transmits a result of the decoding process to the terminal;
A fifth step in which the software in the terminal outputs the value received from the tamper resistant device as a result;
A program that causes a computer to execute.
端末と耐タンパ装置とからなり、端末上で動作し、演算結果を数値で返すソフトウェアを保護するためのソフトウェア保護システムにおけるソフトウェア保護方法をコンピュータに実行させるためのプログラムであって、
前記端末が、前記ソフトウェアを変換する第1のステップと、
前記端末が、該変換したソフトウェアを送信する第2のステップと、
前記耐タンパ装置が、受信したソフトウェアからすべての符号化変数を取得する第3のステップと、
前記耐タンパ装置が、該取得したすべての符号化変数が非自明な関係式を満たすか否かにより、その正当性を検証する第4のステップと、
前記耐タンパ装置が、正当である場合に、変数の値を復号する第5のステップと、
前記耐タンパ装置が、該復号した値を前記端末内のソフトウェアに返送する第6のステップと、
をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute a software protection method in a software protection system for protecting software that consists of a terminal and a tamper-proof device, operates on the terminal, and returns a calculation result as a numerical value,
A first step in which the terminal converts the software;
A second step in which the terminal transmits the converted software;
A third step in which the tamper resistant device acquires all encoding variables from the received software;
A fourth step in which the tamper resistant apparatus verifies the correctness according to whether or not all the obtained encoded variables satisfy a non-trivial relational expression;
A fifth step of decoding the value of the variable if the tamper resistant device is valid;
A sixth step in which the tamper resistant device returns the decrypted value to software in the terminal;
A program that causes a computer to execute.
JP2010011660A 2010-01-22 2010-01-22 System and method for protecting software, software conversion method and program Pending JP2011150560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010011660A JP2011150560A (en) 2010-01-22 2010-01-22 System and method for protecting software, software conversion method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010011660A JP2011150560A (en) 2010-01-22 2010-01-22 System and method for protecting software, software conversion method and program

Publications (1)

Publication Number Publication Date
JP2011150560A true JP2011150560A (en) 2011-08-04

Family

ID=44537467

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010011660A Pending JP2011150560A (en) 2010-01-22 2010-01-22 System and method for protecting software, software conversion method and program

Country Status (1)

Country Link
JP (1) JP2011150560A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002514333A (en) * 1997-06-09 2002-05-14 インタートラスト テクノロジーズ コーポレイション Confusing technology to enhance software security
JP2002539546A (en) * 1999-03-15 2002-11-19 ブル・セー・ペー・8 Object access system using "Web" type browser in cooperation with smart card
JP2004038966A (en) * 2002-06-28 2004-02-05 Microsoft Corp Secure and opaque type library for providing secure variable data protection
JP2006079347A (en) * 2004-09-09 2006-03-23 Kddi Corp Coding method and program therefor
WO2007011001A1 (en) * 2005-07-22 2007-01-25 Matsushita Electric Industrial Co., Ltd. Execution device
JP2007086845A (en) * 2005-09-20 2007-04-05 Kddi Corp Client server system, method for providing server side program for the system, its server device, and server side program
JP2008077400A (en) * 2006-09-21 2008-04-03 Kddi Corp Program-obfuscating method and program
JP2008090668A (en) * 2006-10-03 2008-04-17 Kddi Corp Program obfuscation method and program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002514333A (en) * 1997-06-09 2002-05-14 インタートラスト テクノロジーズ コーポレイション Confusing technology to enhance software security
JP2002539546A (en) * 1999-03-15 2002-11-19 ブル・セー・ペー・8 Object access system using "Web" type browser in cooperation with smart card
JP2004038966A (en) * 2002-06-28 2004-02-05 Microsoft Corp Secure and opaque type library for providing secure variable data protection
JP2006079347A (en) * 2004-09-09 2006-03-23 Kddi Corp Coding method and program therefor
WO2007011001A1 (en) * 2005-07-22 2007-01-25 Matsushita Electric Industrial Co., Ltd. Execution device
JP2007086845A (en) * 2005-09-20 2007-04-05 Kddi Corp Client server system, method for providing server side program for the system, its server device, and server side program
JP2008077400A (en) * 2006-09-21 2008-04-03 Kddi Corp Program-obfuscating method and program
JP2008090668A (en) * 2006-10-03 2008-04-17 Kddi Corp Program obfuscation method and program

Similar Documents

Publication Publication Date Title
JP6257754B2 (en) Data protection
CA2678951C (en) System and method of interlocking to protect software-mediated program and device behaviours
US10409966B2 (en) Optimizing and protecting software
EP2388730A1 (en) Method for generating software code
US20170116410A1 (en) Software protection
CA3047009A1 (en) Software integrity verification
CN105024803A (en) Behavioral fingerprint in a white-box implementation
CN104919750A (en) Computing device configured with a table network
JP4470982B2 (en) Information processing apparatus and information processing program
CN110210211A (en) A kind of method of data protection and calculate equipment
JP2021515314A (en) Compilation device and method
JP4667800B2 (en) Encoding method and program thereof
US11210135B2 (en) Lightweight dispatcher for program control flow flattening
JP4675642B2 (en) Program obfuscation apparatus, method and program
KR101440680B1 (en) Homomorphic Encryption and Decryption Method using Chinese Remainder Theorem and apparatus using the same
EP2947590B1 (en) Program code obfuscation based upon recently executed program code
JP2011150560A (en) System and method for protecting software, software conversion method and program
JP5149061B2 (en) Program obfuscation apparatus, program obfuscation method, and program
JP2011209801A (en) Apparatus and method for obfuscating software, and program
JP6631989B2 (en) Encryption device, control method, and program
JP5627444B2 (en) Software obfuscation device, software obfuscation method and program
KR101625018B1 (en) Data encryption apparatus and method, computing device and communication device employing the same
Shi et al. On security of a white-box implementation of SHARK
JP5149062B2 (en) Program obfuscation apparatus, program obfuscation method, and program
JP2007079916A (en) Encoding method and its program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130829

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130917

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131018

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131021

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140204