ディレクトリの暗号化ツール。
Ubuntu Server 12.04.1 LTS の home directory 暗号化等に利用されている。
Ubuntu Server 12.04.1 LTS の home directory 暗号化等に利用されている。
- Ubuntu Documentation / Ubuntu 12.04 LTS / Ubuntu Server Guide / Security / eCryptfs
- Gentoo Linux Wiki / Encrypt home directory with ecryptfs
- archlinux / eCryptfs
暗号化されたデータ(ファイルやディレクトリ)と暗号化に関するパラメータ(signature や wrapped-passphrase)は以下に記録されている。
/home/.ecryptfs/username/.ecryptfs/wrapped-passphrase には、ログインパスワードで暗号化(=wrap)された passphrase が記録されいる。
login/logout 時、pam_ecryptfs.so モジュールはこれを unwrap して mount/unmount を行う。
このための設定は /etc/pam.d/ 以下のファイルへ以下のように書かれている。
common-auth:
このための設定は /etc/pam.d/ 以下のファイルへ以下のように書かれている。
common-password:
mount.ecryptfs_private によると "using the AES cipher with a key length of 16 bytes" と言うことなので 128bits AES で暗号化されているらしい。
ecryptfs-unwrap-passphrase コマンドを使って、ログインパスワードで unwrap することで生の passphrase を確認してみたところ確かに 16 bytes だった。
万が一ディスクの障害等で、/home/.ecryptfs/username/.ecryptfs/ 以下に損傷を受けてしまった場合、signature や passphrase を失う事になるため、暗号化したデータが事実上失われてしまう危険性が高い。従って /home/.ecryptfs/username/.ecryptfs/ 以下は厳重にバックアップしておく必要がある。
また、暗号化されたデータと wrapped-passphrase が物理的に同じデバイスに記録されている状態であるから、passphrase を wrap しているログインパスワードが事実上の暗号強度になっている点にも注意が必要。
通常、ログインパスワードは ASCII コードの 0x20〜0x7e (= 95 文字)しか使えないので、128bits AES と同程度の暗号強度を得るには、log(2128)/log(95) ≒ 19〜20 文字くらいの長さが必要となる。
HDD 故障等により、データを消去出来ない状態で HDD を破棄する必要が生じた場合、ログインパスワードの暗号強度が気になる等の状況も想定されるなら /home/.ecryptfs/username/.ecryptfs/ は物理的に別のデバイス(例えば USB メモリ等)に移しておいた方が良い。
- データ
- /home/username/.Private -> /home/.ecryptfs/username/.Private
- パラメータ
- /home/username/.ecryptfs -> /home/.ecryptfs/username/.ecryptfs
/home/.ecryptfs/username/.ecryptfs/wrapped-passphrase には、ログインパスワードで暗号化(=wrap)された passphrase が記録されいる。
login/logout 時、pam_ecryptfs.so モジュールはこれを unwrap して mount/unmount を行う。
このための設定は /etc/pam.d/ 以下のファイルへ以下のように書かれている。
common-auth:
auth optional pam_ecryptfs.so unwrapcommon-session, common-session-noninteractive1:
session optional pam_ecryptfs.so unwrapログインパスワードが変更された場合、pam_ecryptfs.so モジュールが wrapped-passphrase を自動的に新しいログインパスワードで rewrap してくれる。
このための設定は /etc/pam.d/ 以下のファイルへ以下のように書かれている。
common-password:
password optional pam_ecryptfs.so
mount.ecryptfs_private によると "using the AES cipher with a key length of 16 bytes" と言うことなので 128bits AES で暗号化されているらしい。
ecryptfs-unwrap-passphrase コマンドを使って、ログインパスワードで unwrap することで生の passphrase を確認してみたところ確かに 16 bytes だった。
万が一ディスクの障害等で、/home/.ecryptfs/username/.ecryptfs/ 以下に損傷を受けてしまった場合、signature や passphrase を失う事になるため、暗号化したデータが事実上失われてしまう危険性が高い。従って /home/.ecryptfs/username/.ecryptfs/ 以下は厳重にバックアップしておく必要がある。
また、暗号化されたデータと wrapped-passphrase が物理的に同じデバイスに記録されている状態であるから、passphrase を wrap しているログインパスワードが事実上の暗号強度になっている点にも注意が必要。
通常、ログインパスワードは ASCII コードの 0x20〜0x7e (= 95 文字)しか使えないので、128bits AES と同程度の暗号強度を得るには、log(2128)/log(95) ≒ 19〜20 文字くらいの長さが必要となる。
HDD 故障等により、データを消去出来ない状態で HDD を破棄する必要が生じた場合、ログインパスワードの暗号強度が気になる等の状況も想定されるなら /home/.ecryptfs/username/.ecryptfs/ は物理的に別のデバイス(例えば USB メモリ等)に移しておいた方が良い。
タグ
コメントをかく