JP2018026651A - Method for protecting program - Google Patents

Method for protecting program Download PDF

Info

Publication number
JP2018026651A
JP2018026651A JP2016156188A JP2016156188A JP2018026651A JP 2018026651 A JP2018026651 A JP 2018026651A JP 2016156188 A JP2016156188 A JP 2016156188A JP 2016156188 A JP2016156188 A JP 2016156188A JP 2018026651 A JP2018026651 A JP 2018026651A
Authority
JP
Japan
Prior art keywords
program
parameter
update
application
function
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.)
Granted
Application number
JP2016156188A
Other languages
Japanese (ja)
Other versions
JP6779702B2 (en
Inventor
渡辺 大
Masaru Watanabe
大 渡辺
高橋 健太
Kenta Takahashi
健太 高橋
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2016156188A priority Critical patent/JP6779702B2/en
Publication of JP2018026651A publication Critical patent/JP2018026651A/en
Application granted granted Critical
Publication of JP6779702B2 publication Critical patent/JP6779702B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To improve security of program.SOLUTION: In a method for protecting a first program containing updatable first parameters, a processor encodes a first update program for updating the first program and first parameters according to an encoding program, by using second parameters. The processor decodes the encoded first program and encoded first update program according to a decoding program, by using the second parameters, and also updates the decoding program according to a second update program.SELECTED DRAWING: Figure 2

Description

本発明は、プログラムを難読化して不正な解析を防止するための技術に関する。   The present invention relates to a technique for obfuscating a program and preventing unauthorized analysis.

モバイル端末の普及とWebサービスの高度化に伴い、サービスの種類も多様化している。特に近年では、モバイル決済のように、従来ATMや窓口、専用端末を経由していた支払や送金に関するサービスをモバイル端末上で実行するサービスが流行の兆しを見せている。   With the spread of mobile terminals and the advancement of Web services, the types of services are diversifying. In particular, in recent years, services such as mobile payments, where services related to payment and remittance that have conventionally been routed through ATMs, windows, and dedicated terminals, are running on mobile terminals.

このようなサービスを利用する際には、ユーザは、専用のアプリケーションプログラム(アプリと呼ぶ)を端末にインストールし、そのアプリを介してサービスを利用するのが一般的である。また、サービスの利用に際してユーザ認証(もしくは端末認証)を行う必要があるが、このとき、ユーザ(もしくは端末)のみが持つ秘密情報が使用される。   When using such a service, a user generally installs a dedicated application program (referred to as an application) on a terminal and uses the service via the application. Also, user authentication (or terminal authentication) needs to be performed when using the service. At this time, secret information possessed only by the user (or terminal) is used.

このような処理は、SIMチップ上の領域内で行われることが望ましい。しかし、上述のように、ほとんどのケースにおいて、メモリ上で動作するアプリが秘密情報を取り扱う。これは、サービス用アプリをインストールするためには、SIMチップの記憶容量や処理能力が不足していることが理由である。   Such processing is preferably performed in an area on the SIM chip. However, as described above, in most cases, an application operating on a memory handles secret information. This is because the storage capacity and processing capacity of the SIM chip are insufficient to install the service application.

一方で、モバイル端末のセキュリティの観点では、端末の10%程度がマルウェアに感染しているという現実があり、金融サービスに特化したマルウェアの存在も確認されている。したがって、アプリは、ユーザ認証や通信路保護で必要となる秘密情報(秘密鍵や生体情報)を保護することが重要である。   On the other hand, from the viewpoint of security of mobile terminals, there is a reality that about 10% of terminals are infected with malware, and the existence of malware specialized for financial services has also been confirmed. Therefore, it is important for the application to protect secret information (secret key and biometric information) required for user authentication and communication path protection.

上述のような課題に対する対策として、秘密情報をそのまま保持せず、読み取りを困難にする難読化技術が知られている。そこで、アプリと鍵のセットを難読化することで、秘密情報の漏えいリスクを軽減することができる。難読化については、既に多くの方式が検討されている。例えば非特許文献1は、プログラムを暗号化して解析を困難にする方法を開示している。   As a countermeasure against the above-described problems, an obfuscation technique is known that makes it difficult to read without retaining confidential information as it is. Therefore, by obfuscating the application and key set, the risk of leakage of confidential information can be reduced. Many methods have already been examined for obfuscation. For example, Non-Patent Document 1 discloses a method of encrypting a program to make analysis difficult.

Christian Collberg and Jasvir Nagra,Surreptitious software,Addison-Wesley, 359ページ, 2010.Christian Collberg and Jasvir Nagra, Surreptitious software, Addison-Wesley, p. 359, 2010.

例えば、アプリがサービス利用のための暗号機能を内蔵しているとする。端末にダウンロードされるアプリは同一であるため、デフォルトで設定されている秘密鍵は異なる端末でも同一である。すなわち、攻撃者は、一つの端末の解析結果を別の端末に適用でき、サービスに対する攻撃が容易である。   For example, it is assumed that the application has a built-in encryption function for using the service. Since the application downloaded to the terminal is the same, the secret key set by default is the same for different terminals. That is, the attacker can apply the analysis result of one terminal to another terminal, and the attack on the service is easy.

また、サービス利用のための秘密鍵は定期的に更新する必要がある。難読化されたアプリが、暗号化されたアプリ及び暗号化されたアプリを復号するモジュールを含む場合、秘密鍵更新の前後の難読化されたアプリの差分を取ると、差分が無い部分が現れる。これは、上記復号するモジュールを含む。すなわち、アプリが使用する鍵の更新により、暗号化されたアプリを復号する復号モジュールを特定することが可能であり、攻撃が容易である。   In addition, it is necessary to periodically update the secret key for using the service. When the obfuscated application includes an encrypted application and a module for decrypting the encrypted application, a portion having no difference appears when the difference between the obfuscated applications before and after the secret key update is taken. This includes the decoding module. That is, it is possible to specify a decryption module for decrypting an encrypted application by updating a key used by the application, and an attack is easy.

本発明の代表的な一例は、更新可能な第1パラメータを含む第1プログラムを保護する方法であって、プロセッサが、符号化プログラムに従って、前記第1プログラム及び前記第1パラメータを更新する第1更新プログラムを、第2パラメータを用いて符号化し、前記プロセッサが、復号プログラムに従って、符号化された前記第1プログラム及び符号化された前記第1更新プログラムを、前記第2パラメータを用いて復号し、前記プロセッサが、第2更新プログラムに従って、前記復号プログラムを更新する。   A typical example of the present invention is a method for protecting a first program including an updatable first parameter, in which a processor updates the first program and the first parameter according to an encoding program. An update program is encoded using a second parameter, and the processor decodes the encoded first program and the encoded first update program using the second parameter according to a decoding program. The processor updates the decryption program according to the second update program.

本発明の一態様によれば、プログラムのセキュリティを向上できる。   According to one embodiment of the present invention, the security of a program can be improved.

実施例1におけるシステム構成を表す図である。1 is a diagram illustrating a system configuration in Embodiment 1. FIG. 実施例1における鍵初期化及び更新プロトコルを表すシーケンス図である。FIG. 4 is a sequence diagram illustrating a key initialization and update protocol in the first embodiment. 実施例1における機器構成を表す図である。2 is a diagram illustrating a device configuration in Embodiment 1. FIG. 実施例1におけるアプリのダウンロードから端末への格納までの処理を表すフローチャートである。It is a flowchart showing the process from the download of the application in Example 1 to the storing to a terminal. 実施例1において、アプリを難読化する技術の概要を説明する図である。In Example 1, it is a figure explaining the outline | summary of the technique which obfuscates an application. 実施例1において、難読化された暗号通信機能を含むアプリの機能構成図である。In Example 1, it is a function block diagram of the application containing the obfuscated encryption communication function. 実施例1において、難読化された暗号通信機能を含むアプリの機能構成図の別例である。In Example 1, it is another example of the function block diagram of the application containing the obfuscated encryption communication function. 図7の機能構成の場合に、難読化されたアプリの暗号通信・認証機能に用いる秘密鍵の更新を行うプロセスを説明するフローチャートである。FIG. 8 is a flowchart for explaining a process for updating a secret key used for an encrypted communication / authentication function of an obfuscated application in the case of the functional configuration of FIG. 実施例2におけるシステム構成を表す図である。6 is a diagram illustrating a system configuration in Embodiment 2. FIG. 実施例2における鍵初期化及び更新プロトコルを表すシーケンス図である。FIG. 10 is a sequence diagram illustrating a key initialization and update protocol in the second embodiment.

以下、添付図面を参照して本発明の実施形態を説明する。本実施形態は本発明を実現するための一例に過ぎず、本発明の技術的範囲を限定するものではないことに注意すべきである。各図において共通の構成については同一の参照符号が付されている。以下において、ダウンロードしたアプリケーションプログラム(アプリとも呼ぶ)を難読化してマルウェア等による不正解析を防止するための技術が開示される。   Embodiments of the present invention will be described below with reference to the accompanying drawings. It should be noted that this embodiment is merely an example for realizing the present invention, and does not limit the technical scope of the present invention. In each figure, the same reference numerals are given to common configurations. In the following, a technique for obfuscating a downloaded application program (also referred to as an application) to prevent unauthorized analysis by malware or the like is disclosed.

図1は本実施例のシステム構成を示す。本システムは、ユーザ101が持つユーザ端末102、アプリの配信を行うアプリ配信サーバ103、アプリを介してユーザにサービスを提供するサービスプロバイダ104を含む。ここでは、サービスプロバイダ104は、1又は複数のサーバを示す。サービスプロバイダ104は、サービスの利用に必要となるアプリの配信をアプリ配信サーバ103に委託する。   FIG. 1 shows the system configuration of this embodiment. This system includes a user terminal 102 possessed by a user 101, an application distribution server 103 that distributes an application, and a service provider 104 that provides a service to the user via the application. Here, the service provider 104 indicates one or a plurality of servers. The service provider 104 entrusts the application distribution server 103 to distribute an application necessary for using the service.

ユーザは、サービスプロバイダ104が提供するサービスを利用する際に、所有するユーザ端末102からアプリ配信サーバ103にアクセスし、アプリをダウンロードする。その後、インストールしたアプリを介して、サービスを利用する。   When using a service provided by the service provider 104, the user accesses the application distribution server 103 from the user terminal 102 owned by the user and downloads the application. Then, use the service through the installed application.

通常、アプリ配信サーバ103からのアプリのダウンロードは、通信途上での改ざん等を防止するため、暗号通信を利用する。この通信は一時的なものであり、アプリ配信サーバ103は、端末102の認証を行わないことが多い。   Normally, the application download from the application distribution server 103 uses encrypted communication in order to prevent tampering during the communication. This communication is temporary, and the application distribution server 103 often does not authenticate the terminal 102.

一方、サービスプロバイダ104は、サービスの提供時に、ユーザ端末102の所有者が正当なサービス利用者であることを確認する。ユーザ端末102は、何らかの秘密情報を所持していることを証明し、正当なサービス利用者であることをサービスプロバイダ104に示す。   On the other hand, the service provider 104 confirms that the owner of the user terminal 102 is a valid service user when providing the service. The user terminal 102 proves that it has some secret information and indicates to the service provider 104 that it is a legitimate service user.

ユーザ端末102は、正規のユーザ端末であることをサービスプロバイダ104に証明するための、パスワード、秘密鍵、もしくは一時的に取り込まれたユーザ生体情報などの秘密情報105を格納している。ユーザ端末102は、秘密情報105を保護するための難読化に用いられる難読化用パラメータ106も保持する。難読化は、難読化用パラメータ106を使用してアプリを符号化し、解析を困難にする。難読化及び難読化用パラメータ106の詳細は後述する。   The user terminal 102 stores secret information 105 such as a password, a secret key, or temporarily captured user biometric information for proving to the service provider 104 that the user terminal 102 is a legitimate user terminal. The user terminal 102 also holds an obfuscation parameter 106 used for obfuscation for protecting the secret information 105. Obfuscation encodes an app using obfuscation parameters 106, making analysis difficult. Details of the obfuscation and obfuscation parameter 106 will be described later.

図2は、本実施例の鍵初期化及び鍵更新のプロトコルを示すシーケンス図である。以下、図2を参照してプロトコルを説明する。サービスプロバイダ104は、アプリに対して固定のパラメータを用いて難読化処理を施し、アプリと難読化機能とを組み合わせる(201)。   FIG. 2 is a sequence diagram illustrating a key initialization and key update protocol according to this embodiment. Hereinafter, the protocol will be described with reference to FIG. The service provider 104 performs obfuscation processing on the application using fixed parameters, and combines the application and the obfuscation function (201).

後述するように、難読化されたアプリは、難読化のために符号化されたアプリと、難読化(アプリの符号化/復号)ためのプログラム(の少なくとも一部)を含んで構成される。なお、以下の記載において、特に言及のない場合、「機能」はプログラム(プログラムモジュール)示す。難読化は、アプリを保護するために符号化する。また、以下に説明する例において、難読化用パラメータは、難読化用秘密鍵とする。難読化は、鍵を使用する暗号化と異なる符号化を使用することができる。   As will be described later, the obfuscated application includes an app encoded for obfuscation and a program (at least a part of) a program for obfuscation (encoding / decoding of the app). In the following description, “function” indicates a program (program module) unless otherwise specified. Obfuscation is coded to protect the app. In the example described below, the obfuscation parameter is an obfuscation secret key. Obfuscation may use a different encoding than the encryption that uses the key.

次に、サービスプロバイダ104は、アプリ配信サーバ103に対してアプリ登録要求を送信し、難読化したアプリを、アプリ配信サーバ103に登録する(202)。なお、サービスプロバイダ104は、アプリを、難読化することなく、アプリ配信サーバ103に登録してもよい。   Next, the service provider 104 transmits an application registration request to the application distribution server 103, and registers the obfuscated application in the application distribution server 103 (202). Note that the service provider 104 may register the application in the application distribution server 103 without obfuscating the application.

次に、以下のように、難読化されたアプリが、アプリ配信サーバ103からユーザ端末102にダウンロードされる。まず、ユーザ端末102はアプリ配信サーバ103に対してアプリダウンロード要求を送信する(203)。さらに、アプリ配信サーバ103は、アプリダウンロード要求を受信すると、ユーザ端末102に、登録されている難読化されたアプリを送信する(204)。   Next, the obfuscated application is downloaded from the application distribution server 103 to the user terminal 102 as described below. First, the user terminal 102 transmits an application download request to the application distribution server 103 (203). Furthermore, when receiving the application download request, the application distribution server 103 transmits the obfuscated application registered to the user terminal 102 (204).

次に、ユーザ端末102は、ダウンロードされたアプリのためのパラメータを初期化する。特に、ユーザ端末102は、端末固有情報、システムログ、通信ログなどの初期化用パラメータを入力として難読化用秘密鍵106を生成し、難読化処理を施す(205)。   Next, the user terminal 102 initializes parameters for the downloaded application. In particular, the user terminal 102 receives the initialization parameters such as the terminal specific information, the system log, and the communication log, generates the obfuscated secret key 106, and performs the obfuscation process (205).

本例において、難読化用秘密鍵106は、アプリを暗号化/復号するための鍵である。ユーザ端末102は、ダウンロードされたアプリを上記固定のパラメータを使用して復号し、さらに、生成した難読化用秘密鍵106を使用してアプリを暗号化する。ユーザ端末102は、暗号化されたアプリと難読化機能とを含む、難読化されたアプリのイメージデータを生成し、記憶装置に格納する。固定のパラメータは、例えば、ユーザ端末102に予め設定されている、又は、アプリ配信サーバ103から送信される。   In this example, the obfuscation secret key 106 is a key for encrypting / decrypting the application. The user terminal 102 decrypts the downloaded application using the fixed parameter, and further encrypts the application using the generated obfuscation secret key 106. The user terminal 102 generates image data of the obfuscated application including the encrypted application and the obfuscation function, and stores the image data in the storage device. The fixed parameter is preset in the user terminal 102 or transmitted from the application distribution server 103, for example.

次に、以下のように、ユーザ登録が実行される。まず、ユーザ101は、アプリをインストールしたユーザ端末102を介して、サービスプロバイダ104にユーザ登録を行う(206)。ユーザ端末102とサービスプロバイダ104とは、通信路を保護するための鍵を共有する(207)。さらに、ユーザ端末102は、共有した鍵データ及び/又は他のデータを用いて、難読化用秘密鍵106を更新する(208)。   Next, user registration is performed as follows. First, the user 101 performs user registration with the service provider 104 via the user terminal 102 in which the application is installed (206). The user terminal 102 and the service provider 104 share a key for protecting the communication path (207). Further, the user terminal 102 updates the obfuscated secret key 106 using the shared key data and / or other data (208).

ユーザ登録の後、ユーザ101は、ユーザ端末102を介してサービスプロバイダ104と暗号通信を行い、サービスを利用する(209)。   After the user registration, the user 101 performs cryptographic communication with the service provider 104 via the user terminal 102 and uses the service (209).

以下のようにサービス利用のための鍵及び難読化のための鍵が更新される。まず、ユーザ端末102は、サービスプロバイダ104と通信を行い、通信路保護(サービス利用)のための秘密鍵を更新する(210)。さらに、ユーザ端末102は、更新した鍵データ及び/又は他のデータを用いて、難読化用秘密鍵106を更新する(211)。   The key for using the service and the key for obfuscation are updated as follows. First, the user terminal 102 communicates with the service provider 104 to update a secret key for communication path protection (service use) (210). Further, the user terminal 102 updates the obfuscated secret key 106 using the updated key data and / or other data (211).

ユーザ端末102は、更新した難読化用秘密鍵106を使用して、アプリに対して難読化処理を実行する。具体的には、ユーザ端末102は、更新した難読化用秘密鍵106を使用してアプリを暗号化し、暗号化されたアプリと難読化機能とを組み合わせて、難読化されたアプリのイメージデータを生成し、記憶装置に格納する。イメージデータは、実行プログラム又はファイルである。   The user terminal 102 uses the updated obfuscation secret key 106 to execute obfuscation processing on the application. Specifically, the user terminal 102 encrypts the application using the updated obfuscation secret key 106, and combines the encrypted application and the obfuscation function to obtain the image data of the obfuscated application. Generate and store in storage. The image data is an execution program or file.

図3は、本実施例に係るシステムのハードウェア構成を表す図である。アプリ配信サーバ103とユーザ端末102は、ネットワーク321を介して通信を行う。アプリ配信サーバ103及びユーザ端末102は、それぞれ、典型的な計算機構成を有することができる。サービスプロバイダ104のサーバも同様に、典型的な計算機構成を有することができる。   FIG. 3 is a diagram illustrating the hardware configuration of the system according to the present embodiment. The application distribution server 103 and the user terminal 102 communicate via the network 321. Each of the application distribution server 103 and the user terminal 102 can have a typical computer configuration. The service provider 104 server may similarly have a typical computer configuration.

アプリ配信サーバ103は、通信装置301、プロセッサであるCPU302、メモリ303、及び記憶装置304を含む。記憶装置304は、難読化されたアプリ305を格納している。アプリは、端末102で実行可能なプログラムである。メモリ303は、CPU302により実行されるプログラム及びプログラムに使用されるデータを格納する。CPU302は、プログラムに従って動作することで、所定の手段として機能する。   The application distribution server 103 includes a communication device 301, a CPU 302 that is a processor, a memory 303, and a storage device 304. The storage device 304 stores the obfuscated application 305. The application is a program that can be executed on the terminal 102. The memory 303 stores a program executed by the CPU 302 and data used for the program. The CPU 302 functions as a predetermined means by operating according to a program.

ユーザ端末102は、通信装置311、プロセッサであるCPU312、メモリ313、記憶装置314を含む。メモリ313は、CPU312により実行されるプログラム及びプログラムに使用されるデータを格納する。CPU312は、プログラムに従って動作することで、所定の機能(プログラムではない)を実現する。   The user terminal 102 includes a communication device 311, a CPU 312 that is a processor, a memory 313, and a storage device 314. The memory 313 stores a program executed by the CPU 312 and data used for the program. The CPU 312 realizes a predetermined function (not a program) by operating according to the program.

記憶装置314は、難読化されたアプリである、端末固有のアプリイメージ315を格納している。ユーザ端末102は、アプリ配信サーバ103からダウンロードしたアプリに難読化処理を実行し、難読化されたアプリ315を、記憶装置314に格納する。難読化処理は、初期化用パラメータ316を使用して、難読化用秘密鍵106を生成する。初期化用パラメータ316は、上述のように、例えば、端末固有情報、及び/又はシステムログ、通信ログである。   The storage device 314 stores a terminal-specific application image 315 that is an obfuscated application. The user terminal 102 executes obfuscation processing on the application downloaded from the application distribution server 103, and stores the obfuscated application 315 in the storage device 314. In the obfuscation process, the obfuscation secret key 106 is generated using the initialization parameter 316. As described above, the initialization parameter 316 is, for example, terminal-specific information, and / or a system log and a communication log.

図4は、ユーザ端末102へアプリのダウンロード及び格納の処理を表すフローチャートである。まず、ユーザ端末102とアプリ配信サーバ103とは、暗号通信を確立する(401)。通信方式としては、例えばTLSなどを用いればよい。次に、ユーザ端末102は、アプリ配信サーバ103にアプリダウンロード要求を送信する(402)。   FIG. 4 is a flowchart showing processing for downloading and storing an application in the user terminal 102. First, the user terminal 102 and the application distribution server 103 establish encrypted communication (401). For example, TLS may be used as the communication method. Next, the user terminal 102 transmits an application download request to the application distribution server 103 (402).

アプリ配信サーバ103は、ユーザ端末102のアプリダウンロード要求に対して、対象の難読化されたアプリ305を端末102に送信する(403)。   In response to the application download request from the user terminal 102, the application distribution server 103 transmits the target obfuscated application 305 to the terminal 102 (403).

ユーザ端末102は、MACアドレスやCPU番号、OSのバージョン情報などのユーザ端末102の固有の値や、現在の時刻情報、システムログなどを初期化用パラメータ316として、端末固有のアプリイメージ315を作成し(404)、作成されたアプリイメージ315を、記憶装置314に格納する(405)。   The user terminal 102 creates a terminal-specific application image 315 using the initialization value 316 using the unique value of the user terminal 102 such as the MAC address, CPU number, OS version information, current time information, and system log. Then, the created application image 315 is stored in the storage device 314 (405).

具体的には、ユーザ端末102は、初期化用パラメータ316を使用して、難読化用パラメータ106を生成する。ユーザ端末102は、難読化されたアプリ305における暗号化されたアプリを復号化し、さらに、難読化用パラメータ106によりアプリを暗号化する。ユーザ端末102は、暗号化されたアプリと難読化のための機能とを含むアプリイメージ315を生成する。   Specifically, the user terminal 102 uses the initialization parameter 316 to generate the obfuscation parameter 106. The user terminal 102 decrypts the encrypted application in the obfuscated application 305, and further encrypts the application using the obfuscation parameter 106. The user terminal 102 generates an application image 315 including an encrypted application and a function for obfuscation.

例えば、難読化されたアプリ305が、図6が示す例のように、難読化のための暗号化機能、復号機能及び鍵更新機能を含む場合、ユーザ端末102のインストーラは、初期化用パラメータ316を鍵更新機能に渡し、当該鍵更新機能が新たな難読化用パラメータ106を生成する。難読化されたアプリ305の復号機能及び暗号化機能が、それぞれ、アプリの復号及び暗号化を行う。   For example, if the obfuscated application 305 includes an encryption function, a decryption function, and a key update function for obfuscation as in the example illustrated in FIG. 6, the installer of the user terminal 102 uses the initialization parameter 316. To the key update function, and the key update function generates a new obfuscation parameter 106. The decryption function and the encryption function of the obfuscated application 305 respectively decrypt and encrypt the application.

いずれかの機能が難読化されたアプリ305に含まれていない場合、インストーラがその代わりに処理を実行する。難読化されたアプリ305に含まれる難読化機能の構成に関わらず、インストーラがアプリイメージ315の生成のための全ての処理を実行してもよい。   If any of the functions is not included in the obfuscated application 305, the installer executes the process instead. Regardless of the configuration of the obfuscation function included in the obfuscated application 305, the installer may execute all the processes for generating the application image 315.

なお、ユーザ端末102は、初期化用パラメータ316をSHA−256などのハッシュ関数に入力し、その出力を乱数生成器のシードとして用い、得られた乱数を用いてdllのメモリ配置のランダム化を実行してもよい。ユーザ端末102は、得られた乱数を秘密鍵として、アプリを暗号化してもよい。結果として得られたアプリイメージ315の実体は、端末ごとに異なるため、マルウェアによる攻撃感染リスクを軽減することができる。   The user terminal 102 inputs the initialization parameter 316 to a hash function such as SHA-256, uses the output as a seed for the random number generator, and randomizes the memory arrangement of the dll using the obtained random number. May be executed. The user terminal 102 may encrypt the application using the obtained random number as a secret key. Since the entity of the application image 315 obtained as a result is different for each terminal, the risk of attack by malware can be reduced.

また、ユーザ端末102は、初期化用パラメータとして、暗号通信における秘密鍵から導出される値を使用してもよい。例えば、DH(Diffie−Hellman)鍵共有を使用している場合、DH exponentは端末のみが知っている秘密情報であるため、通信相手のサーバも初期化されたアプリを推定することはできない。   Further, the user terminal 102 may use a value derived from a secret key in encrypted communication as the initialization parameter. For example, when DH (Diffie-Hellman) key sharing is used, since the DH component is secret information known only to the terminal, the communication partner server cannot estimate the initialized application.

図5は、難読化のためのパッキング技術(アプリを暗号化することで、解析を困難にする技術)の概要を説明する図である。暗号化装置501は、アプリ505を暗号化する。暗号化装置501は、暗号化に用いられる難読化用秘密鍵(難読化用パラメータ)106を、図3を参照して説明したように、端末固有の値や、システム情報から生成してもよい。暗号通信を用いてアプリ505をダウンロードする場合には、暗号化装置501は、暗号通信のために用いる秘密情報から生成してもよい。   FIG. 5 is a diagram for explaining an outline of a packing technique for obfuscation (a technique for making analysis difficult by encrypting an application). The encryption device 501 encrypts the application 505. The encryption device 501 may generate the obfuscation secret key (obfuscation parameter) 106 used for encryption from a value unique to the terminal or system information as described with reference to FIG. . When the application 505 is downloaded using encrypted communication, the encryption device 501 may generate the secret information used for encrypted communication.

例えば、暗号通信のための鍵共有でDiffie−Hellman鍵交換方式が使用されている場合に、ユーザ端末102が生成したDH exponentを難読化用秘密鍵106の生成に用いれば、暗号通信の相手も難読化用秘密鍵106の値を知ることが困難である。   For example, when the Diffie-Hellman key exchange method is used for key sharing for cryptographic communication, if the DH employee generated by the user terminal 102 is used for generation of the obfuscated secret key 106, the partner of the cryptographic communication also It is difficult to know the value of the obfuscated secret key 106.

端末固有のアプリイメージ315は、ブートローダ511、難読化用秘密鍵106を埋め込まれた復号機能512、そして難読化用秘密鍵106で暗号化されたアプリ513を含んで構成される。暗号化されたアプリ513は、パッキングされたデータである。復号機能512はプログラムモジュールである。   The terminal-specific application image 315 includes a boot loader 511, a decryption function 512 in which the obfuscation secret key 106 is embedded, and an application 513 encrypted with the obfuscation secret key 106. The encrypted application 513 is packed data. The decryption function 512 is a program module.

端末固有のアプリイメージ315が実行されると、まずブートローダ511が実行され、ブートローダ511は復号機能512を実行する。復号機能512は、暗号化されたアプリ513を復号し、ユーザ端末102のメモリ313上に展開する。復号が完了すると、復号機能512は復号されたアプリ505に処理を渡す。   When the terminal-specific application image 315 is executed, the boot loader 511 is executed first, and the boot loader 511 executes the decryption function 512. The decryption function 512 decrypts the encrypted application 513 and develops it on the memory 313 of the user terminal 102. When the decryption is completed, the decryption function 512 passes the processing to the decrypted application 505.

図6は、パッキング技術を使用して難読化されたアプリの機能構成図である。アプリ505は、サービスを利用するためのサービス利用機能602に加えて、ユーザ端末102やユーザの認証を行うための暗号通信・認証機能603、鍵更新機能604、そして暗号通信や認証に用いる秘密鍵105を含む。   FIG. 6 is a functional configuration diagram of an application obfuscated using the packing technique. In addition to the service use function 602 for using the service, the application 505 includes an encryption communication / authentication function 603 for authenticating the user terminal 102 and the user, a key update function 604, and a secret key used for encryption communication and authentication. 105.

難読化されたアプリ315は、この他に、ブートローダ511、復号機能512、暗号化機能614、難読化用秘密鍵更新機能615、及びユーザ端末102の通信機能を介してデータを受け取る入力インタフェース(IF)616を含む。   In addition to this, the obfuscated application 315 has an input interface (IF) that receives data via the boot loader 511, the decryption function 512, the encryption function 614, the obfuscation secret key update function 615, and the communication function of the user terminal 102. ) 616.

