Difference between revisions of "Tcplay"

From ArchWiki
Jump to: navigation, search
(Mounting an existing container for a user)
m (See also section.)
(One intermediate revision by one other user not shown)
Line 15: Line 15:
  
 
== Installation ==
 
== Installation ==
Install {{Ic|tcplay-git}} from the AUR.
+
Install {{AUR|tcplay}} or {{AUR|tcplay-git}} from the AUR.
  
 
== Encrypting a file as a virtual volume ==
 
== Encrypting a file as a virtual volume ==
Line 71: Line 71:
 
   # losetup -d /dev/loop0
 
   # losetup -d /dev/loop0
  
==Related links==
+
== See also ==
 +
 
 
* [http://leaf.dragonflybsd.org/cgi/web-man?command=tcplay&section=8 Manual page for tcplay]
 
* [http://leaf.dragonflybsd.org/cgi/web-man?command=tcplay&section=8 Manual page for tcplay]
 
* [http://jasonwryan.com/blog/2013/01/10/truecrypt/ Jason Ryan: Replacing TrueCrypt]
 
* [http://jasonwryan.com/blog/2013/01/10/truecrypt/ Jason Ryan: Replacing TrueCrypt]

Revision as of 15:20, 3 November 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

tcplay is a free (BSD-licensed), pretty much fully featured (including multiple keyfiles, cipher cascades, etc.) and stable TrueCrypt implementation.

Source: github project home

Installation

Install tcplayAUR or tcplay-gitAUR from the AUR.

Encrypting a file as a virtual volume

Invoke

 $ losetup -f

to find the first unused loopback device; in this example, /dev/loop0.

Note: As of udev 181-5, the loop device module is no longer auto-loaded.

Create a new container foo.tc, 20M in size for instance, in the working directory:

 # dd if=/dev/zero of=foo.tc bs=1 count=0 seek=20M
 # losetup /dev/loop0 foo.tc
 # tcplay -c -d /dev/loop0 -a whirlpool -b AES-256-XTS

Enter a secure password for the volume, and confirm the query to overwrite foo.tc with the new volume. tcplay will then write random data into the volume. Map the volume and create a filesystem on it in order to mount

 # tcplay -m foo.tc -d /dev/loop0
 # mkfs.ext4 /dev/mapper/foo.tc
 # mount /dev/mapper/foo.tc /mnt/truecrypt/

To unset the container,

 # umount /mnt/truecrypt
 # dmsetup remove foo.tc
 # losetup -d /dev/loop0

Mounting an existing container for a user

Consider /dev/loop0 the first unused loop device, foo.tc the TrueCrypt container, /home/you/truecrypt/ the desired mount point. The user you in this example has uid=1000 and gid=100. The steps for mounting the container as a virtual volume are:

  1. Associate loop device with the container
  2. Map the container to the loop device
  3. Mount the container in the filesystem

The following commands perform the above actions.

 # losetup /dev/loop0 foo.tc
 # tcplay -m foo.tc -d /dev/loop0
 # mount -o nosuid,uid=1000,gid=100 /dev/mapper/foo.tc /home/you/truecrypt/

To reverse them:

 # umount /home/you/truecrypt/
 # dmsetup remove foo.tc
 # losetup -d /dev/loop0

See also