个人工具

UbuntuHelp:TruecryptHiddenVolume

来自Ubuntu中文

Wikibot讨论 | 贡献2007年12月8日 (六) 09:57的版本

跳转至: 导航, 搜索

IconsPage?action=AttachFile&do=get&target=PicDocs.png

Encrypted filesystems and hidden volume

There is a lot of documentation on how to create an encrypted volume. However, a significant problem caused by most of the existing implementations is that the owner of the data may be forced to reveal the password used to encrypt the data. To address this, different projects exist to implement some steganography mechanisms, but at the time of writing, only Truecrypt is full-featured and production quality. Truecrypt is a free open-source disk encryption software available on Ubuntu. It offers a convenient hidden volumes management that includes protection against damages. More information is available at [1]. This page is mostly based on the man page of truecrypt 4.3a and intents to give a short recipe to implement Truecrypt hidden volumes on Ubuntu.

Truecrypt hidden volumes

  1. Install Truecrypt:
    sudo apt-get install truecrypt
    
  2. Create an outer volume (ex: on /dev/sdb1):
    truecrypt --filesystem none --type normal --encryption AES --hash SHA-1 --random-source /dev/urandom -c /dev/sdb1 
    
  3. Map the corresponding volume (ex: on /dev/sdb1), but do not mount it:
    truecrypt /dev/sdb1
    
  4. Format outer volume with FAT:
    sudo mkfs.vfat /dev/mapper/truecrypt0
    
  5. Dismount the volume:
    truecrypt -d
    
  6. Create a (ex: 50M) hidden volume within the outer volume (ex: on /dev/sdb1):
    truecrypt --filesystem none --type hidden --size 50M --encryption AES --hash SHA-1 --random-source /dev/urandom -c /dev/sdb1
    
  7. Map the corresponding hidden volume (ex: on /dev/sdb1), but do not mount it:
    truecrypt /dev/sdb1 # (use the hidden password)
    
  8. Format the hidden volume with a filesystem recognised by mount(8):
    sudo mkfs.xfs /dev/mapper/truecrypt0
    
  9. Dismount the hidden volume:
    truecrypt -d
    
  10. Mount the outer volume (ex: /dev/sdb1 on /mnt/tc) with the hidden volume protected:
    truecrypt -P /dev/sdb1 /mnt/tc
    
  11. Copy files to the outer volume:
    cp outer_volume_file.txt /mnt/tc
    
  12. Dismount the outer volume:
    truecrypt -d
    
  13. Mount either volume (ex: /dev/sdb1 on /mnt/tc) and enjoy:
    truecrypt /dev/sdb1 /mnt/tc # (use the password relevant to the volume you want to mount)