難読化用秘密鍵更新機能615は、入力IF616を介して受信した暗号通信・認証機能603の秘密鍵更新用鍵データ621や端末のシステム情報、時刻情報622を外部入力として用いて、難読化用秘密鍵を更新する。難読化されたアプリ611が、その内部に通信ログを保持し、難読化用秘密鍵更新機能615は、その通信ログを鍵更新に用いてもよい。   The obfuscation secret key update function 615 uses the secret key update key data 621 of the encryption communication / authentication function 603 received via the input IF 616, the system information of the terminal, and the time information 622 as external inputs. Update the private key. The obfuscated application 611 holds a communication log therein, and the obfuscated secret key update function 615 may use the communication log for key update.

図6においては、サービス利用機能602、暗号通信・認証機能603、鍵更新機能604、及び秘密鍵105がパッキングの対象であり、難読化用秘密鍵更新機能615はパッキング処理の対象外である。しかし、難読化用秘密鍵更新機能615はパッキング処理の対象であってもよい。鍵更新機能604が、難読化用秘密鍵更新機能615に代わって処理を実行してもよい。同様に、(難読化用秘密鍵106を含む)暗号化機能614も、パッキング処理の対象に含めてもよい。   In FIG. 6, the service use function 602, the encryption communication / authentication function 603, the key update function 604, and the secret key 105 are targets for packing, and the obfuscated secret key update function 615 is not a target for packing processing. However, the obfuscated secret key update function 615 may be a target of packing processing. The key update function 604 may execute processing instead of the obfuscation secret key update function 615. Similarly, the encryption function 614 (including the obfuscated secret key 106) may be included in the packing processing target.

