JP5986897B2 - Terminal device, integrity verification system, and program - Google Patents

Terminal device, integrity verification system, and program Download PDF

Info

Publication number
JP5986897B2
JP5986897B2 JP2012249108A JP2012249108A JP5986897B2 JP 5986897 B2 JP5986897 B2 JP 5986897B2 JP 2012249108 A JP2012249108 A JP 2012249108A JP 2012249108 A JP2012249108 A JP 2012249108A JP 5986897 B2 JP5986897 B2 JP 5986897B2
Authority
JP
Japan
Prior art keywords
program
measurement
service
value
boot loader
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
JP2012249108A
Other languages
Japanese (ja)
Other versions
JP2014098951A (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.)
KDDI Corp
Original Assignee
KDDI Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by KDDI Corp filed Critical KDDI Corp
Priority to JP2012249108A priority Critical patent/JP5986897B2/en
Publication of JP2014098951A publication Critical patent/JP2014098951A/en
Application granted granted Critical
Publication of JP5986897B2 publication Critical patent/JP5986897B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、スマートフォン等の端末装置の完全性(改竄されていないこと)を検証する技術に関する。   The present invention relates to a technique for verifying the integrity (not tampered) of a terminal device such as a smartphone.

OS(Operating System)から独立した、耐タンパ性を有する専用チップで構成され、暗号化等の処理を安全に行うTrusted Platform Module(TPM)が開発されている。TPMは主に、x86アーキテクチャをベースとした端末、いわゆるパソコンに搭載されている。非特許文献1,2には、TPMを利用して、端末上のファイルが改竄されていない完全な状態であるか否かを検証しながら端末を安全に起動させる「セキュアブート」を可能とする技術が記載されている。   A Trusted Platform Module (TPM) has been developed that consists of a dedicated tamper-resistant chip that is independent of the OS (Operating System) and that performs secure processing such as encryption. TPM is mainly installed in terminals based on x86 architecture, so-called personal computers. Non-Patent Documents 1 and 2 enable “secure boot” that uses the TPM to safely start the terminal while verifying whether or not the file on the terminal is in a complete state. The technology is described.

この技術では、パソコン用のOSのプログラムが書き込まれたCD-ROMを起動ディスクとしてOSを起動させる際に、OSの起動を行うブートローダのプログラムに対して、TPMを利用して完全性の検証が行われる。CD-ROMに書き込まれたOSのプログラムを書き換えることはできないので、ブートローダの完全性を検証することで、端末が完全な状態で起動したか否かを確認することができる。   With this technology, when booting the OS using a CD-ROM containing the OS program for a personal computer as the boot disk, the integrity of the boot loader program that starts the OS can be verified using TPM. Done. Since the OS program written on the CD-ROM cannot be rewritten, verifying the integrity of the boot loader can confirm whether or not the terminal has started up completely.

完全性の検証は、例えば以下のように行われる。
(1)検証対象のプログラムに対応する完全な状態のプログラムを構成する各ファイルをハッシュ関数の入力値としてハッシュ値を算出する「測定」を行い、測定結果としてハッシュ値(期待値)を得る。このハッシュ値は、検証対象のプログラムに対して同様の測定を行った場合に測定結果として得られることが期待される値である。
(2)検証対象のプログラムを構成する各ファイルに対して測定を行い、測定結果としてハッシュ値(測定値)を得る。
(3)完全な状態のプログラムを測定して得られた期待値と、検証対象のプログラムを測定して得られた測定値とを比較する。両方の測定値が一致した場合、検証対象のプログラムは完全であり、両方の測定値が異なる場合、検証対象のプログラムは完全ではないと判断できる。
For example, the integrity verification is performed as follows.
(1) “Measurement” is performed to calculate a hash value using each file constituting a program in a complete state corresponding to a program to be verified as an input value of a hash function, and a hash value (expected value) is obtained as a measurement result. This hash value is a value expected to be obtained as a measurement result when the same measurement is performed on the program to be verified.
(2) Measurement is performed on each file constituting the program to be verified, and a hash value (measurement value) is obtained as a measurement result.
(3) The expected value obtained by measuring the program in the complete state is compared with the measured value obtained by measuring the program to be verified. If both measured values match, it can be determined that the program to be verified is complete, and if both measured values are different, the program to be verified is not complete.

“KNOPPIXとTPMの組み合わせで「安全なサービス」実現へ”,[online],[平成24年10月29日検索],インターネット<URL:http://www.atmarkit.co.jp/news/200802/07/aist.html>“Combining KNOPPIX and TPM to achieve“ safe service ””, [online], [October 29, 2012 search], Internet <URL: http://www.atmarkit.co.jp/news/200802 /07/aist.html> “Knoppix 5.1.1 for Trusted Computing Geeks”,[online],[平成24年11月07日検索],インターネット<URL:http://unit.aist.go.jp/itri/knoppix/TCGeeks-CD20071105.pdf>“Knoppix 5.1.1 for Trusted Computing Geeks”, [online], [November 07, 2012 search], Internet <URL: http://unit.aist.go.jp/itri/knoppix/TCGeeks-CD20071105. pdf>

パソコンでは、OSの主要な機能を実現するプログラムを含むシステムファイルが保存されるハードディスク上のシステム領域がユーザに開放されている。このため、例えばユーザがパソコンに任意のアプリケーションを追加する等の行為により、システム領域の状態が任意に変化する。このような事情から、パソコンの完全な状態の基準を策定しきれない難しさがあり、2012年7月現在、パソコンのセキュアブートは普及に至っていない。   In the personal computer, the system area on the hard disk where system files including programs for realizing the main functions of the OS are stored is open to the user. For this reason, for example, the state of the system area is arbitrarily changed by an action such as a user adding an arbitrary application to the personal computer. For these reasons, there is a difficulty in formulating the standards for the complete state of personal computers. As of July 2012, secure booting of personal computers has not yet become widespread.

OSのシステムファイルが保存されるシステム領域と、ユーザが任意にファイルを追加することが可能なユーザ領域とが分離しているスマートフォン等の端末の場合、端末に対してウイルスによる攻撃等の特殊な状況を除いて、基本的には端末メーカや通信キャリアのみがシステム領域を設定することができる。OSの更新やパッチの適用が行われる場合でも、どのような更新あるいは適用が行われるのかを把握できることを前提とすれば、OSの更新あるいはパッチの適用後に想定されるシステム領域の状態を事前に策定することが可能となる。   In the case of a terminal such as a smartphone where the system area where OS system files are stored and the user area where users can add files are separated, special attacks such as virus attacks on the terminal Except for the situation, basically only the terminal manufacturer and the communication carrier can set the system area. Even if an OS update or patch application is performed, assuming that it is possible to grasp what kind of update or application will be performed, the state of the system area that is expected after the OS update or patch application is determined in advance. It becomes possible to formulate.

しかし、OSのシステムファイルのサイズが膨大であるため、TPMの非力な演算回路がOSのシステムファイルの測定を行うと、膨大な時間を要する。そこで、処理を高速に行える端末のCPU(Central Processing Unit)を用いてOSのシステムファイルの測定を行う手法が考えられる。この手法では、OSを起動するブートローダがCPUを制御し、OSのシステムファイルの測定を行うことになる。しかし、ブートローダは、シングルタスク/シングルスレッドで動作するために、マルチタスク/マルチスレッドで動作可能なOSと比較して処理能力が低い。また、メモリ・キャッシュも限定的にしか機能していないためCPUの動作も、OSが機能している場合よりも遅い。このため、膨大なサイズのOSのシステムファイルの測定を行うのに時間を要し、セキュアブートを実現する際に端末の高速起動の障害となるという問題がある。   However, since the size of the OS system file is enormous, it takes an enormous amount of time if the TPM's weak computing circuit measures the OS system file. Therefore, a method of measuring the OS system file using a CPU (Central Processing Unit) of a terminal capable of high-speed processing can be considered. In this method, the boot loader that starts the OS controls the CPU and measures the OS system file. However, since the boot loader operates with a single task / single thread, the boot loader has a lower processing capability than an OS that can operate with multitask / multithread. Also, since the memory cache functions only in a limited manner, the CPU operates slower than when the OS functions. For this reason, it takes time to measure a system file of an enormous size of OS, and there is a problem that it becomes an obstacle to high-speed startup of a terminal when realizing a secure boot.

また、OSのシステムファイルの測定値と期待値との比較をTPMの演算回路が行うためには、TPM内の記憶装置にOSのシステムファイルの期待値を予め保持させておく必要がある。しかし、OSのシステムファイルのサイズが膨大であるため、OSのシステムファイルの期待値も膨大となり、OSのシステムファイルの期待値を、記憶容量に乏しいTPMの記憶装置に予め保持させておくことが困難である。そこで、十分な記憶容量を有する記憶装置を備えた外部装置(サーバ)にOSのシステムファイルの期待値を予め保持させておき、端末の起動時にOSのシステムファイルの測定値を端末から外部装置へ送信し、外部装置がOSのシステムファイルの測定値と期待値との比較を行う手法が考えられる。   Further, in order for the TPM arithmetic circuit to compare the measured value and the expected value of the OS system file, it is necessary to store the expected value of the OS system file in the storage device in the TPM in advance. However, since the size of the OS system file is enormous, the expected value of the OS system file also becomes enormous, and the expected value of the OS system file may be held in advance in the TPM storage device that has a small storage capacity. Have difficulty. Therefore, the expected value of the OS system file is held in advance in an external device (server) equipped with a storage device having sufficient storage capacity, and the measured value of the OS system file is transferred from the terminal to the external device when the terminal is started. A method can be considered in which the external device compares the measured value of the OS system file with the expected value.

本発明は、上述した課題に鑑みてなされたものであって、端末装置の起動時にOSの完全性の検証を行うと共に端末装置をより高速に起動することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to verify the integrity of the OS when starting up the terminal device and to start up the terminal device at a higher speed.

