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 PDF

Info

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
Application number
JP2021563925A
Other languages
Japanese (ja)
Other versions
JPWO2021117638A1 (en
Inventor
麻奈美 鈴木
大 渡辺
健太 高橋
雅之 吉野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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
Publication of JPWO2021117638A1 publication Critical patent/JPWO2021117638A1/ja
Application granted granted Critical
Publication of JP7304430B2 publication Critical patent/JP7304430B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords

Description

参照による取り込みImport by reference

本出願は、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, Patent Literature 1 discloses a technique of performing encryption when data is stored in memory without requiring special hardware support such as a CPU or memory mechanism. In this technology, a program that performs encryption processing generates and manages keys used for encryption (hereinafter referred to as "keys") in a CPU.

特開2019-074913号公報JP 2019-074913 A

Bui, T., Rao, S.P., Antikainen, M., Bojan, V.M., Aura, T.: Man-in-the-machine: Exploiting ill-secured communication inside the computer. In: 27th USENIX Security Symposium. pp. 1511-1525. USENIX Association, Baltimore, MD (2018)Bui, T., Rao, S.P., Antikainen, M., Bojan, V.M., Aura, T.: Man-in-the-machine: Exploiting ill-secured communication inside the computer. In: 27th USENIX Security Symposium. pp. 1511 -1525. USENIX Association, Baltimore, MD (2018)

予めインストールされていたり、後から必要に応じてインストールしたりする複数のプログラム間で、マルウェアに対して安全にデータのやり取りを行う方法として、上記で述べたような方法でメモリ上のデータを暗号化したものをプログラム間でやり取りする方法がある。この方法では、メモリ上のデータの暗号化に用いた鍵をプログラム間で共有する必要がある。 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 Document 1 reports that if an attacker can access a shared area, there is a risk that the attacker may obtain data on the shared area. When a shared area is used for key sharing between multiple programs, there is a risk that if malware acquires the key used to encrypt data on the memory stored in the shared area, the encryption of the data on the memory will be invalidated. .

本発明は、上記事情に鑑みなされたものであり、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.

一実施形態に係るネットワークシステムの全体構成図の一例である。1 is an example of an overall configuration diagram of a network system according to an embodiment; FIG. 一実施形態に係る端末の構成図の一例である。1 is an example of a configuration diagram of a terminal according to an embodiment; FIG. 一実施形態に係る端末の機能構成図の一例である。1 is an example of a functional configuration diagram of a terminal according to an embodiment; FIG. 一実施形態に係る第1鍵共有プログラム及び第2鍵共有プログラムにより実現される機能構成図の一例である。FIG. 3 is an example of a functional configuration diagram realized by a first key sharing program and a second key sharing program according to one embodiment; 一実施形態に係る第1鍵共有プログラムの実行時における機能構成図の一例である。FIG. 10 is an example of a functional configuration diagram during execution of a first key sharing program according to one embodiment; 一実施形態に係る乱数データ生成処理のフローチャートの一例である。6 is an example of a flowchart of random number data generation processing according to one embodiment. 一実施形態に係る第2鍵共有プログラムの実行時における機能構成図の一例である。FIG. 10 is an example of a functional configuration diagram during execution of a second key sharing program according to one embodiment; 一実施形態に係る乱数データ取得処理のフローチャートの一例である。6 is an example of a flowchart of random number data acquisition processing according to one embodiment. 一実施形態に係る第1鍵共有プログラム及び第2鍵共有プログラムの間の鍵共有処理のシーケンス図の一例である。FIG. 4 is an example of a sequence diagram of key sharing processing between a first key sharing program and a second key sharing program according to one embodiment; 第1変形例に係る鍵共有処理のシーケンス図の一例である。FIG. 11 is an example of a sequence diagram of key sharing processing according to the first modified example; 一実施形態に係る、第2鍵共有プログラムになりすますマルウェアが存在する場合の鍵共有処理の一例を示すシーケンス図の一例である。FIG. 10 is an example of a sequence diagram showing an example of key sharing processing when there is malware impersonating a second key sharing program, according to an embodiment; 一実施形態に係る、第1鍵共有プログラムになりすますマルウェアが存在する場合の鍵共有処理の一例を示すシーケンス図の一例である。FIG. 10 is an example of a sequence diagram showing an example of key sharing processing when there is malware impersonating the first key sharing program, according to one embodiment; 第2変形例に係る鍵共有処理のシーケンス図の一例である。FIG. 11 is an example of a sequence diagram of key sharing processing according to a second modified example; 第3変形例に係る鍵共有処理のシーケンス図の一例である。FIG. 11 is an example of a sequence diagram of key sharing processing according to a third modified example; 一実施形態に係る第1鍵共有プログラム及び第2鍵共有プログラムにより実現される機能構成図の一例である。FIG. 3 is an example of a functional configuration diagram realized by a first key sharing program and a second key sharing program according to one embodiment;

実施形態について説明する。なお、以下に説明する実施形態は特許請求の範囲に係る発明を限定するものではなく、また実施形態の中で説明されている諸要素及びその組み合わせの全てが発明の解決手段に必須であるとは限らない。 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 network system 100 has an information processing device (terminal) 102 as an example of an information processing system, a program distribution server 103 , an authentication server 111 and a program server 112 . Terminal 102 is used by user 101 . The authentication server 111 and program server 112 provide predetermined services by the service provider 110 .

端末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 service provider 110 from the program distribution server 103 according to the operation of the user 101 . The terminal 102 installs the program downloaded by the operation of the user 101 . After installing the program, the user 101 can access the authentication server 111 from the terminal 102 and perform user registration. After completing user registration, the user 101 can use the service of the service provider 110 using the terminal 102 .

端末102は、ユーザ101からサービス利用の指示を受けた場合には、認証サーバ111によるユーザ認証(または装置認証)を受けた後に、プログラムサーバ112を通じてサービスを利用できるようにする。 When the terminal 102 receives an instruction to use a service from the user 101 , the terminal 102 receives user authentication (or device authentication) from the authentication server 111 and then allows the service to be used through the program server 112 .

図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 sensor 202 , a memory 205 as an example of a main storage device, a CPU 206 as an example of a processor, a network IF (interface) 208 and a storage 210 .

センサ202は、例えば、カメラやマイク等であり、ユーザ101の生体情報(例えば、指紋情報)201をセンシングし、センサデータ203を生成する。 The sensor 202 is, for example, a camera, a microphone, or the like, and senses biometric information (for example, fingerprint information) 201 of the user 101 to generate sensor data 203 .

メモリ205は、例えば、RAM(RANDOM ACCESS MEMORY)であり、CPU206で実行されるプログラムや、必要な情報を記憶する。 The memory 205 is, for example, a RAM (RANDOM ACCESS MEMORY), and stores programs executed by the CPU 206 and necessary information.

ネットワーク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, program distribution server 103, authentication server 111, program server 112) via a communication path.

CPU206は、メモリ205及び/又はストレージ210に格納されているプログラムに従って各種処理を実行する。 The CPU 206 executes various processes according to programs stored in the memory 205 and/or storage 210 .

ストレージ210は、例えば、ハードディスクやフラッシュメモリなどであり、CPU206で実行されるプログラムや、CPU206に利用されるデータを記憶する。本実施形態では、ストレージ210は、例えば、センサ202を介して生体情報201のセンサデータ203を取得するセンサ用プログラム211と、認証サーバ111とのデータの送受信を行う認証プログラム212と、格納する。 The storage 210 is, for example, a hard disk or flash memory, and stores programs executed by the CPU 206 and data used by the CPU 206 . In this embodiment, the storage 210 stores, for example, a sensor program 211 that acquires sensor data 203 of the biometric information 201 via the sensor 202 and an authentication program 212 that transmits and receives data to and from the authentication server 111 .

なお、端末102には、マルウェア204が含まれている可能性がある。なお、図2においては、マルウェア204を模式的に表示しているが、実際には、例えば、メモリ205やストレージ210に格納されている。 Note that the terminal 102 may contain malware 204 . Although the malware 204 is shown schematically in FIG. 2, it is actually stored in the memory 205 or the storage 210, for example.

ここで、端末102が認証サーバ111によるユーザ認証を利用する場合の処理について説明する。 Here, processing when the terminal 102 uses user authentication by the authentication server 111 will be described.

端末102のCPU206は、センサ用プログラム211を実行することにより、センサ202から、ユーザ101の生体情報201をセンシングして生成されたセンサデータ203を取得し、センサデータ203をメモリ205に格納する。次いで、CPU206は、認証プログラム212を実行することにより、センサデータ203に対して適切な処理を施して通信データ207を生成し、ネットワークIF208を介して認証サーバ311に送信する。これにより、認証サーバ311においてユーザ認証が実行されることとなる。 The CPU 206 of the terminal 102 acquires the sensor data 203 generated by sensing the biological information 201 of the user 101 from the sensor 202 by executing the sensor program 211 and stores the sensor data 203 in the memory 205 . Next, by executing the authentication program 212 , the CPU 206 performs appropriate processing on the sensor data 203 to generate communication data 207 and transmits the communication data 207 to the authentication server 311 via the network IF 208 . As a result, user authentication is executed in the authentication server 311 .