図7は、鍵更新において外部から入力されたデータの正当性をチェックする機能を含むソフトウェア構成図である。難読化されたアプリ315は、図6に示す機能に加えて、入力データ認証機能701と出力IF702とを含む。入力データ認証機能701により、セキュリティを向上できる。入力データ認証機能701の動作の詳細は、図8を参照して説明する。   FIG. 7 is a software configuration diagram including a function for checking the validity of data input from the outside in the key update. The obfuscated application 315 includes an input data authentication function 701 and an output IF 702 in addition to the functions shown in FIG. The input data authentication function 701 can improve security. Details of the operation of the input data authentication function 701 will be described with reference to FIG.

図8は、サービス利用のための鍵の更新のプロセスを説明するフローチャートである。具体的には、図8は、図7に示す構成において、難読化されたアプリ513の暗号通信・認証機能603に用いる秘密鍵105の更新を行うプロセスを説明するフローチャートである。   FIG. 8 is a flowchart illustrating a process for updating a key for using a service. Specifically, FIG. 8 is a flowchart for explaining a process for updating the secret key 105 used for the encrypted communication / authentication function 603 of the obfuscated application 513 in the configuration shown in FIG.

ユーザ端末102は、ネットワーク321から、暗号通信・認証機能603の秘密鍵更新用データ621を受信する(801)。秘密鍵更新用データ621は、時間経過において変化する。入力データ認証機能701は、受信した秘密鍵更新用データ621が、サービスプロバイダ104が生成した値であることを検証する(802)。検証の結果、受信したデータが不正であると判定した場合(802:不正)、入力データ認証機能701は、サービスプロバイダ104に対して認証失敗を通知し(803)、処理を終了する。   The user terminal 102 receives the secret key update data 621 of the encryption communication / authentication function 603 from the network 321 (801). The secret key update data 621 changes over time. The input data authentication function 701 verifies that the received secret key update data 621 is a value generated by the service provider 104 (802). As a result of the verification, when it is determined that the received data is invalid (802: illegal), the input data authentication function 701 notifies the service provider 104 of an authentication failure (803) and ends the processing.

ステップ802において、受信データの正当性を確認するための一つの方法において、データの送信者(例えばサービスプロバイダ104)は、ユーザ端末102との間で共有した秘密鍵を用い、当該受信データのメッセージ認証子を送信データに付与する。また、電子署名を使用する方法のように、他の正当性確認方法を用いてもよい。正当性確認に用いる秘密鍵や公開鍵などの情報は、サービスプロバイダ104とユーザ端末102の間の通信路保護に用いる値を流用してもよい。   In step 802, in one method for confirming the validity of the received data, the data sender (for example, the service provider 104) uses the secret key shared with the user terminal 102 and uses the received data message. An authenticator is added to the transmission data. In addition, other validity confirmation methods such as a method using an electronic signature may be used. Information used for protecting the communication path between the service provider 104 and the user terminal 102 may be used for information such as a secret key and public key used for validity verification.

入力データ認証機能701が受信したデータが正当であると判定した場合(802:正当)、鍵更新機能604は、受信した秘密鍵更新用鍵データ621を使って新しい秘密鍵105を生成し、古い秘密鍵105と置き換える(804)。   When the input data authentication function 701 determines that the received data is valid (802: valid), the key update function 604 generates a new secret key 105 using the received secret key update key data 621, and the old data is updated. Replace with the secret key 105 (804).