本発明は、上記の課題を解決するためになされたもので、OS(Operating System)が提供するサービスの機能を実現するためのサービスプログラムと、カーネルによる制御に従って、前記サービスプログラムを測定し、測定結果である第1の測定値を生成した後、前記サービスを起動するサービス測定・起動部の機能を実現するためのサービス測定・起動プログラムと、前記サービス測定・起動部を起動し、前記サービス測定・起動部によって行われる処理を制御する前記カーネルの機能を実現するためのカーネルプログラムと、を含むOSプログラムを記憶する第1の記憶部と、前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動するブートローダの機能を実現するためのブートローダプログラムを記憶する第2の記憶部と、前記OSプログラムおよび前記ブートローダプログラムに従って処理を行う処理部と、前記サービスプログラムを測定したときに期待される測定結果である第1の期待値と前記第1の測定値とを比較し、前記サービス測定・起動プログラムを測定したときに期待される測定結果である第2の期待値と前記第2の測定値とを比較し、前記カーネルプログラムを測定したときに期待される測定結果である第3の期待値と前記第3の測定値とを比較することにより前記OSの完全性を検証するサーバへ前記第1の測定値、前記第2の測定値、および前記第3の測定値を送信する送信部と、を備えたことを特徴とする端末装置である。   The present invention has been made to solve the above-described problems, and measures and measures a service program for realizing a function of a service provided by an OS (Operating System) and control by a kernel. After generating the first measured value as a result, a service measurement / startup program for realizing the function of the service measurement / startup unit for starting the service, and starting the service measurement / startup unit, the service measurement A first storage unit for storing an OS program including a kernel program for realizing the function of the kernel for controlling processing performed by the activation unit, and measuring the service measurement / activation program, A second measurement value is generated, and the kernel program is measured to generate a third measurement value as a measurement result. A second storage unit for storing a boot loader program for realizing a boot loader function for starting the kernel; a processing unit for performing processing in accordance with the OS program and the boot loader program; and measuring the service program The first expected value, which is an expected measurement result, is compared with the first measured value, and the second expected value, which is the expected measurement result when the service measurement / startup program is measured, and the first 2 is compared with the third measured value, and the third expected value, which is a measurement result expected when the kernel program is measured, is compared with the third measured value to verify the integrity of the OS. A terminal device comprising: a transmission unit that transmits the first measurement value, the second measurement value, and the third measurement value to a server.

また、本発明の端末装置は、前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動する第1のブートローダの機能を実現するための、書き換え可能な第1のブートローダプログラムを記憶する前記第2の記憶部と、前記第1のブートローダプログラムを測定し、測定結果である第4の測定値を生成した後、前記第1のブートローダを起動する第2のブートローダの機能を実現するための、書き換え不可能な第2のブートローダプログラムを記憶する第3の記憶部と、前記第1のブートローダプログラムを測定したときに期待される測定結果である第4の期待値と前記第4の測定値とを比較することにより前記第1のブートローダプログラムの完全性を検証する検証部と、を有することを特徴とする。   Further, the terminal device of the present invention measures the service measurement / startup program, generates a second measurement value as a measurement result, measures the kernel program, and obtains a third measurement value as the measurement result. After generating, measure the second storage unit for storing a rewritable first boot loader program for realizing the function of the first boot loader for starting the kernel, and the first boot loader program, Third memory for storing a second non-rewritable second boot loader program for realizing the function of the second boot loader for starting the first boot loader after generating the fourth measurement value as the measurement result The fourth expected value, which is a measurement result expected when the first boot loader program is measured, and the fourth measured value A verification unit for verifying the integrity of the first boot loader program Ri, and having a.

また、本発明の端末装置において、前記検証部は、耐タンパ性を有するTPM(Trusted Platform Module)であって、前記第4の期待値を記憶する記憶部と、前記第4の期待値と前記第4の測定値とを比較することにより前記第1のブートローダプログラムの完全性を検証する比較部と、を有することを特徴とする。   In the terminal device according to the present invention, the verification unit is a TPM (Trusted Platform Module) having tamper resistance, a storage unit that stores the fourth expected value, the fourth expected value, and the And a comparison unit that verifies the integrity of the first boot loader program by comparing with a fourth measurement value.

また、本発明の端末装置において、前記TPMはさらに、前記第1の測定値、前記第2の測定値、および前記第3の測定値の電子署名を生成する署名部を有し、前記送信部は、前記サーバへ、前記第1の測定値、前記第2の測定値、前記第3の測定値、および前記電子署名を送信することを特徴とする。   In the terminal device of the present invention, the TPM further includes a signature unit that generates an electronic signature of the first measurement value, the second measurement value, and the third measurement value, and the transmission unit Transmits the first measurement value, the second measurement value, the third measurement value, and the electronic signature to the server.

また、本発明の端末装置において、前記サービス測定・起動プログラムは、起動した前記カーネルが最初に実行するプログラムであることを特徴とする。   In the terminal device according to the present invention, the service measurement / start program is a program that is executed first by the started kernel.

また、本発明は、端末装置およびサーバを備えた完全性検証システムであって、前記端末装置は、OS(Operating System)が提供するサービスの機能を実現するためのサービスプログラムと、カーネルによる制御に従って、前記サービスプログラムを測定し、測定結果である第1の測定値を生成した後、前記サービスを起動するサービス測定・起動部の機能を実現するためのサービス測定・起動プログラムと、前記サービス測定・起動部を起動し、前記サービス測定・起動部によって行われる処理を制御する前記カーネルの機能を実現するためのカーネルプログラムと、を含むOSプログラムを記憶する第1の記憶部と、前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動するブートローダの機能を実現するためのブートローダプログラムを記憶する第2の記憶部と、前記OSプログラムおよび前記ブートローダプログラムに従って処理を行う処理部と、前記サーバへ前記第1の測定値、前記第2の測定値、および前記第3の測定値を送信する送信部と、を有し、前記サーバは、前記サービスプログラムを測定したときに期待される測定結果である第1の期待値、前記サービス測定・起動プログラムを測定したときに期待される測定結果である第2の期待値、および前記カーネルプログラムを測定したときに期待される測定結果である第3の期待値を記憶する第2の記憶部と、前記端末装置から前記第1の測定値、前記第2の測定値、および第3の測定値を受信する受信部と、前記第1の期待値と前記第1の測定値とを比較し、前記第2の期待値と前記第2の測定値とを比較し、前記第3の期待値と前記第3の測定値とを比較することにより、前記OSの完全性を検証する検証部と、を有することを特徴とする完全性検証システムである。   The present invention is also an integrity verification system comprising a terminal device and a server, wherein the terminal device is in accordance with a service program for realizing a service function provided by an OS (Operating System) and control by a kernel. , After measuring the service program and generating a first measurement value as a measurement result, a service measurement / startup program for realizing the function of a service measurement / startup unit for starting the service, A first storage unit for storing an OS program including a kernel program for realizing a function of the kernel that activates an activation unit and controls processing performed by the service measurement / activation unit; Measures the startup program, generates a second measurement value as a measurement result, and measures the kernel program After generating a third measurement value that is a measurement result, a second storage unit that stores a boot loader program for realizing a boot loader function for starting the kernel, and processing according to the OS program and the boot loader program A processing unit, and a transmission unit that transmits the first measurement value, the second measurement value, and the third measurement value to the server, and the server measures the service program The first expected value that is a measurement result expected for the service, the second expected value that is the measurement result expected when the service measurement / startup program is measured, and the expected value when the kernel program is measured A second storage unit that stores a third expected value that is a measurement result; and the first measurement value, the second measurement value, and the third measurement value from the terminal device. A receiving unit for receiving a value, comparing the first expected value and the first measured value, comparing the second expected value and the second measured value, and the third expected value. A verification unit that verifies the integrity of the OS by comparing the measured value with the third measurement value.

また、本発明は、OS(Operating System)が提供するサービスの機能を実現するためのサービスプログラムと、カーネルによる制御に従って、前記サービスプログラムを測定し、測定結果である第1の測定値を生成した後、前記サービスを起動するサービス測定・起動部の機能を実現するためのサービス測定・起動プログラムと、前記サービス測定・起動部を起動し、前記サービス測定・起動部によって行われる処理を制御する前記カーネルの機能を実現するためのカーネルプログラムと、を含むOSプログラムを記憶する第1の記憶部と、前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動するブートローダの機能を実現するためのブートローダプログラムを記憶する第2の記憶部と、前記OSプログラムおよび前記ブートローダプログラムに従って処理を行う処理部と、前記サービスプログラムを測定したときに期待される測定結果である第1の期待値と前記第1の測定値とを比較し、前記サービス測定・起動プログラムを測定したときに期待される測定結果である第2の期待値と前記第2の測定値とを比較し、前記カーネルプログラムを測定したときに期待される測定結果である第3の期待値と前記第3の測定値とを比較することにより前記OSの完全性を検証するサーバへ前記第1の測定値、前記第2の測定値、および前記第3の測定値を送信する送信部と、としてコンピュータを機能させるためのプログラムである。   The present invention also measures a service program for realizing a service function provided by an OS (Operating System) and control by the kernel, and generates a first measurement value as a measurement result. Thereafter, a service measurement / startup program for realizing the function of a service measurement / startup unit for starting the service, and the service measurement / startup unit are started, and the processing performed by the service measurement / startup unit is controlled. A first storage unit for storing an OS program including a kernel program for realizing a kernel function; measuring the service measurement / startup program; and generating a second measurement value as a measurement result; After measuring the kernel program and generating a third measurement value as a measurement result, the boot program that starts the kernel is started. A second storage unit that stores a boot loader program for realizing the functions of the driver, a processing unit that performs processing according to the OS program and the boot loader program, and a measurement result expected when the service program is measured A first expected value is compared with the first measured value, and a second expected value that is a measurement result expected when the service measurement / startup program is measured is compared with the second measured value. Then, the first measurement is sent to a server that verifies the integrity of the OS by comparing the third expected value, which is a measurement result expected when the kernel program is measured, with the third measured value. A program for causing a computer to function as a value, the second measurement value, and a transmission unit that transmits the third measurement value.

本発明によれば、端末装置が、端末装置のOSの完全性を検証するサーバへ第1の測定値、第2の測定値、および第3の測定値を送信することによって、端末装置の起動時にサーバが端末装置のOSの完全性を検証することができる。また、カーネルによる制御に従って、サービス測定・起動部がサービスプログラムを測定することによって、端末装置をより高速に起動することができる。   According to the present invention, the terminal device activates the terminal device by transmitting the first measurement value, the second measurement value, and the third measurement value to the server that verifies the integrity of the OS of the terminal device. Sometimes the server can verify the integrity of the terminal's OS. Further, the service measuring / starting unit measures the service program according to the control by the kernel, so that the terminal device can be started at a higher speed.

本発明の一実施形態による端末装置の構成を示すブロック図である。It is a block diagram which shows the structure of the terminal device by one Embodiment of this invention. 本発明の一実施形態による端末装置が有するCPUの機能構成を示すブロック図である。It is a block diagram which shows the function structure of CPU which the terminal device by one Embodiment of this invention has. 本発明の一実施形態によるサーバの構成を示すブロック図である。It is a block diagram which shows the structure of the server by one Embodiment of this invention. 本発明の一実施形態におけるOSのファイルシステムを示す参考図である。FIG. 3 is a reference diagram illustrating an OS file system according to an embodiment of the present invention. 本発明の一実施形態による端末装置の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the terminal device by one Embodiment of this invention. 本発明の一実施形態による端末装置の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the terminal device by one Embodiment of this invention. 本発明の一実施形態によるサーバの動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of the operation | movement of the server by one Embodiment of this invention.

