JP7304430B2 - Information processing system, inter-program key sharing method, and inter-program key sharing program - Google Patents
Information processing system, inter-program key sharing method, and inter-program key sharing program Download PDFInfo
- Publication number
- JP7304430B2 JP7304430B2 JP2021563925A JP2021563925A JP7304430B2 JP 7304430 B2 JP7304430 B2 JP 7304430B2 JP 2021563925 A JP2021563925 A JP 2021563925A JP 2021563925 A JP2021563925 A JP 2021563925A JP 7304430 B2 JP7304430 B2 JP 7304430B2
- Authority
- JP
- Japan
- Prior art keywords
- key
- program
- key sharing
- random number
- sharing program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
Description
本出願は、2019年12月9日に出願された日本特許出願第2019-222400号の優先権を主張し、その内容を参照することにより本出願に取り込む。 This application claims priority from Japanese Patent Application No. 2019-222400 filed on December 9, 2019, the content of which is incorporated into the present application by reference.
本発明は、悪意を持ったプログラムの活動を防止するための技術に関する。 The present invention relates to technology for preventing malicious program activity.
モバイル端末の普及とWebサービスの高度化に伴い、サービスの種類も多様化している。特に近年では、モバイル決済のように、従来ATMや窓口の専用端末を経由していた支払いや送金に関するサービスをモバイル端末上で実行するサービスが流行の兆しを見せている。 With the spread of mobile terminals and the sophistication of web services, the types of services are diversifying. Especially in recent years, services such as mobile payment, in which payments and remittances that have conventionally been performed via dedicated terminals at ATMs and tellers are executed on mobile terminals, are showing signs of popularity.
このようなサービスを利用する際には、専用のソフトウェア(以下、「プログラム」ともいう)をインストールし、そのプログラムを介してサービスを利用するのが一般的である。 When using such a service, it is common to install dedicated software (hereinafter also referred to as a "program") and use the service via that program.
また、サービスの利用に際してユーザ認証(もしくは端末認証)を行う必要があるが、このとき、ユーザ(もしくは端末)のみが持つ秘密情報が用いられる。このような認証の処理は、SIM(Subscriber Identity Module)チップ上の領域内で行われることが望ましいが、上記のように、プログラム上で秘密情報を取り扱うケースがほとんどである。これは、サービス用のプログラムをインストールするためには、SIMチップの記憶容量や処理能力が低いことが理由である。 Also, user authentication (or terminal authentication) must be performed when using a service, and at this time, secret information possessed only by the user (or terminal) is used. Such authentication processing is desirably performed within an area on a SIM (Subscriber Identity Module) chip, but as described above, in most cases confidential information is handled on a program. This is because the SIM chip has a low memory capacity and processing power for installing the service program.
一方で、モバイル端末のセキュリティという観点では、一定の割合でモバイル端末が不正ソフトウェア(以下、「マルウェア」という)に感染しているという現実があり、金融サービスに特化したマルウェアの存在も確認されている。特に、メモリ上に置かれたデータを読み取ってクレジットカード番号などを取り出すマルウェアの存在が報告されており、プログラムの実行中にメモリに置かれるデータを保護する必要がある。 On the other hand, from the perspective of mobile terminal security, the reality is that a certain percentage of mobile terminals are infected with malicious software (hereinafter referred to as "malware"), and the existence of malware specialized in financial services has also been confirmed. ing. In particular, there have been reports of the existence of malware that extracts credit card numbers by reading data placed in memory, so it is necessary to protect data placed in memory during program execution.
上記のような課題への対策として、メモリ上のデータを暗号化して格納する方法がある。例えば、特許文献1は、CPUやメモリ機構などの特別のハードウェアのサポートを必要とせずにメモリ上にデータを格納する際に暗号化を行う技術を開示している。この技術では、暗号化処理を行うプログラムが、暗号化に用いる鍵(以下、「鍵」という)の生成、管理をCPU内で行う。
As a countermeasure against the above problems, there is a method of encrypting and storing data on the memory. For example,
予めインストールされていたり、後から必要に応じてインストールしたりする複数のプログラム間で、マルウェアに対して安全にデータのやり取りを行う方法として、上記で述べたような方法でメモリ上のデータを暗号化したものをプログラム間でやり取りする方法がある。この方法では、メモリ上のデータの暗号化に用いた鍵をプログラム間で共有する必要がある。 As a way to safely exchange data against malware between multiple programs that are installed in advance or installed later as needed, encrypting data in memory using the method described above There is a way to exchange the converted one between programs. This method requires that the programs share the key used to encrypt the data in memory.
また、複数のプログラム間でデータをやり取りする方法として、複数のプログラムがアクセスできるメモリ上の共有領域を作成し、この共有領域を介してデータのやり取りをする方法がある。一般的に、共有領域を作成する際は共有領域に紐づく識別子を設定する。共有領域を利用するプログラムはこの共有領域に紐づく識別子を用いて共有領域にアクセスし、共有領域内の値の取得や値の書き込みを行う。複数のプログラム間で共有領域を用いてデータのやり取りを行うためには、共有領域に紐づく識別子をプログラム間で共有する必要がある。 Also, as a method of exchanging data between a plurality of programs, there is a method of creating a shared area on a memory that can be accessed by a plurality of programs and exchanging data via this shared area. Generally, when creating a shared area, an identifier associated with the shared area is set. A program that uses the shared area accesses the shared area using the identifier associated with the shared area, and acquires or writes values in the shared area. In order to exchange data using a shared area between a plurality of programs, it is necessary to share an identifier associated with the shared area among the programs.
複数プログラム間での鍵共有方法として、上記の共有領域を介して鍵をやり取りする方法を考える。非特許文献1において、共有領域に攻撃者がアクセスできる場合、攻撃者が共有領域上のデータを取得する危険があることが報告されている。複数プログラム間での鍵共有に共有領域を用いる場合、マルウェアが共有領域上に格納されているメモリ上のデータの秘匿に用いる鍵を取得すると、メモリ上のデータの秘匿を無効化する危険がある。
As a key sharing method between multiple programs, consider a method of exchanging keys via the above-mentioned shared area. Non-Patent
本発明は、上記事情に鑑みなされたものであり、2つのプログラム間で安全に鍵を共有することのできる技術を提供する。 SUMMARY OF THE INVENTION The present invention has been made in view of the circumstances described above, and provides a technique for safely sharing a key between two programs.
上記目的を達成するため、一観点に係る情報処理システムは、
データとプログラムとを格納する主記憶装置と、主記憶装置に接続され、プログラムを実行するプロセッサと、を備える情報処理システムであって、
所定の割当基準に基づいて、実行するプログラムにプロセッサ及び主記憶装置を含むリソースの割り当てを行うためのOS(オペレーティングシステム)と、
鍵を共有して処理を実行するための第1鍵共有プログラム及び第2鍵共有プログラムを備え、
プロセッサは、OSを実行して、
第1鍵共有プログラムと第2鍵共有プログラムとで処理に共有可能な共有領域とを設定し、
第1鍵共有プログラムにリソースを割り当て、
第2鍵共有プログラムにリソースを割り当て、
プロセッサは、OSを実行して、第1鍵共有プログラムを実行することにより、
第2鍵共有プログラムが第2鍵を生成するための乱数を特定可能な乱数データの生成と、共有領域への乱数データの格納と、を繰り返し、
プロセッサは、OSを実行して、第2鍵共有プログラムを実行することにより、
共有領域に格納された乱数データを取得することを繰り返し、
取得した複数の乱数データに基づいて第2鍵を生成し、
第2鍵を生成するために使用した取得した複数の乱数データを特定可能な鍵生成情報を生成し、
鍵生成情報を共有領域に格納し、
プロセッサは、OSを実行して、第1鍵共有プログラムを実行することにより、
共有領域に格納された鍵生成情報に基づいて第1鍵を生成することを特徴とする。
本明細書において開示される主題の、少なくとも一つの実施の詳細は、添付されている図面と以下の記述の中で述べられる。開示される主題のその他の特徴、態様、効果は、以下の開示、図面、請求項により明らかにされる。In order to achieve the above object, an information processing system according to one aspect includes:
An information processing system comprising a main memory storing data and programs, and a processor connected to the main memory and executing the programs,
an OS (operating system) for allocating resources including processors and main storage devices to programs to be executed based on predetermined allocation criteria;
comprising a first key sharing program and a second key sharing program for sharing a key and executing processing;
The processor runs an OS and
setting a shared area that can be shared for processing by the first key sharing program and the second key sharing program;
Allocating resources for the first key agreement program;
Allocating resources for a second key agreement program;
By executing the OS and executing the first key sharing program, the processor
Repeating the generation of random number data that can identify the random number for the second key sharing program to generate the second key, and the storage of the random number data in the shared area,
By executing the OS and executing the second key sharing program, the processor
Repeatedly obtaining random number data stored in the shared area,
generating a second key based on the obtained plurality of random number data;
generating key generation information capable of identifying a plurality of obtained random number data used to generate the second key;
Store the key generation information in the shared area,
By executing the OS and executing the first key sharing program, the processor
The first key is generated based on the key generation information stored in the shared area.
The details of at least one implementation of the subject matter disclosed in this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the disclosed subject matter will become apparent from the following disclosure, drawings, and claims.
本発明によれば、2つのプログラム間で安全に鍵を共有することができる。 According to the present invention, a key can be securely shared between two programs.
実施形態について説明する。なお、以下に説明する実施形態は特許請求の範囲に係る発明を限定するものではなく、また実施形態の中で説明されている諸要素及びその組み合わせの全てが発明の解決手段に必須であるとは限らない。 An embodiment will be described. It should be noted that the embodiments described below do not limit the invention according to the scope of claims, and that all of the elements described in the embodiments and their combinations are essential to the solution of the invention. is not limited.
以下の説明では、「AAAテーブル」の表現にて情報を説明することがあるが、情報は、どのようなデータ構造で表現されていてもよい。すなわち、情報がデータ構造に依存しないことを示すために、「AAAテーブル」を「AAA情報」と呼ぶことができる。 In the following description, the information may be described using the expression of "AAA table", but the information may be expressed in any data structure. That is, the "AAA table" can be called "AAA information" to indicate that the information is independent of the data structure.
また、以下の説明では、「プログラム」を動作の主体として処理を説明する場合があるが、プログラムは、プロセッサ(例えばCPU(Central Processing Unit))によって実行されることで、定められた処理を、適宜に記憶部(例えばメモリ)及び/又はインターフェースデバイス(例えば通信ポート)等を用いながら行うため、処理の動作の主体が、プロセッサ(或いは、そのプロセッサを有する装置又はシステム)とされてもよい。また、プロセッサは、処理の一部または全部を行うハードウェア回路を含んでもよい。プログラムは、プログラムソースから計算機のような装置にインストールされてもよい。プログラムソースは、例えば、プログラム配布サーバまたは計算機が読み取り可能な記憶メディアであってもよい。また、以下の説明において、2以上のプログラムが1つのプログラムとして実現されてもよいし、1つのプログラムが2以上のプログラムとして実現されてもよい。 Further, in the following description, the processing may be described with the "program" as the subject of the operation, but the program is executed by a processor (for example, a CPU (Central Processing Unit)) to perform a predetermined process. A processor (or a device or system having the processor) may be the subject of the operation of the processing because it is performed using a storage unit (e.g. memory) and/or an interface device (e.g. communication port) as appropriate. A processor may also include hardware circuitry that performs some or all of the processing. A program may be installed on a device, such as a computer, from a program source. The program source may be, for example, a program distribution server or a computer-readable storage medium. Also, in the following description, two or more programs may be implemented as one program, and one program may be implemented as two or more programs.
まず、本実施形態の概要について説明する。 First, the outline of this embodiment will be described.
本実施形態では、情報処理システムの一例としての端末のOS(オペレーティングシステム)を改変することなく、プログラム間で安全に鍵共有を行うようにする。このため、本実施形態では、例えば、以下に示すOSの機能を利用する。 In the present embodiment, the programs securely share the key without modifying the OS (Operating System) of the terminal as an example of the information processing system. Therefore, in this embodiment, for example, the following OS functions are used.
OS(厳密には、OSを実行するプロセッサ)は、端末内の情報を用いた所定の割当基準に従ってプログラムごとにリソースの割り当てを行う。一般的には、OSによる各プログラムへのリソースの割当順序は一定ではないので、複数のプログラムから同時に同一リソースへアクセスする試行を繰り返した場合、リソースへのプログラムのアクセス順も一定とはならない。 The OS (strictly speaking, the processor that executes the OS) allocates resources to each program according to predetermined allocation criteria using information in the terminal. In general, the order in which resources are allocated to programs by the OS is not constant, so if multiple programs repeatedly attempt to access the same resource at the same time, the order in which the programs access the resources is not constant.
プログラム(厳密には、プログラムを実行するプロセッサ)が、OSによって用意されているAPI(Application Programming Interface)を呼び出すことで、OSはメモリ内に複数のプログラムがアクセスすることができる領域(「共有領域」という)を確保する。 A program (strictly speaking, the processor that executes the program) calls an API (Application Programming Interface) prepared by the OS, and the OS creates an area in memory that can be accessed by multiple programs ("shared area"). ).
本実施形態では、例えば、以下のような方法により、プログラム間(第1鍵共有プログラムと第2鍵共有プログラムとの間)で鍵の共有を行う。 In this embodiment, the key is shared between the programs (between the first key sharing program and the second key sharing program) by, for example, the following method.
第1鍵共有プログラム(厳密には、第1鍵共有プログラムを実行するプロセッサ)は、乱数とインデックス情報を生成し、これらの組を乱数データとして共有領域に書き込む処理を繰り返し行う。また、第1鍵共有プログラムは、共有領域に書き込んだ乱数データを乱数データテーブルに記録する。 The first key sharing program (strictly speaking, the processor that executes the first key sharing program) repeats the process of generating a random number and index information and writing a set of these as random number data in the shared area. Also, the first key sharing program records the random number data written in the shared area in the random number data table.
一方、第2鍵共有プログラム(厳密には、第2鍵共有プログラムを実行するプロセッサ)は、第1鍵共有プログラムが共有領域に乱数データを書き込む処理を繰り返し行っている間、共有領域内の乱数データの取得を繰り返し行う。第2鍵共有プログラムは、共有領域から取得した乱数データの乱数を用いて鍵を生成する。また、第2鍵共有プログラムは、鍵の生成に用いた全ての乱数データのインデックス番号を鍵生成情報として共有領域に書き込む。 On the other hand, the second key sharing program (strictly speaking, the processor that executes the second key sharing program) writes the random number data in the shared area while the first key sharing program repeatedly writes the random number data in the shared area. Repeat data acquisition. The second key sharing program generates a key using random numbers in the random number data obtained from the shared area. Also, the second key sharing program writes the index numbers of all the random number data used for key generation to the shared area as key generation information.
第1鍵共有プログラムは、共有領域内に格納されている鍵生成情報を取得し、この鍵生成情報に基づいて、乱数データテーブルから第2鍵共有プログラムが鍵生成に用いた乱数を取得し、取得した乱数を用いて鍵を生成する。 The first key sharing program obtains the key generation information stored in the shared area, and based on this key generation information, obtains the random number used by the second key sharing program to generate the key from the random number data table, Generate a key using the obtained random number.
これらの一連の処理によって、第1鍵共有プログラムと、第2鍵共有プログラムとは、それぞれが同一の値をもつ鍵を生成することができる、すなわち鍵の共有を行うことができる。 Through this series of processes, the first key sharing program and the second key sharing program can generate keys having the same value, that is, share the keys.
本実施形態によれば、OS上で動く各プログラムが共有領域にアクセスできるタイミングは、OSによって所定の割当基準に基づいて随時決定される。このため、上述したように、プログラム間で共有領域を介して鍵生成を行うための乱数データの格納及び取得を繰り返し行うことで、例えば、マルウェアが共有領域にアクセスできる場合においても、第2鍵共有プログラムが鍵生成に用いる乱数データの全てをマルウェアが取得することが困難であり、また、第2鍵共有プログラムが取得する乱数データの全てをマルウェアが書き込むことも困難である。 According to this embodiment, the timing at which each program running on the OS can access the shared area is determined as needed by the OS based on a predetermined allocation criterion. For this reason, as described above, by repeatedly storing and acquiring random number data for key generation via a shared area between programs, even if malware can access the shared area, the second key It is difficult for malware to acquire all of the random number data that the sharing program uses for key generation, and it is also difficult for malware to write all of the random number data that the second key sharing program acquires.
この結果、マルウェアが第1鍵共有プログラムと第2鍵共有プログラムとの間で使用する鍵を取得することが困難であり、これによってマルウェアがメモリ上のデータに施されている秘匿処理を無効化するリスクを軽減できる。 As a result, it is difficult for the malware to obtain the key to be used between the first key sharing program and the second key sharing program. reduce the risk of
以下に、本実施形態を図面を参照して詳細に説明する。 The present embodiment will be described in detail below with reference to the drawings.
図1は、一実施形態に係るネットワークシステムの全体構成図である。 FIG. 1 is an overall configuration diagram of a network system according to one embodiment.
ネットワークシステム100は、情報処理システムの一例としての情報処理装置(端末)102と、プログラム配信サーバ103と、認証サーバ111と、プログラムサーバ112とを有する。端末102は、ユーザ101によって使用される。認証サーバ111と、プログラムサーバ112とは、サービス提供者110による所定のサービスを提供する。
The
端末102は、ユーザ101の操作に従って、プログラム配信サーバ103からサービス提供者110が提供するサービスを利用するためのプログラムをダウンロードする。端末102は、ユーザ101の操作によってダウンロードしたプログラムをインストールする。ユーザ101は、プログラムをインストールした後に、端末102により認証サーバ111にアクセスしてユーザ登録を行うことができる。ユーザ101は、ユーザ登録を行った後に、端末102を用いてサービス提供者110のサービスを利用することが可能となる。
The terminal 102 downloads a program for using the service provided by the
端末102は、ユーザ101からサービス利用の指示を受けた場合には、認証サーバ111によるユーザ認証(または装置認証)を受けた後に、プログラムサーバ112を通じてサービスを利用できるようにする。
When the terminal 102 receives an instruction to use a service from the
図2は、一実施形態に係る端末の構成図である。 FIG. 2 is a configuration diagram of a terminal according to one embodiment.
端末102は、センサ202と、主記憶装置の一例としてのメモリ205と、プロセッサの一例としてのCPU206と、ネットワークIF(インターフェース)208と、ストレージ210とを備える。
The terminal 102 includes a
センサ202は、例えば、カメラやマイク等であり、ユーザ101の生体情報(例えば、指紋情報)201をセンシングし、センサデータ203を生成する。
The
メモリ205は、例えば、RAM(RANDOM ACCESS MEMORY)であり、CPU206で実行されるプログラムや、必要な情報を記憶する。
The
ネットワークIF208は、例えば、有線LANカードや無線LANカードなどのインターフェースであり、通信路を介して他の装置(例えば、プログラム配信サーバ103、認証サーバ111、プログラムサーバ112)と通信する。
The network IF 208 is, for example, an interface such as a wired LAN card or a wireless LAN card, and communicates with other devices (eg,
CPU206は、メモリ205及び/又はストレージ210に格納されているプログラムに従って各種処理を実行する。
The
ストレージ210は、例えば、ハードディスクやフラッシュメモリなどであり、CPU206で実行されるプログラムや、CPU206に利用されるデータを記憶する。本実施形態では、ストレージ210は、例えば、センサ202を介して生体情報201のセンサデータ203を取得するセンサ用プログラム211と、認証サーバ111とのデータの送受信を行う認証プログラム212と、格納する。
The
なお、端末102には、マルウェア204が含まれている可能性がある。なお、図2においては、マルウェア204を模式的に表示しているが、実際には、例えば、メモリ205やストレージ210に格納されている。
Note that the terminal 102 may contain
ここで、端末102が認証サーバ111によるユーザ認証を利用する場合の処理について説明する。
Here, processing when the terminal 102 uses user authentication by the
端末102のCPU206は、センサ用プログラム211を実行することにより、センサ202から、ユーザ101の生体情報201をセンシングして生成されたセンサデータ203を取得し、センサデータ203をメモリ205に格納する。次いで、CPU206は、認証プログラム212を実行することにより、センサデータ203に対して適切な処理を施して通信データ207を生成し、ネットワークIF208を介して認証サーバ311に送信する。これにより、認証サーバ311においてユーザ認証が実行されることとなる。
The
図3は、一実施形態に係る端末の機能構成図である。 FIG. 3 is a functional configuration diagram of a terminal according to one embodiment.
端末102は、図2に示す端末において、センサ用プログラム211と、認証プログラム212との間でセンサデータ203を安全に交換できるようにするために、センサ用プログラム211と認証プログラム212との間でデータを暗号化するようにした端末である。
In the terminal shown in FIG. 2, the terminal 102 allows the
以下の説明では、センサ用プログラム211と認証プログラム212との間で暗号化するための鍵共有を実行するための処理を行うプログラムが、後述する第1鍵共有プログラム305と第2鍵共有プログラム306を含んでいる場合について説明する。
In the following description, the programs that perform processing for executing key sharing for encryption between the
なお、第1鍵共有プログラム305と第2鍵共有プログラム306のいずれか一方または両方が、センサ用プログラム211や認証プログラム212に含まれないプログラムであってもよい。この場合の構成については後述する。
One or both of the first
端末102は、ネットワークIF208、センサ202、エントロピー発生器302、ストレージ210、CPU206、メモリ205を備える。これらの機能構成は、データバスで互いに繋がれており、メモリ205を介してデータをやり取り可能となっている。
エントロピー発生器302は、エントロピーを有する値(「エントロピー源」という)を生成する。ここで、疑似乱数を生成するための値(「seed」という)は、一般的にエントロピー源から生成される。生成されたエントロピー源のサイズが十分でない場合には、繰り返して生成されたエントロピー源に基づいてseedが生成される。
なお、エントロピー発生器302はOS304による機能として提供されていてもよいし、プログラムによる機能として提供されていてもよい。The
Note that the
CPU206は、演算処理で扱うデータを格納するための汎用レジスタ303を複数保持している。
The
ストレージ210は、プログラムの実行ファイルや設定ファイルを記憶する。本実施形態では、ストレージ210は、第1鍵共有プログラム305と、第2鍵共有プログラム306とを記憶する。第1鍵共有プログラム305及び第2鍵共有プログラム306は、プログラム間鍵共有プログラムに相当する。
The
なお、第1鍵共有プログラム305と、第2鍵共有プログラム306は、予めストレージ210に格納されていてもよいし、必要に応じて、他の装置の非一時的記憶装置からネットワーク経由で、または非一時的な記憶媒体から、ストレージ210に格納されてもよい。
Note that the first
メモリ205には、OS304と呼ばれるプログラムが常駐している。OS304は、CPU206に実行されることによって、ハードウェアとプログラムとの間のデータの仲介や、複数のプログラムの実行権限とリソースとの管理を行う。
A program called an
ユーザプログラムは、OS304の管理によって、ユーザ権限とよばれる限られた権限の元でCPU206により実行される。一方、OS304のリソース管理に関わる処理などは、より強い権限の元でCPU206により実行される。ここで、第1鍵共有プログラム305、第2鍵共有プログラム306、マルウェア204は、ユーザプログラムに対応する。
A user program is executed by the
メモリ205は、OS304の中心的な処理が利用するカーネル空間310と、ユーザプログラムが利用するユーザ空間320とを有する。
The
ユーザ空間320上には、ストレージ210に記憶されている第1鍵共有プログラム305及び第2鍵共有プログラム306等のユーザプログラムが実行されると展開される。
When user programs such as the first
ユーザ空間320上に展開された第1鍵共有プログラム321や、第2鍵共有プログラム324は、OS304がプログラム毎に割り当てるユーザ空間320上のメモリ利用領域(例えば、第1鍵共有プログラム321に割り当てられた第1鍵共有プログラム割り当て領域322や、第2鍵共有プログラム324に割り当てられた第2鍵共有プログラム割り当て領域325を使って、CPU206により処理が実行される。
The first key-
ユーザプログラムに割り当てられるメモリ205の利用領域は、ユーザプログラムの実行時に動的に確保されてもよいし、ユーザプログラムの実行の途中で動的に(例えば、C言語の標準ライブラリとして提供されるalloc関数などを介して)確保されてもよい。
The use area of the
一般的にOS304によってプログラム毎に異なる領域がプログラムのメモリの利用領域としてユーザ空間320上に割り当てられるが、メモリ205内のユーザ空間320上に複数プログラムがアクセス可能な共有領域を確保することをユーザプログラム実行開始時又は、実行中にOS304へ明示することで、共有領域323を確保することができる。
In general, the
複数のプログラムについての共有領域323の作成方法の例としては、非特許文献1のプロセス間通信手法(「IPC」という)の利用があげられる。IPCは、プロセス間でデータのやり取りを行うためにOS304が用意している仕組みである。IPCとしては、パイプ、メッセージキュー、共有メモリ、ソケットなどがあげられる。本実施形態では、第1鍵共有プログラム321と第2鍵共有プログラム324は、メモリ205のユーザ空間320に共有領域323を確保するように構成されている。なお、共有領域323の確保は、第1鍵共有プログラム321が行ってもよいし、第2鍵共有プログラム324が行ってもよい。なお、本実施形態では、便宜的に、第1鍵共有プログラム321が共有領域の確保を行うものとして説明する。
As an example of a method for creating the shared
OS304のプロセス管理機能は、複数のプログラムを実行する場合には、CPU206やメモリ205などのハードウェアリソースを、いずれかのプログラムに割り当て、適宜、このハードウェアリソースの割り当てを切り替え(「割り込み」という)を行う。例えば、第1鍵共有プログラム321の実行中に、第2鍵共有プログラム324による割り込みが発生すると、OS304を実行するCPU206は、第1鍵共有プログラム321の汎用レジスタ303の情報を、カーネル空間310の第1鍵共有プログラム退避領域311へ退避格納する。その後、CPU206は、ハードウェアリソースの次の割当先の第2鍵共有プログラム324に、ハードウェアリソースを割り当て、第2鍵共有プログラム324の実行を開始する。第2鍵共有プログラム324の実行が終了したら、CPU206は、第1鍵共有プログラム退避領域311のデータを汎用レジスタ303に復元し、第1鍵共有プログラム321の処理を再開する。
When executing a plurality of programs, the process management function of the
OS304を実行するCPU206は、例えば、サイクルカウンタなどの時刻情報やプログラムごとの実行優先度情報などに基づいて、ハードウェアリソースを割り当てるプログラムを決定し、必要に応じて割り込みのための処理を行う。したがって、実行対象の複数のプログラムがある場合には、複数のプログラムに対してハードウェアリソースを割り当てる順番は、必ずしも一定の順番にならない。
The
本実施形態の第1鍵共有プログラム321は、所定のルール(例えば、乱数データの配送開始要求から、配送終了要求までの間)に従って、乱数とインデックス情報とを含む乱数データを逐次生成し、共有領域323に格納する。ここで、乱数データが共有領域323に格納されるのは、OS304によって第1鍵共有プログラム321にリソースが割り当てられたタイミングとなる。このように共有領域323に格納された乱数データの少なくとも一部は、第2鍵共有プログラム324により取得されることとなる。また、第1鍵共有プログラム321は、共有領域323から第2鍵共有プログラム324により生成された鍵生成情報を取得し、鍵生成情報に基づいて、第1鍵を生成する。
The first
一方、第2鍵共有プログラム324は、共有領域323を介して第1鍵共有プログラム321により格納された乱数データを取得し、取得した乱数データに基づいて、第2鍵を生成し、第2鍵の生成に使用した乱数を特定可能な鍵生成情報を生成し、共有領域323に格納する。ここで、共有領域323から乱数データを取得されるのは、OS304によって第2鍵共有プログラム324にリソースが割り当てられたタイミングとなる。
On the other hand, the second
本実施形態では、マルウェア204等の影響がない場合においては、第1鍵共有プログラム321により生成される第1鍵と、第2鍵共有プログラム324により第2鍵は、同じ値となる。すなわち、第1鍵共有プログラム321と、第2鍵共有プログラム324とは鍵を共有することができる。なお、鍵の共有についての詳細は後述する。
In this embodiment, the first key generated by the first
次に、第1鍵共有プログラム321及び第2鍵共有プログラム324を、CPU206が実行することにより構成される機能構成について詳細に説明する。
Next, a functional configuration configured by the
図4は、一実施形態に係る第1鍵共有プログラム及び第2鍵共有プログラムにより実現される機能構成図である。 FIG. 4 is a functional configuration diagram realized by a first key sharing program and a second key sharing program according to one embodiment.
第1鍵共有プログラム321をCPU206が実行することにより、乱数データ生成・配送部400と、鍵生成情報取得・鍵生成部410と、第1データ秘匿処理部420とが構成される。
By executing the first
乱数データ生成・配送部400は、乱数データを生成して共有領域323に格納することにより、共有領域323を介して第2鍵共有プログラム324へ乱数データが配送されるようにする。
The random number data generation/distribution unit 400 generates random number data and stores it in the shared
乱数データ生成・配送部400は、乱数データ生成部401と、乱数データ配送部404とを備える。
The random number data generation/distribution unit 400 includes a random number data generation unit 401 and a random number
乱数データ生成部401は、乱数とインデックス情報とを含む乱数データを生成する。乱数データ生成部401は、乱数生成部402と、インデックス生成部403とを備える。乱数生成部402は、エントロピー発生器により発生されたエントロピー源によって生成されたseedを用いて乱数を生成する。
The random number data generator 401 generates random number data including random numbers and index information. The random number data generator 401 includes a random number generator 402 and an
このとき、乱数生成部402によって生成される乱数1個のデータサイズは第1鍵および第2鍵の生成に必要な乱数のサイズよりも小さくてもよい。インデックス生成部403は、生成された乱数を識別するインデックス情報を生成する。インデックス生成部403は、例えば、カウンタによる出力をインデックス情報としてもよい。
At this time, the data size of one random number generated by the random number generation unit 402 may be smaller than the size of random numbers required to generate the first and second keys. The
乱数データ配送部404は、乱数データ生成部401で生成された乱数データを共有領域323に格納する。
The random number
鍵生成情報取得・鍵生成部410は、第2鍵共有プログラム324によって共有領域323に格納された鍵生成情報を取得して、鍵生成情報に基づいて第1鍵を生成する。鍵生成情報取得・鍵生成部410は、鍵生成情報取得部411と、第1鍵生成部412とを備える。鍵生成情報取得部411は、共有領域323から第2鍵共有プログラム324に格納された鍵生成情報を取得する。第1鍵生成部412は、鍵生成情報取得部411が取得した鍵生成情報を用いて第1鍵を生成する。
The key generation information acquisition/key generation unit 410 acquires the key generation information stored in the shared
第1データ秘匿処理部420は、生成された第1鍵を用いてメモリ205上に格納するデータの秘匿処理を行いながら所定の処理を行う。例えば、第1データ秘匿処理部420は、センサデータ203を第1鍵で暗号化する秘匿処理を行って、メモリ205に格納する。なお、第1データ秘匿処理部420の秘匿処理としては、例えば、特許文献1の方法を用いてもよい。
The first data
第2鍵共有プログラム324は、乱数データ取得・鍵生成部430と、第2データ秘匿処理部440とを備える。
The second
乱数データ取得・鍵生成部430は、共有領域323から乱数データを取得して第2鍵を生成する。乱数データ取得・鍵生成部430は、乱数データ取得部431と、第2鍵生成部432と、鍵生成情報配送部433とを備える。乱数データ取得部431は、共有領域323から乱数データを取得する。第2鍵生成部432は、乱数データ取得部431が取得した乱数データに基づいて、第2鍵を生成する。第2鍵生成部432は、乱数データ取得部431が取得した複数の乱数データに基づいて、第2鍵を生成してもよく、例えば、複数の乱数データの中から1以上の乱数データを選択し、選択した乱数データを使用して第2鍵を生成してもよい。鍵生成情報配送部433は、鍵生成に用いた全ての乱数データのインデックス情報を鍵生成情報として共有領域323に格納する。
Random number data acquisition/
第2データ秘匿処理部440は、第2鍵を用いてメモリ205上に格納するデータの秘匿処理を行いながら所定の処理を行う。例えば、第2データ秘匿処理部420は、メモリ205に格納された暗号化されたセンサデータ203を、第2鍵を用いて復号し、復号したセンサデータ203を用いて例えば認証処理を実行する。なお、第2データ秘匿処理部440の秘匿処理としては、例えば、特許文献1の方法を用いてもよい。
また、第2データ秘匿処理部440から第1データ秘匿処理部420へデータを送る際も、上述の処理を同様に行えばよい。The second data
Also, when sending data from the second data
次に、第1鍵共有プログラム305の実行時における端末102の構成について説明する。
Next, the configuration of
図5は、一実施形態に係る第1鍵共有プログラムの実行時における状態を示す機能構成図である。なお、図3に示す要素と同様な部分については、同一符号を付し、重複する説明を省略する。 FIG. 5 is a functional configuration diagram showing a state during execution of the first key sharing program according to one embodiment. In addition, the same reference numerals are given to the same parts as the elements shown in FIG. 3, and overlapping explanations are omitted.
第1鍵共有プログラム305がメモリ205のユーザ空間320上に第1鍵共有プログラム321として展開される。CPU206は、汎用レジスタ303や、メモリ205上の第1鍵共有プログラム割り当て領域322にプログラム変数や処理中のデータを格納しながら、第1鍵共有プログラム321を実行する。
The first
汎用レジスタ303には、処理の状況に応じて、seed501、乱数データテーブル502、第1鍵503、鍵生成情報504、インデックス情報505、乱数506が格納される。
The general-
また、共有領域323には、処理で使用する乱数データ524や、鍵生成情報525が格納される。
Also, the shared
このように第1鍵共有プログラム321を実行している最中に、他のプログラム(マルウェア204も含む)による割り込みが発生した場合には、OS304の機能により、CPU206は、汎用レジスタ303上のデータ(seed501、乱数データテーブル502、第1鍵503、鍵生成情報504、インデックス情報505、乱数506等)を、カーネル空間310の第1鍵共有プログラム退避領域311に格納する。この場合、割り込みによって実行されることとなったプログラムでは、第1鍵共有プログラム退避領域311内のデータにアクセスすることはできない。したがって、マルウェア204は、第1鍵共有プログラム退避領域311からseed501、乱数データテーブル502、第1鍵503、鍵生成情報504、インデックス情報505、乱数506等を取得することができないので、情報が漏洩することを防止できる。
In this way, if another program (including the malware 204) interrupts while the first
なお、図5の例では、seed501、乱数データテーブル502、第1鍵503、鍵生成情報504、インデックス情報505、乱数506を汎用レジスタ303に格納するようにしていたが、メモリ205上に格納するようにしてもよい。
In the example of FIG. 5, the
次に、CPU206が第1鍵共有プログラム321を実行することにより行われる乱数データ生成処理について説明する。この乱数データ生成処理は、図4に示す乱数データ生成・配送部400によって実行される。
Next, random number data generation processing performed by the
図6は、一実施形態に係る乱数データ生成処理のフローチャートである。 FIG. 6 is a flowchart of random number data generation processing according to one embodiment.
まず、乱数データ生成・配送部400は、メモリ205のユーザ空間320に、第2鍵共有プログラム324とで共有する共有領域323を確保する(ステップ601)。
First, the random number data generation/distribution unit 400 secures a shared
次いで、乱数データ生成・配送部400は、第2鍵共有プログラム324から乱数データの配送を開始する要求(配送開始要求)を受信したか否かを確認し(ステップ602)、受信していない場合(ステップ602:No)には、配送開始要求を受信するまで待機する。 Next, the random number data generation/distribution unit 400 checks whether or not a request to start distribution of random number data (distribution start request) has been received from the second key sharing program 324 (step 602). (Step 602: No) waits until a delivery start request is received.
一方、配送開始要求を受信した場合(ステップ602:Yes)には、乱数データ生成・配送部400は、乱数生成部402によって乱数を生成し、インデックス生成部403によって、生成した乱数を示すインデックス情報を生成する(ステップ603)。
On the other hand, when the delivery start request is received (step 602: Yes), the random number data generation/delivery unit 400 generates a random number by the random number generation unit 402, and the index information indicating the generated random number by the
次いで、乱数データ生成・配送部400は、生成した乱数と、対応するインデックス情報とを含む乱数データ524を共有領域323に書き込む(ステップ604)。なお、共有領域323に、すでに書き込まれている乱数データ524が存在する場合には、乱数データ生成・配送部400は、この乱数データを新たな乱数データ524により上書きする。これにより、共有領域323には、最新の乱数データ524が存在することとなる。
Next, random number data generation/distribution unit 400 writes
次いで、乱数データ生成・配送部400は、新しい乱数データ524をエントリとして乱数データテーブル502に追加する(ステップ605)。この結果、乱数データテーブル502には、乱数データ生成・配送部400により生成された各乱数データ524に対応するエントリが格納されることとなる。
Next, the random number data generation/distribution unit 400 adds the new
次いで、乱数データ生成・配送部400は、第2鍵共有プログラム324から乱数データの配送を終了する要求(配送終了要求)を受信したか否かを確認する(ステップ606)。この結果、配送終了要求を受信していない場合(ステップ606:No)には、まだ乱数データを生成する必要があるので、乱数データ生成・配送部400は、処理をステップ603に進める。 Next, the random number data generation/delivery unit 400 checks whether or not a request to end delivery of random number data (delivery end request) has been received from the second key sharing program 324 (step 606). As a result, if the delivery end request has not been received (step 606: No), the random number data generation/delivery unit 400 advances the process to step 603 because it is still necessary to generate random number data.
一方、配送終了要求を受信した場合(ステップS606:Yes)には、乱数データ生成・配送部400は、処理を終了する。 On the other hand, when the delivery end request is received (step S606: Yes), the random number data generation/delivery unit 400 ends the process.
なお、第1鍵共有プログラム321と第2鍵共有プログラム324とのメモリ205の共有領域323の確保を第2鍵共有プログラム324が行う場合には、ステップ601を行わなくてよい。
If the second
次に、第2鍵共有プログラム306の実行時における端末102の構成について説明する。
Next, the configuration of
図7は、一実施形態に係る第2鍵共有プログラムの実行時における状態を示す機能構成図である。なお、図3に示す要素と同様な部分については、同一符号を付し、重複する説明を省略する。 FIG. 7 is a functional configuration diagram showing a state during execution of the second key sharing program according to one embodiment. In addition, the same reference numerals are given to the same parts as the elements shown in FIG. 3, and overlapping explanations are omitted.
第2鍵共有プログラム306がメモリ205のユーザ空間320上に第2鍵共有プログラム324として展開される。CPU206は、汎用レジスタ303や、メモリ205上の第2鍵共有プログラム割り当て領域325にプログラム変数や処理中のデータを格納しながら、第2鍵共有プログラム324を実行する。
The second
汎用レジスタ303には、処理の状況に応じて、乱数データプール711、第2鍵713、鍵生成情報714が格納される。乱数データプール711には、共有領域323から取得された複数の乱数データ712が格納される。
The general-
このように第2鍵共有プログラム324を実行している最中に、他のプログラム(マルウェア204も含む)による割り込みが発生した場合には、OS304の機能により、CPU206は、汎用レジスタ303上のデータ(例えば、乱数データプール711の乱数データ712、第2鍵713、鍵生成情報714等)を、カーネル空間310の第2鍵共有プログラム退避領域312に格納する。この場合、割り込みによって実行されることとなったプログラムでは、第2鍵共有プログラム退避領域312内のデータにアクセスすることはできない。したがって、マルウェア204は、第2鍵共有プログラム退避領域312から乱数データプール711の乱数データ712、第2鍵713、鍵生成情報714等を取得することができないので、情報が漏洩することを防止できる。
In this way, if another program (including the malware 204) interrupts while the second
次に、CPU206が第2鍵共有プログラム324を実行することにより行われる乱数データ取得処理について説明する。この乱数データ取得処理は、図4に示す乱数データ取得部431によって実行される。
Next, random number data acquisition processing performed by the
図8は、一実施形態に係る乱数データ取得処理のフローチャートである。 FIG. 8 is a flowchart of random number data acquisition processing according to one embodiment.
まず、乱数データ取得部431は、第1鍵共有プログラム321に対して、乱数データの配送開始要求を送信する(ステップ801)。
First, the random number
次いで、乱数データ取得部431は、共有領域323の乱数データ524を取得し、乱数データプール711に乱数データ712として追加格納する(ステップ802)。ここで、乱数データ取得部431が共有領域323から乱数データ524を取得できるタイミングは、OS304によりリソースが割り当てられたタイミングであり、取得される乱数データ524は、その時点で共有領域323に格納されている乱数データ524である。したがって、第1鍵共有プログラム321により共有領域323に逐次格納される乱数データ524の全てを取得できるとは限らない。
Next, the random number
次いで、乱数データ取得部431は、乱数データプール711内の乱数データ712の個数、すなわち、使用可能な乱数のサイズが鍵の生成に十分なサイズであるか否かを判定する(ステップ803)。例えば、1つの乱数データ712の乱数のサイズが鍵の生成に必要なサイズよりも小さい場合であれば、複数の乱数データを取得したか否かが判定される。
Next, the random number
この結果、乱数のサイズが鍵の生成に十分なサイズでない場合(ステップ803:No)には、乱数データ取得部431は、処理をステップ802に進めて、更に乱数データを取得する。
As a result, if the size of the random number is not sufficient for key generation (step 803: No), the random number
一方、乱数のサイズが鍵の生成に十分なサイズである場合(ステップ803:Yes)には、乱数データ取得部431は、配送終了要求を第1鍵共有プログラム321に送信し(ステップ804)、処理を終了する。
On the other hand, if the size of the random number is sufficient for key generation (step 803: Yes), the random number
この乱数データ取得処理によると、第2鍵共有プログラム324において鍵を生成するために必要な乱数を適切に取得することができる。
According to this random number data acquisition process, the random numbers required for key generation in the second
なお、第1鍵共有プログラム321と第2鍵共有プログラム324とで共有するメモリ205の共有領域323の確保を第2鍵共有プログラム324が行う場合には、ステップ801を行う前に、図6のステップ601で示す処理と同様な処理を行えばよい。
Note that when the second
次に、第1鍵共有プログラム321と、第2鍵共有プログラム324との間で鍵を共有する鍵共有処理について説明する。
Next, key sharing processing for sharing a key between the first
図9は、一実施形態に係る第1鍵共有プログラム及び第2鍵共有プログラムの間の鍵共有処理のシーケンス図である。 FIG. 9 is a sequence diagram of key sharing processing between the first key sharing program and the second key sharing program according to one embodiment.
まず、第2鍵共有プログラム324は、第1鍵共有プログラム321へ乱数データ524の配送開始要求を送信する(ステップS11)。
First, the second
第1鍵共有プログラム321は、配送開始要求を受信すると、乱数データを共有領域323に繰り返し書き込む処理を実行する(ステップS12)。
Upon receiving the delivery start request, the first
ここで、図9においては、乱数を、生成された順番にr0、r1、・・・と表し、それぞれの乱数のインデックス番号を0、1、・・・と表し、乱数データを(乱数,インデックス番号)で表している。Here, in FIG. 9, the random numbers are represented by r 0 , r 1 , . , index number).
図9の例では、第1鍵共有プログラム321は、乱数データ(r0,0)を共有領域323に格納し、乱数データ(r1,1)を共有領域323に格納し、乱数データ(r2,2)を共有領域323に格納するといったように、第2鍵共有プログラム324から配信終了要求を受信するまで、乱数データを生成し、共有領域323に格納する処理を繰り返し実行する。また、第1鍵共有プログラム321は、各乱数データを、エントリとして乱数データテーブル502に追加する。なお、第1鍵共有プログラム321が乱数データを共有領域323に格納するタイミングは、OS304が第1鍵共有プログラム321にリソースを割り当てたタイミングに依存する。In the example of FIG. 9, the first
一方、第2鍵共有プログラム324は、共有領域323から乱数データを取得する処理を繰り返し実行する(ステップS13)。
On the other hand, the second
ここで、第2鍵共有プログラム324が乱数データを共有領域323から取得するタイミングは、OS304が第2鍵共有プログラム324にリソースを割り当てたタイミングに依存する。このため、例えば、図9に示すように、第1鍵共有プログラム321によって、乱数データ(r1,1)が共有領域323に格納されてから、乱数データ(r2,2)が共有領域323に格納されるまでの間に、第2鍵共有プログラム324による共有領域323からの乱数データの取得が行われず、第2鍵共有プログラム324では、乱数データ(r1,1)を取得できないことが発生することもある。なお、本実施形態では、第2鍵共有プログラム324は、第1鍵共有プログラム321が格納した乱数データ524のすべてを取得しておく必要はない。Here, the timing at which the second
この後、第2鍵共有プログラム324は、乱数データプール711の乱数データ712のサイズが鍵を生成するのに十分なサイズ以上になったときには、配送終了要求を、第1鍵共有プログラム321に送信する(ステップS14:図8のステップ804に対応)。この結果、第1鍵共有プログラム321は、乱数データの生成処理を終了する。
After that, the second
次に、第2鍵共有プログラム324は、取得した複数の乱数データ712の全て又は一部を用いて、第2鍵713を生成する。なお、鍵の生成に必要なサイズが確保できるのであれば、いずれの乱数データ712を選択して使用してもよい。
Next, the second
更に、第2鍵共有プログラム324は、第2鍵713の生成に用いた乱数データ712のインデックス番号を鍵生成情報525として共有領域323に書き込む(ステップS15)。この鍵生成情報525によると、どの乱数データの乱数を用いて第2鍵713を生成したのかを特定することができる。
Further, the second
一方、第1鍵共有プログラム321は、共有領域323から鍵生成情報525を取得する(ステップS16)。
On the other hand, the first
この後、第1鍵共有プログラム321は、鍵生成情報525に基づいて、乱数データテーブル502を参照することにより、第2鍵共有プログラム324が第2鍵713を生成する際に用いた乱数を取得し、これらの乱数を用いて第1鍵503を生成する。なお、乱数から鍵を生成する方法は、予め第1鍵共有プログラム321と、第2鍵共有プログラム324とで共通の方法として決められている。
Thereafter, the first
上記処理によると、第1鍵共有プログラム321と第2鍵共有プログラム324とはそれぞれ同じ乱数を用いて鍵を生成することとなるので、第1鍵503と第2鍵713との値が一致することとなる。すなわち、第1鍵共有プログラム321と第2鍵共有プログラム324とは鍵の共有に成功する。このとき、第1鍵共有プログラム321は鍵生成情報525の取得を一定時間繰り返してもよい。第1鍵共有プログラムは値の異なる複数の鍵生成情報525を受信したとき、第2鍵共有プログラム324になりすますマルウェア204を検知することができる。
According to the above process, the first
なお、上記実施形態において、第1鍵共有プログラム321は、共有領域323に書き込んだ乱数データ524を、第2鍵共有プログラム324が取得したか否かを確認するようにしてもよく、この場合には、例えば、第2鍵共有プログラム324による乱数データ524の取得が行われていない場合には、次の乱数データを格納するのを遅くしたり、乱数データの格納を行う周期を長くしたりしてもよい。このようにすることにより、CPU205の処理負荷を低減することができる。
In the above embodiment, the first
上記実施形態において、第1鍵共有プログラム321と第2鍵共有プログラム324とがお互いに鍵の共有に成功したか否かを確認する鍵共有確認処理を更に行う鍵共有処理(第1変形例)が考えられる。
In the above-described embodiment, key sharing processing (first modified example) further performs key sharing confirmation processing for confirming whether or not the first
図10は、第1変形例に係る鍵共有処理のシーケンス図である。なお、図9に示す鍵共有処理と同様な処理については、同一の符号を付し、重複する説明を省略する。 FIG. 10 is a sequence diagram of key sharing processing according to the first modification. Note that processing similar to the key sharing processing shown in FIG. 9 is given the same reference numerals, and redundant description is omitted.
この鍵共有処理においては、メッセージ認証符号(「MAC」という)を用いて、第1鍵共有プログラム321と第2鍵共有プログラム324とがお互いに鍵共有が成功したか否か確認するようにしている。
In this key sharing process, the first
第1鍵共有プログラム321は、第1鍵503を生成した後に、任意のメッセージmと第1鍵503を用いてMAC値を計算し、使用したメッセージmと、MAC値とを共有領域323に格納する(ステップS17)。なお、図10においては、メッセージmと第1鍵503を用いて計算したMAC値をMAC(m,第1鍵)と表している。
After generating the
一方、第2鍵共有プログラム324は、共有領域323からメッセージmとMAC値とを取得する(ステップS18)。次いで、第2鍵共有プログラム324は、メッセージmと第2鍵713とからMAC値(MAC(m,第2鍵))を計算し、取得したMAC値(MAC(m,第1鍵))と算出したMAC値(MAC(m,第2鍵))とが等しいか否かを確認する。ここで、MAC値(MAC(m,第1鍵))とMAC値(MAC(m,第2鍵))とが等しい場合には、第1鍵503と、第2鍵713とが同じ値であることを示しており、鍵共有が成功していることを意味している。そこで、第2鍵共有プログラム324は、取得したMAC値(MAC(m,第1鍵))と算出したMAC値(MAC(m,第2鍵))とが等しい場合には、鍵共有が成功したことを示す鍵共有成功信号を第1鍵共有プログラム321へ送信する(ステップS19)。第1鍵共有プログラム321は、鍵共有成功信号を受信したことによって、第2鍵共有プログラム324との鍵共有が成功したことを認識することができる。
On the other hand, the second
なお、上記した例では、MAC値を第1鍵共有プログラム321が生成し、第2鍵共有プログラム324が第1鍵共有プログラム321で生成されたMAC値と、自身が計算したMAC値とを比較することにより、鍵共有の成功を確認するようにしていたが、例えば、第2鍵共有プログラム324がMAC値を生成し、第1鍵共有プログラム321が、第2鍵共有プログラム324により生成されたMAC値と、自身が計算したMAC値とを比較することにより、鍵共有の成功を確認するようにしてもよい。
In the above example, the first
また、MAC値を鍵共有で利用した共有領域323に格納するようにしていたが、MAC値を共有する共有領域として共有領域323とは別の領域としてもよい。
Further, although the MAC value is stored in the shared
次に、上記した実施形態において、端末102に第2鍵共有プログラム324になりすますマルウェア204が存在する場合における、鍵共有処理について説明する。
Next, a key sharing process will be described in the case where the
図11は、一実施形態に係る、マルウェア204が存在する場合の鍵共有処理の一例を示すシーケンス図である。なお、図9に示す鍵共有処理と同様な処理については、同一の符号を付し、重複する説明を省略する。
FIG. 11 is a sequence diagram illustrating an example of key sharing processing when
ここで、マルウェア204は、第1鍵共有プログラム321と第2鍵共有プログラム324との共有領域323を盗聴(参照)することができるものとする。マルウェア204は第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵(第1鍵、第2鍵)と同じ鍵を盗聴によって生成することを試みるものとする。
Here, it is assumed that the
マルウェア204は、共有領域323を参照することにより、乱数データを取得することができる(ステップS21)。
The
ここで、端末102においては、OS304が端末102内の情報に基づいてリソースにアクセスできるプログラムを随時決定している。このため、複数のプログラムがOS304へ同一リソース(ここでは共有領域323)へのアクセス要求を出す処理を繰り返したときには、それぞれのプログラムのリソースへのアクセス順は随時異なる。このため、第1鍵共有プログラム321、第2鍵共有プログラム324が共有領域323へのアクセスを繰り返し行っている際に、共有領域323にアクセス可能なマルウェア204がこれらのプログラムと同様に共有領域323へアクセスを繰り返し行うようにした場合にも、共有領域323にアクセスできるプログラムの順序はOS304によって随時決定される。
Here, in the terminal 102, the
したがって、マルウェア204が共有領域323の乱数データ524の取得を繰り返し行った場合に、図11に示すように、第2鍵共有プログラム324が共有領域323から取得した乱数データ(R0,R1、…)と、マルウェア204が共有領域323から取得した乱数データ(R’0,R’1、…)とが、一致しない状態となる可能性が高い。このように、取得する乱数データが一致しない状態となるので、マルウェア204側で、鍵生成情報を取得した場合(ステップS22)であっても、鍵生成情報が示す乱数を適切に把握することができないので、第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵と同様の鍵を生成できる可能性は低い。よって、複数のプログラム間で安全に鍵を共有することができる。したがって、第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵を用いて暗号化されたデータがマルウェア204に漏洩してしまうリスクを軽減することができる。Therefore, when the
特に、乱数データ524の送受信を繰り返す回数を増やすと、マルウェア204が第2鍵共有プログラム324と同じ乱数データを盗聴することができる確率がより低くなる。すなわち、第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵と同様の鍵を生成できる確率がより低くなる。よって、複数のプログラム間でより安全に鍵を共有することができる。
In particular, increasing the number of repetitions of sending and receiving
次に、上記した実施形態において、端末102に中間者攻撃を行うマルウェア204、すなわち、第1鍵共有プログラム321及び第2鍵共有プログラム324になりすますことで、各鍵共有プログラムと鍵を共有しようとするマルウェア204が存在する場合の対策について説明する。
Next, in the above embodiment, by impersonating the
図12は、一実施形態に係る、第1鍵共有プログラムになりすますマルウェアが存在する場合の鍵共有処理の一例を示すシーケンス図である。なお、図9に示す鍵共有処理と同様な処理については、同一の符号を付し、重複する説明を省略する。 FIG. 12 is a sequence diagram illustrating an example of key sharing processing when there is malware impersonating the first key sharing program, according to one embodiment. Note that processing similar to the key sharing processing shown in FIG. 9 is given the same reference numerals, and redundant description is omitted.
本実施形態では、マルウェア204による中間者攻撃の対策として、第2鍵共有プログラム324は、第1鍵共有プログラム321へ送信する配送開始要求を、自身が第1鍵共有プログラム321として把握しているプログラム(場合によっては、マルウェア204が成りすましているプログラム)だけでなく他のプログラムも受信できるように送信するようにしている。これにより、配送開始要求が、第1鍵共有プログラム321になりすましているマルウェア204のみに送信されてしまうことを適切に防止することができる。
In this embodiment, as a measure against man-in-the-middle attacks by the
これは、例えば第2鍵共有プログラム324が起動中の全てのプログラムに対して配送開始要求を送信することや、第2鍵共有プログラム324が共有領域323に繰り返し配送開始要求を書き込み第1鍵共有プログラム321が共有領域323から配送開始要求を繰り返し取得することで実現できる。起動中の全てのプログラムに配送開始要求を送信する方法として、例えば、配信開始要求をシグナルとして送信する場合には、シグナルのブロードキャストを用いることで実現できる。
For example, the second
マルウェア204が、第2鍵共有プログラム324と鍵を共有するためには、マルウェア204が第1鍵共有プログラム321になりすまし、乱数データ524と鍵生成情報525とを第2鍵共有プログラム324との間でやり取りする必要がある。上記した中間者攻撃への対策を行うことで、第2鍵共有プログラム324が配送開始要求を送信した際(ステップS11,S31)に、第1鍵共有プログラム321になりすましているマルウェア204だけでなく、第1鍵共有プログラム321も配送開始要求を受信することができる。
In order for
この場合には、マルウェア204と第1鍵共有プログラム321とは、それぞれ共有領域323に乱数データの書き込みを繰り返し行う(ステップS12,S32)。
In this case, the
この際に、共有領域323には、マルウェア204により書き込まれた乱数データ(W’0,W’1,・・・,W’m)と、第1鍵共有プログラム321により書き込まれた乱数データ(W0,W1,・・・,Wn)とのいずれかが格納された状態となる。At this time, in the shared
ここで、端末102においては、OS304が端末102内の情報に基づいてリソースにアクセスできるプログラムを随時決定している。このため、複数のプログラムがOS304へ同一リソース(ここでは共有領域323)へのアクセス要求を出す処理を繰り返したときには、それぞれのプログラムのリソースへのアクセス順は随時異なる。このため、第1鍵共有プログラム321、第2鍵共有プログラム324が共有領域323へのアクセスを繰り返し行っている際に、共有領域323にアクセス可能なマルウェア204がこれらのプログラムと同様に共有領域323へアクセスを繰り返し行うようにした場合にも、共有領域323にアクセスできるプログラムの順序はOS304によって随時決定される。
Here, in the terminal 102, the
したがって、第2鍵共有プログラム324が、共有領域323から乱数データ(R0,R1,・・・,Rn)を取得すると、すべての乱数データが、マルウェア204が書き込んだ乱数データのみとなったり、第1鍵共有プログラム321が書き込んだ乱数データのみとなったりする可能性は低い。すなわち、第2鍵共有プログラム324が取得した乱数データ(R0,R1,・・・,Rn)には、第1鍵共有プログラム321が書き込んだ乱数データ(W0,W1,・・・,Wn)の一部と、マルウェア204が書き込んだ乱数データ(W’0,W’1,・・・,W’m)の一部とが含まれている可能性が非常に高い。 Therefore , when the second
このような状態において、第2鍵共有プログラム324は、取得した乱数データ524を用いて第2鍵713を生成する。
In such a state, the second
例えば、マルウェア204が、共有領域323上のデータを取得する場合においても、第1鍵共有プログラム321が共有領域323に書き込んだ全ての乱数データ(W0,W1,・・・,Wn)を取得することはできないため、共有領域323から鍵生成情報525を取得しても(ステップS33)、第2鍵共有プログラム324が生成した第2鍵713を生成することができない。すなわち、マルウェア204は第2鍵共有プログラム324との間で鍵共有ができないため、中間者攻撃を行うことができない。For example, even when the
また、マルウェア204が乱数データ524を共有領域323に書き込んでいる場合、第2鍵共有プログラム324が鍵生成に用いた乱数データにはマルウェア204によって書き込まれた乱数データが含まれている可能性が高く、この場合には、第1鍵共有プログラム321は、マルウェア204によって書き込まれた乱数データの値を知らないため、第1鍵共有プログラム321と第2鍵共有プログラム324との間での鍵共有についても失敗する可能性が高い。
Also, if the
そこで、第1鍵共有プログラム321と第2鍵共有プログラム324とがお互いに鍵共有が成功しているか否かを、図10を参照して説明したMACを用いて確認するようにしてもよい。この結果、鍵共有が失敗していることを確認した場合には、例えば、第1鍵共有プログム321と第2鍵共有プログラム324とは、作成した第1鍵503と、第2鍵713とを破棄し、再度、鍵共有処理を行うようにしてもよい。
Therefore, the first
上記実施形態において、マルウェアも、共有領域から乱数データを取得し、取得した乱数データから生成した鍵生成情報を第1鍵共有プログラムへ送信し、第1鍵共有プログラムが第2鍵共有プログラムから送信された鍵生成情報を取得する前にマルウェアが送信した鍵生成情報を取得してしまうと、マルウェアが第2鍵共有プログラムになりすまして第1鍵共有プロラグムとの鍵共有に成功してしまうことがあり得る。なぜなら、マルウェアは第2鍵共有プログラムが取得した乱数データを同じ乱数データを取得する必要はないからである。 In the above embodiment, the malware also acquires random number data from the shared area, transmits key generation information generated from the acquired random number data to the first key sharing program, and the first key sharing program transmits it from the second key sharing program. If the malware obtains the key generation information sent by the malware before obtaining the key generation information sent by the malware, the malware may impersonate the second key sharing program and successfully share the key with the first key sharing program. could be. This is because the malware does not need to acquire the same random number data as the random number data acquired by the second key sharing program.
マルウェアによる第2鍵共有プログラムへのなりすましをより効果的に防止する方法として、図9の鍵共有処理における乱数データの生成及び取得処理における処理の主体を逆にした処理を行うようにし、すなわち、第2鍵共有プログラム324側で生成した乱数データを第1鍵共有プログラム321が取得するようにし、第1鍵共有プログラム321と第2鍵共有プログラム324とは、双方が生成した乱数データ712を用いて第1鍵503と第2鍵713とを生成する鍵共有処理(第2変形例)が考えられる。
As a method of more effectively preventing malware from spoofing the second key sharing program, the process of generating and obtaining random number data in the key sharing process of FIG. 9 is reversed, that is, The first
第2変形例では、第1鍵共有プログラム321は乱数データ取得部321と鍵生成情報配送部433を含み、また、第2鍵共有プログラム324は乱数データ生成・配送部400と鍵生成情報取得部411を含む。
In the second modification, the first
図13は、第2変形例に係る鍵共有処理のシーケンス図である。なお、図11に示す鍵共有処理と同様な処理については、同一の符号を付し、重複する説明を省略する。 FIG. 13 is a sequence diagram of key sharing processing according to the second modification. Note that processing similar to the key sharing processing shown in FIG. 11 is given the same reference numerals, and redundant description is omitted.
第1鍵共有プログラム321は鍵生成情報を受信後、乱数データ配送開始要求を第2鍵共有プログラム324に送信する(ステップS17)。
After receiving the key generation information, the first
第2鍵共有プログラム324は、配送開始要求を受信すると、乱数データを共有領域323に繰り返し書き込む処理を実行する(ステップS18)。
Upon receiving the delivery start request, the second
ここで、図13においては、第2鍵共有プログラムが送信した乱数を、生成された順番にr’0、r’1、・・・と表している。 Here, in FIG. 13, the random numbers transmitted by the second key sharing program are represented as r'0, r'1, . . . in the order of generation.
図13の例では、第2鍵共有プログラム324は、第1鍵共有プログラム321から配送終了要求を受信するまで、乱数データを生成し、共有領域323に格納する処理を繰り返し実行する。
In the example of FIG. 13 , the second
一方、第1鍵共有プログラム321は、共有領域323から乱数データを取得する処理を繰り返し実行する(ステップS19)。
On the other hand, the first
この後、第1鍵共有プログラム324は、鍵生成に十分なサイズの乱数データを取得したときに、配送終了要求を、第2鍵共有プログラム324に送信する(ステップS20)。この結果、第2鍵共有プログラム324は、乱数データの生成処理を終了する。
After that, when the first
次に、第1鍵共有プログラム321は、取得した複数の乱数データのすべてまたは一部と第1鍵503を用いて、新たな第1鍵503を生成する。このとき、第1鍵共有プログラムはステップS16後に第1鍵を生成せずに、ステップS19後に、ステップS19で取得した乱数データのすべてまたは一部と、S16で受信した鍵生成情報に紐づく乱数とを用いて第1鍵503を生成してもよい。
Next, the first
更に、第1鍵共有プログラム321は、ステップS19で取得した乱数データの内、第1鍵生成に用いた乱数データに含まれるインデックス番号を鍵生成情報として共有領域323に書き込む(ステップS21)。
Further, the first
一方、第2鍵共有プログラム324は、共有領域323から鍵生成情報を取得する(ステップS22)。
On the other hand, the second
この後、第2鍵共有プログラム324は、鍵生成情報に基づいて、第1鍵共有プログラム321が第1鍵を生成する際に用いた乱数を取得し、これらの乱数と第2鍵713から新たな第2鍵を生成する。このとき、第2鍵共有プログラムはステップS14後に第2鍵を生成せずに、ステップS22後に、ステップS13で取得した乱数データのすべてまたは一部と、ステップS22で受信した鍵生成情報に紐づく乱数とを用いて第2鍵713を生成してもよい。
After that, the second
図13では、ステップS11からステップS16を行った後にステップS17からステップS22を行っているが、ステップS17からステップS22を行った後にステップS11からステップS16を行ってもよいし、ステップS11からステップS16とステップS17からステップS22を並行して行ってもよい。 In FIG. 13, steps S17 to S22 are performed after steps S11 to S16 are performed, but steps S11 to S16 may be performed after steps S17 to S22 are performed, or steps S11 to S16 may be performed. and step S17 to step S22 may be performed in parallel.
上記第2変形例において、マルウェアが第2鍵共有プログラムになりすまして第1鍵共有プロラグムとの鍵共有に成功するためには、ステップS18でマルウェアが乱数データを共有領域323に繰り返し書き込み、第1鍵共有プログラムがステップS19で取得する乱数データすべてがマルウェアによって書き込まれたものである必要がある。OS304が端末102内の情報に基づいて共有領域にアクセスできるプログラムをランダムに決定しており、プログラムが共有領域にアクセスするタイミングを決定することはできない。このため、マルウェアと第2鍵共有プログラムが共有領域323に乱数データを繰り返し書き込んでいるとき、第1鍵共有プログラムが共有領域323から取得した乱数データが全てマルウェアによって書き込まれたものである可能性は低い。このため、第2変形例では、第1鍵共有プログラム、第2鍵共有プログラムは、第2共有プログラムになりすますマルウェアが端末102内で動作していても、安全に鍵共有を行うことができる。
In the second modification, in order for the malware to impersonate the second key sharing program and successfully share the key with the first key sharing program, the malware repeatedly writes random number data to the shared
次に、第3変形例に係る鍵共有処理について説明する。 Next, key sharing processing according to the third modification will be described.
ここで、エントロピー発生器302により生成されるエントロピー源によりseed501を生成する方法について着目する。
Here, attention is paid to a method of generating the
例えば、seed501は、乱数生成のための十分なエントロピーを有している必要があり、エントロピー発生器302により生成されるエントロピー源が乱数生成のための十分なエントロピーを有しているときは、エントロピー源をそのままseed501として用いることができる。しかし、エントロピー源が十分なエントロピーを有していないときは、エントロピー発生器302から繰り返しエントロピー源を収集し、収集したエントロピー源を用いてseed501を生成する必要がある。
For example,
ここで、第1鍵共有プログラム321は、起動後にエントロピー源の収集を行うこととなるが、一般的にエントロピー発生器302からエントロピー源を取得するには時間がかかるため、エントロピー源が乱数の生成のための十分なエントロピーを有していない場合、鍵共有にかかる時間が増加する。
Here, the first
そこで、第3変形例においては、エントロピー源が乱数生成のための十分なエントロピーを有していない場合に第1鍵共有プログラム321が高速にseed501を生成する方法として、エントロピー発生器302からエントロピー源を収集し配送するプログラム(「エントロピー源取得プログラム1400」という)を、第1鍵共有プログラム321を起動する前、例えば、端末102を起動する際に、起動しておき、第1鍵共有プログラム321へ大きなエントロピーサイズをもつ値(以下「seed生成情報」という)を配送し、第1鍵共有プログラム321がseed生成情報を用いてseed501を生成するようにしている。
Therefore, in the third modified example, the entropy source is started before the first
図14は、第3変形例に係る鍵共有処理のシーケンス図である。なお、図9に示す鍵共有処理と同様な処理については、同一の符号を付し、重複する説明を省略する。 FIG. 14 is a sequence diagram of key sharing processing according to the third modification. Note that processing similar to the key sharing processing shown in FIG. 9 is given the same reference numerals, and redundant description is omitted.
例えば、端末102が起動された直後に、エントロピー源取得プログラム1400(厳密には、エントロピー源取得プログラム1400を実行するCPU206)は、エントロピー発生器302からエントロピー源(e0,e1,・・・ep)を取得する(ステップS41)。For example, immediately after the terminal 102 is activated, the entropy source acquisition program 1400 (more precisely, the
その後、第1鍵共有プログラム321が起動されると、第1鍵共有プログラム321は、エントロピー源取得プログラム1400に、seedの配送の開始を要求するseed配送開始要求を送信する(ステップS42)。
After that, when the first
エントロピー源取得プログラム1400は、第1鍵共有プログラム321からseed配送開始要求を受信すると、取得したエントロピー源を用いて、高いエントロピーを有するseedを生成するための値(「seed生成情報」という。s0,s1,・・・)を生成する。次いで、エントロピー源取得プログラム1400は、生成したseed生成情報(s0,s1,・・・)をエントロピー源取得プログラム1400と第1鍵共有プログラム321との共有領域(例えば、第1鍵共有プログラム321と第2鍵共有プログラム324との共有領域323)に書き込む処理を繰り返し行う(ステップS43)。When the entropy
ここで、seed生成情報として、例えば、エントロピー発生器302の一例としての疑似乱数生成器で生成されたエントロピー源により生成した疑似乱数であってもよい。また、エントロピー源取得プログラム1400と第1鍵共有プログラム321との共有領域は、第1鍵共有プログラム321と第2鍵共有プログラム324とが鍵共有のために用いる共有領域323と異なる領域であってもよい。
Here, the seed generation information may be, for example, a pseudorandom number generated by an entropy source generated by a pseudorandom number generator as an example of the
一方、第1鍵共有プログラム321は、エントロピー源取得プログラム1400との共有領域323からseed生成情報の収集を繰り返す(ステップS44)。なお、第1鍵共有プログラム321は、エントロピー源取得プログラム1400が共有領域323に書き込んだすべてのseed生成情報を取得しなくてもよい。
On the other hand, the first
次いで、第1鍵共有プログラム321は、seed501を生成するための十分なエントロピーサイズを有するseed生成情報を収集した後、エントロピー源取得プログラム1400へseedの配送の終了を要求するseed配送終了要求を送信する(ステップS45)。この結果、seed配送終了要求を受信すると、エントロピー源取得プログラム1400は、seed生成情報の共有領域323への書き込みを終了する。
Next, the first
この後、第1鍵共有プログラム321の乱数生成部402は、seed生成情報からseed501を生成し、第2鍵共有プログラム324と鍵共有を行う。
After that, the random number generation unit 402 of the first
上記処理において、エントロピー源取得プログラム1400により共有領域323に書き込まれるseed生成情報が有するエントロピーの大きさは、エントロピー源が有するエントロピーの大きさよりも大幅に大きい。したがって、上記処理によると、seed501を生成するためにエントロピーを有する値を収集する回数を少なくすることができる。このため、第1鍵共有プログラム321は、seed501を高速に生成して利用することができる。
In the above process, the entropy of the seed generation information written in the shared
次に第4変形例に係る鍵共有処理について説明する。 Next, key sharing processing according to the fourth modification will be described.
上記実施形態では、マルウェア204が多くの数のプログラムから構成され、これらプログラムが連携して動作する場合、マルウェアは第1鍵共有プログラム321や第2鍵共有プログラム324よりも共有領域323にアクセスできる回数が増えるため、鍵共有の安全性が低下する。これに対して、例えば次のようにしてもよい。第1鍵共有プログラムは定期的に共有領域323へのアクセスを試み、実際にアクセスに成功した間隔を測定する。これは例えばCPU206がもつタイマで測定してもよい。端末102内で動作するプログラムが多いほどこのアクセスに成功した間隔は大きくなるため、アクセス間隔が増加したときに第1鍵共有プログラム321はマルウェア204の存在を検知することができる。
In the above embodiment, the
このマルウェア検知機能は第2鍵共有プログラムがもってもよいし、新たなプログラム(検知プログラム)がマルウェア検知機能をもってもよい。このとき、検知プログラムはマルウェア204を検知時に第1鍵共有プログラム321、第2鍵共有プログラム324にマルウェアを検知したことを知らせる信号を送ることで、第1鍵共有プログラム321、第2鍵共有プログラム324はマルウェア204を検知することができる。
The second key sharing program may have this malware detection function, or a new program (detection program) may have the malware detection function. At this time, when the detection program detects
次に第5変形例に係る鍵共有処理について説明する。 Next, key sharing processing according to the fifth modification will be described.
上記実施形態では、汎用レジスタ303内の乱数データテーブル711について、第1鍵共有プログラム321が送信した乱数データ524の数が増加すると乱数データテーブル711に格納する乱数データが増加するため、汎用レジスタ303の使用率が増加してしまう。これに対して、例えば、次のようにしてもよい。図6のステップ603において、乱数生成部402は、疑似乱数生成器を用いて、インデックス生成部403で生成したインデックス情報とseed501とから乱数を生成し、ステップ605の処理を行わないようにする。ここで、疑似乱数生成器は、同一のインデックス情報とseed501とを入力すると同一の乱数を生成できるものとする。
In the above embodiment, as the number of
そして、第1鍵生成部412は、疑似乱数生成器を用いて、鍵生成情報525の各インデックス情報と、seed501とから乱数を生成し、これらの乱数を用いて第1鍵503を生成するようにしてもよい。
Then, the first key generation unit 412 uses a pseudo-random number generator to generate random numbers from each index information of the key generation information 525 and the
このようにすると、汎用レジスタ303に乱数データテーブル711をもたなくてよいため、汎用レジスタ303の使用率を下げることができて、短い時間での鍵共有が可能になる。
By doing so, the general-
次に第6変形例に係る鍵共有処理について説明する。 Next, key sharing processing according to the sixth modification will be described.
上記実施形態では、乱数データ取得部431が汎用レジスタ303内の乱数データプール711に乱数データを収集が終了した後、第2鍵生成部432が収集した乱数データ712から第2鍵を生成していたが、収集する乱数データの数の増加に比例して汎用レジスタ303の使用率が増加してしまう。これに対して、例えば次のようにしてもよい。図8のステップ802において、乱数データ取得部431は共有領域上の乱数データ524を取得した後、この乱数データに含まれる乱数とこれまで取得した乱数から生成した第2鍵713から、新たな第2鍵713を生成し、乱数データに含まれるインデックス情報を新たに鍵生成情報714に加える。続いて図8のステップ803において、鍵生成情報714に含まれるインデックス情報の数から鍵生成に十分なサイズの乱数を取得したか判別を行う。これにより、乱数データプール711が不要になり、汎用レジスタ303の使用率を下げることができる。
In the above embodiment, the second key is generated from the collected random number data 712 by the second
また、上記実施形態と第1~第6変形例は、二つ以上を組み合わせることが可能である。 Further, two or more of the above embodiment and the first to sixth modifications can be combined.
例えば、上記実施形態の第2変形例に第5変形例、第6変形例を組み合わせることで、汎用レジスタ303の使用率を下げつつなりすましや盗聴を行うマルウェアから安全に鍵共有を行うことができる。この組み合わせ方法として、例えば第1鍵共有プログラム321は第2鍵共有プログラム324が配送した鍵生成情報525を用いて一時鍵1を生成、第2鍵共有プログラム324が配送した乱数データ524を用いて逐次的に一時鍵2を生成し、一時鍵1と一時鍵2から第1鍵を生成し、第2鍵共有プログラム324はこの主体を逆にした処理を行い第2鍵を生成してもよい。
For example, by combining the fifth and sixth modifications with the second modification of the above-described embodiment, it is possible to reduce the usage rate of the general-
次に、端末102にすでにインストールされている2つのプログラム(例えば、センサ用プログラム211と、認証プログラム212)に本発明の機能を追加する他の実施形態について詳細に説明する。
Next, another embodiment in which the functions of the present invention are added to two programs already installed on the terminal 102 (for example, the
図15は、本実施形態に係る第1鍵共有プログラム、及び第2鍵共有プログラムにより実現される機能構成図の一例である。 FIG. 15 is an example of a functional configuration diagram realized by the first key sharing program and the second key sharing program according to this embodiment.
第1データ秘匿処理プログラム1500は、例えば、センサ用プログラム211の処理を行う第1プログラム処理部1501と、第1鍵共有プログラム321を含む。
第2データ秘匿処理プログラム1510は、例えば、認証プログラム212の処理を行う2プログラム処理部1511と、第2鍵共有プログラム324を含む。
インストール済みの第1プログラム処理部1501は、第2プログラム処理部1511へデータ(例えば、センサデータ203)を送る際は、秘匿処理が必要なデータを第1データ秘匿処理部420へ渡す。
第1データ秘匿処理部420は、第1プログラム処理部1501から取得したデータに対してて、上記実施形態で説明した処理により共有した鍵を用いて秘匿処理を行う。
第1データ秘匿処理部420は、例えば共有領域323を用いて、第2データ秘匿処理部440へ、秘匿処理されたデータを渡す。
第2データ秘匿処理部440は、取得した秘匿処理されたデータに対して、上記実施形態で説明した処理により共有した鍵を用いて元のデータを復元し、第2プログラム処理部1511へ渡す。
第2プログラム処理部1511から第1プログラム処理部1501へデータを送る際は、上記と同様の処理を、主体を逆にして行えばよい。The first data
The second data
When the installed first
The first data
The first data
The second data
When data is sent from the second
本実施形態においても、上記第1~第6変形例を一つ以上組み合わせて適用することが可能である。また、上記2つの実施形態を組み合わせることも可能である。
以上の処理により、いずれか一方または両方がすでにインストールされている2つのプログラム間においても、安全なデータのやり取りが可能になる。Also in the present embodiment, it is possible to apply one or more of the first to sixth modified examples in combination. It is also possible to combine the above two embodiments.
By the above processing, safe data exchange becomes possible even between two programs in which one or both of them have already been installed.
また、上記各実施形態では、第1鍵共有プログラム321(または第1データ秘匿処理プログラム1500)と第2鍵共有プログラム324(または第2データ秘匿処理プログラム1510)とを同一の端末102内に配置して実行するようにしていた。しかし、これに限られず、例えば、ネットワーク301を介して接続されている2つの端末を含む情報処理システムにおいて、第1鍵共有プログラム321(または第1データ秘匿処理プログラム1500)と、第2鍵共有プログラム324(または第2データ秘匿処理プログラム1510)とを別の端末に配置して実行するようにしてもよい。
この場合、共有領域323は、いずれの端末のメモリに備えるようにしてもよい。例えば、第2鍵共有プログラム324(または第2データ秘匿処理プログラム1510)を実行する端末のメモリに共有領域を備えるようにした場合には、第1鍵共有プログラム321は、ネットワークを介して、乱数データ524を共有領域323に格納し、また、共有領域323から鍵生成情報を取得するようにすればよい。Further, in each of the above embodiments, the first key sharing program 321 (or the first data security processing program 1500) and the second key sharing program 324 (or the second data security processing program 1510) are arranged in the
In this case, the shared
上記開示は、代表的実施形態に関して記述されているが、当業者は、開示される主題の趣旨や範囲を逸脱することなく、形式及び細部において、様々な変更や修正が可能であることを理解するであろう。
また、上記実施形態において、CPUが行っていた処理の一部又は全部を、専用のハードウェア回路で行うようにしてもよい。また、上記実施形態におけるプログラムは、プログラムソースからインストールされてよい。プログラムソースは、プログラム配布サーバ又は非一時的な記憶メディア(例えば可搬型の記憶メディア)であってもよい。Although the above disclosure has been described with respect to exemplary embodiments, those skilled in the art will appreciate that various changes and modifications can be made in form and detail without departing from the spirit or scope of the disclosed subject matter. would do.
Further, in the above embodiments, part or all of the processing performed by the CPU may be performed by a dedicated hardware circuit. Also, the programs in the above embodiments may be installed from program sources. A program source may be a program distribution server or a non-transitory storage medium (for example, a portable storage medium).
Claims (12)
所定の割当基準に基づいて、実行する前記プログラムに前記プロセッサ及び前記主記憶装置を含むリソースの割り当てを行うためのOS(オペレーティングシステム)と、
鍵を共有して処理を実行するための第1鍵共有プログラム及び第2鍵共有プログラムを備え、
前記プロセッサは、前記OSを実行して、
前記第1鍵共有プログラムと前記第2鍵共有プログラムとで処理に共有可能な共有領域とを設定し、
前記第1鍵共有プログラムにリソースを割り当て、
前記第2鍵共有プログラムにリソースを割り当て、
前記プロセッサは、前記OSを実行して、
前記第1鍵共有プログラムを実行することにより、前記第2鍵共有プログラムが第2鍵を生成するための乱数を特定可能な乱数データの生成と、前記共有領域への前記乱数データの格納と、を繰り返し、
前記プロセッサは、前記OSを実行して、
前記第2鍵共有プログラムを実行することにより、前記共有領域に格納された乱数データを取得することを繰り返し、
取得した複数の前記乱数データに基づいて前記第2鍵を生成し、
前記第2鍵を生成するために使用した前記取得した複数の乱数データを特定可能な鍵生成情報を生成し、
前記鍵生成情報を前記共有領域に格納し、
前記プロセッサは、前記OSを実行して、
前記第1鍵共有プログラムを実行することにより、前記共有領域に格納された前記鍵生成情報に基づいて第1鍵を生成する
情報処理システム。An information processing system comprising a main memory storing data and programs, and a processor connected to the main memory and executing the programs,
an OS (operating system) for allocating resources including the processor and the main storage device to the program to be executed based on predetermined allocation criteria;
comprising a first key sharing program and a second key sharing program for sharing a key and executing processing;
The processor executes the OS,
setting a shared area that can be shared for processing by the first key sharing program and the second key sharing program;
Allocating resources to the first key agreement program;
Allocating resources to the second key agreement program;
The processor executes the OS,
By executing the first key sharing program, the second key sharing program generates random number data capable of specifying a random number for generating a second key, and stores the random number data in the shared area; repeat
The processor executes the OS,
Repeating obtaining random number data stored in the shared area by executing the second key sharing program,
generating the second key based on the obtained plurality of random number data;
generating key generation information capable of identifying the obtained plurality of random number data used to generate the second key;
storing the key generation information in the shared area;
The processor executes the OS,
An information processing system that generates a first key based on the key generation information stored in the shared area by executing the first key sharing program.
請求項1に記載の情報処理システム。2. The information processing system according to claim 1, wherein the process of allocating resources by executing the OS is not a process of allocating the resources to each program in a fixed order.
請求項1に記載の情報処理システム。2. The information processing system according to claim 1, wherein said processor selects one or more pieces of random number data to be used for key generation from among a plurality of pieces of random number data, and generates said second key.
前記プロセッサは、前記第2鍵の生成に必要なデータサイズ以上となる複数の乱数データに基づいて前記鍵を生成する
請求項3に記載の情報処理システム。one piece of random number data is data smaller than the data size required to generate the second key;
4. The information processing system according to claim 3, wherein said processor generates said key based on a plurality of pieces of random number data having a data size equal to or larger than the data size necessary for generating said second key.
前記OS用のカーネル領域を含み、
前記プロセッサは、データを記憶するレジスタを含み、
前記プロセッサは、実行しているプログラムとは別のプログラムへのリソースの割り当てがあった場合に、前記レジスタに格納されているデータを、前記カーネル領域に退避格納する
請求項1に記載の情報処理システム。The main storage device is
including a kernel area for the OS,
the processor includes registers for storing data;
2. The information processing according to claim 1, wherein said processor saves and stores data stored in said register in said kernel area when a resource is allocated to a program different from the program being executed. system.
前記第1鍵共有プログラムを実行することにより生成した前記第1鍵と、前記第2鍵共有プログラムを実行することにより生成した前記第2鍵とが同一であるか否かを確認する
請求項1に記載の情報処理システム。The processor
2. Confirming whether or not said first key generated by executing said first key sharing program and said second key generated by executing said second key sharing program are the same. The information processing system according to .
前記第1鍵共有プログラムを実行することにより生成した前記第1鍵と、所定のメッセージとに基づいて生成される第1メッセージ認証符号と、前記第2鍵共有プログラムを実行することにより生成した前記第2鍵と前記所定のメッセージとに基づいて生成される第2メッセージ認証符号とが同一であるか否かを確認する
請求項6に記載の情報処理システム。The processor
a first message authentication code generated based on the first key generated by executing the first key sharing program and a predetermined message; and the first message authentication code generated by executing the second key sharing program 7. The information processing system according to claim 6, wherein it is confirmed whether or not the second key and the second message authentication code generated based on the predetermined message are the same.
前記第1鍵共有プログラムを実行することにより生成した前記第1鍵と、前記第2鍵共有プログラムを実行することにより生成した前記第2鍵とが同一でない場合に、前記第1鍵共有プログラムと、前記第2鍵共有プログラムとにより鍵を生成する処理を最初から実行する
請求項6に記載の情報処理システム。The processor
When the first key generated by executing the first key sharing program and the second key generated by executing the second key sharing program are not the same, the first key sharing program and 7. The information processing system according to claim 6, wherein the process of generating the key by means of the second key sharing program is executed from the beginning.
前記OSを実行して、前記第1鍵共有プログラムにリソースを割り当て、前記第1鍵を用いて、前記第2鍵共有プログラムとの間で前記主記憶装置を介してやり取りをするデータの秘匿処理を行い、
前記プロセッサは、
前記OSを実行して、前記第2鍵共有プログラムにリソースを割り当て、前記第2鍵を用いて、前記第1鍵共有プログラムとの間でやり取りをするデータの秘匿処理を行う
請求項1に記載の情報処理システム。The processor
Securing data exchanged with the second key sharing program via the main storage device by executing the OS, allocating resources to the first key sharing program, and using the first key and
The processor
2. The apparatus according to claim 1, wherein said OS is executed, resources are allocated to said second key sharing program, and data exchanged with said first key sharing program is encrypted using said second key. information processing system.
単一の情報処理装置により実現されている
請求項1に記載の情報処理システム。The information processing system is
2. The information processing system according to claim 1, which is realized by a single information processing device.
所定の割当基準に基づいて、実行する前記プログラムに前記プロセッサ及び前記主記憶装置を含むリソースの割り当てを行うためのOS(オペレーティングシステム)と、
鍵を共有して処理を実行するための第1鍵共有プログラム及び第2鍵共有プログラムを備え、
前記OSの実行により、
前記第1鍵共有プログラムと前記第2鍵共有プログラムとで処理に共有可能な共有領域とを設定し、
前記第1鍵共有プログラムにリソースを割り当て、
前記第2鍵共有プログラムにリソースを割り当て、
前記OSの実行により、
前記第1鍵共有プログラムを実行することにより、前記第2鍵共有プログラムが第2鍵を生成するための乱数を特定可能な乱数データの生成と、前記共有領域への前記乱数データの格納と、を繰り返し、
前記OSの実行により、
前記第2鍵共有プログラムを実行することにより、前記共有領域に格納された乱数データを取得することを繰り返し、
取得した複数の前記乱数データに基づいて前記第2鍵を生成し、
前記第2鍵を生成するために使用した前記取得した複数の乱数データを特定可能な鍵生成情報を生成し、
前記鍵生成情報を前記共有領域に格納し、
前記OSの実行により、
前記第1鍵共有プログラムを実行することにより、前記共有領域に格納された前記鍵生成情報に基づいて第1鍵を生成する
プログラム間鍵共有方法。An inter-program key sharing method by an information processing system comprising a main memory storing data and a program, and a processor connected to the main memory and executing the program,
an OS (operating system) for allocating resources including the processor and the main storage device to the program to be executed based on predetermined allocation criteria;
comprising a first key sharing program and a second key sharing program for sharing a key and executing processing;
By executing the OS,
setting a shared area that can be shared for processing by the first key sharing program and the second key sharing program;
Allocating resources to the first key agreement program;
Allocating resources to the second key agreement program;
By executing the OS,
By executing the first key sharing program, the second key sharing program generates random number data capable of specifying a random number for generating a second key, and stores the random number data in the shared area; repeat
By executing the OS,
Repeating obtaining random number data stored in the shared area by executing the second key sharing program,
generating the second key based on the obtained plurality of random number data;
generating key generation information capable of identifying the obtained plurality of random number data used to generate the second key;
storing the key generation information in the shared area;
By executing the OS,
An inter-program key sharing method for generating a first key based on the key generation information stored in the shared area by executing the first key sharing program.
前記プログラム間鍵共有プログラムは、鍵を共有して処理を実行するための第1鍵共有プログラム及び第2鍵共有プログラムを含み、
前記第1鍵共有プログラムは、
前記コンピュータに、
OSによりリソースが割り当てられると、前記第2鍵共有プログラムが第2鍵を生成するための乱数を特定可能な乱数データの生成と、前記主記憶装置の共有領域への前記乱数データの格納と、を繰り返し実行させ、
前記第2鍵共有プログラムは、
前記コンピュータに、
前記OSによりリソースが割り当てられると、前記共有領域に格納された乱数データを取得することを繰り返し実行させ、
取得した複数の前記乱数データに基づいて前記第2鍵を生成させ、
前記第2鍵を生成するために使用した前記取得した複数の乱数データを特定可能な鍵生成情報を生成させ、
前記鍵生成情報を前記共有領域に格納させ、
前記第1鍵共有プログラムは、
前記コンピュータに、
前記OSの実行によりリソースが割り当てられると、前記共有領域に格納された前記鍵生成情報に基づいて第1鍵を生成させる
プログラム間鍵共有プログラム。
An inter-program key sharing program to be executed by a computer comprising a main memory storing data and a program, and a processor connected to the main memory and executing the program,
The inter-program key sharing program includes a first key sharing program and a second key sharing program for sharing keys and executing processing,
The first key sharing program is
to the computer;
When resources are allocated by the OS, the second key sharing program generates random number data capable of specifying a random number for generating a second key, and stores the random number data in a shared area of the main storage device; repeatedly execute
The second key sharing program is
to the computer;
repeatedly executing acquisition of random number data stored in the shared area when resources are allocated by the OS;
generating the second key based on the obtained plurality of random number data;
generating key generation information capable of identifying the obtained plurality of random number data used to generate the second key;
storing the key generation information in the shared area;
The first key sharing program is
to the computer;
An inter-program key sharing program for generating a first key based on the key generation information stored in the shared area when resources are allocated by execution of the OS.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019222400 | 2019-12-09 | ||
JP2019222400 | 2019-12-09 | ||
PCT/JP2020/045295 WO2021117638A1 (en) | 2019-12-09 | 2020-12-04 | Information processing system, method for sharing key between programs, and program for sharing key between programs |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2021117638A1 JPWO2021117638A1 (en) | 2021-06-17 |
JP7304430B2 true JP7304430B2 (en) | 2023-07-06 |
Family
ID=76330340
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021563925A Active JP7304430B2 (en) | 2019-12-09 | 2020-12-04 | Information processing system, inter-program key sharing method, and inter-program key sharing program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7304430B2 (en) |
WO (1) | WO2021117638A1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010161660A (en) | 2009-01-08 | 2010-07-22 | Sony Corp | Information processing apparatus and method, program, and information processing system |
WO2011101972A1 (en) | 2010-02-18 | 2011-08-25 | 株式会社東芝 | Program |
US20180157433A1 (en) | 2016-12-07 | 2018-06-07 | Vmware, Inc. | Inter-application secure data sharing workflow |
-
2020
- 2020-12-04 WO PCT/JP2020/045295 patent/WO2021117638A1/en active Application Filing
- 2020-12-04 JP JP2021563925A patent/JP7304430B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010161660A (en) | 2009-01-08 | 2010-07-22 | Sony Corp | Information processing apparatus and method, program, and information processing system |
WO2011101972A1 (en) | 2010-02-18 | 2011-08-25 | 株式会社東芝 | Program |
US20180157433A1 (en) | 2016-12-07 | 2018-06-07 | Vmware, Inc. | Inter-application secure data sharing workflow |
Also Published As
Publication number | Publication date |
---|---|
JPWO2021117638A1 (en) | 2021-06-17 |
WO2021117638A1 (en) | 2021-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10796009B2 (en) | Security engine for a secure operating environment | |
CN108345806B (en) | Hardware encryption card and encryption method | |
US9270466B2 (en) | System and method for temporary secure boot of an electronic device | |
CN110637301B (en) | Reducing disclosure of sensitive data in virtual machines | |
CN113572715B (en) | Data transmission method and system based on block chain | |
JP2018521417A (en) | Safety verification method based on biometric features, client terminal, and server | |
KR20120066018A (en) | Auditing a divice | |
CN101517591A (en) | Architecture for virtual security module | |
EP3270319B1 (en) | Method and apparatus for generating dynamic security module | |
US10880091B2 (en) | Control method for enrolling face template data and related product | |
US10635826B2 (en) | System and method for securing data in a storage medium | |
CN111160905B (en) | Block chain link point user request processing protection method and device | |
JP7304430B2 (en) | Information processing system, inter-program key sharing method, and inter-program key sharing program | |
CN115495746B (en) | eBPF-based safety protection method and system and electronic equipment | |
CN112733208B (en) | Secure boot method and device of chip, secure chip and computer equipment | |
CN116956298A (en) | Application running environment detection method and device | |
JP7295761B2 (en) | Information processing equipment | |
CN113949988A (en) | Position protection method and system, and storage medium | |
KR20120019916A (en) | The certification process server and the method for graphic otp certification | |
CN111339578A (en) | Key access method, device, system, equipment and storage medium | |
JP7168776B2 (en) | Information processing method, information processing device and storage medium | |
CN114866409B (en) | Password acceleration method and device based on password acceleration hardware | |
CN114257410A (en) | Identity authentication method and device based on digital certificate, and computer equipment | |
Srivathsan et al. | Development of a secure framework for an unified authentication mechanism using elliptic curve cryptography | |
RU2481632C1 (en) | System and method of recovering password and encrypted data on mobile devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220602 |
|
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: 20230613 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230626 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7304430 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |