「Trusted Platform Module/1.2」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(英語版から転載)
 
(→‎使い方: 同期)
 
(同じ利用者による、間の3版が非表示)
3行目: 3行目:
 
[[en:Trusted Platform Module/1.2]]
 
[[en:Trusted Platform Module/1.2]]
 
[[pl:Trusted Platform Module (Polski)/1.2]]
 
[[pl:Trusted Platform Module (Polski)/1.2]]
TPM 1.2 uses the "TrouSerS" TSS (TCG software stack) by IBM, which is packaged as {{AUR|trousers}} (''tcsd'') and {{AUR|tpm-tools}} (userspace). All software access the TPM through the ''tcsd'' daemon.
+
TPM 1.2 は、IBM "TrouSerS" TSS (TCG ソフトウェアスタック) を使用します。これは、{{AUR|trousers}} (''tcsd'') および {{AUR|tpm-tools}} (ユーザースペース) としてパッケージ化されています。すべてのソフトウェアは、tcsd デーモンを通じて TPM にアクセスします。
   
== Drivers ==
+
== ドライバー ==
   
  +
TPM ドライバーは最新のカーネルでネイティブにサポートされていますが、ロードする必要がある場合があります:
TPM drivers are natively supported in modern kernels, but might need to be loaded:
 
   
 
# modprobe tpm
 
# modprobe tpm
   
  +
チップセットによっては、次のいずれかをロードする必要がある場合もあります:
Depending on your chipset, you might also need to load one of the following:
 
   
 
# modprobe -a tpm_{atmel,infineon,nsc,tis,crb}
 
# modprobe -a tpm_{atmel,infineon,nsc,tis,crb}
   
== Usage ==
+
== 使用方法 ==
   
  +
TPM 1.2 は {{ic|tcsd}} によって管理します。Trusted Computing リソースを管理するユーザー空間のデーモンで、(TSS の仕様によれば) TPM デバイスドライバーの唯一のポータルです。{{ic|tcsd}} は AUR パッケージの {{AUR|trousers}} に含まれています。IBM によって開発・リリースされており、{{ic|/etc/tcsd.conf}} で設定することが可能です。
TPM 1.2 is managed by {{ic|tcsd}}, a userspace daemon that manages Trusted Computing resources and should be (according to the TSS spec) the only portal to the TPM device driver. {{ic|tcsd}} is part of the {{AUR|trousers}} package, which was created and released by IBM, and can be configured via {{ic|/etc/tcsd.conf}}.
 
   
  +
tcsd を起動して出力を監視するには、次を実行:
To start tcsd and watch the output, run:
 
   
 
# tcsd -f
 
# tcsd -f
   
  +
もしくは {{ic|tcsd.service}} を [[起動/有効化]] してください。
or simply [[start]] and [[enable]] {{ic|tcsd.service}}.
 
   
  +
{{ic|tcsd}} を実行したら、{{AUR|tpm-tools}} もインストールすると良いでしょう。TPM を管理するためのコマンドラインツールが多数入っています。
Once {{ic|tcsd}} is running you might also want to install {{AUR|tpm-tools}} which provides many of the command line tools for managing the TPM.
 
   
  +
他の便利なツール:
Some other tools of interest:
 
   
* {{App|tpmmanager|A Qt front-end to tpm-tools|https://github.com/Rohde-Schwarz/TPMManager|{{AUR|tpmmanager}}}}
+
* {{App|tpmmanager|tpm-tools の Qt フロントエンド。|https://sourceforge.net/projects/tpmmanager|{{AUR|tpmmanager}}}}
* {{App|opencryptoki|A PKCS#11 implementation for Linux. It includes drivers and libraries to enable IBM cryptographic hardware as well as a software token for testing.|https://sourceforge.net/projects/opencryptoki|{{AUR|opencryptoki}}}}
+
* {{App|opencryptoki|Linux の PKCS#11 実装。IBM の暗号ハードウェアを使用するためのドライバーやライブラリ、テスト用のソフトウェアトークンが含まれています。|https://sourceforge.net/projects/opencryptoki|{{AUR|opencryptoki}}}}
   
== Basics ==
+
== 基本 ==
   
  +
まずは基本的なバージョン情報を取得します:
Start off by getting basic version info:
 
   
 
$ tpm_version
 
$ tpm_version
   
  +
そしてセルフテストを実行します:
and running a selftest:
 
   
 
{{hc|$ tpm_selftest -l info|
 
{{hc|$ tpm_selftest -l info|
45行目: 45行目:
 
}}
 
}}
   
== Securing SSH keys ==
+
== SSH キーの保護 ==
   
  +
TPM を使用してキーを保護するにはいくつかの方法がありますが、ここでは {{AUR|simple-tpm-pk11-git}} に基づく簡単な方法を示します。
There are several methods to use TPM to secure keys, but here we show a simple method based on {{AUR|simple-tpm-pk11-git}}.
 
   
  +
まず、新しいディレクトリを作成し、キーを生成します:
First, create a new directory and generate the key:
 
   
 
$ mkdir ~/.simple-tpm-pk11
 
$ mkdir ~/.simple-tpm-pk11
 
$ stpm-keygen -o ~/.simple-tpm-pk11/my.key
 
$ stpm-keygen -o ~/.simple-tpm-pk11/my.key
   
  +
設定でキーを指すようにします:
Point the configuration to the key:
 
   
 
{{hc|~/.simple-tpm-pk11/config|
 
{{hc|~/.simple-tpm-pk11/config|
60行目: 60行目:
 
}}
 
}}
   
  +
次に、適切な PKCS11 プロバイダーを使用するように SSH を設定します:
Now configure SSH to use the right PKCS11 provider:
 
   
 
{{hc|~/.ssh/config|
 
{{hc|~/.ssh/config|
67行目: 67行目:
 
}}
 
}}
   
  +
PKCS11 プロバイダーを使用してキーを生成できるようになりました:
It is now possible to generate keys with the PKCS11 provider:
 
   
 
$ ssh-keygen -D /usr/lib/libsimple-tpm-pk11.so
 
$ ssh-keygen -D /usr/lib/libsimple-tpm-pk11.so
   
  +
{{Note|現在、この方法では複数のキーを生成して使用することはできません。}}
{{Note|This method currently does not allow for multiple keys to be generated and used.}}
 
   
  +
== トラブルシューティング ==
== Troubleshooting ==
 
   
=== tcsd.service failed to start ===
+
=== tcsd.service の開始に失敗しました ===
   
After installing {{AUR|trousers}}, the {{ic|tcsd.service}} service may not start correctly due to permission issues.[https://bugs.launchpad.net/ubuntu/+source/trousers/+bug/963587/comments/3] It is possible to fix this either by rebooting or by triggering the [[udev]] rule that is included in the {{AUR|trousers}} package:
+
{{AUR|trousers}} をインストールした後、権限の問題により、{{ic|tcsd.service}} サービスが正しく開始されない可能性があります。[https://bugs.launchpad.net/ubuntu/+source/trousers/+bug/963587/comments/3] この問題は、再起動するか、{{AUR|trousers}} パッケージに含まれる [[udev]] ルールをトリガーすることで修正できます。
   
 
# udevadm control --reload-rules
 
# udevadm control --reload-rules
 
# udevadm trigger
 
# udevadm trigger
   
== See also ==
+
== 参照 ==
   
* [https://lwn.net/Articles/674751/ Protecting systems with the TPM]
+
* [https://lwn.net/Articles/674751/ TPM によるシステムの保護]
* [https://www.thinkwiki.org/wiki/Embedded_Security_Subsystem Embedded Security Subsystem on Thinkwiki]
+
* [https://www.thinkwiki.org/wiki/Embedded_Security_Subsystem Thinkwiki の組み込みセキュリティサブシステム]
* [https://www.cs.unh.edu/~it666/reading_list/Hardware/tpm_fundamentals.pdf TPM Fundamentals (PDF)]
+
* [https://www.cs.unh.edu/~it666/reading_list/Hardware/tpm_fundamentals.pdf TPM の基礎 (PDF)]
* [https://www.lorier.net/docs/tpm Using a TPM]
+
* [https://www.lorier.net/docs/tpm TPM の使用法]

2024年2月9日 (金) 17:29時点における最新版

TPM 1.2 は、IBM の "TrouSerS" TSS (TCG ソフトウェアスタック) を使用します。これは、trousersAUR (tcsd) および tpm-toolsAUR (ユーザースペース) としてパッケージ化されています。すべてのソフトウェアは、tcsd デーモンを通じて TPM にアクセスします。

ドライバー

TPM ドライバーは最新のカーネルでネイティブにサポートされていますが、ロードする必要がある場合があります:

# modprobe tpm

チップセットによっては、次のいずれかをロードする必要がある場合もあります:

# modprobe -a tpm_{atmel,infineon,nsc,tis,crb}

使用方法

TPM 1.2 は tcsd によって管理します。Trusted Computing リソースを管理するユーザー空間のデーモンで、(TSS の仕様によれば) TPM デバイスドライバーの唯一のポータルです。tcsd は AUR パッケージの trousersAUR に含まれています。IBM によって開発・リリースされており、/etc/tcsd.conf で設定することが可能です。

tcsd を起動して出力を監視するには、次を実行:

# tcsd -f

もしくは tcsd.service起動/有効化 してください。

tcsd を実行したら、tpm-toolsAUR もインストールすると良いでしょう。TPM を管理するためのコマンドラインツールが多数入っています。

他の便利なツール:

  • tpmmanager — tpm-tools の Qt フロントエンド。
https://sourceforge.net/projects/tpmmanager || tpmmanagerAUR
  • opencryptoki — Linux の PKCS#11 実装。IBM の暗号ハードウェアを使用するためのドライバーやライブラリ、テスト用のソフトウェアトークンが含まれています。
https://sourceforge.net/projects/opencryptoki || opencryptokiAUR

基本

まずは基本的なバージョン情報を取得します:

$ tpm_version

そしてセルフテストを実行します:

$ tpm_selftest -l info
TPM Test Results: 00000000 ...
tpm_selftest succeeded

SSH キーの保護

TPM を使用してキーを保護するにはいくつかの方法がありますが、ここでは simple-tpm-pk11-gitAUR に基づく簡単な方法を示します。

まず、新しいディレクトリを作成し、キーを生成します:

$ mkdir ~/.simple-tpm-pk11
$ stpm-keygen -o ~/.simple-tpm-pk11/my.key

設定でキーを指すようにします:

~/.simple-tpm-pk11/config
key my.key

次に、適切な PKCS11 プロバイダーを使用するように SSH を設定します:

~/.ssh/config
Host *
    PKCS11Provider /usr/lib/libsimple-tpm-pk11.so

PKCS11 プロバイダーを使用してキーを生成できるようになりました:

$ ssh-keygen -D /usr/lib/libsimple-tpm-pk11.so
ノート: 現在、この方法では複数のキーを生成して使用することはできません。

トラブルシューティング

tcsd.service の開始に失敗しました

trousersAUR をインストールした後、権限の問題により、tcsd.service サービスが正しく開始されない可能性があります。[1] この問題は、再起動するか、trousersAUR パッケージに含まれる udev ルールをトリガーすることで修正できます。

# udevadm control --reload-rules
# udevadm trigger

参照