以下、図面を参照し、本発明の実施形態を説明する。本実施形態による完全性検証システムは、完全性の検証の対象であるOSを有する端末装置と、端末装置が有するOSの完全性の検証を行うサーバとを含む。図1は、本実施形態による端末装置1の構成を示している。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The integrity verification system according to the present embodiment includes a terminal device having an OS that is an object of integrity verification, and a server that performs OS integrity verification of the terminal device. FIG. 1 shows the configuration of a terminal device 1 according to the present embodiment.

端末装置1は、通信部10(送信部)、CPU11(処理部)、フラッシュメモリ12、ROM(Read Only Memory)13、RAM(Random Access Memory)14、およびTPM15を有する。通信部10は、サーバ2と通信を行う通信回路を有する。CPU11は、各種の処理を行う処理回路を有する。フラッシュメモリ12は、各種のプログラムを記憶する不揮発性のメモリである。ROM13は、各種のプログラムを記憶する、書き換えが不可能な不揮発性のメモリである。RAM14は、各種のプログラムやデータを一時記憶する揮発性のメモリである。フラッシュメモリ12、ROM13、およびRAM14は、以下で説明する各プログラムを記憶する記憶部として機能する。TPM15(検証部)は、内部にCPU(図示せず)を有しており、耐タンパ性を有する専用チップで構成されている。本実施形態では、OSとして、スマートフォン用のOSとして一般的なAndroid(登録商標)が端末装置1に搭載されている場合を例として説明する。   The terminal device 1 includes a communication unit 10 (transmission unit), a CPU 11 (processing unit), a flash memory 12, a ROM (Read Only Memory) 13, a RAM (Random Access Memory) 14, and a TPM 15. The communication unit 10 includes a communication circuit that communicates with the server 2. The CPU 11 has a processing circuit that performs various processes. The flash memory 12 is a non-volatile memory that stores various programs. The ROM 13 is a non-volatile memory that stores various programs and cannot be rewritten. The RAM 14 is a volatile memory that temporarily stores various programs and data. The flash memory 12, the ROM 13, and the RAM 14 function as a storage unit that stores each program described below. The TPM 15 (verification unit) has a CPU (not shown) inside and is configured by a dedicated chip having tamper resistance. In this embodiment, a case where a general Android (registered trademark) as an OS for a smartphone is installed in the terminal device 1 will be described as an example.

フラッシュメモリ12は、サービスプログラム120、サービス測定・起動プログラム121、カーネルプログラム122、および第1ブートローダプログラム123を記憶する。ROM13は第2ブートローダプログラム130を記憶する。   The flash memory 12 stores a service program 120, a service measurement / startup program 121, a kernel program 122, and a first boot loader program 123. The ROM 13 stores the second boot loader program 130.

サービスプログラム120は、OSが提供するサービスの機能を実現するためのシステムファイルを含むプログラムである。サービスプログラム120がフラッシュメモリ12からRAM14に読み込まれることによりサービス140が起動する。サービス140は、RAM14に常駐しているプログラムであり、OSによってはデーモンと呼ばれることもある。起動したサービス140は、サービスプログラム120で規定されている命令をCPU11に与えることにより、サービスの機能を実現する。   The service program 120 is a program including a system file for realizing the function of the service provided by the OS. The service 140 is activated when the service program 120 is read from the flash memory 12 into the RAM 14. The service 140 is a program that is resident in the RAM 14 and may be called a daemon depending on the OS. The activated service 140 implements a service function by giving the CPU 11 a command defined by the service program 120.

サービス測定・起動プログラム121は、サービスプログラム120を測定し、測定値(第1の測定値)を生成した後、サービス140を起動する機能を実現するためのプログラムである。サービス測定・起動プログラム121がフラッシュメモリ12からRAM14に読み込まれることによりサービス測定・起動部141が起動する。起動したサービス測定・起動部141は、サービス測定・起動プログラム121で規定されている命令をCPU11に与えることにより、上記の機能を実現する。   The service measurement / startup program 121 is a program for realizing a function of starting the service 140 after measuring the service program 120 and generating a measurement value (first measurement value). When the service measurement / startup program 121 is read from the flash memory 12 into the RAM 14, the service measurement / startup unit 141 is started. The activated service measurement / activation unit 141 realizes the above-described function by giving the CPU 11 a command defined by the service measurement / activation program 121.

カーネルプログラム122は、メモリ管理、プロセス管理、デバイス管理等のOSとしての基本機能を実現すると共に、本実施形態ではサービス測定・起動部141を起動し、サービス測定・起動部141によって行われる処理を制御する機能を実現するためのプログラムである。カーネルプログラム122がフラッシュメモリ12からRAM14に読み込まれることによりカーネル142が起動する。起動したカーネル142は、カーネルプログラム122で規定されている命令をCPU11に与えることにより、上記の機能を実現する。   The kernel program 122 realizes basic functions as an OS such as memory management, process management, and device management. In the present embodiment, the kernel program 122 starts the service measurement / startup unit 141 and performs processing performed by the service measurement / startup unit 141. This is a program for realizing the function to be controlled. The kernel 142 is activated by reading the kernel program 122 from the flash memory 12 into the RAM 14. The activated kernel 142 implements the above-described function by giving the CPU 11 an instruction defined by the kernel program 122.

サービスプログラム120、サービス測定・起動プログラム121、およびカーネルプログラム122はOSプログラムを構成する。また、RAM14上で起動したサービス140、サービス測定・起動部141、およびカーネル142はOSを構成する。サービスプログラム120、サービス測定・起動プログラム121、およびカーネルプログラム122は、圧縮された状態でフラッシュメモリ12に格納されている。   The service program 120, the service measurement / startup program 121, and the kernel program 122 constitute an OS program. In addition, the service 140 activated on the RAM 14, the service measurement / activation unit 141, and the kernel 142 constitute an OS. The service program 120, the service measurement / startup program 121, and the kernel program 122 are stored in the flash memory 12 in a compressed state.

第1ブートローダプログラム123は、サービス測定・起動プログラム121を測定し、測定値(第2の測定値)を生成すると共に、カーネルプログラム122を測定し、測定値(第3の測定値)を生成した後、カーネル142を起動する機能を実現するためのプログラムである。第1ブートローダプログラム123がフラッシュメモリ12からRAM14に読み込まれることにより第1ブートローダ143が起動する。起動した第1ブートローダ143は、第1ブートローダプログラム123で規定されている命令をCPU11に与えることにより、上記の機能を実現する。本実施形態の第1ブートローダプログラム123は書き換え可能なプログラムであり、ブートローダの機能の更新に対応することが可能である。   The first boot loader program 123 measures the service measurement / startup program 121, generates a measurement value (second measurement value), measures the kernel program 122, and generates a measurement value (third measurement value). This is a program for realizing the function of starting the kernel 142 later. The first boot loader program 123 is started by reading the first boot loader program 123 from the flash memory 12 into the RAM 14. The activated first boot loader 143 implements the above function by giving the CPU 11 an instruction defined by the first boot loader program 123. The first boot loader program 123 of the present embodiment is a rewritable program and can cope with the update of the boot loader function.

第2ブートローダプログラム130は、第1ブートローダプログラム123を測定し、測定値(第4の測定値)を生成した後、第1ブートローダ143を起動する機能を実現するためのプログラムである。第2ブートローダプログラム130がROM13からRAM14に読み込まれることにより第2ブートローダ144が起動する。起動した第2ブートローダ144は、第2ブートローダプログラム130で規定されている命令をCPU11に与えることにより、上記の機能を実現する。本実施形態の第2ブートローダプログラム130は書き換え不可能なプログラムである。   The second boot loader program 130 is a program for realizing a function of starting the first boot loader 143 after measuring the first boot loader program 123 and generating a measurement value (fourth measurement value). The second boot loader program 130 is activated by reading the second boot loader program 130 from the ROM 13 into the RAM 14. The activated second boot loader 144 implements the above function by giving the CPU 11 an instruction defined by the second boot loader program 130. The second boot loader program 130 of this embodiment is a non-rewritable program.

第1ブートローダ143および第2ブートローダ144はブートローダを構成する。本実施形態では第1ブートローダ143および第2ブートローダ144が使用されるが、第1ブートローダ143を設けず、第2ブートローダ144にその機能を持たせてもよい。この場合、ブートローダの全体が書き換え不可能となる。   The first boot loader 143 and the second boot loader 144 constitute a boot loader. In the present embodiment, the first boot loader 143 and the second boot loader 144 are used, but the first boot loader 143 may not be provided, and the second boot loader 144 may have the function. In this case, the entire boot loader cannot be rewritten.

TPM15は、記憶部150、比較部151、および署名部152を有する。記憶部150は、第1ブートローダプログラム123を測定したときに測定結果として期待される期待値(第4の期待値)を記憶する。比較部151は、第2ブートローダ144が第1ブートローダプログラム123を測定して得られた測定値と、記憶部150に格納されている期待値とを比較することにより第1ブートローダ143の完全性を検証する。   The TPM 15 includes a storage unit 150, a comparison unit 151, and a signature unit 152. The storage unit 150 stores an expected value (fourth expected value) expected as a measurement result when the first boot loader program 123 is measured. The comparison unit 151 compares the measured value obtained by measuring the first boot loader program 123 with the second boot loader 144 and the expected value stored in the storage unit 150, thereby confirming the integrity of the first boot loader 143. Validate.

署名部152は、第1ブートローダ143がサービス測定・起動プログラム121を測定して得られる測定値と、第1ブートローダ143がカーネルプログラム122を測定して得られる測定値と、サービス測定・起動部141がサービスプログラム120を測定して得られる測定値とのそれぞれに対して電子署名を付加した署名ファイルを生成する。生成された署名ファイルはサーバ2へ送信される。   The signature unit 152 includes a measurement value obtained by measuring the service measurement / startup program 121 by the first boot loader 143, a measurement value obtained by measuring the kernel program 122 by the first boot loader 143, and a service measurement / startup unit 141. Generates a signature file with an electronic signature added to each of the measured values obtained by measuring the service program 120. The generated signature file is transmitted to the server 2.

CPU11は、RAM14に読み込まれて起動したサービス140、サービス測定・起動部141、カーネル142、第1ブートローダ143、および第2ブートローダ144から与えられる各種命令を実行することによって、それらの機能に対応する処理を実行する処理部として機能する。図2はCPU11の機能構成を模式的に示している。CPU11は、サービス140の機能に対応するサービス処理部110、サービス測定・起動部141の機能に対応するサービス測定・起動処理部111、カーネル142の機能に対応するカーネル処理部112、第1ブートローダ143の機能に対応する第1ブートローダ処理部113、および第2ブートローダ144の機能に対応する第2ブートローダ処理部114として機能する。   The CPU 11 corresponds to these functions by executing various instructions given from the service 140, the service measurement / starting unit 141, the kernel 142, the first boot loader 143, and the second boot loader 144 that are loaded into the RAM 14 and started. It functions as a processing unit that executes processing. FIG. 2 schematically shows the functional configuration of the CPU 11. The CPU 11 includes a service processing unit 110 corresponding to the function of the service 140, a service measurement / starting processing unit 111 corresponding to the function of the service measuring / starting unit 141, a kernel processing unit 112 corresponding to the function of the kernel 142, and the first boot loader 143. Functions as a first boot loader processing unit 113 corresponding to the above functions and a second boot loader processing unit 114 corresponding to the functions of the second boot loader 144.

本実施形態では、第1ブートローダ143の完全性の検証は端末装置1で行われる。しかし、サービス140、サービス測定・起動部141、およびカーネル142を含むOSの完全性の検証は、測定値と期待値との比較に時間を要するため、サーバ2で行われる。   In the present embodiment, the integrity of the first boot loader 143 is verified by the terminal device 1. However, verification of the integrity of the OS including the service 140, the service measurement / starting unit 141, and the kernel 142 takes time to compare the measured value with the expected value, and thus is performed by the server 2.

図3は、本実施形態によるサーバ2の構成を示している。サーバ2は、通信部20(受信部)、検証部21、および記憶部22を有する。通信部20は、端末装置1と通信を行う通信回路を有する。検証部21は、端末装置1から受信された署名ファイルに基づいて、測定値が改竄されているか否かを確認し、さらに、署名ファイルに含まれる測定値と、記憶部22に格納されている期待値とを比較することにより、端末装置1におけるOSの完全性を検証する。記憶部22は、サービスプログラム120を測定したときに測定結果として期待される期待値(第1の期待値)と、サービス測定・起動プログラム121を測定したときに測定結果として期待される期待値(第2の期待値)と、カーネルプログラム122を測定したときに測定結果として期待される期待値(第3の期待値)と、検証部21が端末装置1におけるOSの完全性を検証した結果とを記憶する。サーバ2の完全性は予め保証されているものとする。   FIG. 3 shows the configuration of the server 2 according to the present embodiment. The server 2 includes a communication unit 20 (reception unit), a verification unit 21, and a storage unit 22. The communication unit 20 includes a communication circuit that communicates with the terminal device 1. The verification unit 21 confirms whether or not the measurement value has been tampered with based on the signature file received from the terminal device 1, and further stores the measurement value included in the signature file and the storage unit 22. The integrity of the OS in the terminal device 1 is verified by comparing with the expected value. The storage unit 22 has an expected value (first expected value) expected as a measurement result when the service program 120 is measured, and an expected value expected as a measurement result when the service measurement / startup program 121 is measured ( A second expected value), an expected value (third expected value) expected as a measurement result when the kernel program 122 is measured, and a result of the verification unit 21 verifying the integrity of the OS in the terminal device 1; Remember. Assume that the integrity of the server 2 is guaranteed in advance.

次に、本実施形態におけるOSのファイルシステムを説明する。図4は、フラッシュメモリ12上に構築されているOSのファイルシステムを示している。なお、図4は、端末装置1の起動時の状態を示している。「*」はルートディレクトリを示している。“[”と“]”で囲まれた文字列はディレクトリ(フォルダ)を示している。ルートディレクトリには、ディレクトリである/data、/proc、/sbin、/sys、/systemのほか、プログラムである/init、ファイルであるdefault.prop、init.goldfish.rc、init.rc、tcg-scan.conf等がある。ディレクトリにはファイルをマウント(格納)することが可能であり、例えば/sbinにはadbというファイルがマウントされている。/data、/proc、/sys、/systemには端末装置1の起動時にファイルはマウントされていない。   Next, the OS file system in the present embodiment will be described. FIG. 4 shows an OS file system built on the flash memory 12. FIG. 4 shows a state when the terminal device 1 is activated. “*” Indicates the root directory. A character string surrounded by “[” and “]” indicates a directory (folder). In addition to the directories / data, / proc, / sbin, / sys, and / system, the root directory includes programs / init, files default.prop, init.goldfish.rc, init.rc, tcg- scan.conf etc. A file can be mounted (stored) in the directory. For example, a file called adb is mounted in / sbin. No files are mounted in / data, / proc, / sys, or / system when the terminal device 1 is started.

initは、カーネル142が最初に実行するプログラムである。initが処理を実行する順番は、init.rcに規定されている。init.rcには、サービスプログラム120を起動して初期化する従来の処理に対して、サービスプログラム120を測定する処理が追加されている。また、initがinit.rcに従ってサービスプログラム120を測定する際の条件はtcg-scan.confに規定されている。tcg-scan.confには、例えば測定するファイルのパス、測定対象となるエントリーの名称のマッチングパターン、エントリーのタイプ(ファイル、ディレクトリ、ノード、リンク、デバイス等)等が含まれる。   init is a program executed first by the kernel 142. The order in which init executes processes is specified in init.rc. Init.rc has a process for measuring the service program 120 added to the conventional process for starting and initializing the service program 120. In addition, conditions when the init measures the service program 120 according to init.rc are defined in tcg-scan.conf. The tcg-scan.conf includes, for example, the path of the file to be measured, the matching pattern of the name of the entry to be measured, the entry type (file, directory, node, link, device, etc.) and the like.

サービス測定・起動プログラム121は、少なくともinit、init.rc、tcg-scan.confを含んでいる。また、サービスプログラム120は、少なくとも/dataおよび/systemにマウントされるシステムファイルを含んでいる。上述したように、端末装置1の起動時に/dataおよび/systemにはファイルがマウントされていないため、サービスプログラム120を構成するシステムファイルが/dataおよび/systemにマウントされた後、サービスプログラム120が測定される。なお、カーネルプログラム122はファイルシステムに含まれていない。   The service measurement / startup program 121 includes at least init, init.rc, and tcg-scan.conf. The service program 120 includes at least system files mounted at / data and / system. As described above, since files are not mounted on / data and / system when the terminal device 1 is started up, the service program 120 is executed after the system files constituting the service program 120 are mounted on / data and / system. Measured. Note that the kernel program 122 is not included in the file system.

次に、本実施形態による端末装置1の起動時の動作を説明する。図5および図6は端末装置1の起動時の動作を示している。図5はOSおよびブートローダの動作を示し、図6はTPM15の動作を示している。RAM14に読み込まれて起動した各プログラムに従ってCPU11が処理を行うことによって、図4に示す各処理が行われるが、以下では、RAM14上で起動した各プログラムを処理の主体として説明を行う。   Next, the operation at the time of starting the terminal device 1 according to the present embodiment will be described. 5 and 6 show the operation at the time of starting the terminal device 1. FIG. 5 shows the operation of the OS and the boot loader, and FIG. 6 shows the operation of the TPM 15. The CPU 11 performs processing according to each program read and started by the RAM 14 to perform each processing shown in FIG. 4. Hereinafter, each program started on the RAM 14 will be described as the main subject of processing.

端末装置1の電源が投入され、起動が指示されると、図5に示すように、第2ブートローダプログラム130がROM13からRAM14に読み込まれ、第2ブートローダ144が起動する(ステップS100)。第2ブートローダ144は、フラッシュメモリ12からRAM14に第1ブートローダプログラム123を読み込み、第1ブートローダプログラム123を測定する(ステップS105)。第1ブートローダプログラム123の測定値はTPM15へ出力される。   When the terminal device 1 is powered on and activated, the second boot loader program 130 is read from the ROM 13 into the RAM 14 and the second boot loader 144 is activated as shown in FIG. 5 (step S100). The second boot loader 144 reads the first boot loader program 123 from the flash memory 12 into the RAM 14 and measures the first boot loader program 123 (step S105). The measured value of the first boot loader program 123 is output to the TPM 15.

続いて、第2ブートローダ144はフラッシュメモリ12からRAM14に第1ブートローダプログラム123を読み込み、第1ブートローダ143を起動する(ステップS110)。起動した第1ブートローダ143は、TPM15から指示が出力されるのを待つ。   Subsequently, the second boot loader 144 reads the first boot loader program 123 from the flash memory 12 into the RAM 14 and activates the first boot loader 143 (step S110). The activated first boot loader 143 waits for an instruction to be output from the TPM 15.

図6に示すように、TPM15の比較部151は、第1ブートローダプログラム123の測定値が入力されると、第1ブートローダプログラム123の期待値を記憶部150から読み出す。比較部151は、第1ブートローダプログラム123の測定値と期待値とを比較する(ステップS200)。   As illustrated in FIG. 6, when the measurement value of the first boot loader program 123 is input, the comparison unit 151 of the TPM 15 reads the expected value of the first boot loader program 123 from the storage unit 150. The comparison unit 151 compares the measured value of the first boot loader program 123 with the expected value (step S200).

続いて、比較部151は、第1ブートローダプログラム123の測定値と期待値とが一致するか否かを判定する(ステップS205)。第1ブートローダプログラム123の測定値と期待値とが一致しなかった場合、比較部151は終了指示を出力し(ステップS235)、TPM15は処理を終了する。この場合、第1ブートローダ143の完全性が確認できなかったことになる。   Subsequently, the comparison unit 151 determines whether or not the measured value of the first boot loader program 123 matches the expected value (step S205). If the measured value and the expected value of the first boot loader program 123 do not match, the comparison unit 151 outputs an end instruction (step S235), and the TPM 15 ends the process. In this case, the integrity of the first boot loader 143 could not be confirmed.

また、第1ブートローダプログラム123の測定値と期待値とが一致した場合、比較部151は起動指示を出力する(ステップS210)。この場合、第1ブートローダ1434の完全性が確認できたことになる。続いて、署名部152は、TPM15に測定値が入力されるのを待つ。   If the measured value and the expected value of the first boot loader program 123 match, the comparison unit 151 outputs a start instruction (step S210). In this case, the integrity of the first boot loader 1434 has been confirmed. Subsequently, the signature unit 152 waits for a measurement value to be input to the TPM 15.

図5に示すように、第1ブートローダ143は、TPM15から出力された指示の内容を判定する(ステップS115)。TPM15から出力された指示が終了指示であった場合、第1ブートローダ143は処理を終了する。この場合、端末装置1の起動は中止される。また、TPM15から出力された指示が起動指示であった場合、第1ブートローダ143は、圧縮されたカーネルプログラム122をフラッシュメモリ12から読み出して測定しながら、カーネルプログラム122をRAM14に展開(伸張)する。また、第1ブートローダ143は、圧縮されたサービス測定・起動プログラム121をフラッシュメモリ12から読み出して測定しながら、サービス測定・起動プログラム121をRAM14に展開する(ステップS120)。カーネルプログラム122およびサービス測定・起動プログラム121のそれぞれの測定値はTPM15へ出力される。   As shown in FIG. 5, the first boot loader 143 determines the content of the instruction output from the TPM 15 (step S115). If the instruction output from the TPM 15 is an end instruction, the first boot loader 143 ends the process. In this case, activation of the terminal device 1 is stopped. If the instruction output from the TPM 15 is a start instruction, the first boot loader 143 expands (decompresses) the kernel program 122 to the RAM 14 while reading the compressed kernel program 122 from the flash memory 12 and measuring it. . The first boot loader 143 expands the service measurement / startup program 121 in the RAM 14 while reading the compressed service measurement / startup program 121 from the flash memory 12 and measuring it (step S120). The measured values of the kernel program 122 and the service measurement / startup program 121 are output to the TPM 15.

