right click and generate truecrypt volume from contents

0

has any one found a way to take the contents of a folder and programiticly generate a volume for it in truecrypt that is just the right size?

like in windows how you right click and select send to archive etc... I am hoping theres a solution for linux to either gather the relevent data or script a command line to generate the volume and copy or move contents to that volume.

Kendrick

Posted 2016-02-20T16:28:03.757

Reputation: 559

This would require you intergrate Truecrypt into the Windows shell, hard to do, without a great deal of programming experience – Ramhound – 2016-02-20T16:43:45.727

@Ramhound I'm sure comment still holds but OP is asking for a Linux solution " I am hoping theres a solution for linux" – DavidPostill – 2016-02-20T16:55:43.070

Answers

0

Does it have to be a truecrypt container, or a container at all?

  • If you'd like gpg (pgp), then

    tar -z -cv datadir | gpg --output data.tar.gz.gpg -c

    creates a passphrase (as opposed to -e public/secret key) encrypted compressed tar file, about the same size or maybe smaller than the source folder.

  • eCryptFS or EncFS would do on-the-fly encryption of a new folder, that's about the same size as the original.

    • Does not use a container file or partition, keeps encrypted files on the same drive in a new folder. Therefore only uses as much disk space as is required (after encryption some files are a little larger, tiny files may have a minimum size) and increases in size dynamically (ex. space is only limited by the host filesystem).
  • TrueCrypt still exists for Linux, not officially supported anymore but it's not "broken" or anything AFAIK (as of the start of 2016). But cryptsetup below supports the truecrypt format & existing volumes too...

  • dm-crypt / cryptsetup / LUKS uses container files that look like a separate partition/drive, very similar to truecrypt.

  • A custom script (bash for instance) you create with a combination of du -bs <folder> | cut -f1 to find the required size and creating a file of the size plus the dm-crypt/LUKS & filesystem overhead space (varies by encryption type, # of keys, filesystem type & options) could work too, and dm-crypt/cryptsetup supports truecrypt volumes too.

Xen2050

Posted 2016-02-20T16:28:03.757

Reputation: 12 097

I would be expecting it to do strong encryption for things including tax records. I would prefer a fs level approach where i can mount a drive of the requested data. if i need to update it i just create a new larger container with the new data. – Kendrick – 2016-02-25T00:58:12.047

The tools I listed all do those, with the "folder only" eCryptFS & EncFS advantages of not wasting space with the empty parts of a "container" and you never have to create a larger "container". But using linux, and especially bash, you can do almost anything you want, just write your own script so it's exactly how you like it, you won't be happy or fully trust it unless you do. I'll add some help / FAQ links to the tools in the answer, and definitely see arch's Disk Encryption overview & info, top notch

– Xen2050 – 2016-02-25T15:22:31.580