図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 sensor program 211 and the authentication program 212 to safely exchange the sensor data 203 between the sensor program 211 and the authentication program 212. It is a terminal designed to encrypt data.

以下の説明では、センサ用プログラム211と認証プログラム212との間で暗号化するための鍵共有を実行するための処理を行うプログラムが、後述する第1鍵共有プログラム305と第2鍵共有プログラム306を含んでいる場合について説明する。 In the following description, the programs that perform processing for executing key sharing for encryption between the sensor program 211 and the authentication program 212 are the first key sharing program 305 and the second key sharing program 306, which will be described later. will be described.

なお、第1鍵共有プログラム305と第2鍵共有プログラム306のいずれか一方または両方が、センサ用プログラム211や認証プログラム212に含まれないプログラムであってもよい。この場合の構成については後述する。 One or both of the first key sharing program 305 and the second key sharing program 306 may be programs that are not included in the sensor program 211 or the authentication program 212 . A configuration in this case will be described later.

端末102は、ネットワークIF208、センサ202、エントロピー発生器302、ストレージ210、CPU206、メモリ205を備える。これらの機能構成は、データバスで互いに繋がれており、メモリ205を介してデータをやり取り可能となっている。 Terminal 102 comprises network IF 208 , sensor 202 , entropy generator 302 , storage 210 , CPU 206 and memory 205 . These functional configurations are connected to each other by a data bus and can exchange data via the memory 205 .

エントロピー発生器302は、エントロピーを有する値(「エントロピー源」という)を生成する。ここで、疑似乱数を生成するための値(「seed」という)は、一般的にエントロピー源から生成される。生成されたエントロピー源のサイズが十分でない場合には、繰り返して生成されたエントロピー源に基づいてseedが生成される。
なお、エントロピー発生器302はOS304による機能として提供されていてもよいし、プログラムによる機能として提供されていてもよい。
The entropy generator 302 produces a value with entropy (referred to as an "entropy source"). Here, a value (referred to as “seed”) for generating pseudo-random numbers is generally generated from an entropy source. If the size of the generated entropy source is not sufficient, a seed is generated based on the iteratively generated entropy source.
Note that the entropy generator 302 may be provided as a function by the OS 304, or may be provided as a function by a program.

CPU206は、演算処理で扱うデータを格納するための汎用レジスタ303を複数保持している。 The CPU 206 holds a plurality of general-purpose registers 303 for storing data handled in arithmetic processing.

ストレージ210は、プログラムの実行ファイルや設定ファイルを記憶する。本実施形態では、ストレージ210は、第1鍵共有プログラム305と、第2鍵共有プログラム306とを記憶する。第1鍵共有プログラム305及び第2鍵共有プログラム306は、プログラム間鍵共有プログラムに相当する。 The storage 210 stores program execution files and setting files. In this embodiment, storage 210 stores first key sharing program 305 and second key sharing program 306 . The first key sharing program 305 and the second key sharing program 306 correspond to inter-program key sharing programs.

なお、第1鍵共有プログラム305と、第2鍵共有プログラム306は、予めストレージ210に格納されていてもよいし、必要に応じて、他の装置の非一時的記憶装置からネットワーク経由で、または非一時的な記憶媒体から、ストレージ210に格納されてもよい。 Note that the first key sharing program 305 and the second key sharing program 306 may be stored in advance in the storage 210, or if necessary, from a non-temporary storage device of another device via a network, or It may be stored in the storage 210 from a non-temporary storage medium.

メモリ205には、OS304と呼ばれるプログラムが常駐している。OS304は、CPU206に実行されることによって、ハードウェアとプログラムとの間のデータの仲介や、複数のプログラムの実行権限とリソースとの管理を行う。 A program called an OS 304 resides in the memory 205 . The OS 304, when executed by the CPU 206, mediates data between hardware and programs, and manages the execution authority and resources of a plurality of programs.

ユーザプログラムは、OS304の管理によって、ユーザ権限とよばれる限られた権限の元でCPU206により実行される。一方、OS304のリソース管理に関わる処理などは、より強い権限の元でCPU206により実行される。ここで、第1鍵共有プログラム305、第2鍵共有プログラム306、マルウェア204は、ユーザプログラムに対応する。 A user program is executed by the CPU 206 under limited authority called user authority under the control of the OS 304 . On the other hand, processing related to resource management of the OS 304 is executed by the CPU 206 under stronger authority. Here, the first key sharing program 305, the second key sharing program 306, and the malware 204 correspond to user programs.

メモリ205は、OS304の中心的な処理が利用するカーネル空間310と、ユーザプログラムが利用するユーザ空間320とを有する。 The memory 205 has a kernel space 310 used by the central processing of the OS 304 and a user space 320 used by user programs.

ユーザ空間320上には、ストレージ210に記憶されている第1鍵共有プログラム305及び第2鍵共有プログラム306等のユーザプログラムが実行されると展開される。 When user programs such as the first key sharing program 305 and the second key sharing program 306 stored in the storage 210 are executed, they are deployed in the user space 320 .

ユーザ空間320上に展開された第1鍵共有プログラム321や、第2鍵共有プログラム324は、OS304がプログラム毎に割り当てるユーザ空間320上のメモリ利用領域(例えば、第1鍵共有プログラム321に割り当てられた第1鍵共有プログラム割り当て領域322や、第2鍵共有プログラム324に割り当てられた第2鍵共有プログラム割り当て領域325を使って、CPU206により処理が実行される。 The first key-sharing program 321 and the second key-sharing program 324 developed on the user space 320 are memory usage areas on the user space 320 allocated by the OS 304 for each program (for example, memory areas allocated to the first key-sharing program 321). Processing is executed by the CPU 206 using the first key sharing program allocation area 322 and the second key sharing program allocation area 325 allocated to the second key sharing program 324 .

ユーザプログラムに割り当てられるメモリ205の利用領域は、ユーザプログラムの実行時に動的に確保されてもよいし、ユーザプログラムの実行の途中で動的に(例えば、C言語の標準ライブラリとして提供されるalloc関数などを介して)確保されてもよい。 The use area of the memory 205 allocated to the user program may be dynamically secured during execution of the user program, or dynamically during execution of the user program (for example, alloc function, etc.).

一般的にOS304によってプログラム毎に異なる領域がプログラムのメモリの利用領域としてユーザ空間320上に割り当てられるが、メモリ205内のユーザ空間320上に複数プログラムがアクセス可能な共有領域を確保することをユーザプログラム実行開始時又は、実行中にOS304へ明示することで、共有領域323を確保することができる。 In general, the OS 304 allocates a different area for each program on the user space 320 as a memory utilization area for the program. The shared area 323 can be secured by specifying this to the OS 304 at the start of program execution or during execution.

複数のプログラムについての共有領域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 area 323 for a plurality of programs, use of the inter-process communication technique (referred to as "IPC") of Non-Patent Document 1 can be mentioned. IPC is a mechanism prepared by the OS 304 to exchange data between processes. IPCs include pipes, message queues, shared memory, sockets, and the like. In this embodiment, the first key sharing program 321 and the second key sharing program 324 are configured to secure a shared area 323 in the user space 320 of the memory 205 . The shared area 323 may be secured by the first key sharing program 321 or by the second key sharing program 324 . In this embodiment, for the sake of convenience, it is assumed that the first key sharing program 321 secures the shared area.

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 OS 304 allocates hardware resources such as the CPU 206 and memory 205 to one of the programs, and switches the allocation of the hardware resources as appropriate (referred to as "interrupt"). )I do. For example, when an interrupt by the second key sharing program 324 occurs during the execution of the first key sharing program 321, the CPU 206 executing the OS 304 transfers the information in the general register 303 of the first key sharing program 321 to the kernel space 310. Save and store in the first key sharing program save area 311 . Thereafter, CPU 206 allocates the hardware resource to second key sharing program 324 to which the hardware resource is to be allocated next, and starts executing second key sharing program 324 . After the execution of the second key sharing program 324 ends, the CPU 206 restores the data in the first key sharing program save area 311 to the general-purpose register 303 and restarts the processing of the first key sharing program 321 .

OS304を実行するCPU206は、例えば、サイクルカウンタなどの時刻情報やプログラムごとの実行優先度情報などに基づいて、ハードウェアリソースを割り当てるプログラムを決定し、必要に応じて割り込みのための処理を行う。したがって、実行対象の複数のプログラムがある場合には、複数のプログラムに対してハードウェアリソースを割り当てる順番は、必ずしも一定の順番にならない。 The CPU 206 executing the OS 304 determines a program to allocate hardware resources based on, for example, time information such as a cycle counter and execution priority information for each program, and performs interrupt processing as necessary. Therefore, when there are multiple programs to be executed, the order in which hardware resources are allocated to the multiple programs is not necessarily a fixed order.

本実施形態の第1鍵共有プログラム321は、所定のルール(例えば、乱数データの配送開始要求から、配送終了要求までの間)に従って、乱数とインデックス情報とを含む乱数データを逐次生成し、共有領域323に格納する。ここで、乱数データが共有領域323に格納されるのは、OS304によって第1鍵共有プログラム321にリソースが割り当てられたタイミングとなる。このように共有領域323に格納された乱数データの少なくとも一部は、第2鍵共有プログラム324により取得されることとなる。また、第1鍵共有プログラム321は、共有領域323から第2鍵共有プログラム324により生成された鍵生成情報を取得し、鍵生成情報に基づいて、第1鍵を生成する。 The first key sharing program 321 of this embodiment sequentially generates and shares random number data including random numbers and index information according to a predetermined rule (for example, between a request to start delivery of random number data and a request to end delivery). Store in area 323 . Here, the random number data is stored in the shared area 323 at the timing when the resource is allocated to the first key sharing program 321 by the OS 304 . At least part of the random number data stored in the shared area 323 in this manner is acquired by the second key sharing program 324 . Also, the first key sharing program 321 acquires the key generation information generated by the second key sharing program 324 from the shared area 323, and generates the first key based on the key generation information.

一方、第2鍵共有プログラム324は、共有領域323を介して第1鍵共有プログラム321により格納された乱数データを取得し、取得した乱数データに基づいて、第2鍵を生成し、第2鍵の生成に使用した乱数を特定可能な鍵生成情報を生成し、共有領域323に格納する。ここで、共有領域323から乱数データを取得されるのは、OS304によって第2鍵共有プログラム324にリソースが割り当てられたタイミングとなる。 On the other hand, the second key sharing program 324 obtains the random number data stored by the first key sharing program 321 via the shared area 323, generates a second key based on the obtained random number data, is generated, and stored in the shared area 323 . Here, the random number data is acquired from the shared area 323 at the timing when the resource is allocated to the second key sharing program 324 by the OS 304 .

本実施形態では、マルウェア204等の影響がない場合においては、第1鍵共有プログラム321により生成される第1鍵と、第2鍵共有プログラム324により第2鍵は、同じ値となる。すなわち、第1鍵共有プログラム321と、第2鍵共有プログラム324とは鍵を共有することができる。なお、鍵の共有についての詳細は後述する。 In this embodiment, the first key generated by the first key sharing program 321 and the second key generated by the second key sharing program 324 have the same value when there is no influence of the malware 204 or the like. That is, the first key sharing program 321 and the second key sharing program 324 can share a key. The details of key sharing will be described later.

次に、第1鍵共有プログラム321及び第2鍵共有プログラム324を、CPU206が実行することにより構成される機能構成について詳細に説明する。 Next, a functional configuration configured by the CPU 206 executing the first key sharing program 321 and the second key sharing program 324 will be described in detail.

図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 key sharing program 321 by the CPU 206, a random number data generation/distribution unit 400, a key generation information acquisition/key generation unit 410, and a first data secrecy processing unit 420 are configured.

乱数データ生成・配送部400は、乱数データを生成して共有領域323に格納することにより、共有領域323を介して第2鍵共有プログラム324へ乱数データが配送されるようにする。 The random number data generation/distribution unit 400 generates random number data and stores it in the shared area 323 so that the random number data is distributed to the second key sharing program 324 via the shared area 323 .

乱数データ生成・配送部400は、乱数データ生成部401と、乱数データ配送部404とを備える。 The random number data generation/distribution unit 400 includes a random number data generation unit 401 and a random number data distribution unit 404 .

乱数データ生成部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 index generator 403 . The random number generator 402 generates random numbers using the seed generated by the entropy source generated by the entropy generator.

このとき、乱数生成部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 index generation unit 403 generates index information that identifies the generated random numbers. The index generator 403 may use, for example, the output of a counter as the index information.

乱数データ配送部404は、乱数データ生成部401で生成された乱数データを共有領域323に格納する。 The random number data distribution unit 404 stores the random number data generated by the random number data generation unit 401 in the shared area 323 .

鍵生成情報取得・鍵生成部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 area 323 by the second key sharing program 324 and generates the first key based on the key generation information. The key generation information acquisition/key generation unit 410 includes a key generation information acquisition unit 411 and a first key generation unit 412 . Key generation information acquisition unit 411 acquires key generation information stored in second key sharing program 324 from shared area 323 . The first key generation unit 412 generates the first key using the key generation information acquired by the key generation information acquisition unit 411 .

第1データ秘匿処理部420は、生成された第1鍵を用いてメモリ205上に格納するデータの秘匿処理を行いながら所定の処理を行う。例えば、第1データ秘匿処理部420は、センサデータ203を第1鍵で暗号化する秘匿処理を行って、メモリ205に格納する。なお、第1データ秘匿処理部420の秘匿処理としては、例えば、特許文献1の方法を用いてもよい。 The first data concealment processing unit 420 performs predetermined processing while concealing data stored in the memory 205 using the generated first key. For example, the first data encryption processing unit 420 performs encryption processing to encrypt the sensor data 203 with the first key, and stores the encrypted data in the memory 205 . As the encryption processing of the first data encryption processing unit 420, for example, the method of Patent Document 1 may be used.

第2鍵共有プログラム324は、乱数データ取得・鍵生成部430と、第2データ秘匿処理部440とを備える。 The second key sharing program 324 includes a random number data acquisition/key generation unit 430 and a second data secrecy processing unit 440 .

乱数データ取得・鍵生成部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/key generation unit 430 acquires random number data from shared area 323 and generates a second key. The random number data acquisition/key generation unit 430 includes a random number data acquisition unit 431 , a second key generation unit 432 , and a key generation information distribution unit 433 . The random number data acquisition unit 431 acquires random number data from the shared area 323 . The second key generation unit 432 generates a second key based on the random number data acquired by the random number data acquisition unit 431 . The second key generation unit 432 may generate the second key based on the plurality of random number data acquired by the random number data acquisition unit 431. For example, one or more random number data is selected from among the plurality of random number data. and the selected random number data may be used to generate the second key. The key generation information distribution unit 433 stores index information of all random number data used for key generation in the shared area 323 as key generation information.

第2データ秘匿処理部440は、第2鍵を用いてメモリ205上に格納するデータの秘匿処理を行いながら所定の処理を行う。例えば、第2データ秘匿処理部420は、メモリ205に格納された暗号化されたセンサデータ203を、第2鍵を用いて復号し、復号したセンサデータ203を用いて例えば認証処理を実行する。なお、第2データ秘匿処理部440の秘匿処理としては、例えば、特許文献1の方法を用いてもよい。
また、第2データ秘匿処理部440から第1データ秘匿処理部420へデータを送る際も、上述の処理を同様に行えばよい。
The second data encryption processing unit 440 performs predetermined processing while encrypting the data stored in the memory 205 using the second key. For example, the second data secrecy processing unit 420 decrypts the encrypted sensor data 203 stored in the memory 205 using the second key, and uses the decrypted sensor data 203 to perform authentication processing, for example. As the encryption processing of the second data encryption processing unit 440, for example, the method of Patent Document 1 may be used.
Also, when sending data from the second data anonymization processing unit 440 to the first data anonymization processing unit 420, the above-described processing may be performed in the same manner.

次に、第1鍵共有プログラム305の実行時における端末102の構成について説明する。 Next, the configuration of terminal 102 when first key sharing program 305 is executed will be described.

図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 key sharing program 305 is developed as the first key sharing program 321 on the user space 320 of the memory 205 . The CPU 206 executes the first key sharing program 321 while storing program variables and data being processed in the general-purpose register 303 and the first key sharing program allocation area 322 on the memory 205 .

汎用レジスタ303には、処理の状況に応じて、seed501、乱数データテーブル502、第1鍵503、鍵生成情報504、インデックス情報505、乱数506が格納される。 The general-purpose register 303 stores a seed 501, a random number data table 502, a first key 503, key generation information 504, index information 505, and a random number 506 according to the status of processing.

また、共有領域323には、処理で使用する乱数データ524や、鍵生成情報525が格納される。 Also, the shared area 323 stores random number data 524 and key generation information 525 used in processing.

このように第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 key sharing program 321 is running, the function of the OS 304 causes the CPU 206 to change the data on the general-purpose register 303 (seed 501 , random number data table 502 , first key 503 , key generation information 504 , index information 505 , random number 506 , etc.) are stored in first key sharing program save area 311 of kernel space 310 . In this case, the program to be executed by the interrupt cannot access the data in the first key sharing program save area 311 . Therefore, the malware 204 cannot obtain the seed 501, the random number data table 502, the first key 503, the key generation information 504, the index information 505, the random number 506, etc. from the first key sharing program save area 311, so information leaks. can be prevented.

なお、図5の例では、seed501、乱数データテーブル502、第1鍵503、鍵生成情報504、インデックス情報505、乱数506を汎用レジスタ303に格納するようにしていたが、メモリ205上に格納するようにしてもよい。 In the example of FIG. 5, the seed 501, random number data table 502, first key 503, key generation information 504, index information 505, and random number 506 are stored in the general-purpose register 303, but they are stored in the memory 205. You may do so.

次に、CPU206が第1鍵共有プログラム321を実行することにより行われる乱数データ生成処理について説明する。この乱数データ生成処理は、図4に示す乱数データ生成・配送部400によって実行される。 Next, random number data generation processing performed by the CPU 206 executing the first key sharing program 321 will be described. This random number data generation process is executed by the random number data generation/distribution unit 400 shown in FIG.

図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 area 323 shared with the second key sharing program 324 in the user space 320 of the memory 205 (step 601).

次いで、乱数データ生成・配送部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 index generation unit 403. is generated (step 603).

次いで、乱数データ生成・配送部400は、生成した乱数と、対応するインデックス情報とを含む乱数データ524を共有領域323に書き込む(ステップ604)。なお、共有領域323に、すでに書き込まれている乱数データ524が存在する場合には、乱数データ生成・配送部400は、この乱数データを新たな乱数データ524により上書きする。これにより、共有領域323には、最新の乱数データ524が存在することとなる。 Next, random number data generation/distribution unit 400 writes random number data 524 including the generated random number and corresponding index information to shared area 323 (step 604). If there is already written random number data 524 in the shared area 323 , the random number data generation/distribution unit 400 overwrites this random number data with new random number data 524 . As a result, the latest random number data 524 exists in the shared area 323 .

次いで、乱数データ生成・配送部400は、新しい乱数データ524をエントリとして乱数データテーブル502に追加する(ステップ605)。この結果、乱数データテーブル502には、乱数データ生成・配送部400により生成された各乱数データ524に対応するエントリが格納されることとなる。 Next, the random number data generation/distribution unit 400 adds the new random number data 524 as an entry to the random number data table 502 (step 605). As a result, the random number data table 502 stores an entry corresponding to each random number data 524 generated by the random number data generation/distribution unit 400 .

次いで、乱数データ生成・配送部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 key sharing program 324 secures the shared area 323 of the memory 205 between the first key sharing program 321 and the second key sharing program 324, step 601 need not be performed.

次に、第2鍵共有プログラム306の実行時における端末102の構成について説明する。 Next, the configuration of terminal 102 when executing second key sharing program 306 will be described.

図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 key sharing program 306 is developed as a second key sharing program 324 on the user space 320 of the memory 205 . The CPU 206 executes the second key sharing program 324 while storing program variables and data being processed in the general-purpose register 303 and the second key sharing program allocation area 325 on the memory 205 .

汎用レジスタ303には、処理の状況に応じて、乱数データプール711、第2鍵713、鍵生成情報714が格納される。乱数データプール711には、共有領域323から取得された複数の乱数データ712が格納される。 The general-purpose register 303 stores a random number data pool 711, a second key 713, and key generation information 714 according to the processing status. A random number data pool 711 stores a plurality of random number data 712 acquired from the shared area 323 .

このように第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 key sharing program 324 is running, the function of the OS 304 causes the CPU 206 to change the data on the general-purpose register 303 (For example, the random number data 712 of the random number data pool 711, the second key 713, the key generation information 714, etc.) are stored in the second key sharing program save area 312 of the kernel space 310. FIG. In this case, the program to be executed by the interrupt cannot access the data in the second key sharing program save area 312 . Therefore, since the malware 204 cannot acquire the random number data 712, the second key 713, the key generation information 714, etc. of the random number data pool 711 from the second key sharing program save area 312, information leakage can be prevented. .

次に、CPU206が第2鍵共有プログラム324を実行することにより行われる乱数データ取得処理について説明する。この乱数データ取得処理は、図4に示す乱数データ取得部431によって実行される。 Next, random number data acquisition processing performed by the CPU 206 executing the second key sharing program 324 will be described. This random number data acquisition process is executed by the random number data acquisition unit 431 shown in FIG.

図8は、一実施形態に係る乱数データ取得処理のフローチャートである。 FIG. 8 is a flowchart of random number data acquisition processing according to one embodiment.

まず、乱数データ取得部431は、第1鍵共有プログラム321に対して、乱数データの配送開始要求を送信する(ステップ801)。 First, the random number data acquisition unit 431 transmits a request to start delivering random number data to the first key sharing program 321 (step 801).

次いで、乱数データ取得部431は、共有領域323の乱数データ524を取得し、乱数データプール711に乱数データ712として追加格納する(ステップ802)。ここで、乱数データ取得部431が共有領域323から乱数データ524を取得できるタイミングは、OS304によりリソースが割り当てられたタイミングであり、取得される乱数データ524は、その時点で共有領域323に格納されている乱数データ524である。したがって、第1鍵共有プログラム321により共有領域323に逐次格納される乱数データ524の全てを取得できるとは限らない。 Next, the random number data acquisition unit 431 acquires the random number data 524 in the shared area 323 and additionally stores it as the random number data 712 in the random number data pool 711 (step 802). Here, the timing at which the random number data acquisition unit 431 can acquire the random number data 524 from the shared area 323 is the timing at which the resource is allocated by the OS 304, and the acquired random number data 524 is stored in the shared area 323 at that time. random number data 524. Therefore, it is not always possible to obtain all of the random number data 524 sequentially stored in the shared area 323 by the first key sharing program 321 .

次いで、乱数データ取得部431は、乱数データプール711内の乱数データ712の個数、すなわち、使用可能な乱数のサイズが鍵の生成に十分なサイズであるか否かを判定する(ステップ803)。例えば、1つの乱数データ712の乱数のサイズが鍵の生成に必要なサイズよりも小さい場合であれば、複数の乱数データを取得したか否かが判定される。 Next, the random number data acquisition unit 431 determines whether or not the number of random number data 712 in the random number data pool 711, that is, the usable random number size is sufficient for key generation (step 803). For example, if the random number size of one piece of random number data 712 is smaller than the size required for key generation, it is determined whether or not a plurality of pieces of random number data have been acquired.