続いて、第1ブートローダ143は、圧縮されたカーネルプログラム122をフラッシュメモリ12から再度読み出してRAM14に展開し、カーネル142を起動する。また、第1ブートローダ143は、圧縮されたサービス測定・起動プログラム121をフラッシュメモリ12から再度読み出してRAM14に展開し、サービス測定・起動部141を起動する(ステップS125)。   Subsequently, the first boot loader 143 reads the compressed kernel program 122 from the flash memory 12 again, expands it in the RAM 14, and starts the kernel 142. Also, the first boot loader 143 reads the compressed service measurement / startup program 121 from the flash memory 12 again and expands it in the RAM 14, and starts the service measurement / startup unit 141 (step S125).

続いて、起動したカーネル142が、前述したinitを起動することにより、サービス測定・起動部141を起動する(ステップS130)。起動したサービス測定・起動部141のinitは、init.rcで規定されている手順に従って処理を行う。本実施形態のinit.rcでは、サービスプログラム120を構成するシステムファイルのマウント、サービスプログラム120の測定、サービス140の起動の順に処理を行うことが規定されている。したがって、サービス測定・起動部141のinitは、圧縮されたサービスプログラム120をフラッシュメモリ12から読み出して展開し、サービスプログラム120を構成するシステムファイルをフラッシュメモリ12中の/dataと/systemにマウントする(ステップS135)。   Subsequently, the activated kernel 142 activates the above-described init to activate the service measurement / activation unit 141 (step S130). The init of the activated service measurement / activation unit 141 performs processing according to the procedure defined in init.rc. The init.rc of this embodiment stipulates that processing is performed in the order of mounting of system files constituting the service program 120, measurement of the service program 120, and activation of the service 140. Therefore, init of the service measuring / starting unit 141 reads the compressed service program 120 from the flash memory 12 and expands it, and mounts system files constituting the service program 120 at / data and / system in the flash memory 12. (Step S135).

続いて、サービス測定・起動部141のinitは、tcg-scan.confに従って、/dataと/systemにマウントされたサービスプログラム120をフラッシュメモリ12からRAM14に読み込み、サービスプログラム120を測定する(ステップS140)。ステップS140では、サービスプログラム120を構成するシステムファイルに含まれるファイル毎に測定が行われ、ファイル毎に測定値が算出される。各ファイルの測定値は1つのファイルにまとめられ、サービスプログラム120の測定値を記録したファイルとしてフラッシュメモリ12に格納される。   Subsequently, init of the service measurement / startup unit 141 reads the service program 120 mounted on / data and / system from the flash memory 12 to the RAM 14 according to tcg-scan.conf, and measures the service program 120 (step S140). ). In step S140, measurement is performed for each file included in the system file constituting the service program 120, and a measurement value is calculated for each file. The measurement values of each file are collected into one file and stored in the flash memory 12 as a file in which the measurement values of the service program 120 are recorded.

続いて、サービス測定・起動部141のinitは、/dataと/systemにマウントされたサービスプログラム120をフラッシュメモリ12からRAM14に読み込み、サービス140を起動する(ステップS145)。起動したサービス140は、通信に関する機能が起動した時点で、TPM15から指示が出力されるのを待つ。   Subsequently, init of the service measurement / startup unit 141 reads the service program 120 mounted on / data and / system from the flash memory 12 to the RAM 14 and starts the service 140 (step S145). The activated service 140 waits for an instruction to be output from the TPM 15 when a communication function is activated.

図6に示すように、TPM15の署名部152は、比較部151から起動指示が出力された後、カーネルプログラム122の測定値が入力されると、この測定値と電子署名とを含む署名ファイルを生成し、フラッシュメモリ12に格納する(ステップS215)。この署名ファイルに含まれる電子署名は、カーネルプログラム122の測定値のハッシュ値を、TPM15が保持する秘密鍵で暗号化した情報である。署名ファイルの生成に使用される秘密鍵は、例えば記憶部150に格納されている。   As shown in FIG. 6, when the measurement value of the kernel program 122 is input after the activation instruction is output from the comparison unit 151, the signature unit 152 of the TPM 15 generates a signature file including the measurement value and the electronic signature. It is generated and stored in the flash memory 12 (step S215). The electronic signature included in the signature file is information obtained by encrypting the hash value of the measurement value of the kernel program 122 with the secret key held by the TPM 15. The secret key used for generating the signature file is stored in the storage unit 150, for example.

続いて、署名部152は、サービス測定・起動プログラム121の測定値が入力されると、この測定値と電子署名とを含む署名ファイルを生成し、フラッシュメモリ12に格納する(ステップS220)。この署名ファイルに含まれる電子署名は、サービス測定・起動プログラム121の測定値のハッシュ値を、TPM15が保持する秘密鍵で暗号化した情報である。   Subsequently, when the measurement value of the service measurement / startup program 121 is input, the signature unit 152 generates a signature file including the measurement value and the electronic signature, and stores the signature file in the flash memory 12 (step S220). The electronic signature included in the signature file is information obtained by encrypting the hash value of the measurement value of the service measurement / startup program 121 with the private key held by the TPM 15.

続いて、署名部152は、サービスプログラム120の測定値を含むファイルをフラッシュメモリ12から読み出し、この測定値と電子署名とを含む署名ファイルを生成し、フラッシュメモリ12に格納する(ステップS220)。この署名ファイルに含まれる電子署名は、サービスプログラム120の測定値のハッシュ値を、TPM15が保持する秘密鍵で暗号化した情報である。   Subsequently, the signature unit 152 reads a file including the measurement value of the service program 120 from the flash memory 12, generates a signature file including the measurement value and the electronic signature, and stores the signature file in the flash memory 12 (step S220). The electronic signature included in the signature file is information obtained by encrypting the hash value of the measurement value of the service program 120 with the secret key held by the TPM 15.

続いて、署名部152は、サービス140に署名ファイルの送信指示を出力し(ステップS230)、TPM15は処理を終了する。   Subsequently, the signature unit 152 outputs a signature file transmission instruction to the service 140 (step S230), and the TPM 15 ends the process.

図5に示すように、サービス140は、TPM15から署名ファイルの送信指示が出力されたか否かを判定する(ステップS150)。署名ファイルの送信指示が出力されていない場合、サービス140は、署名ファイルの送信指示が出力されるまで待つ。また、署名ファイルの送信指示が出力された場合、サービス140は、フラッシュメモリ12から署名ファイルを読み出して通信部10へ出力し、署名ファイルをサーバ2へ送信させる(ステップS225)。この署名ファイルは、カーネルプログラム122の測定値を含む署名ファイルと、サービス測定・起動プログラム121の測定値を含む署名ファイルと、サービスプログラム120の測定値を含む署名ファイルとからなる。署名ファイルは、これらの各プログラムの測定値と電子署名とを含む1つのファイルであってもよい。署名ファイルの送信後、サービス140は、端末装置1の起動に関する処理を完了し、起動中の処理を行う。   As shown in FIG. 5, the service 140 determines whether or not a signature file transmission instruction is output from the TPM 15 (step S150). If the signature file transmission instruction is not output, the service 140 waits until the signature file transmission instruction is output. When the signature file transmission instruction is output, the service 140 reads the signature file from the flash memory 12, outputs the signature file to the communication unit 10, and transmits the signature file to the server 2 (step S225). The signature file includes a signature file including the measurement value of the kernel program 122, a signature file including the measurement value of the service measurement / startup program 121, and a signature file including the measurement value of the service program 120. The signature file may be a single file including the measurement values of each of these programs and the electronic signature. After transmitting the signature file, the service 140 completes the process related to the activation of the terminal device 1 and performs the process during activation.

第1ブートローダプログラム123の書き換えは、必要に応じて、サービス140が起動した後に行われる。第1ブートローダプログラム123の書き換えが行われた直後に、第1ブートローダプログラム123の期待値が算出される。算出された期待値はTPM15へ出力され、TPM15の記憶部150に格納されている期待値が、TPM15に入力された期待値に更新される。第1ブートローダプログラム123の書き換えが失敗する可能性を想定して、以下のようにしてもよい。例えば、初期状態の第1ブートローダプログラム123がROM13に予め格納されており、TPM15の比較部151は、第1ブートローダプログラム123の測定値と期待値とが一致しなかったと判定した場合に、初期状態の第1ブートローダプログラム123を使用した起動の指示を出力する。第2ブートローダ144は、この起動指示に基づいて、ROM13からRAM14に初期状態の第1ブートローダプログラム123を読み込み、第1ブートローダ143を起動する。起動した第1ブートローダ143はステップS120の処理を行う。   The rewriting of the first boot loader program 123 is performed after the service 140 is activated as necessary. Immediately after the first boot loader program 123 is rewritten, the expected value of the first boot loader program 123 is calculated. The calculated expected value is output to the TPM 15, and the expected value stored in the storage unit 150 of the TPM 15 is updated to the expected value input to the TPM 15. Assuming the possibility that rewriting of the first boot loader program 123 fails, the following may be performed. For example, when the first boot loader program 123 in the initial state is stored in the ROM 13 in advance and the comparison unit 151 of the TPM 15 determines that the measured value of the first boot loader program 123 does not match the expected value, the initial state The start instruction using the first boot loader program 123 is output. Based on this activation instruction, the second boot loader 144 reads the first boot loader program 123 in the initial state from the ROM 13 into the RAM 14 and activates the first boot loader 143. The activated first boot loader 143 performs the process of step S120.

次に、本実施形態によるサーバ2の動作を説明する。図7はサーバ2の動作を示している。   Next, the operation of the server 2 according to the present embodiment will be described. FIG. 7 shows the operation of the server 2.

通信部20は端末装置1から署名ファイルを受信し、検証部21へ出力する(ステップS300)。検証部21は、署名ファイルに含まれている電子署名を検証する(ステップS305)。このとき、検証部21は、記憶部22から公開鍵を読み出し、署名ファイルに含まれている電子署名を公開鍵で復号し、得られたハッシュ値と、署名ファイルに含まれている測定値から算出したハッシュ値とが一致するか否かを確認する。両者が一致すれば、署名ファイルの内容が改竄されていないことが保証される。   The communication unit 20 receives the signature file from the terminal device 1 and outputs it to the verification unit 21 (step S300). The verification unit 21 verifies the electronic signature included in the signature file (step S305). At this time, the verification unit 21 reads the public key from the storage unit 22, decrypts the electronic signature included in the signature file with the public key, and uses the obtained hash value and the measurement value included in the signature file. Check whether the calculated hash value matches. If they match, it is guaranteed that the contents of the signature file have not been tampered with.