難読化用秘密鍵更新機能615は、受信した秘密鍵更新用鍵データ621又はステップ804で生成された新しい秘密鍵105と、古い難読化用秘密鍵106とから、新しい難読化用秘密鍵を生成する(805)。   The obfuscation secret key update function 615 generates a new obfuscation secret key from the received secret key update key data 621 or the new secret key 105 generated in step 804 and the old obfuscation secret key 106. (805).

難読化用秘密鍵更新機能615は、ステップ805で生成した新しい難読化用秘密鍵106を用いて、暗号化機能614と復号機能512とを、更新する(806)。具体的には、難読化用秘密鍵更新機能615は、暗号化機能614及び復号機能512に含まれる難読化用秘密鍵106を更新する。   The obfuscation secret key update function 615 updates the encryption function 614 and the decryption function 512 using the new obfuscation secret key 106 generated in Step 805 (806). Specifically, the obfuscation secret key update function 615 updates the obfuscation secret key 106 included in the encryption function 614 and the decryption function 512.

ステップ806で更新された暗号化機能614は、鍵更新機能615、秘密鍵105、サービス利用機能602、暗号通信・認証機能603を新しい難読化用秘密鍵106で暗号化し、記憶装置(314)に格納する(807)。   The encryption function 614 updated in step 806 encrypts the key update function 615, the secret key 105, the service use function 602, and the encryption communication / authentication function 603 with the new obfuscation secret key 106 and stores it in the storage device (314). Store (807).

例えば、暗号化機能614は、メモリ313上の暗号化されていないアプリから、新しい秘密鍵106で暗号化されたアプリを生成し、イメージ315内の古い暗号化されアプリ513を置き換える。または、秘密鍵106の更新の前に、復号機能512はイメージ315内の古い暗号化されアプリ513を復号する。暗号化機能614は、復号されたアプリから、新しい秘密鍵106で暗号化されたアプリを生成し、イメージ315内の古い暗号化されアプリ513を置き換える。   For example, the encryption function 614 generates an application encrypted with the new secret key 106 from an unencrypted application on the memory 313 and replaces the old encrypted application 513 in the image 315. Alternatively, the decryption function 512 decrypts the old encrypted application 513 in the image 315 before updating the secret key 106. The encryption function 614 generates an application encrypted with the new secret key 106 from the decrypted application, and replaces the old encrypted application 513 in the image 315.

難読化用秘密鍵更新機能615は、サービスプロバイダ104に対して、鍵更新成功を通知する(808)。   The obfuscation secret key update function 615 notifies the service provider 104 of the key update success (808).

このように、難読化対象のプログラム(上記例において秘密鍵105)が更新されるときに、難読化用パラメータ(上記例において難読化用秘密鍵106)を更新することで、難読化対象のプログラムと難読化の復号機能との境界を読み取りにくくすることができる。   In this way, when the obfuscation target program (the secret key 105 in the above example) is updated, the obfuscation target program is updated by updating the obfuscation parameter (the obfuscation secret key 106 in the above example). And the obfuscation decoding function can be made difficult to read.

上述のように、ユーザ端末102は、外部からの入力情報とサービス利用のための秘密鍵105の更新命令とを受け取ると、アプリが保持する秘密鍵105を更新する。ユーザ端末102は、さらに、受信した入力情報を用いて、アプリを暗号化/復号するための難読化用秘密鍵106も更新する。   As described above, when receiving the input information from the outside and the instruction to update the private key 105 for using the service, the user terminal 102 updates the private key 105 held by the application. The user terminal 102 further updates the obfuscated secret key 106 for encrypting / decrypting the application using the received input information.

これにより、サービス利用のための鍵105の更新時に、難読化のための復号機能(モジュール)512を含む難読化されたアプリ315全体が更新され、モジュール差分を見ても難読化のための復号機能512が特定できず、攻撃がより困難になる。   As a result, when the key 105 for use of the service is updated, the entire obfuscated application 315 including the decryption function (module) 512 for obfuscation is updated, and decryption for obfuscation is performed even if the module difference is seen. The function 512 cannot be specified, and the attack becomes more difficult.

難読化用秘密鍵106の更新は、サービス利用のための鍵105の更新と同期していなくてもよい、つまり、サービス利用のための鍵105の更新時に、常に難読化用秘密鍵106を更新しなくてもよい。難読化用秘密鍵106の更新は、サービス利用のための鍵105の更新におけるデータ(例えば鍵105又は暗号通信・認証機能の更新用鍵データ
621)と異なるデータを使用してもよい。鍵105の更新のデータを使用することで、高いセキュリティにおいて効率的に難読化のための復号機能512を更新できる。
The obfuscation secret key 106 may not be synchronized with the update of the service use key 105, that is, the obfuscation secret key 106 is always updated when the service use key 105 is updated. You don't have to. The obfuscation secret key 106 may be updated by using data different from the data in the update of the key 105 for use of the service (for example, the key 105 or the encryption communication / authentication function update key data 621). By using the update data of the key 105, the decryption function 512 for obfuscation can be updated efficiently with high security.

