More Related Content
Similar to 偏執的な人の為の? NotePCセキュリティ HDD編 -小江戸らぐ1月のオフな集まり(第102回)-
Similar to 偏執的な人の為の? NotePCセキュリティ HDD編 -小江戸らぐ1月のオフな集まり(第102回)- (20)
More from Kenichiro MATOHARA
More from Kenichiro MATOHARA (20)
偏執的な人の為の? NotePCセキュリティ HDD編 -小江戸らぐ1月のオフな集まり(第102回)-
- 7. Dm-crypt 手動設定例
●
暗号化ファイルの作成例 1GB のimageを作成
dd if=/dev/zero of=./crypt bs=1M count=1024
●
/crypt を/dev/loop0 に関連付け。
sudo losetup /dev/loop0 ./crypt
●
Device mapper(crypt0)に関連づけ
●
●
cryptsetup luksFormat /dev/mapper/crypt0
暗号化
●
cryptsetup luksFormat /dev/mapper/crypt0
※このときの確認メッセージは大文字でYES と入力すること ※求められたパ
スフレーズを忘れないこと/後で変更可能
- 9. Dm-crypt 手動設定例
●
パスフレーズの追加
cryptsetup luksAddKey /dev/mapper/mk_cryptarea
Enter any LUKS passphrase:key slot 0 unlocked.
Enter new passphrase for key slot:
Verify passphrase:Command successful.
※key slot 0~6 迄7つまで設定できる.
●
パスフレーズの削除/1 のKey Slot 削除.
cryptsetup luksDelKey /dev/hoge 1
- 10. Dm-crypt 手動設定例
●
暗号化fs の確認/Key Slot0-1 に設定があることが解る
●
cryptsetup luksDump /dev/mapper/mk_cryptarea
--snip--
Key Slot 0: ENABLED
Iterations:
Salt:
18870
22 1b 6e 8b 2b 64 90 2f e9 25 84 48 6e 2f 48 b4
0e c2 1c 93 fa f3 a7 53 d9 12 05 96 80 d7 9c 13
Key material offset:
AF stripes:
8
4000
Key Slot 1: ENABLED
Iterations:
Salt:
19078
62 df c8 cb 91 29 89 85 46 48 fe 85 3f 3b db 04
1d b7 6b d1 80 5a 4b f9 0e 0c 39 9f ba 1d 48 ca
Key material offset:
AF stripes:
136
4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED普段使いのKeyslot と忘れたとき用のKeyslot を用意すると良いかもしれません.
- 12. eCryptFS
●
Kernel 2.6.19 から
●
Ubuntu の~ の暗号化などで使われている.
●
通常のファイルシステムの上で,1ファイル,ディレクトリ毎に暗号化し
ている.
●
そのディレクトリへのアクセス権があれば暗号化されたファイル,ディ
レクトリの存在は分かるしコピー削除等も出来る.
●
ファイル自体にメタ情報を持つため細かいファイルが大量にある場合
などには実容量よりずっと大量の領域が必要になったりする.
●
ファイルシステムごと暗号化をしないので,容量を気にせず手軽に利
用できる. > dm-crypt は固定
- 18. EcryptFS のファイル名長制限
●
日本語(UTF-8)
$ touch 'あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお
あいう'
touch: `あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあ
いう'にtouchできませんでした: File name too long
$ touch 'あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお
あい'
$ echo 'あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあ
い' |wc
1
1 142
$ touch あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお
あい1
$ touch あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお
あい12
$ touch あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお
あい123
touch: `あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあ
い123'にtouchできませんでした: File name too long
- 19. EcryptFS 手動マウント
●
マシンが起動しなくなったりした時などに読む方法.
$ sudo mount -t ecryptfs -o
ecryptfs_sig=xxxxxxxxxxxxxxxx,ecryptfs_fnek_sig=xxxxxxxxxxxxxxxx,ecryptfs_cip
her=aes,ecryptfs_key_bytes=16 /home/USER/.Private /mnt
Passphrase:
Enable plaintext passthrough (y/n) [n]:
Attempting to mount with the following options:
ecryptfs_unlink_sigs
ecryptfs_fnek_sig=xxxxxxxxxxxxxxxx
ecryptfs_key_bytes=16
ecryptfs_cipher=aes
ecryptfs_sig=xxxxxxxxxxxxxxxx
Mounted eCryptfs
※ecryptfs_sig は(/home/.ecryptfs/$USER/.ecryptfs/Private.sig の1行目
ecryptfs_fnek_sig は2行目
- 21. TrueCrypt の使い方
●
Slax で暗号化fs を持ち運ぶ 12 月のインストールパー
ティ in 電大鳩山 (20081220) 1 月のオフな集まり 第
78 回
http://www.slideshare.net/matoken/koedo200812
20-install-party