この結果、乱数のサイズが鍵の生成に十分なサイズでない場合(ステップ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 data acquiring unit 431 proceeds to step 802 and acquires further random number data.

一方、乱数のサイズが鍵の生成に十分なサイズである場合(ステップ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 data acquisition unit 431 transmits a delivery end request to the first key sharing program 321 (step 804), End the process.

この乱数データ取得処理によると、第2鍵共有プログラム324において鍵を生成するために必要な乱数を適切に取得することができる。 According to this random number data acquisition process, the random numbers required for key generation in the second key sharing program 324 can be appropriately acquired.

なお、第1鍵共有プログラム321と第2鍵共有プログラム324とで共有するメモリ205の共有領域323の確保を第2鍵共有プログラム324が行う場合には、ステップ801を行う前に、図6のステップ601で示す処理と同様な処理を行えばよい。 Note that when the second key sharing program 324 secures the shared area 323 of the memory 205 shared by the first key sharing program 321 and the second key sharing program 324, before performing step 801, A process similar to that shown in step 601 may be performed.

次に、第1鍵共有プログラム321と、第2鍵共有プログラム324との間で鍵を共有する鍵共有処理について説明する。 Next, key sharing processing for sharing a key between the first key sharing program 321 and the second key sharing program 324 will be described.

図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 key sharing program 324 transmits a delivery start request for the random number data 524 to the first key sharing program 321 (step S11).

第1鍵共有プログラム321は、配送開始要求を受信すると、乱数データを共有領域323に繰り返し書き込む処理を実行する(ステップS12)。 Upon receiving the delivery start request, the first key sharing program 321 repeatedly writes the random number data to the shared area 323 (step S12).

ここで、図9においては、乱数を、生成された順番にr、r、・・・と表し、それぞれの乱数のインデックス番号を0、1、・・・と表し、乱数データを(乱数,インデックス番号)で表している。Here, in FIG. 9, the random numbers are represented by r 0 , r 1 , . , index number).

図9の例では、第1鍵共有プログラム321は、乱数データ(r,0)を共有領域323に格納し、乱数データ(r,1)を共有領域323に格納し、乱数データ(r,2)を共有領域323に格納するといったように、第2鍵共有プログラム324から配信終了要求を受信するまで、乱数データを生成し、共有領域323に格納する処理を繰り返し実行する。また、第1鍵共有プログラム321は、各乱数データを、エントリとして乱数データテーブル502に追加する。なお、第1鍵共有プログラム321が乱数データを共有領域323に格納するタイミングは、OS304が第1鍵共有プログラム321にリソースを割り当てたタイミングに依存する。In the example of FIG. 9, the first key sharing program 321 stores random number data (r 0 , 0) in the shared area 323, stores random number data (r 1 , 1) in the shared area 323, stores random number data (r 2 , 2) are stored in the shared area 323 , and the process of generating random number data and storing it in the shared area 323 is repeatedly executed until a distribution end request is received from the second key sharing program 324 . The first key sharing program 321 also adds each piece of random number data to the random number data table 502 as an entry. The timing at which the first key sharing program 321 stores the random number data in the shared area 323 depends on the timing at which the OS 304 allocates resources to the first key sharing program 321 .

一方、第2鍵共有プログラム324は、共有領域323から乱数データを取得する処理を繰り返し実行する(ステップS13)。 On the other hand, the second key sharing program 324 repeatedly executes the process of acquiring random number data from the shared area 323 (step S13).

ここで、第2鍵共有プログラム324が乱数データを共有領域323から取得するタイミングは、OS304が第2鍵共有プログラム324にリソースを割り当てたタイミングに依存する。このため、例えば、図9に示すように、第1鍵共有プログラム321によって、乱数データ(r,1)が共有領域323に格納されてから、乱数データ(r,2)が共有領域323に格納されるまでの間に、第2鍵共有プログラム324による共有領域323からの乱数データの取得が行われず、第2鍵共有プログラム324では、乱数データ(r,1)を取得できないことが発生することもある。なお、本実施形態では、第2鍵共有プログラム324は、第1鍵共有プログラム321が格納した乱数データ524のすべてを取得しておく必要はない。Here, the timing at which the second key sharing program 324 acquires random number data from the shared area 323 depends on the timing at which the OS 304 allocates resources to the second key sharing program 324 . For this reason, for example , as shown in FIG. , the random number data is not acquired from the shared area 323 by the second key sharing program 324, and the second key sharing program 324 cannot acquire the random number data (r 1 , 1). It can also occur. Note that in this embodiment, the second key sharing program 324 does not need to acquire all of the random number data 524 stored by the first key sharing program 321 .

この後、第2鍵共有プログラム324は、乱数データプール711の乱数データ712のサイズが鍵を生成するのに十分なサイズ以上になったときには、配送終了要求を、第1鍵共有プログラム321に送信する(ステップS14:図8のステップ804に対応)。この結果、第1鍵共有プログラム321は、乱数データの生成処理を終了する。 After that, the second key sharing program 324 sends a delivery end request to the first key sharing program 321 when the size of the random number data 712 in the random number data pool 711 becomes equal to or larger than the size sufficient to generate a key. (step S14: corresponding to step 804 in FIG. 8). As a result, the first key sharing program 321 terminates the random number data generation process.

次に、第2鍵共有プログラム324は、取得した複数の乱数データ712の全て又は一部を用いて、第2鍵713を生成する。なお、鍵の生成に必要なサイズが確保できるのであれば、いずれの乱数データ712を選択して使用してもよい。 Next, the second key sharing program 324 generates a second key 713 using all or part of the obtained random number data 712 . Any random number data 712 may be selected and used as long as the size required for key generation can be secured.

更に、第2鍵共有プログラム324は、第2鍵713の生成に用いた乱数データ712のインデックス番号を鍵生成情報525として共有領域323に書き込む(ステップS15)。この鍵生成情報525によると、どの乱数データの乱数を用いて第2鍵713を生成したのかを特定することができる。 Further, the second key sharing program 324 writes the index number of the random number data 712 used to generate the second key 713 to the shared area 323 as the key generation information 525 (step S15). According to this key generation information 525, it is possible to specify which random number of random number data was used to generate the second key 713. FIG.

一方、第1鍵共有プログラム321は、共有領域323から鍵生成情報525を取得する(ステップS16)。 On the other hand, the first key sharing program 321 acquires the key generation information 525 from the shared area 323 (step S16).

この後、第1鍵共有プログラム321は、鍵生成情報525に基づいて、乱数データテーブル502を参照することにより、第2鍵共有プログラム324が第2鍵713を生成する際に用いた乱数を取得し、これらの乱数を用いて第1鍵503を生成する。なお、乱数から鍵を生成する方法は、予め第1鍵共有プログラム321と、第2鍵共有プログラム324とで共通の方法として決められている。 Thereafter, the first key sharing program 321 obtains the random number used by the second key sharing program 324 to generate the second key 713 by referring to the random number data table 502 based on the key generation information 525. and generate the first key 503 using these random numbers. It should be noted that the method of generating the key from the random number is determined in advance as a method common to the first key sharing program 321 and the second key sharing program 324 .

上記処理によると、第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 key sharing program 321 and the second key sharing program 324 generate keys using the same random number, so the values of the first key 503 and the second key 713 match. It will happen. That is, the first key sharing program 321 and the second key sharing program 324 successfully share the key. At this time, the first key sharing program 321 may repeat acquisition of the key generation information 525 for a certain period of time. When the first key sharing program receives a plurality of key generation information 525 with different values, it can detect malware 204 impersonating the second key sharing program 324 .

なお、上記実施形態において、第1鍵共有プログラム321は、共有領域323に書き込んだ乱数データ524を、第2鍵共有プログラム324が取得したか否かを確認するようにしてもよく、この場合には、例えば、第2鍵共有プログラム324による乱数データ524の取得が行われていない場合には、次の乱数データを格納するのを遅くしたり、乱数データの格納を行う周期を長くしたりしてもよい。このようにすることにより、CPU205の処理負荷を低減することができる。 In the above embodiment, the first key sharing program 321 may check whether or not the second key sharing program 324 has acquired the random number data 524 written in the shared area 323. For example, when the random number data 524 is not acquired by the second key sharing program 324, the storage of the next random number data is delayed or the cycle of storing the random number data is lengthened. may By doing so, the processing load on the CPU 205 can be reduced.

上記実施形態において、第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 key sharing program 321 and the second key sharing program 324 have successfully shared a key with each other. can be considered.

図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 key sharing program 321 and the second key sharing program 324 use a message authentication code (referred to as "MAC") to mutually confirm whether or not the key sharing has succeeded. there is

第1鍵共有プログラム321は、第1鍵503を生成した後に、任意のメッセージmと第1鍵503を用いてMAC値を計算し、使用したメッセージmと、MAC値とを共有領域323に格納する(ステップS17)。なお、図10においては、メッセージmと第1鍵503を用いて計算したMAC値をMAC(m,第1鍵)と表している。 After generating the first key 503, the first key sharing program 321 calculates the MAC value using an arbitrary message m and the first key 503, and stores the used message m and the MAC value in the shared area 323. (step S17). Note that in FIG. 10, the MAC value calculated using the message m and the first key 503 is expressed as MAC(m, first key).

一方、第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 key sharing program 324 acquires the message m and the MAC value from the shared area 323 (step S18). Next, the second key sharing program 324 calculates the MAC value (MAC(m, second key)) from the message m and the second key 713, and obtains the MAC value (MAC(m, first key)) and It is confirmed whether or not the calculated MAC value (MAC(m, second key)) is equal. Here, when the MAC value (MAC(m, first key)) and the MAC value (MAC(m, second key)) are equal, the first key 503 and the second key 713 have the same value. It means that the key agreement is successful. Therefore, when the obtained MAC value (MAC(m, first key)) is equal to the calculated MAC value (MAC(m, second key)), the second key sharing program 324 successfully performs key sharing. A key sharing success signal indicating that it has been completed is transmitted to the first key sharing program 321 (step S19). The first key sharing program 321 can recognize that the key sharing with the second key sharing program 324 has been successful by receiving the key sharing success signal.

なお、上記した例では、MAC値を第1鍵共有プログラム321が生成し、第2鍵共有プログラム324が第1鍵共有プログラム321で生成されたMAC値と、自身が計算したMAC値とを比較することにより、鍵共有の成功を確認するようにしていたが、例えば、第2鍵共有プログラム324がMAC値を生成し、第1鍵共有プログラム321が、第2鍵共有プログラム324により生成されたMAC値と、自身が計算したMAC値とを比較することにより、鍵共有の成功を確認するようにしてもよい。 In the above example, the first key sharing program 321 generates the MAC value, and the second key sharing program 324 compares the MAC value generated by the first key sharing program 321 with the MAC value calculated by itself. For example, the second key sharing program 324 generates the MAC value, and the first key sharing program 321 generates the MAC value by the second key sharing program 324. Successful key sharing may be confirmed by comparing the MAC value with the MAC value calculated by itself.

また、MAC値を鍵共有で利用した共有領域323に格納するようにしていたが、MAC値を共有する共有領域として共有領域323とは別の領域としてもよい。 Further, although the MAC value is stored in the shared area 323 used for key sharing, the shared area for sharing the MAC value may be an area separate from the shared area 323 .

次に、上記した実施形態において、端末102に第2鍵共有プログラム324になりすますマルウェア204が存在する場合における、鍵共有処理について説明する。 Next, a key sharing process will be described in the case where the malware 204 impersonating the second key sharing program 324 exists in the terminal 102 in the above-described embodiment.

図11は、一実施形態に係る、マルウェア204が存在する場合の鍵共有処理の一例を示すシーケンス図である。なお、図9に示す鍵共有処理と同様な処理については、同一の符号を付し、重複する説明を省略する。 FIG. 11 is a sequence diagram illustrating an example of key sharing processing when malware 204 is present, 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は、第1鍵共有プログラム321と第2鍵共有プログラム324との共有領域323を盗聴(参照)することができるものとする。マルウェア204は第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵(第1鍵、第2鍵)と同じ鍵を盗聴によって生成することを試みるものとする。 Here, it is assumed that the malware 204 can wiretap (reference) the shared area 323 between the first key sharing program 321 and the second key sharing program 324 . It is assumed that the malware 204 attempts to generate the same key (first key, second key) shared by the first key sharing program 321 and the second key sharing program by eavesdropping.

マルウェア204は、共有領域323を参照することにより、乱数データを取得することができる(ステップS21)。 The malware 204 can acquire random number data by referring to the shared area 323 (step S21).

ここで、端末102においては、OS304が端末102内の情報に基づいてリソースにアクセスできるプログラムを随時決定している。このため、複数のプログラムがOS304へ同一リソース(ここでは共有領域323)へのアクセス要求を出す処理を繰り返したときには、それぞれのプログラムのリソースへのアクセス順は随時異なる。このため、第1鍵共有プログラム321、第2鍵共有プログラム324が共有領域323へのアクセスを繰り返し行っている際に、共有領域323にアクセス可能なマルウェア204がこれらのプログラムと同様に共有領域323へアクセスを繰り返し行うようにした場合にも、共有領域323にアクセスできるプログラムの順序はOS304によって随時決定される。 Here, in the terminal 102, the OS 304 determines a program that can access resources based on information in the terminal 102 as needed. For this reason, when a plurality of programs repeat the process of issuing access requests to the same resource (here, the shared area 323) to the OS 304, the order in which the programs access the resource is always different. For this reason, when the first key sharing program 321 and the second key sharing program 324 repeatedly access the shared area 323, the malware 204 that can access the shared area 323 can access the shared area 323 like these programs. Even if accesses to the shared area 323 are repeated, the order of programs that can access the shared area 323 is determined as needed by the OS 304 .

したがって、マルウェア204が共有領域323の乱数データ524の取得を繰り返し行った場合に、図11に示すように、第2鍵共有プログラム324が共有領域323から取得した乱数データ(R,R、…)と、マルウェア204が共有領域323から取得した乱数データ(R’,R’、…)とが、一致しない状態となる可能性が高い。このように、取得する乱数データが一致しない状態となるので、マルウェア204側で、鍵生成情報を取得した場合(ステップS22)であっても、鍵生成情報が示す乱数を適切に把握することができないので、第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵と同様の鍵を生成できる可能性は低い。よって、複数のプログラム間で安全に鍵を共有することができる。したがって、第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵を用いて暗号化されたデータがマルウェア204に漏洩してしまうリスクを軽減することができる。Therefore, when the malware 204 repeatedly acquires the random number data 524 of the shared area 323, as shown in FIG. 11, the random number data (R 0 , R 1 , ) and the random number data (R′ 0 , R′ 1 , . In this way, the acquired random number data do not match, so even if the malware 204 acquires the key generation information (step S22), the random number indicated by the key generation information can be properly grasped. Therefore, it is unlikely that a key similar to the key shared between the first key sharing program 321 and the second key sharing program can be generated. Therefore, a key can be safely shared among multiple programs. Therefore, it is possible to reduce the risk of data encrypted using the key shared by the first key sharing program 321 and the second key sharing program leaking to the malware 204 .

特に、乱数データ524の送受信を繰り返す回数を増やすと、マルウェア204が第2鍵共有プログラム324と同じ乱数データを盗聴することができる確率がより低くなる。すなわち、第1鍵共有プログラム321と第2鍵共有プログラムが共有した鍵と同様の鍵を生成できる確率がより低くなる。よって、複数のプログラム間でより安全に鍵を共有することができる。 In particular, increasing the number of repetitions of sending and receiving random number data 524 lowers the probability that malware 204 can eavesdrop on the same random number data as second key sharing program 324 . That is, the probability that a key similar to the key shared by the first key sharing program 321 and the second key sharing program can be generated becomes lower. Therefore, the key can be shared more securely among multiple programs.

次に、上記した実施形態において、端末102に中間者攻撃を行うマルウェア204、すなわち、第1鍵共有プログラム321及び第2鍵共有プログラム324になりすますことで、各鍵共有プログラムと鍵を共有しようとするマルウェア204が存在する場合の対策について説明する。 Next, in the above embodiment, by impersonating the malware 204 that performs a man-in-the-middle attack on the terminal 102, that is, the first key sharing program 321 and the second key sharing program 324, an attempt is made to share the key with each key sharing program. A countermeasure against the presence of malware 204 that

図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 malware 204, the second key sharing program 324 recognizes the delivery start request to be sent to the first key sharing program 321 as the first key sharing program 321 itself. The program (in some cases, the program impersonated by the malware 204) as well as other programs are transmitted so that they can be received. This can appropriately prevent the delivery start request from being sent only to the malware 204 impersonating the first key sharing program 321 .

これは、例えば第2鍵共有プログラム324が起動中の全てのプログラムに対して配送開始要求を送信することや、第2鍵共有プログラム324が共有領域323に繰り返し配送開始要求を書き込み第1鍵共有プログラム321が共有領域323から配送開始要求を繰り返し取得することで実現できる。起動中の全てのプログラムに配送開始要求を送信する方法として、例えば、配信開始要求をシグナルとして送信する場合には、シグナルのブロードキャストを用いることで実現できる。 For example, the second key sharing program 324 sends a delivery start request to all running programs. This can be realized by having the program 321 repeatedly acquire the delivery start request from the shared area 323 . As a method of transmitting a delivery start request to all running programs, for example, when transmitting a delivery start request as a signal, signal broadcasting can be used.

マルウェア204が、第2鍵共有プログラム324と鍵を共有するためには、マルウェア204が第1鍵共有プログラム321になりすまし、乱数データ524と鍵生成情報525とを第2鍵共有プログラム324との間でやり取りする必要がある。上記した中間者攻撃への対策を行うことで、第2鍵共有プログラム324が配送開始要求を送信した際(ステップS11,S31)に、第1鍵共有プログラム321になりすましているマルウェア204だけでなく、第1鍵共有プログラム321も配送開始要求を受信することができる。 In order for malware 204 to share a key with second key sharing program 324 , malware 204 impersonates first key sharing program 321 and exchanges random number data 524 and key generation information 525 with second key sharing program 324 . need to interact with By taking measures against man-in-the-middle attacks described above, when the second key sharing program 324 sends a delivery start request (steps S11 and S31), not only the malware 204 impersonating the first key sharing program 321 but also , the first key sharing program 321 can also receive the delivery start request.

この場合には、マルウェア204と第1鍵共有プログラム321とは、それぞれ共有領域323に乱数データの書き込みを繰り返し行う(ステップS12,S32)。 In this case, the malware 204 and the first key sharing program 321 each repeatedly write random number data to the shared area 323 (steps S12 and S32).

この際に、共有領域323には、マルウェア204により書き込まれた乱数データ(W’,W’,・・・,W’)と、第1鍵共有プログラム321により書き込まれた乱数データ(W,W,・・・,W)とのいずれかが格納された状態となる。At this time, in the shared area 323, the random number data ( W'0 , W'1 , ..., W'm ) written by the malware 204 and the random number data (W'm) written by the first key sharing program 321 are stored. W 0 , W 1 , . . . , W n ) is stored.

ここで、端末102においては、OS304が端末102内の情報に基づいてリソースにアクセスできるプログラムを随時決定している。このため、複数のプログラムがOS304へ同一リソース(ここでは共有領域323)へのアクセス要求を出す処理を繰り返したときには、それぞれのプログラムのリソースへのアクセス順は随時異なる。このため、第1鍵共有プログラム321、第2鍵共有プログラム324が共有領域323へのアクセスを繰り返し行っている際に、共有領域323にアクセス可能なマルウェア204がこれらのプログラムと同様に共有領域323へアクセスを繰り返し行うようにした場合にも、共有領域323にアクセスできるプログラムの順序はOS304によって随時決定される。 Here, in the terminal 102, the OS 304 determines a program that can access resources based on information in the terminal 102 as needed. For this reason, when a plurality of programs repeat the process of issuing access requests to the same resource (here, the shared area 323) to the OS 304, the order in which the programs access the resource is always different. For this reason, when the first key sharing program 321 and the second key sharing program 324 repeatedly access the shared area 323, the malware 204 that can access the shared area 323 can access the shared area 323 like these programs. Even if accesses to the shared area 323 are repeated, the order of programs that can access the shared area 323 is determined as needed by the OS 304 .

したがって、第2鍵共有プログラム324が、共有領域323から乱数データ(R,R,・・・,R)を取得すると、すべての乱数データが、マルウェア204が書き込んだ乱数データのみとなったり、第1鍵共有プログラム321が書き込んだ乱数データのみとなったりする可能性は低い。すなわち、第2鍵共有プログラム324が取得した乱数データ(R,R,・・・,R)には、第1鍵共有プログラム321が書き込んだ乱数データ(W,W,・・・,W)の一部と、マルウェア204が書き込んだ乱数データ(W’,W’,・・・,W’)の一部とが含まれている可能性が非常に高い。 Therefore , when the second key sharing program 324 acquires the random number data (R 0 , R 1 , . Or, it is unlikely that only the random number data written by the first key sharing program 321 is used. That is , the random number data (R 0 , R 1 , . , W n ) and part of the random number data (W′ 0 , W1 , .

このような状態において、第2鍵共有プログラム324は、取得した乱数データ524を用いて第2鍵713を生成する。 In such a state, the second key sharing program 324 uses the acquired random number data 524 to generate the second key 713 .

例えば、マルウェア204が、共有領域323上のデータを取得する場合においても、第1鍵共有プログラム321が共有領域323に書き込んだ全ての乱数データ(W,W,・・・,W)を取得することはできないため、共有領域323から鍵生成情報525を取得しても(ステップS33)、第2鍵共有プログラム324が生成した第2鍵713を生成することができない。すなわち、マルウェア204は第2鍵共有プログラム324との間で鍵共有ができないため、中間者攻撃を行うことができない。For example, even when the malware 204 acquires data on the shared area 323, all random number data ( W0 , W1 , . . . , Wn ) written to the shared area 323 by the first key sharing program 321 cannot be obtained, even if the key generation information 525 is obtained from the shared area 323 (step S33), the second key 713 generated by the second key sharing program 324 cannot be generated. That is, since the malware 204 cannot share a key with the second key sharing program 324, it cannot carry out a man-in-the-middle attack.

また、マルウェア204が乱数データ524を共有領域323に書き込んでいる場合、第2鍵共有プログラム324が鍵生成に用いた乱数データにはマルウェア204によって書き込まれた乱数データが含まれている可能性が高く、この場合には、第1鍵共有プログラム321は、マルウェア204によって書き込まれた乱数データの値を知らないため、第1鍵共有プログラム321と第2鍵共有プログラム324との間での鍵共有についても失敗する可能性が高い。 Also, if the malware 204 has written the random number data 524 to the shared area 323, there is a possibility that the random number data written by the malware 204 is included in the random number data used by the second key sharing program 324 to generate the key. In this case, since the first key sharing program 321 does not know the value of the random number data written by the malware 204, key sharing between the first key sharing program 321 and the second key sharing program 324 are also likely to fail.

そこで、第1鍵共有プログラム321と第2鍵共有プログラム324とがお互いに鍵共有が成功しているか否かを、図10を参照して説明したMACを用いて確認するようにしてもよい。この結果、鍵共有が失敗していることを確認した場合には、例えば、第1鍵共有プログム321と第2鍵共有プログラム324とは、作成した第1鍵503と、第2鍵713とを破棄し、再度、鍵共有処理を行うようにしてもよい。 Therefore, the first key sharing program 321 and the second key sharing program 324 may use the MAC described with reference to FIG. 10 to check whether the mutual key sharing has been successful. As a result, when it is confirmed that the key sharing has failed, for example, the first key sharing program 321 and the second key sharing program 324 share the created first key 503 and second key 713. It may be discarded and the key sharing process may be performed again.

上記実施形態において、マルウェアも、共有領域から乱数データを取得し、取得した乱数データから生成した鍵生成情報を第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 key sharing program 321 acquires the random number data generated by the second key sharing program 324 side, and the first key sharing program 321 and the second key sharing program 324 use the random number data 712 generated by both. A key sharing process (second modification) is conceivable in which the first key 503 and the second key 713 are generated by using the keys.

第2変形例では、第1鍵共有プログラム321は乱数データ取得部321と鍵生成情報配送部433を含み、また、第2鍵共有プログラム324は乱数データ生成・配送部400と鍵生成情報取得部411を含む。 In the second modification, the first key sharing program 321 includes a random number data acquisition unit 321 and a key generation information distribution unit 433, and the second key sharing program 324 includes a random number data generation/distribution unit 400 and a key generation information acquisition unit. 411 included.

図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 key sharing program 321 transmits a random number data delivery start request to the second key sharing program 324 (step S17).

第2鍵共有プログラム324は、配送開始要求を受信すると、乱数データを共有領域323に繰り返し書き込む処理を実行する(ステップS18)。 Upon receiving the delivery start request, the second key sharing program 324 executes a process of repeatedly writing random number data to the shared area 323 (step S18).

ここで、図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 key sharing program 324 repeats the process of generating random number data and storing it in the shared area 323 until it receives a delivery end request from the first key sharing program 321 .

一方、第1鍵共有プログラム321は、共有領域323から乱数データを取得する処理を繰り返し実行する(ステップS19)。 On the other hand, the first key sharing program 321 repeatedly executes the process of acquiring random number data from the shared area 323 (step S19).

この後、第1鍵共有プログラム324は、鍵生成に十分なサイズの乱数データを取得したときに、配送終了要求を、第2鍵共有プログラム324に送信する(ステップS20)。この結果、第2鍵共有プログラム324は、乱数データの生成処理を終了する。 After that, when the first key sharing program 324 acquires random number data of a size sufficient for key generation, it sends a delivery end request to the second key sharing program 324 (step S20). As a result, the second key sharing program 324 terminates the random number data generation process.

次に、第1鍵共有プログラム321は、取得した複数の乱数データのすべてまたは一部と第1鍵503を用いて、新たな第1鍵503を生成する。このとき、第1鍵共有プログラムはステップS16後に第1鍵を生成せずに、ステップS19後に、ステップS19で取得した乱数データのすべてまたは一部と、S16で受信した鍵生成情報に紐づく乱数とを用いて第1鍵503を生成してもよい。 Next, the first key sharing program 321 generates a new first key 503 using all or part of the obtained random number data and the first key 503 . At this time, the first key sharing program does not generate the first key after step S16, and after step S19, generates all or part of the random number data obtained in step S19 and the random number associated with the key generation information received in step S16. may be used to generate the first key 503 .

更に、第1鍵共有プログラム321は、ステップS19で取得した乱数データの内、第1鍵生成に用いた乱数データに含まれるインデックス番号を鍵生成情報として共有領域323に書き込む(ステップS21)。 Further, the first key sharing program 321 writes the index number included in the random number data used for generating the first key among the random number data obtained in step S19 as key generation information in the shared area 323 (step S21).

一方、第2鍵共有プログラム324は、共有領域323から鍵生成情報を取得する(ステップS22)。 On the other hand, the second key sharing program 324 acquires key generation information from the shared area 323 (step S22).

この後、第2鍵共有プログラム324は、鍵生成情報に基づいて、第1鍵共有プログラム321が第1鍵を生成する際に用いた乱数を取得し、これらの乱数と第2鍵713から新たな第2鍵を生成する。このとき、第2鍵共有プログラムはステップS14後に第2鍵を生成せずに、ステップS22後に、ステップS13で取得した乱数データのすべてまたは一部と、ステップS22で受信した鍵生成情報に紐づく乱数とを用いて第2鍵713を生成してもよい。 After that, the second key sharing program 324 acquires the random numbers used by the first key sharing program 321 to generate the first key based on the key generation information, and uses these random numbers and the second key 713 to generate a new key. to generate a second key. At this time, the second key sharing program does not generate the second key after step S14, and associates all or part of the random number data obtained in step S13 with the key generation information received in step S22 after step S22. A random number may be used to generate the second key 713 .

図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 area 323 in step S18, All of the random number data that the key sharing program acquires in step S19 must be written by malware. The OS 304 randomly determines the programs that can access the shared area based on the information in the terminal 102, and cannot determine the timing at which the programs access the shared area. Therefore, when malware and the second key sharing program repeatedly write random number data to the shared area 323, there is a possibility that all of the random number data acquired from the shared area 323 by the first key sharing program was written by malware. is low. Therefore, in the second modified example, the first key sharing program and the second key sharing program can safely share keys even if malware masquerading as the second sharing program is operating in the terminal 102 .

次に、第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 seed 501 from the entropy source generated by the entropy generator 302 .

例えば、seed501は、乱数生成のための十分なエントロピーを有している必要があり、エントロピー発生器302により生成されるエントロピー源が乱数生成のための十分なエントロピーを有しているときは、エントロピー源をそのままseed501として用いることができる。しかし、エントロピー源が十分なエントロピーを有していないときは、エントロピー発生器302から繰り返しエントロピー源を収集し、収集したエントロピー源を用いてseed501を生成する必要がある。 For example, seed 501 must have sufficient entropy for random number generation, and entropy The source can be used as seed 501 as it is. However, when the entropy source does not have enough entropy, it is necessary to repeatedly collect the entropy source from the entropy generator 302 and use the collected entropy source to generate the seed 501 .

ここで、第1鍵共有プログラム321は、起動後にエントロピー源の収集を行うこととなるが、一般的にエントロピー発生器302からエントロピー源を取得するには時間がかかるため、エントロピー源が乱数の生成のための十分なエントロピーを有していない場合、鍵共有にかかる時間が増加する。 Here, the first key sharing program 321 collects entropy sources after being activated. Generally, it takes time to obtain the entropy sources from the entropy generator 302. If you do not have enough entropy for , the time taken for key agreement increases.

そこで、第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 key sharing program 321 is started, for example, when the terminal 102 is started, and the first key sharing program 321 A value with a large entropy size (hereinafter referred to as "seed generation information") is delivered to the first key sharing program 321 to generate the seed 501 using the seed generation information.

図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からエントロピー源(e,e,・・・e)を取得する(ステップS41)。For example, immediately after the terminal 102 is activated, the entropy source acquisition program 1400 (more precisely, the CPU 206 executing the entropy source acquisition program 1400) extracts the entropy sources (e 0 , e 1 , . . . ) from the entropy generator 302 . e p ) is obtained (step S41).

その後、第1鍵共有プログラム321が起動されると、第1鍵共有プログラム321は、エントロピー源取得プログラム1400に、seedの配送の開始を要求するseed配送開始要求を送信する(ステップS42)。 After that, when the first key sharing program 321 is activated, the first key sharing program 321 transmits a seed delivery start request for requesting start of seed delivery to the entropy source acquisition program 1400 (step S42).

エントロピー源取得プログラム1400は、第1鍵共有プログラム321からseed配送開始要求を受信すると、取得したエントロピー源を用いて、高いエントロピーを有するseedを生成するための値(「seed生成情報」という。s,s,・・・)を生成する。次いで、エントロピー源取得プログラム1400は、生成したseed生成情報(s,s,・・・)をエントロピー源取得プログラム1400と第1鍵共有プログラム321との共有領域(例えば、第1鍵共有プログラム321と第2鍵共有プログラム324との共有領域323)に書き込む処理を繰り返し行う(ステップS43)。When the entropy source acquisition program 1400 receives a seed delivery start request from the first key sharing program 321, the acquired entropy source is used to generate a value (referred to as “seed generation information”) for generating a seed with high entropy. 0 , s 1 , . . . ). Next, the entropy source acquisition program 1400 stores the generated seed generation information (s 0 , s 1 , . . . ) in a shared area (for example, the first key sharing program 321 and the second key sharing program 324 in the shared area 323) is repeated (step S43).

ここで、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 entropy generator 302 . The shared area between entropy source acquisition program 1400 and first key sharing program 321 is a different area from shared area 323 used for key sharing between first key sharing program 321 and second key sharing program 324. good too.

一方、第1鍵共有プログラム321は、エントロピー源取得プログラム1400との共有領域323からseed生成情報の収集を繰り返す(ステップS44)。なお、第1鍵共有プログラム321は、エントロピー源取得プログラム1400が共有領域323に書き込んだすべてのseed生成情報を取得しなくてもよい。 On the other hand, the first key sharing program 321 repeats collection of seed generation information from the shared area 323 with the entropy source acquisition program 1400 (step S44). Note that the first key sharing program 321 does not have to acquire all the seed generation information written in the shared area 323 by the entropy source acquisition program 1400 .

次いで、第1鍵共有プログラム321は、seed501を生成するための十分なエントロピーサイズを有するseed生成情報を収集した後、エントロピー源取得プログラム1400へseedの配送の終了を要求するseed配送終了要求を送信する(ステップS45)。この結果、seed配送終了要求を受信すると、エントロピー源取得プログラム1400は、seed生成情報の共有領域323への書き込みを終了する。 Next, the first key sharing program 321 collects seed generation information having a sufficient entropy size for generating the seed 501, and then transmits a seed delivery termination request to the entropy source acquisition program 1400 to request termination of seed delivery. (step S45). As a result, upon receiving the seed delivery end request, the entropy source acquisition program 1400 ends the writing of the seed generation information to the shared area 323 .

この後、第1鍵共有プログラム321の乱数生成部402は、seed生成情報からseed501を生成し、第2鍵共有プログラム324と鍵共有を行う。 After that, the random number generation unit 402 of the first key sharing program 321 generates a seed 501 from the seed generation information and performs key sharing with the second key sharing program 324 .

上記処理において、エントロピー源取得プログラム1400により共有領域323に書き込まれるseed生成情報が有するエントロピーの大きさは、エントロピー源が有するエントロピーの大きさよりも大幅に大きい。したがって、上記処理によると、seed501を生成するためにエントロピーを有する値を収集する回数を少なくすることができる。このため、第1鍵共有プログラム321は、seed501を高速に生成して利用することができる。 In the above process, the entropy of the seed generation information written in the shared area 323 by the entropy source acquisition program 1400 is much larger than the entropy of the entropy source. Therefore, according to the above processing, it is possible to reduce the number of times values having entropy are collected in order to generate the seed 501 . Therefore, the first key sharing program 321 can generate and use the seed 501 at high speed.

次に第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 malware 204 is composed of many programs, and when these programs work together, the malware can access the shared area 323 more than the first key sharing program 321 and the second key sharing program 324. Since the number of times increases, the security of key sharing decreases. On the other hand, for example, the following may be done. The first key sharing program periodically attempts to access the shared area 323 and measures the interval at which access is actually successful. This may be measured by a timer that the CPU 206 has, for example. As the number of programs operating in the terminal 102 increases, the interval at which this access succeeds increases. Therefore, the first key sharing program 321 can detect the presence of the malware 204 when the access interval increases.

このマルウェア検知機能は第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 malware 204, the detection program sends a signal notifying that the malware has been detected to the first key sharing program 321 and the second key sharing program 324. 324 can detect malware 204 .

次に第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 random number data 524 transmitted by the first key sharing program 321 increases, the random number data stored in the random number data table 711 in the general-purpose register 303 increases. usage rate will increase. On the other hand, for example, the following may be done. In step 603 of FIG. 6, the random number generation unit 402 uses a pseudo-random number generator to generate random numbers from the index information generated by the index generation unit 403 and the seed 501, so that the process of step 605 is not performed. Here, it is assumed that the pseudo-random number generator can generate the same random number by inputting the same index information and seed 501 .

そして、第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 seed 501, and uses these random numbers to generate the first key 503. can be

このようにすると、汎用レジスタ303に乱数データテーブル711をもたなくてよいため、汎用レジスタ303の使用率を下げることができて、短い時間での鍵共有が可能になる。 By doing so, the general-purpose register 303 does not need to have the random number data table 711, so that the usage rate of the general-purpose register 303 can be reduced, and the key can be shared in a short time.

次に第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 key generation unit 432 after the random number data acquisition unit 431 has finished collecting the random number data in the random number data pool 711 in the general-purpose register 303 . However, the usage rate of the general-purpose register 303 increases in proportion to the increase in the number of random number data to be collected. On the other hand, for example, the following may be done. In step 802 of FIG. 8, after the random number data acquisition unit 431 acquires the random number data 524 on the shared area, the random number included in this random number data and the second key 713 generated from the random numbers acquired so far are used to generate a new first key. 2 key 713 is generated, and the index information included in the random number data is newly added to the key generation information 714 . Subsequently, at step 803 in FIG. 8, it is determined from the number of index information included in the key generation information 714 whether a random number having a size sufficient for key generation has been obtained. As a result, the random number data pool 711 becomes unnecessary, and the usage rate of the general-purpose register 303 can be reduced.

また、上記実施形態と第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-purpose register 303 and safely perform key sharing from malware that spoofs or eavesdrops. . As this combination method, for example, the first key sharing program 321 generates a temporary key 1 using the key generation information 525 delivered by the second key sharing program 324, and uses the random number data 524 delivered by the second key sharing program 324 to Temporary key 2 may be generated sequentially, the first key may be generated from temporary key 1 and temporary key 2, and the second key sharing program 324 may generate the second key by reversing this subject. .

次に、端末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 sensor program 211 and the authentication program 212) will be described in detail.

