コンテンツにスキップ

「Systemd-cryptenroll」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
Kgx (トーク | 投稿記録)
Kgx (トーク | 投稿記録)
66行目: 66行目:
# systemd-cryptenroll /dev/''disk'' --recovery-key
# systemd-cryptenroll /dev/''disk'' --recovery-key


== ハードウェアデバイスの登録 ==
== Enrolling hardware devices ==


{{ic|--''type''-device}} オプションは、それぞれのタイプの有効なデバイスパスを指定する必要があります。使用可能なデバイスのリストは、このオプションに {{ic|list}} 引数を渡すことで取得できます。あるいは、目的のタイプのデバイスが 1 つだけ接続されている場合は、{{ic|auto}} オプションを使用してそれを自動的に選択できます。
The {{ic|--''type''-device}} options must point to a valid device path of their respective type. A list of available devices can be obtained by passing the {{ic|list}} argument to this option. Alternatively, if you only have a single device of the desired type connected, the {{ic|auto}} option can be used to automatically select it.


ハードウェアトークンを LUKS ボリュームに登録した後、必要に応じてハードウェア トークンを使用するようにシステムを構成する必要があります。ルートファイルシステムなど、初期のユーザー空間でロックを解除する必要があるボリュームについては [[dm-crypt/システム設定#Trusted Platform Module と FIDO2 鍵]] を参照し、その他のボリュームについては [[dm-crypt/システム設定#後期ユーザ空間でロックを解除する]] を参照してください。パーティション。
After enrolling the hardware tokens into LUKS volumes, you must configure your system to use them when appropriate. See [[dm-crypt/System configuration#Trusted Platform Module and FIDO2 keys]] for volumes that should be unlocked in early userspace like the root filesystem, and [[dm-crypt/System configuration#Unlocking in late userspace]] for other partitions.


=== PKCS#11 tokens or smartcards ===
=== PKCS#11 トークンまたはスマートカード ===


トークンまたはスマートカードには、ボリュームのロックを解除するために使用される生成されたキーの暗号化に使用される RSA キーペアが含まれている必要があります。
The token or smartcard must contain a RSA key pair, which will be used to encrypt the generated key that will be used to unlock the volume.


# systemd-cryptenroll /dev/''disk'' --pkcs11-token-uri=''device''
# systemd-cryptenroll /dev/''disk'' --pkcs11-token-uri=''device''


=== FIDO2 tokens ===
=== FIDO2 トークン ===


Any FIDO2 token that supports the "hmac-secret" extension can be used with ''systemd-cryptenroll''.
"hmac-secret" 拡張機能をサポートする FIDO2 トークンは、''systemd-cryptenroll'' で使用できます。


# systemd-cryptenroll /dev/''disk'' --fido2-device=''device''
# systemd-cryptenroll /dev/''disk'' --fido2-device=''device''


さらに、''systemd-cryptenroll'' は、トークンの組み込み検証機能の使用をサポートしています。
In addition, ''systemd-cryptenroll'' supports using the token's built-in verification features:


* {{ic|--fido2-with-client-pin}} defines whether to ask for a PIN before unlocking, defaults to no
* {ic|--fido2-with-client-pin}}は、ロック解除前にPINを要求するかどうかを定義する。
* {{ic|--fido2-with-user-presence}} defines whether to verify the user presence (i.e. by tapping the token) before unlocking, defaults to yes
* {ic|--fido2-with-user-presence}}は、ロックを解除する前にユーザの存在を確認するかどうか (トークンをタップするなど) を定義する。
* {{ic|--fido2-with-user-verification}} defines whether to require user verification before unlocking, defaults to no
* {ic|--fido2-with-user-verification}} は、ロック解除前にユーザ認証を要求するかどうかを定義します。


{{Note|
{{Note|
* トークンがこれらの機能をサポートしていない場合、これらのオプションは効力を持ちません。
* These options will have no effect if the token does not support these features.
* See [https://developers.yubico.com/WebAuthn/WebAuthn_Developer_Guide/User_Presence_vs_User_Verification.html User Presence vs User Verification] for more information on the difference between the two.}}
* 両者の違いについては、[https://developers.yubico.com/WebAuthn/WebAuthn_Developer_Guide/User_Presence_vs_User_Verification.html User Presence vs User Verification] を参照してください。}}


=== 信頼できるプラットフォームモジュール ===
=== Trusted Platform Module ===


{{Expansion|Document {{ic|--tpm2-public-key}}}}
{{Expansion|Document {{ic|--tpm2-public-key}}}}
100行目: 100行目:
# systemd-cryptenroll /dev/''disk'' --tpm2-device=''device''
# systemd-cryptenroll /dev/''disk'' --tpm2-device=''device''


デフォルトでは、TPM を登録するとキーが PCR7 にバインドされ、[[セキュアブート]] 状態が測定されます。{{ic|--tpm2-pcrs}} オプションを使用すると、キーがバインドされる PCR を変更できます。{{ic|+}} 記号で区切ることにより、複数の PCR を同時に使用できます。PCR とその測定内容の完全なリストは、[[Trusted Platform Module#Accessing PCR registers]] で入手できます。
By default, enrolling a TPM will bind the key to PCR7, which measures the [[Secure Boot]] state. It is possible to change which PCRs the key will be bound to by using the {{ic|--tpm2-pcrs}} option. Multiple PCRs can be used at once by separating them with {{ic|+}} symbol. A full list of PCRs and what they measure is available in [[Trusted Platform Module#Accessing PCR registers]].


==== Using TPM with a PIN ====
==== PIN を使用して TPM を歌う ====


TPM 測定チェックに加えて、PIN の入力を要求することもできます。TPM デバイスの登録時にオプション {{ic|1=--tpm2-with-pin=yes}} を追加し、要求されたら PIN を入力します。''systemd-cryptenroll'' ではこれを PIN と呼びますが、任意の文字を使用できます。
It is possible to require a PIN to be entered in addition to the TPM measurement check. Add the option {{ic|1=--tpm2-with-pin=yes}} while enrolling a TPM device, then enter the PIN when asked. Although ''systemd-cryptenroll'' calls this a PIN, any characters may be used.


{{Note|''systemd-cryptenroll'' は、PIN を要求する前に TPM 測定をチェックしません。そのため、環境が信頼できない可能性があるため、一意の PIN の使用を検討してください。}}
{{Note|''systemd-cryptenroll'' does not check the TPM measurement before asking for the PIN, therefore consider using a unique PIN since the environment may be untrustworthy.}}


== See also ==
== See also ==

2023年10月16日 (月) 13:37時点における版

systemd-cryptenroll(1) から:

systemd-cryptenroll は、ハードウェアセキュリティトークンとデバイスを LUKS2 暗号化ボリュームに登録するためのツールです。これは、ブート中にボリュームのロックを解除するために使用できます。

systemd-cryptenroll を使用すると、スマートカードFIDO2 トークン、および Trusted Platform Module セキュリティチップを LUKS デバイスに登録できるだけでなく、通常のパスフレーズも登録できます。これらのデバイスは、登録されたトークンを使用して、後で systemd-cryptsetup@.service(8) によってロック解除されます。

インストール

systemd-cryptenroll は、systemd の一部であり、パッケージ化されています。ただし、ハードウェアデバイスをキーとして使用するには、追加のパッケージが必要です。

  • PKCS#11 トークンを使用するには、libp11-kitインストール します。
  • FIDO2 トークンを使用するには、libfido2 をインストールします。
  • TPM2 デバイスを使用するには、tpm2-tss をインストールします。

キースロットのリスト

systemd-cryptenroll は、cryptsetup luksDump と同様に、LUKS デバイス内のキースロットをリストできますが、よりユーザーフレンドリーな形式です。

# systemd-cryptenroll /dev/disk
SLOT TYPE    
   0 password
   1 tpm2

キースロットの消去

# systemd-cryptenroll /dev/disk --wipe-slot=SLOT

SLOT には次の値を指定できます。

  • キースロットのインデックス。
  • そのタイプのキースロットはすべて消去されます。有効なタイプは empty, password, recovery, pkcs11, fido2, tpm2 です。
  • カンマで区切られた上記のすべての組み合わせ
  • 文字列 all は、デバイス上のすべてのキースロットを消去します。このオプションは、別のデバイスまたはパスフレーズを同時に登録する場合にのみ使用できます。

--wipe-slot 操作はすべての登録オプションと組み合わせて使用​​でき、既存のデバイス登録を更新するのに役立ちます。

# systemd-cryptenroll /dev/disk --wipe-slot=fido2 --fido2-device=auto

パスフレーズの登録

通常のパスワード

これは、cryptsetup luksAddKey と同等です。

# systemd-cryptenroll /dev/disk --password

回復キー

systemd-cryptenroll(1) から:

回復キーはパスフレーズとほとんど同じですが、人間が選択するのではなくコンピューターによって生成されるため、高いエントロピーが保証されています。キーは入力しやすい文字セットを使用しており、QR コードを介して画面外からスキャンすることもできます。

回復キーは、ハードウェアトークンが利用できない場合にフォールバックとして使用されるように設計されており、必要なときにいつでも通常のパスフレーズの代わりに使用できます。

# systemd-cryptenroll /dev/disk --recovery-key

ハードウェアデバイスの登録

--type-device オプションは、それぞれのタイプの有効なデバイスパスを指定する必要があります。使用可能なデバイスのリストは、このオプションに list 引数を渡すことで取得できます。あるいは、目的のタイプのデバイスが 1 つだけ接続されている場合は、auto オプションを使用してそれを自動的に選択できます。

ハードウェアトークンを LUKS ボリュームに登録した後、必要に応じてハードウェア トークンを使用するようにシステムを構成する必要があります。ルートファイルシステムなど、初期のユーザー空間でロックを解除する必要があるボリュームについては dm-crypt/システム設定#Trusted Platform Module と FIDO2 鍵 を参照し、その他のボリュームについては dm-crypt/システム設定#後期ユーザ空間でロックを解除する を参照してください。パーティション。

PKCS#11 トークンまたはスマートカード

トークンまたはスマートカードには、ボリュームのロックを解除するために使用される生成されたキーの暗号化に使用される RSA キーペアが含まれている必要があります。

# systemd-cryptenroll /dev/disk --pkcs11-token-uri=device

FIDO2 トークン

"hmac-secret" 拡張機能をサポートする FIDO2 トークンは、systemd-cryptenroll で使用できます。

# systemd-cryptenroll /dev/disk --fido2-device=device

さらに、systemd-cryptenroll は、トークンの組み込み検証機能の使用をサポートしています。

  • {ic|--fido2-with-client-pin}}は、ロック解除前にPINを要求するかどうかを定義する。
  • {ic|--fido2-with-user-presence}}は、ロックを解除する前にユーザの存在を確認するかどうか (トークンをタップするなど) を定義する。
  • {ic|--fido2-with-user-verification}} は、ロック解除前にユーザ認証を要求するかどうかを定義します。
ノート
  • トークンがこれらの機能をサポートしていない場合、これらのオプションは効力を持ちません。
  • 両者の違いについては、User Presence vs User Verification を参照してください。

信頼できるプラットフォームモジュール

この記事またはセクションは加筆を必要としています。
理由: Document --tpm2-public-key (議論: トーク:Systemd-cryptenroll#)
# systemd-cryptenroll /dev/disk --tpm2-device=device

デフォルトでは、TPM を登録するとキーが PCR7 にバインドされ、セキュアブート 状態が測定されます。--tpm2-pcrs オプションを使用すると、キーがバインドされる PCR を変更できます。+ 記号で区切ることにより、複数の PCR を同時に使用できます。PCR とその測定内容の完全なリストは、Trusted Platform Module#Accessing PCR registers で入手できます。

PIN を使用して TPM を歌う

TPM 測定チェックに加えて、PIN の入力を要求することもできます。TPM デバイスの登録時にオプション --tpm2-with-pin=yes を追加し、要求されたら PIN を入力します。systemd-cryptenroll ではこれを PIN と呼びますが、任意の文字を使用できます。

ノート systemd-cryptenroll は、PIN を要求する前に TPM 測定をチェックしません。そのため、環境が信頼できない可能性があるため、一意の PIN の使用を検討してください。

See also