また、ユーザ端末102は、端末固有情報をエントロピソースにして、アプリ用秘密情報(例えば、公開鍵ペアや乱数生成器のシード)の初期化と、難読化用秘密鍵の初期化を行う。端末固有情報をエントロピソースとした初期化により、端末ごとにユニークなモジュールのインスタンスが得られる。   In addition, the user terminal 102 uses the terminal unique information as an entropy source to initialize application secret information (for example, a public key pair or a random number generator seed) and an obfuscation secret key. Initialization using terminal-specific information as an entropy source provides a unique module instance for each terminal.

図8のフローチャートにおいて、秘密鍵更新用データ621はネットワークを介して受信したデータのみで構成されている。これと異なり、難読化用秘密鍵の更新は、時間経過におい変化する、時刻情報やシステムログなどの情報622を用いてもよい。このような情報622を用いることで、難読化されたアプリは、backward securityを実現することができる。マルウェアが難読化されたアプリに関する情報を外部の攻撃者に送信したとしても、攻撃者による解析結果により、難読化されたアプリが将来的に解析されるリスクを軽減できる。   In the flowchart of FIG. 8, the secret key update data 621 is composed only of data received via the network. In contrast, the obfuscation secret key may be updated using information 622 such as time information and system log that changes over time. By using such information 622, the obfuscated application can realize the backing security. Even if information about an app whose malware has been obfuscated is transmitted to an external attacker, the risk of future analysis of the obfuscated app can be reduced by the analysis result by the attacker.

図8のフローチャートにおいて、秘密鍵更新用データ621、例えば認証用の秘密鍵は、サービスプロバイダ104が生成し、端末に送信する。鍵更新の方法は、これに限るものではない。例えば、ユーザ端末102は、新しい秘密鍵と公開鍵のペアを生成して、新しい公開鍵をサービスプロバイダ104に登録してもよい。ユーザ端末102を起点として、鍵更新が実行されてもよい。   In the flowchart of FIG. 8, the private key update data 621, for example, the private key for authentication, is generated by the service provider 104 and transmitted to the terminal. The key update method is not limited to this. For example, the user terminal 102 may generate a new private key / public key pair and register the new public key with the service provider 104. The key update may be executed starting from the user terminal 102.

上記システム構成において、サービスプロバイダ104がユーザ認証に関わる一切の処理を担当している。しかし、公開鍵証明書を発行する認証局が、公開鍵の更新処理を行い、さらに、難読化されたアプリ315を更新してもよい。   In the above system configuration, the service provider 104 is in charge of all processing related to user authentication. However, a certificate authority that issues a public key certificate may perform a public key update process and further update the obfuscated application 315.

サービス利用時のセッション鍵は使い捨てであってもよい。この場合、セッション鍵は難読化対象外であってもよい。また、セッション鍵の確立時に、難読化されたアプリが更新されてもよい。   The session key when using the service may be disposable. In this case, the session key may not be obfuscated. Further, the obfuscated application may be updated when the session key is established.

暗号通信を一時中断し、アプリを終了する場合に、セッション鍵が維持される場合がある。例えば、TLS(Transport Layer Security)は、セッションをまたいで鍵を持ち続けるセッションリサンプションという仕組みを有する。   The session key may be maintained when the cryptographic communication is temporarily suspended and the application is terminated. For example, TLS (Transport Layer Security) has a mechanism called session resumption that keeps a key across sessions.

このような場合には、アプリの終了又は中断時に、保存する情報が更新されている場合には、ユーザ端末102は、難読化されたアプリを更新してもよい。暗号化機能614、難読化用秘密鍵更新機能615、入力データ認証機能701も、暗号化の対象としてもよい。   In such a case, the user terminal 102 may update the obfuscated application when the information to be stored is updated when the application is terminated or interrupted. The encryption function 614, the obfuscation secret key update function 615, and the input data authentication function 701 may also be subject to encryption.

上記例は、鍵を更新することで復号機能と暗号化機能を更新する。これにより、効率的に高いセキュリティで復号機能と暗号化機能を更新できる。これと異なる方法、例えば、コードレイアウトを変更することにより、復号機能と暗号化機能を更新してもよい。   In the above example, the decryption function and the encryption function are updated by updating the key. Thereby, the decryption function and the encryption function can be updated with high security efficiently. The decryption function and the encryption function may be updated by a different method, for example, by changing the code layout.

図9は実施例2に係るシステムの構成を表す図である。本構成は、シングルサインオンのサービスを想定する。シングルサインオンのシステムは、複数のサービスを提供しており、図1のシステムを構成するユーザ101、ユーザ端末102、アプリ配信サーバ103、サービスプロバイダ901、902の他に、認証サーバ903が含まれる。認証サーバ903は、複数のサービスプロバイダ901、902に代わって、ユーザ認証を実行する。   FIG. 9 is a diagram illustrating a configuration of a system according to the second embodiment. This configuration assumes a single sign-on service. The single sign-on system provides a plurality of services, and includes an authentication server 903 in addition to the user 101, the user terminal 102, the application distribution server 103, and the service providers 901 and 902 constituting the system of FIG. . The authentication server 903 performs user authentication on behalf of the plurality of service providers 901 and 902.

図10は、本発明の実施例2における鍵初期化及び更新プロトコルを表すシーケンス図である。以下、図10を参照して、プロトコルを説明する。サービスプロバイダ(901(902))は、アプリに対して固定のパラメータを用いて難読化処理を施し、アプリと難読化機能とを組み合わせる(1001)。   FIG. 10 is a sequence diagram illustrating a key initialization and update protocol according to the second embodiment of the present invention. Hereinafter, the protocol will be described with reference to FIG. The service provider (901 (902)) obfuscates the application using a fixed parameter, and combines the application and the obfuscation function (1001).

次に、サービスプロバイダ(901(902))は、アプリ配信サーバ103に対してアプリ登録要求を送信し、難読化したアプリを、アプリ配信サーバ103に登録する(1002)。なお、サービスプロバイダ(901(902))は、アプリを、難読化することなく、アプリ配信サーバ103に登録してもよい。   Next, the service provider (901 (902)) transmits an application registration request to the application distribution server 103, and registers the obfuscated application in the application distribution server 103 (1002). The service provider (901 (902)) may register the application in the application distribution server 103 without obfuscation.

次に、以下のように、難読化されたアプリが、アプリ配信サーバ103からユーザ端末102にダウンロードされる。まず、ユーザ端末102はアプリ配信サーバ103に対してアプリダウンロード要求を送信する(1003)。さらに、アプリ配信サーバ103は、アプリダウンロード要求を受信すると、ユーザ端末102に、登録されている難読化されたアプリを送信する(1004)。   Next, the obfuscated application is downloaded from the application distribution server 103 to the user terminal 102 as described below. First, the user terminal 102 transmits an application download request to the application distribution server 103 (1003). Furthermore, when receiving the application download request, the application distribution server 103 transmits the obfuscated application registered to the user terminal 102 (1004).

次に、ユーザ端末102は、ダウンロードされたアプリのためのパラメータを初期化する。特に、ユーザ端末102は、端末固有情報、システムログ、通信ログなどの初期化用パラメータを入力として難読化用秘密鍵106を生成し、難読化処理を施す(1005)。   Next, the user terminal 102 initializes parameters for the downloaded application. In particular, the user terminal 102 receives the initialization parameters such as the terminal specific information, the system log, and the communication log, generates the obfuscated secret key 106, and performs the obfuscation process (1005).