サーバ2が有する公開鍵は、端末装置1のTPM15が有する秘密鍵と対になる鍵である。端末装置1の起動時に通信が可能になった時点で、署名ファイルとは別々に、あるいは署名ファイルと一緒に、公開鍵が端末装置1からサーバ2へ送信される。   The public key that the server 2 has is a key that is paired with the secret key that the TPM 15 of the terminal device 1 has. When communication is enabled when the terminal device 1 is activated, the public key is transmitted from the terminal device 1 to the server 2 separately from the signature file or together with the signature file.

署名ファイルの内容が改竄されていなければ、検証部21は、カーネルプログラム122の期待値を記憶部22から読み出し、署名ファイルに含まれるカーネルプログラム122の測定値と、記憶部22から読み出した期待値とを比較する(ステップS310)。続いて、検証部21は、サービス測定・起動プログラム121の期待値を記憶部22から読み出し、署名ファイルに含まれるサービス測定・起動プログラム121の測定値と、記憶部22から読み出した期待値とを比較する(ステップS315)。さらに、検証部21は、サービスプログラム120の期待値を記憶部22から読み出し、署名ファイルに含まれるサービスプログラム120の測定値と、記憶部22から読み出した期待値とを比較する(ステップS320)。サービスプログラム120の期待値は、サービスプログラム120を構成するシステムファイルに含まれるファイル毎の期待値からなる。   If the contents of the signature file are not falsified, the verification unit 21 reads the expected value of the kernel program 122 from the storage unit 22, the measured value of the kernel program 122 included in the signature file, and the expected value read from the storage unit 22. Are compared (step S310). Subsequently, the verification unit 21 reads the expected value of the service measurement / startup program 121 from the storage unit 22, and obtains the measured value of the service measurement / startup program 121 included in the signature file and the expected value read from the storage unit 22. Compare (step S315). Further, the verification unit 21 reads the expected value of the service program 120 from the storage unit 22, and compares the measured value of the service program 120 included in the signature file with the expected value read from the storage unit 22 (step S320). The expected value of the service program 120 is an expected value for each file included in the system files that constitute the service program 120.

続いて、検証部21は、ステップS310,S315,S320の処理の結果に基づいて、端末装置1のOSが完全であるか否かを判定する(ステップS325)。ステップS310,S315,S320の全てにおいて、全てのファイルの測定値と期待値とが完全に一致した場合、端末装置1のOSが完全であると判定される。また、ステップS310,S315,S320の少なくともいずれかにおいて、いずれかのファイルの測定値と期待値とが一致しなかった場合、端末装置1のOSが完全でないと判定される。   Subsequently, the verification unit 21 determines whether or not the OS of the terminal device 1 is complete based on the processing results of steps S310, S315, and S320 (step S325). In all of Steps S310, S315, and S320, when the measured values and expected values of all files completely match, it is determined that the OS of the terminal device 1 is complete. In addition, in at least one of steps S310, S315, and S320, if the measured value of one of the files does not match the expected value, it is determined that the OS of the terminal device 1 is not complete.

端末装置1のOSが完全であると判定された場合、検証部21は、端末装置1のOSが完全であることを示す情報を生成し、端末装置1の識別情報(MACアドレスやTPM15のID等)と関連付けて記憶部22に記録する(ステップS330)。また、端末装置1のOSが完全でないと判定された場合、検証部21は、端末装置1のOSが完全でないことを示す情報を生成し、端末装置1の識別情報と関連付けて記憶部22に記録する(ステップS335)。ステップS330,S335で記憶部22に記録された情報を参照することにより、端末装置1が完全な状態で起動したのか否かを後から確認することができる。ステップS330,S335のいずれかの処理が終了すると、サーバ2は、端末装置1のOSの完全性を検証する処理を終了する。   When it is determined that the OS of the terminal device 1 is complete, the verification unit 21 generates information indicating that the OS of the terminal device 1 is complete, and the identification information of the terminal device 1 (MAC address or TPM 15 ID). Etc.) and recorded in the storage unit 22 (step S330). When it is determined that the OS of the terminal device 1 is not complete, the verification unit 21 generates information indicating that the OS of the terminal device 1 is not complete, and associates the identification information of the terminal device 1 with the storage unit 22. Recording is performed (step S335). By referring to the information recorded in the storage unit 22 in steps S330 and S335, it can be confirmed later whether or not the terminal device 1 has been activated in a complete state. When one of the processes in steps S330 and S335 ends, the server 2 ends the process of verifying the integrity of the OS of the terminal device 1.

本実施形態では、以下の変形が可能である。ステップS115の判定はステップS110の処理が行われる前に第2ブートローダ144によって行われてもよい。また、ステップS215,S220,S225の各処理が行われる順番は、図6に示す順番でなくてもよい。また、ステップS310,S315,S320の各処理が行われる順番は、図7に示す順番でなくてもよい。   In the present embodiment, the following modifications are possible. The determination in step S115 may be performed by the second boot loader 144 before the process in step S110 is performed. Further, the order in which the processes of steps S215, S220, and S225 are performed may not be the order shown in FIG. Moreover, the order in which each process of step S310, S315, S320 is performed does not need to be the order shown in FIG.

上記の説明では、サービス測定・起動部141のinitがサービス測定・起動プログラム121およびカーネルプログラム122の測定を行っているが、サービス測定・起動部141のinitが測定用プログラムを実行し、その測定用プログラムがサービス測定・起動プログラム121およびカーネルプログラム122の測定を行ってもよい。この場合、サービス測定・起動プログラム121は測定用プログラムを含む。   In the above description, init of the service measurement / startup unit 141 measures the service measurement / startup program 121 and the kernel program 122, the init of the service measurement / startup unit 141 executes the measurement program, and the measurement is performed. The service program may measure the service measurement / startup program 121 and the kernel program 122. In this case, the service measurement / startup program 121 includes a measurement program.

上記の説明では、第2ブートローダ144が、圧縮されたサービス測定・起動プログラム121およびカーネルプログラム122の測定および展開を行っているが、第2ブートローダ144が、圧縮されたサービス測定・起動プログラム121およびカーネルプログラム122の測定を行い、カーネル142が起動した後、カーネル142が、圧縮されたサービス測定・起動プログラム121およびカーネルプログラム122の展開を行ってもよい。   In the above description, the second boot loader 144 measures and expands the compressed service measurement / startup program 121 and the kernel program 122. However, the second bootloader 144 does not use the compressed service measurement / startup program 121 and After the kernel program 122 is measured and the kernel 142 is activated, the kernel 142 may expand the compressed service measurement / activation program 121 and the kernel program 122.

上記の説明では、サービス測定・起動プログラム121およびカーネルプログラム122が分離しているが、両者が一体化されていてもよい。   In the above description, the service measurement / startup program 121 and the kernel program 122 are separated, but both may be integrated.

上記の説明では、第1ブートローダプログラム123および第2ブートローダプログラム130が分離しているが、両者が一体化され、そのプログラムがROM13に格納されていてもよい。   In the above description, the first boot loader program 123 and the second boot loader program 130 are separated, but both may be integrated and the program may be stored in the ROM 13.

次に、端末装置1をより高速に起動することができる理由を説明する。本実施形態では、サービス測定・起動部141のinitがサービスプログラム120の測定を行うことにより、ブートローダがサービスプログラム120の測定を行う場合よりも測定時間を短縮し、その結果、端末装置1をより高速に起動することができる。   Next, the reason why the terminal device 1 can be activated at a higher speed will be described. In the present embodiment, the init of the service measurement / startup unit 141 performs the measurement of the service program 120, so that the measurement time is shortened compared to the case where the boot loader performs the measurement of the service program 120. It can start at high speed.

カーネル142が起動する前、ブートローダはカーネル142によって提供されるファイルのオープン、ファイルのクローズ、スレッドの生成等の機能を使用することができない。サービスプログラム120を構成するシステムファイルの測定はファイル単位で行われるため、ブートローダがサービスプログラム120の測定を行うためにはブートローダがファイルを扱えるようにする必要がある。しかし、ブートローダにファイルのオープンやクローズを扱う機能を追加するとコードサイズが大きくなるので、その機能を追加する代わりにブートローダにファイルキャッシュ(ページキャッシュ)の機能を実装しないことが考えられる。   Before the kernel 142 is booted, the boot loader cannot use functions provided by the kernel 142 such as opening a file, closing a file, and creating a thread. Since the measurement of the system file constituting the service program 120 is performed in units of files, in order for the boot loader to measure the service program 120, the boot loader needs to be able to handle the file. However, since the code size increases when a function for opening and closing files is added to the boot loader, it is conceivable that the file cache (page cache) function is not implemented in the boot loader instead of adding the function.

ファイルキャッシュの機能がないと、ファイルをオープンするたびに、ファイルシステムの最上位位置にあるルートディレクトリから、開くファイルがマウントされているディレクトリまでディレクトリの検索を行うためにデバイス(本実施形態ではフラッシュメモリ12)にアクセスする必要があり、ファイルのオープンに要する時間が長くなる。また、ファイルの先読み機能も実装されないことが考えられ、ファイルを読み込むためにデバイスにアクセスし、多くの待ち時間が発生する。さらに、L2キャッシュ(2次キャッシュ)のハンドリングが面倒であるため、L2キャッシュを無効にすることが考えられる。これにより、L1キャッシュ(1次キャッシュ)でのキャッシュミスによるミスペナルティが発生し、処理速度が低下する。   Without the file cache function, each time a file is opened, a device (flash in this embodiment) is used to search the directory from the root directory at the highest level of the file system to the directory where the file to be opened is mounted. The memory 12) needs to be accessed, and the time required to open the file becomes longer. Also, it is conceivable that a file prefetching function is not implemented, and the device is accessed to read the file, resulting in a lot of waiting time. Furthermore, since the handling of the L2 cache (secondary cache) is troublesome, it can be considered to invalidate the L2 cache. As a result, a miss penalty due to a cache miss in the L1 cache (primary cache) occurs, and the processing speed decreases.

また、前述したように、ブートローダはシングルタスク/シングルスレッドで動作するため、複数のCPUコアが搭載されている場合でも1つのCPUコアしか使用することができない。   Further, as described above, since the boot loader operates with a single task / single thread, even when a plurality of CPU cores are mounted, only one CPU core can be used.

