Changes between Version 2 and Version 3 of luks
- Timestamp:
- Nov 15, 2007 4:01:34 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
luks
v2 v3 11 11 12 12 When you want to use a LUKS-formatted volume, the computer you're using asks you for a passphrase (or a passphrase file). It uses that passphrase with one of the scrambled passphrases to unscramble the secret key. The key is then used to unscramble sections of the underlying block device as they are requested by the OS. This is represented as a new virtual block device available to the system. A regular filesystem can be written to the virtual block device, and the actual data stored on disk will be encrypted. 13 14 == how to use LUKS == 15 16 on [http://debian.org debian] systems, to put a layer of encryption over `/dev/sda1`, running an ext3 filesystem, it would look something like this: 17 18 {{{ 19 0 root@lemur:~# aptitude install cryptsetup 20 0 root@lemur:~# cryptsetup luksFormat /dev/sda1 21 22 WARNING! 23 ======== 24 This will overwrite data on /dev/sda1 irrevocably. 25 26 Are you sure? (Type uppercase yes): YES 27 Enter LUKS passphrase: 28 Verify passphrase: 29 Command successful. 30 0 root@lemur:~# cryptsetup luksOpen /dev/sda1 mynewdisk 31 Enter LUKS passphrase: 32 key slot 0 unlocked. 33 Command successful. 34 0 root@lemur:~# mkfs -t ext3 -q /dev/mapper/mynewdisk 35 0 root@lemur:~# mount /dev/mapper/mynewdisk /mnt 36 0 root@lemur:~# 37 }}} 38 39 When you're done with the disk, you unmount it and release the encryption: 40 {{{ 41 0 root@lemur:~# umount /dev/mapper/mynewdisk 42 0 root@lemur:~# cryptsetup luksClose mynewdisk 43 0 root@lemur:~# 44 }}} 45 46 If you want regular access to an encrypted block device (might not make sense for a portable drive, for example), you can add entries in `/etc/crypttab` to prompt for keys at boot time. Note that if you do this, you need to be at the computer (or have remote console access) when it boots, or it will wait forever for you to get to the console and put in the keys! 13 47 14 48 == advantages of LUKS == … … 29 63 30 64 Once an encrypted block device is "!LuksOpen"ed on a computer, any process running as superuser on that computer has access to all the unencrypted data. If you want individual files to be opaque to the system administrator, you probably should encrypt those files individually somewhere else before transferring the encrypted version to the computer in question. 65 66 == other links == 67 68 * [http://www.freeotfe.org/ FreeOTFE] claims to be able to use LUKS volumes on windows. 69 * [https://www.debian-administration.org/articles/536 resizing encrpyted filesystems]