次に、ユーザ101は、アプリをインストールしたユーザ端末102を介して、認証サーバ903にユーザ登録を行い、認証用の鍵を登録する(1006)。次に、ユーザ端末102は、認証用の鍵及び/又は他のデータを用いて、難読化用秘密鍵106を更新する(1007)。   Next, the user 101 performs user registration in the authentication server 903 via the user terminal 102 in which the application is installed, and registers an authentication key (1006). Next, the user terminal 102 updates the obfuscated secret key 106 using the authentication key and / or other data (1007).

次に、以下のように、サービスプロバイダに対するユーザ登録が実行される。まず、ユーザ101は、ユーザ端末102を介して認証サーバ903に接続し、ユーザ認証を行う(1008)。認証サーバ903は、ユーザ端末102に対してチケットを発行する(1009)。ユーザ端末102は、ステップ1009で取得したチケットを使ってサービスプロバイダ901(902)にアクセスし、ユーザ登録を行う(1010)。   Next, user registration with the service provider is executed as follows. First, the user 101 connects to the authentication server 903 via the user terminal 102 and performs user authentication (1008). The authentication server 903 issues a ticket to the user terminal 102 (1009). The user terminal 102 accesses the service provider 901 (902) using the ticket acquired in step 1009, and performs user registration (1010).

次に、以下のように、ユーザ101はサービスを利用する。まず、ユーザ101は、ユーザ端末102を介して認証サーバ903に接続し、ユーザ認証を行う。認証サーバ903は、ユーザ端末102に対してチケットを発行する(1011)。ユーザ端末102は、ステップ1012で取得したチケットを使ってサービスプロバイダ901(902)にアクセスし、サービスを利用する(1012)。   Next, the user 101 uses the service as follows. First, the user 101 connects to the authentication server 903 via the user terminal 102 and performs user authentication. The authentication server 903 issues a ticket to the user terminal 102 (1011). The user terminal 102 accesses the service provider 901 (902) using the ticket acquired in Step 1012, and uses the service (1012).

以下のようにサービス利用のための鍵及び難読化のための鍵が更新される。まず、ユーザ端末102は、認証サーバ903と通信を行い、通信路保護(サービス利用)のための秘密鍵を更新する(1013)。さらに、ユーザ端末102は、更新した鍵データ及び/又は他のデータを用いて、難読化用秘密鍵106を更新する(1014)。   The key for using the service and the key for obfuscation are updated as follows. First, the user terminal 102 communicates with the authentication server 903 to update a secret key for communication path protection (service use) (1013). Further, the user terminal 102 updates the obfuscated secret key 106 using the updated key data and / or other data (1014).

なお、鍵更新は所定の期間ごとに行えばよく、鍵更新までの期間中に複数回サービス利用のステップが実行されてもよい。図9、図10は、認証サーバ903が発行するチケットを利用するエージェント方式を示す。本実施例の概念は、これ以外の、任意のシングルサインオンの実現方式に適用できる。   The key update may be performed every predetermined period, and the service use step may be executed a plurality of times during the period until the key update. FIG. 9 and FIG. 10 show an agent method using a ticket issued by the authentication server 903. The concept of the present embodiment can be applied to any other single sign-on implementation method.

例えば、認証サーバ903がユーザ101を代行してサービスプロバイダ901(902)との間の認証応答を行うリバースプロキシ方式においても、(1)認証サーバ903によるユーザ101の認証、(2)ユーザ端末102とサービスプロバイダ901(902)との鍵確立という基本的な流れは変わらない。したがって、図10のシーケンスに基づき、難読化されたアプリの更新を行うことができる。   For example, even in the reverse proxy method in which the authentication server 903 performs an authentication response with the service provider 901 (902) on behalf of the user 101, (1) authentication of the user 101 by the authentication server 903, and (2) the user terminal 102 The basic flow of key establishment between the service provider 901 (902) and the service provider 901 does not change. Therefore, the obfuscated application can be updated based on the sequence of FIG.

また、図10のシーケンスでは、ユーザ端末102とサービスプロバイダ901(902)とのセッション確立と、難読化用パラメータの更新とは、異なる時に実行される。しかし、ユーザ端末102とサービスプロバイダ901(902)の暗号通信用の鍵確立時に、確立したセッション鍵やシェアードシークレットを利用して、難読化用パラメータを更新してもよい。   In the sequence of FIG. 10, the session establishment between the user terminal 102 and the service provider 901 (902) and the update of the obfuscation parameters are executed at different times. However, the obfuscation parameters may be updated by using the established session key or shared secret when the encryption communication key between the user terminal 102 and the service provider 901 (902) is established.

なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明したすべての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。   In addition, this invention is not limited to an above-described Example, Various modifications are included. For example, the above-described embodiments have been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. Further, a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of one embodiment. Further, it is possible to add, delete, and replace other configurations for a part of the configuration of each embodiment.

また、上記の各構成・機能・処理部等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード等の記録媒体に置くことができる。また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしもすべての制御線や情報線を示しているとは限らない。実際には殆どすべての構成が相互に接続されていると考えてもよい。   Each of the above-described configurations, functions, processing units, and the like may be realized by hardware by designing a part or all of them, for example, by an integrated circuit. Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor. Information such as programs, tables, and files for realizing each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card or an SD card. In addition, the control lines and information lines are those that are considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. In practice, it may be considered that almost all the components are connected to each other.

101 ユーザ、102 ユーザ端末、103 アプリ配信サーバ、104 サービスプロバイダ、105 秘密鍵、106 難読化用秘密鍵、301 通信装置、303 メモリ、304 記憶装置、305 難読化されたアプリ、311 通信装置、313 メモリ、314 記憶装置、315 アプリイメージ、316 初期化用パラメータ、321 ネットワーク、501 暗号化装置、505 アプリ、511 ブートローダ、512 復号機能、513 暗号化されたアプリ、602 サービス利用機能、603 暗号通信・認証機能、604 鍵更新機能、614 暗号化機能、615 難読化用秘密鍵更新機能、616 入力IF、621 秘密鍵更新用データ、622 時刻情報、701 入力データ認証機能、702 出力IF、901、902 サービスプロバイダ、903 認証サーバ 101 user, 102 user terminal, 103 application distribution server, 104 service provider, 105 secret key, 106 obfuscated secret key, 301 communication device, 303 memory, 304 storage device, 305 obfuscated app, 311 communication device, 313 Memory, 314 storage device, 315 application image, 316 initialization parameter, 321 network, 501 encryption device, 505 application, 511 boot loader, 512 decryption function, 513 encrypted application, 602 service use function, 603 encryption communication / Authentication function, 604 key update function, 614 encryption function, 615 obfuscation secret key update function, 616 input IF, 621 secret key update data, 622 time information, 701 input data authentication function, 702 output IF, 901, 9 2 service provider, 903 authentication server

Claims (9)