一方、サービス測定・起動部141のinitが起動したとき、カーネル142が起動しているので、サービス測定・起動部141のinitは、カーネル142によって提供されるファイルのオープン、ファイルのクローズ、スレッドの生成等の機能を使用することができる。これにより、サービス測定・起動部141のinitは、マルチタスク/マルチスレッドで動作することができ、測定対象のファイルの読み込みと測定とを並行的に行うことができる。また、ファイルキャッシュの機能により、開くファイルがマウントされているディレクトリの検索を行う際に同じディレクトリを繰り返し無駄に読み込む回数が減る。さらに、ファイルの先読み機能により、デバイスにアクセスする回数が減る。さらに、L2キャッシュを有効にすることにより、L1キャッシュでのキャッシュミスによるミスペナルティが減少する。   On the other hand, since the kernel 142 is activated when the init of the service measuring / starting unit 141 is started, the init of the service measuring / starting unit 141 opens the file provided by the kernel 142, closes the file, and sets the thread. Functions such as generation can be used. As a result, the init of the service measuring / starting unit 141 can operate in multitasking / multithreading, and the measurement target file can be read and measured in parallel. In addition, the file cache function reduces the number of times the same directory is repeatedly read in vain when searching the directory where the file to be opened is mounted. In addition, the file read-ahead feature reduces the number of times the device is accessed. Further, by enabling the L2 cache, the miss penalty due to a cache miss in the L1 cache is reduced.

また、複数のCPUコアが搭載されている場合には、複数のスレッドのそれぞれにCPUコアを割り当てて測定を並行的に行うことができる。   Further, when a plurality of CPU cores are mounted, it is possible to perform measurement in parallel by assigning a CPU core to each of a plurality of threads.

以上のように、サービス測定・起動部141のinitがカーネル142の各種機能を使用することによって、サービスプログラム120の測定に要する時間を短縮し、その結果、端末装置1をより高速に起動することができる。   As described above, the init of the service measuring / starting unit 141 uses various functions of the kernel 142, thereby shortening the time required for the measurement of the service program 120 and, as a result, starting the terminal device 1 at a higher speed. Can do.

次に、本実施形態の完全性検証システムを適用した例を説明する。個人が所有している端末装置を会社に持ち込むBring Your Own Device(BYOD)が進んでいる。システム領域が完全である、つまり、マルウエア感染や社員による不正改造の影響を受けていない安全な端末装置であることを検証した後に端末装置を会社のネットワークに接続させる検疫サービスに対して、本実施形態の完全性検証システムを適用することが可能である。例えば、サーバ2は会社の管理サーバであり、端末装置1のOSが完全であることが確認できた場合のみ、端末装置1を会社のネットワークに接続させる。   Next, an example in which the integrity verification system of this embodiment is applied will be described. Bring Your Own Device (BYOD), which brings terminal devices owned by individuals into the company, is advancing. Implemented for quarantine services that connect the terminal device to the company network after verifying that the system area is complete, that is, it is a safe terminal device that is not affected by malware infection or unauthorized modification by employees It is possible to apply a form integrity verification system. For example, the server 2 is a company management server, and the terminal device 1 is connected to the company network only when it is confirmed that the OS of the terminal device 1 is complete.

また、銀行決済アプリケーションを利用する際に、端末装置1の完全性の確認を行うようにしてもよい。例えば、端末装置1に銀行決済アプリケーションがインストールされており、銀行決済アプリケーションが銀行のサーバに決済の要求を行った際に、銀行のサーバがサーバ2に端末装置1の完全性の確認を求める。サーバ2は、記憶部22に格納されている情報に基づいて、端末装置1のOSが完全であるか否かを確認し、確認結果を銀行のサーバに通知する。銀行のサーバは、端末装置1のOSが完全であることが確認できた場合のみ、決済の処理を行う。あるいは、サーバ2が銀行のサーバであってもよい。   Further, when using the bank settlement application, the integrity of the terminal device 1 may be confirmed. For example, when the bank settlement application is installed in the terminal device 1 and the bank settlement application makes a settlement request to the bank server, the bank server requests the server 2 to confirm the integrity of the terminal device 1. The server 2 confirms whether or not the OS of the terminal device 1 is complete based on the information stored in the storage unit 22 and notifies the bank server of the confirmation result. The bank server processes the payment only when it is confirmed that the OS of the terminal device 1 is complete. Alternatively, the server 2 may be a bank server.

上述したように、本実施形態によれば、端末装置1の起動時にサーバ2が端末装置1のOSの完全性を検証することができる。また、カーネル142による制御に従って、サービス測定・起動部141がサービスプログラム120を測定することによって、端末装置1をより高速に起動することができる。   As described above, according to the present embodiment, the server 2 can verify the integrity of the OS of the terminal device 1 when the terminal device 1 is activated. Further, the service measuring / starting unit 141 measures the service program 120 under the control of the kernel 142, so that the terminal device 1 can be started at a higher speed.

また、サービス140の初期化を行う初期化プログラム(init)に対してサービスプログラム120の測定を行う機能を追加してサービス測定・起動プログラム121を構成することによって、サービス測定・起動プログラム121の実装が容易になる。   Further, the service measurement / startup program 121 is implemented by adding the function of measuring the service program 120 to the initialization program (init) for initializing the service 140 to configure the service measurement / startup program 121. Becomes easier.

以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成は上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。本実施形態では、測定値および期待値にハッシュ値を用いているが、不可逆な値であれば、ハッシュ値の代わりに用いることが可能である。また、本実施形態では、端末装置1にOSとしてAndroid(登録商標)が搭載されているが、端末装置のディスク領域(フラッシュメモリやハードディスクドライブ等の領域)において、OSのシステムファイルが保存されるシステム領域と、ユーザが任意にファイルを追加することが可能なユーザ領域とが分離していればよく、他のOSが端末装置1に搭載されていてもよい。   As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the above-described embodiments, and includes design changes and the like without departing from the gist of the present invention. . In this embodiment, hash values are used for measured values and expected values. However, any irreversible values can be used instead of hash values. In the present embodiment, Android (registered trademark) is installed as the OS in the terminal device 1, but the OS system file is stored in the disk area (an area such as a flash memory or a hard disk drive) of the terminal apparatus. It suffices that the system area and the user area where a user can arbitrarily add a file are separated, and another OS may be installed in the terminal device 1.

1 端末装置、2 サーバ、10,20 通信部、11 CPU、12 RAM、13 フラッシュメモリ、14 ROM、15 TPM、21 検証部、22,150 記憶部、110 サービス処理部、111 サービス測定・起動処理部、112 カーネル処理部、113 第1ブートローダ処理部、114 第2ブートローダ処理部、120 サービスプログラム、121 サービス測定・起動プログラム、122 カーネルプログラム、123 第1ブートローダプログラム、130 第2ブートローダプログラム、140 サービス、141 サービス測定・起動部、142 カーネル、143 第1ブートローダ、144 第2ブートローダ、151 比較部、152 署名部   1 terminal device, 2 server, 10, 20 communication unit, 11 CPU, 12 RAM, 13 flash memory, 14 ROM, 15 TPM, 21 verification unit, 22,150 storage unit, 110 service processing unit, 111 service measurement / startup process , 112 kernel processing unit, 113 first boot loader processing unit, 114 second boot loader processing unit, 120 service program, 121 service measurement / start program, 122 kernel program, 123 first boot loader program, 130 second boot loader program, 140 service , 141 Service measurement / starting unit, 142 Kernel, 143 First boot loader, 144 Second boot loader, 151 Comparison unit, 152 Signature unit

Claims (7)

