I had a need to access a VeraCrypt/TrueCrypt encrypted volume, so I 
made a port of VeraCrypt.

Our wxWidgets is too old to build the GUI stuff, but the 
command-line program and FUSE service work enough to access a volume 
from a USB disk or create a new volume stored as a file.

The veracrypt utility accesses the encrypted volume/file and uses 
FUSE to present a disk that has a single large "volume" file on it, 
then vnconfig is used to mount that volume file as a loopback disk 
which by default has a FAT filesystem on it.

I don't really have a need for this anymore, so I'm making this port 
available in case anyone else wants to run with it and possibly 
import it.

Ideally our wxWidgets can be updated to 2.9+ so the GUI parts can be 
built and other patches removed, and then upstreamed to VeraCrypt so 
they can import it alongside their FreeBSD support.

Example creating a new image file and mounting it:

jcs@frob:~> veracrypt -c
Volume type:
 1) Normal
 2) Hidden
Select [1]:

Enter volume path: testfile.tc

Enter volume size (sizeK/size[M]/sizeG): 100M

Encryption Algorithm:
 1) AES
 2) Serpent
 3) Twofish
 4) Camellia
 5) Kuznyechik
 6) AES(Twofish)
 7) AES(Twofish(Serpent))
 8) Serpent(AES)
 9) Serpent(Twofish(AES))
 10) Twofish(Serpent)
Select [1]:

Hash algorithm:
 1) SHA-512
 2) Whirlpool
 3) SHA-256
 4) Streebog
Select [1]:

Filesystem:
 1) None
 2) FAT
Select [2]:

Enter password:
Re-enter password:

Enter PIM:

Enter keyfile path [none]:

Please type at least 320 randomly chosen characters and then press Enter:


Done: 100.000%  Speed:   31 MB/s  Left: 0 s
The VeraCrypt volume has been successfully created.

jcs@frob:~> ls -l testfile.tc 
-rw-------  1 jcs  jcs  104857600 Dec  1 16:40 testfile.tc

jcs@frob:~> doas veracrypt testfile.tc /mnt
Enter password for /home/jcs/testfile.tc: 
Enter PIM for /home/jcs/testfile.tc: 
Enter keyfile [none]: 
Protect hidden volume (if any)? (y=Yes/n=No) [No]: 

jcs@frob:~> mount | grep /mnt
/dev/vnd0c on /mnt type msdos (local)

jcs@frob:~> doas vnconfig -l
vnd0: covering /tmp/.veracrypt_aux_mnt1/volume on ??, inode 3
vnd1: not in use
vnd2: not in use
vnd3: not in use

jcs@frob:~> df -h /mnt
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/vnd0c    99.0M    1.0K   99.0M     0%    /mnt

jcs@frob:~> doas veracrypt -d

jcs@frob:~> doas vnconfig -l 
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use

Attachment: veracrypt.tar.gz
Description: Binary data

Reply via email to