更新可能な第1パラメータを含む第1プログラムを保護する方法であって、
プロセッサが、符号化プログラムに従って、前記第1プログラム及び前記第1パラメータを更新する第1更新プログラムを、第2パラメータを用いて符号化し、
前記プロセッサが、復号プログラムに従って、符号化された前記第1プログラム及び符号化された前記第1更新プログラムを、前記第2パラメータを用いて復号し、
前記プロセッサが、第2更新プログラムに従って、前記復号プログラムを更新する、方法。
A method for protecting a first program including a first parameter that can be updated, comprising:
The processor encodes the first update program for updating the first program and the first parameter according to the encoding program using the second parameter,
The processor decodes the encoded first program and the encoded first update program using the second parameter according to a decoding program,
A method in which the processor updates the decryption program according to a second update program.
請求項1に記載の方法であって、
前記プロセッサが、前記第2更新プログラムに従って、前記符号化プログラムを更新する、方法。
The method of claim 1, comprising:
The method, wherein the processor updates the encoding program according to the second update program.
請求項1に記載の方法であって、
前記プロセッサが、前記第1パラメータの更新に同期して前記復号プログラムを更新する、方法。
The method of claim 1, comprising:
The method, wherein the processor updates the decoding program in synchronization with the update of the first parameter.
請求項1、2又は3に記載の方法であって、
前記プロセッサが、前記第1パラメータと更新用データとに基づき、前記第1パラメータを更新し、
前記プロセッサが、前記第1パラメータの更新におけるデータと前記復号プログラムとに基づき、前記復号プログラムを更新する、方法。
The method according to claim 1, 2 or 3,
The processor updates the first parameter based on the first parameter and the update data;
The method, wherein the processor updates the decoding program based on data in the update of the first parameter and the decoding program.
請求項4に記載の方法であって、
前記プロセッサが、前記更新用データを、ネットワークを介して受信し、
前記プロセッサが、前記更新用データの正当性を、前記更新用データと共に受信した認証用データを使用してチェックし、
前記更新用データが正当である場合に、
前記プロセッサが、前記第1パラメータ及び前記復号プログラムを更新する、方法。
The method of claim 4, comprising:
The processor receives the update data via a network;
The processor checks the validity of the update data using the authentication data received together with the update data,
When the update data is valid,
The method, wherein the processor updates the first parameter and the decoding program.
請求項1から5のいずれか一項に記載の方法であって、
前記第1パラメータは、前記第1プログラムが暗号通信を行うための鍵であり、
前記復号プログラムは前記第2パラメータを含み、
前記方法は、
前記プロセッサが、前記復号プログラムに含まれる前記第2パラメータを更新することによって、前記復号プログラムを更新する、方法。
A method according to any one of claims 1 to 5, comprising
The first parameter is a key for the first program to perform encrypted communication;
The decryption program includes the second parameter,
The method
The method, wherein the processor updates the decoding program by updating the second parameter included in the decoding program.
請求項1から6のいずれか一項に記載の方法であって、
前記プロセッサは端末に含まれ、
前記方法は、
前記プロセッサが、前記端末にネットワークを介して接続されたサーバから、初期値の前記第2パラメータによって符号化された前記第1プログラムをダウンロードし、
前記プロセッサが、ダウンロードされた前記第1プログラムを前記初期値によって復号し、
前記プロセッサが、前記初期値から前記端末内の情報から生成した値に、前記第2パラメータを更新し、
前記プロセッサが、更新された前記第2パラメータによって前記第1プログラムを符号化して、前記端末の記憶装置に格納する、方法。
The method according to any one of claims 1 to 6, comprising:
The processor is included in a terminal;
The method
The processor downloads the first program encoded by the second parameter of an initial value from a server connected to the terminal via a network;
The processor decrypts the downloaded first program with the initial value;
The processor updates the second parameter from the initial value to a value generated from information in the terminal;
The method, wherein the processor encodes the first program with the updated second parameter and stores the first program in a storage device of the terminal.
更新可能な第1パラメータを含む第1プログラムを保護するプログラムであって、
計算機に、
前記第1プログラム及び前記第1パラメータを更新する第1更新プログラムを、第2パラメータを用いて符号化する符号化機能と、
前記符号化機能により符号化された、前記第1プログラム及び前記第1更新プログラムを、前記第2パラメータを用いて復号する復号機能と、
前記復号機能を実現するための復号プログラムを更新する、第2更新機能と、
を実現させるためのプログラム。
A program for protecting a first program including a first parameter that can be updated,
In the calculator,
An encoding function for encoding the first program and the first update program for updating the first parameter using a second parameter;
A decoding function for decoding the first program and the first update program encoded by the encoding function using the second parameter;
A second update function for updating a decryption program for realizing the decryption function;
A program to realize
更新可能な第1パラメータを含む第1プログラムを保護する装置であって、
プログラムを格納するメモリと、
前記メモリに格納されたプログラムに従って動作するプロセッサと、を含み、
前記プロセッサは、
符号化プログラムに従って、前記第1プログラム及び前記第1パラメータを更新する第1更新プログラムを、第2パラメータを用いて符号化し、
復号プログラムに従って、符号化された前記第1プログラム及び符号化された前記第1更新プログラムを、前記第2パラメータを用いて復号し、
第2更新プログラムに従って、前記復号プログラムを更新する、装置。
An apparatus for protecting a first program including a first parameter that can be updated, comprising:
Memory for storing the program;
A processor that operates according to a program stored in the memory,
The processor is
According to an encoding program, the first update program for updating the first program and the first parameter is encoded using a second parameter,
According to a decoding program, the encoded first program and the encoded first update program are decoded using the second parameter,
An apparatus for updating the decryption program according to a second update program.
JP2016156188A 2016-08-09 2016-08-09 How to protect your program Active JP6779702B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016156188A JP6779702B2 (en) 2016-08-09 2016-08-09 How to protect your program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016156188A JP6779702B2 (en) 2016-08-09 2016-08-09 How to protect your program

Publications (2)

Publication Number Publication Date
JP2018026651A true JP2018026651A (en) 2018-02-15
JP6779702B2 JP6779702B2 (en) 2020-11-04

Family

ID=61194315

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016156188A Active JP6779702B2 (en) 2016-08-09 2016-08-09 How to protect your program

Country Status (1)

Country Link
JP (1) JP6779702B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021174327A (en) * 2020-04-27 2021-11-01 Arithmer株式会社 Processing device, learning device, processing program, and learning program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007336127A (en) * 2006-06-14 2007-12-27 Dainippon Printing Co Ltd Authentication system, server computer, program, and recording medium
WO2009118800A1 (en) * 2008-03-28 2009-10-01 パナソニック株式会社 Software updating apparatus, software updating system, alteration verification method and alteration verification program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007336127A (en) * 2006-06-14 2007-12-27 Dainippon Printing Co Ltd Authentication system, server computer, program, and recording medium
WO2009118800A1 (en) * 2008-03-28 2009-10-01 パナソニック株式会社 Software updating apparatus, software updating system, alteration verification method and alteration verification program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021174327A (en) * 2020-04-27 2021-11-01 Arithmer株式会社 Processing device, learning device, processing program, and learning program

Also Published As

Publication number Publication date
JP6779702B2 (en) 2020-11-04

Similar Documents

Publication Publication Date Title
EP3387813B1 (en) Mobile device having trusted execution environment
EP2728908B1 (en) Telecommunications chip card
US6986041B2 (en) System and method for remote code integrity in distributed systems
US11853438B2 (en) Providing cryptographically secure post-secrets-provisioning services
WO2020114377A1 (en) Secure distributed key management system
KR20090095635A (en) Method for the secure storing of program state data in an electronic device
CN111401901B (en) Authentication method and device of biological payment device, computer device and storage medium
KR20130093557A (en) System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction
CN111191217B (en) Password management method and related device
CN111008094A (en) Data recovery method, equipment and system
EP3292654B1 (en) A security approach for storing credentials for offline use and copy-protected vault content in devices
KR20070059891A (en) Application authentication security system and method thereof
JP2015104020A (en) Communication terminal device, communication terminal association system, communication terminal association method and computer program
US20200160333A1 (en) System and method for the protection of consumer financial data utilizing dynamic content shredding
KR101473656B1 (en) Method and apparatus for security of mobile data
Sarhan et al. Secure android-based mobile banking scheme
JP6779702B2 (en) How to protect your program
KR101711024B1 (en) Method for accessing temper-proof device and apparatus enabling of the method
KR20190070691A (en) Program executing authority authentication method and system
JP6047718B2 (en) License management system, method and module
CN114556344A (en) Executing entity-specific cryptographic code in a cryptographic coprocessor
KR20220081068A (en) Application security device and method using encryption/decryption key
CN115765981A (en) Trusted network communication method and device
JP2021136470A (en) Data management method
JP2018088574A (en) Method for protecting program image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181001

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190903

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200423

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201014

R150 Certificate of patent or registration of utility model

Ref document number: 6779702

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150