OS(Operating System)が提供するサービスの機能を実現するためのサービスプログラムと、
カーネルによる制御に従って、前記サービスプログラムを測定し、測定結果である第1の測定値を生成した後、前記サービスを起動するサービス測定・起動部の機能を実現するためのサービス測定・起動プログラムと、
前記サービス測定・起動部を起動し、前記サービス測定・起動部によって行われる処理を制御する前記カーネルの機能を実現するためのカーネルプログラムと、
を含むOSプログラムを記憶する第1の記憶部と、
前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動するブートローダの機能を実現するためのブートローダプログラムを記憶する第2の記憶部と、
前記OSプログラムおよび前記ブートローダプログラムに従って処理を行う処理部と、
前記サービスプログラムを測定したときに期待される測定結果である第1の期待値と前記第1の測定値とを比較し、前記サービス測定・起動プログラムを測定したときに期待される測定結果である第2の期待値と前記第2の測定値とを比較し、前記カーネルプログラムを測定したときに期待される測定結果である第3の期待値と前記第3の測定値とを比較することにより前記OSの完全性を検証するサーバへ前記第1の測定値、前記第2の測定値、および前記第3の測定値を送信する送信部と、
を備えたことを特徴とする端末装置。
A service program for realizing the functions of the service provided by the OS (Operating System);
A service measurement / startup program for realizing the function of a service measurement / startup unit for starting the service after measuring the service program according to control by the kernel and generating a first measurement value as a measurement result;
A kernel program for activating the service measurement / starting unit and realizing the function of the kernel for controlling processing performed by the service measurement / starting unit;
A first storage unit for storing an OS program including:
The service measurement / startup program is measured to generate a second measurement value that is a measurement result, and the kernel program is measured to generate a third measurement value that is a measurement result, and then the kernel is started. A second storage unit for storing a boot loader program for realizing the function of the boot loader;
A processing unit for performing processing according to the OS program and the boot loader program;
It is a measurement result expected when the service measurement / startup program is measured by comparing a first expected value, which is a measurement result expected when the service program is measured, with the first measurement value. By comparing a second expected value and the second measured value, and comparing a third expected value that is a measurement result expected when the kernel program is measured and the third measured value A transmission unit for transmitting the first measurement value, the second measurement value, and the third measurement value to a server that verifies the integrity of the OS;
A terminal device comprising:
前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動する第1のブートローダの機能を実現するための、書き換え可能な第1のブートローダプログラムを記憶する前記第2の記憶部と、
前記第1のブートローダプログラムを測定し、測定結果である第4の測定値を生成した後、前記第1のブートローダを起動する第2のブートローダの機能を実現するための、書き換え不可能な第2のブートローダプログラムを記憶する第3の記憶部と、
前記第1のブートローダプログラムを測定したときに期待される測定結果である第4の期待値と前記第4の測定値とを比較することにより前記第1のブートローダプログラムの完全性を検証する検証部と、
を有することを特徴とする請求項1に記載の端末装置。
The service measurement / startup program is measured to generate a second measurement value that is a measurement result, and the kernel program is measured to generate a third measurement value that is a measurement result, and then the kernel is started. The second storage unit for storing a rewritable first boot loader program for realizing the function of the first boot loader;
A second non-rewritable second for realizing the function of the second boot loader that activates the first boot loader after measuring the first boot loader program and generating a fourth measurement value as a measurement result. A third storage unit for storing the boot loader program of
A verification unit that verifies the integrity of the first boot loader program by comparing a fourth expected value, which is a measurement result expected when measuring the first boot loader program, with the fourth measured value. When,
The terminal device according to claim 1, comprising:
前記検証部は、耐タンパ性を有するTPM(Trusted Platform Module)であって、
前記第4の期待値を記憶する記憶部と、
前記第4の期待値と前記第4の測定値とを比較することにより前記第1のブートローダプログラムの完全性を検証する比較部と、
を有することを特徴とする請求項2に記載の端末装置。
The verification unit is a TPM (Trusted Platform Module) having tamper resistance,
A storage unit for storing the fourth expected value;
A comparison unit that verifies the integrity of the first boot loader program by comparing the fourth expected value and the fourth measured value;
The terminal device according to claim 2, comprising:
前記TPMはさらに、前記第1の測定値、前記第2の測定値、および前記第3の測定値の電子署名を生成する署名部を有し、
前記送信部は、前記サーバへ、前記第1の測定値、前記第2の測定値、前記第3の測定値、および前記電子署名を送信する
ことを特徴とする請求項3に記載の端末装置。
The TPM further includes a signature unit that generates an electronic signature of the first measurement value, the second measurement value, and the third measurement value;
The terminal device according to claim 3, wherein the transmission unit transmits the first measurement value, the second measurement value, the third measurement value, and the electronic signature to the server. .
前記サービス測定・起動プログラムは、起動した前記カーネルが最初に実行するプログラムであることを特徴とする請求項1〜請求項4のいずれか一項に記載の端末装置。   The terminal device according to claim 1, wherein the service measurement / startup program is a program that is executed first by the started kernel. 端末装置およびサーバを備えた完全性検証システムであって、
前記端末装置は、
OS(Operating System)が提供するサービスの機能を実現するためのサービスプログラムと、
カーネルによる制御に従って、前記サービスプログラムを測定し、測定結果である第1の測定値を生成した後、前記サービスを起動するサービス測定・起動部の機能を実現するためのサービス測定・起動プログラムと、
前記サービス測定・起動部を起動し、前記サービス測定・起動部によって行われる処理を制御する前記カーネルの機能を実現するためのカーネルプログラムと、
を含むOSプログラムを記憶する第1の記憶部と、
前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動するブートローダの機能を実現するためのブートローダプログラムを記憶する第2の記憶部と、
前記OSプログラムおよび前記ブートローダプログラムに従って処理を行う処理部と、
前記サーバへ前記第1の測定値、前記第2の測定値、および前記第3の測定値を送信する送信部と、
を有し、
前記サーバは、
前記サービスプログラムを測定したときに期待される測定結果である第1の期待値、前記サービス測定・起動プログラムを測定したときに期待される測定結果である第2の期待値、および前記カーネルプログラムを測定したときに期待される測定結果である第3の期待値を記憶する第2の記憶部と、
前記端末装置から前記第1の測定値、前記第2の測定値、および第3の測定値を受信する受信部と、
前記第1の期待値と前記第1の測定値とを比較し、前記第2の期待値と前記第2の測定値とを比較し、前記第3の期待値と前記第3の測定値とを比較することにより、前記OSの完全性を検証する検証部と、
を有することを特徴とする完全性検証システム。
An integrity verification system comprising a terminal device and a server,
The terminal device
A service program for realizing the functions of the service provided by the OS (Operating System);
A service measurement / startup program for realizing the function of a service measurement / startup unit for starting the service after measuring the service program according to control by the kernel and generating a first measurement value as a measurement result;
A kernel program for activating the service measurement / starting unit and realizing the function of the kernel for controlling processing performed by the service measurement / starting unit;
A first storage unit for storing an OS program including:
The service measurement / startup program is measured to generate a second measurement value that is a measurement result, and the kernel program is measured to generate a third measurement value that is a measurement result, and then the kernel is started. A second storage unit for storing a boot loader program for realizing the function of the boot loader;
A processing unit for performing processing according to the OS program and the boot loader program;
A transmission unit for transmitting the first measurement value, the second measurement value, and the third measurement value to the server;
Have
The server
A first expected value that is a measurement result expected when the service program is measured, a second expected value that is a measurement result expected when the service measurement / startup program is measured, and the kernel program A second storage unit that stores a third expected value that is a measurement result expected when the measurement is performed;
A receiving unit for receiving the first measurement value, the second measurement value, and the third measurement value from the terminal device;
The first expected value and the first measured value are compared, the second expected value and the second measured value are compared, and the third expected value and the third measured value are compared. Verifying the integrity of the OS by comparing
An integrity verification system characterized by comprising:
OS(Operating System)が提供するサービスの機能を実現するためのサービスプログラムと、
カーネルによる制御に従って、前記サービスプログラムを測定し、測定結果である第1の測定値を生成した後、前記サービスを起動するサービス測定・起動部の機能を実現するためのサービス測定・起動プログラムと、
前記サービス測定・起動部を起動し、前記サービス測定・起動部によって行われる処理を制御する前記カーネルの機能を実現するためのカーネルプログラムと、
を含むOSプログラムを記憶する第1の記憶部と、
前記サービス測定・起動プログラムを測定し、測定結果である第2の測定値を生成すると共に、前記カーネルプログラムを測定し、測定結果である第3の測定値を生成した後、前記カーネルを起動するブートローダの機能を実現するためのブートローダプログラムを記憶する第2の記憶部と、
前記OSプログラムおよび前記ブートローダプログラムに従って処理を行う処理部と、
前記サービスプログラムを測定したときに期待される測定結果である第1の期待値と前記第1の測定値とを比較し、前記サービス測定・起動プログラムを測定したときに期待される測定結果である第2の期待値と前記第2の測定値とを比較し、前記カーネルプログラムを測定したときに期待される測定結果である第3の期待値と前記第3の測定値とを比較することにより前記OSの完全性を検証するサーバへ前記第1の測定値、前記第2の測定値、および前記第3の測定値を送信する送信部と、
としてコンピュータを機能させるためのプログラム。
A service program for realizing the functions of the service provided by the OS (Operating System);
A service measurement / startup program for realizing the function of a service measurement / startup unit for starting the service after measuring the service program according to control by the kernel and generating a first measurement value as a measurement result;
A kernel program for activating the service measurement / starting unit and realizing the function of the kernel for controlling processing performed by the service measurement / starting unit;
A first storage unit for storing an OS program including:
The service measurement / startup program is measured to generate a second measurement value that is a measurement result, and the kernel program is measured to generate a third measurement value that is a measurement result, and then the kernel is started. A second storage unit for storing a boot loader program for realizing the function of the boot loader;
A processing unit for performing processing according to the OS program and the boot loader program;
It is a measurement result expected when the service measurement / startup program is measured by comparing a first expected value, which is a measurement result expected when the service program is measured, with the first measurement value. By comparing a second expected value and the second measured value, and comparing a third expected value that is a measurement result expected when the kernel program is measured and the third measured value A transmission unit for transmitting the first measurement value, the second measurement value, and the third measurement value to a server that verifies the integrity of the OS;
As a program to make the computer function as.
JP2012249108A 2012-11-13 2012-11-13 Terminal device, integrity verification system, and program Active JP5986897B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012249108A JP5986897B2 (en) 2012-11-13 2012-11-13 Terminal device, integrity verification system, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012249108A JP5986897B2 (en) 2012-11-13 2012-11-13 Terminal device, integrity verification system, and program

Publications (2)

Publication Number Publication Date
JP2014098951A JP2014098951A (en) 2014-05-29
JP5986897B2 true JP5986897B2 (en) 2016-09-06

Family

ID=50940940

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012249108A Active JP5986897B2 (en) 2012-11-13 2012-11-13 Terminal device, integrity verification system, and program

Country Status (1)

Country Link
JP (1) JP5986897B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6257460B2 (en) * 2014-06-25 2018-01-10 Kddi株式会社 Remote integrity verification system, method and program
EP3040896A1 (en) * 2014-12-30 2016-07-06 Gemalto Sa Secure element
JP6675227B2 (en) * 2016-02-26 2020-04-01 キヤノン株式会社 Information processing apparatus, information processing system, information processing method, and program
US10757087B2 (en) * 2018-01-02 2020-08-25 Winbond Electronics Corporation Secure client authentication based on conditional provisioning of code signature
JP7152920B2 (en) * 2018-09-28 2022-10-13 キヤノン株式会社 Information processing device, its control method, and program
JP7313395B2 (en) * 2021-04-21 2023-07-24 キヤノン株式会社 Information processing device, its control method, and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004265286A (en) * 2003-03-04 2004-09-24 Fujitsu Ltd Management of mobile device according to security policy selected in dependence on environment
JP4906854B2 (en) * 2006-07-03 2012-03-28 パナソニック株式会社 Information processing apparatus, information recording apparatus, information processing system, program update method, program, and integrated circuit
JP5001123B2 (en) * 2006-12-07 2012-08-15 パナソニック株式会社 Recording device, integrated circuit, access control method, program recording medium
JP5085287B2 (en) * 2007-11-21 2012-11-28 株式会社リコー Information processing apparatus, validity verification method, and validity verification program

Also Published As

Publication number Publication date
JP2014098951A (en) 2014-05-29

Similar Documents

Publication Publication Date Title
US11687645B2 (en) Security control method and computer system
CN103718165B (en) BIOS flash memory attack protection and notice
CN109669734B (en) Method and apparatus for starting a device
JP5986897B2 (en) Terminal device, integrity verification system, and program
US9087188B2 (en) Providing authenticated anti-virus agents a direct access to scan memory
EP2854066B1 (en) System and method for firmware integrity verification using multiple keys and OTP memory
JP6319609B2 (en) Reliable kernel booting method and apparatus
CN103093150B (en) A kind of dynamic integrity protection method based on credible chip
WO2020063001A1 (en) Method and device for managing basic input and output system firmware, and server
US9824220B2 (en) Secure execution of software modules on a computer
RU2481616C2 (en) Method and device for software download
KR20160110504A (en) Initialization trace of a computing device
CN105488418B (en) trusted starting method and system of virtualization platform server
CN109992966B (en) Memory subsystem, secure client device, and authentication method thereof
CN107567629A (en) Dynamic firmware module loader in credible performing environment container
CN108595950A (en) A kind of safe Enhancement Methods of SGX of combination remote authentication
CN107924440B (en) Method, system, and computer readable medium for managing containers
TW201602835A (en) Allowing use of a test key for a BIOS installation
WO2009144602A1 (en) Protection and security provisioning using on-the-fly virtualization
US20160239364A1 (en) Method of verifying integrity of program using hash
US7913074B2 (en) Securely launching encrypted operating systems
JP2005182509A (en) Computer system and data tampering detection method
Muramoto et al. Improving Hardware Security on Talos II Architecture Through Boot Image Encryption
US20240054001A1 (en) Data manipulation detection through a verification operating system
CN115859225A (en) Reinforcement method, registration method, operation method, electronic device, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150806

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20150810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160616

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160808

R150 Certificate of patent or registration of utility model

Ref document number: 5986897

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150