図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 security processing program 1500 includes, for example, a first program processing unit 1501 that processes the sensor program 211 and a first key sharing program 321 .
The second data security processing program 1510 includes, for example, a 2-program processing unit 1511 that processes the authentication program 212 and a second key sharing program 324 .
When the installed first program processing unit 1501 sends data (for example, sensor data 203 ) to the second program processing unit 1511 , it passes data that requires confidentiality processing to the first data confidentiality processing unit 420 .
The first data encryption processing unit 420 performs encryption processing on the data acquired from the first program processing unit 1501 using the shared key through the processing described in the above embodiment.
The first data encryption processing unit 420 passes the encrypted data to the second data encryption processing unit 440 using the shared area 323, for example.
The second data encryption processing unit 440 restores the original data from the obtained encryption-processed data using the shared key through the processing described in the above embodiment, and passes the restored data to the second program processing unit 1511 .
When data is sent from the second program processing unit 1511 to the first program processing unit 1501, the same processing as described above may be performed with the subjects reversed.

本実施形態においても、上記第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 same terminal 102. and run it. However, it is not limited to this. The program 324 (or the second data security processing program 1510) may be arranged and executed on another terminal.
In this case, the shared area 323 may be provided in the memory of any terminal. For example, if a shared area is provided in the memory of the terminal that executes the second key sharing program 324 (or the second data security processing program 1510), the first key sharing program 321 will receive a random number The data 524 may be stored in the shared area 323 and the key generation information may be obtained from the shared area 323 .

上記開示は、代表的実施形態に関して記述されているが、当業者は、開示される主題の趣旨や範囲を逸脱することなく、形式及び細部において、様々な変更や修正が可能であることを理解するであろう。
また、上記実施形態において、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.
前記OSを実行することによるリソースの割り当ての処理は、前記リソースが各プログラムに対して一定の順序で割り当てられる処理ではない
請求項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鍵の生成を行う
請求項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.
1つの前記乱数データは、前記第2鍵の生成に必要なデータサイズよりも小さいデータであり、
前記プロセッサは、前記第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.

JP2021563925A 2019-12-09 2020-12-04 Information processing system, inter-program key sharing method, and inter-program key sharing program Active JP7304430B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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