Featured image of post Using GoCryptFS with QR-Code

Using GoCryptFS with QR-Code

A quick tutorial on how to use GoCryptFS with QR-Code

In this tutorial we are going to use the following application.

To get started we need to create the QR-code with a very long password, say around 256 character.

cd /tmp
pwgen -1syv 256 | tr -d '\n' | qrencode -t SVG -o "qr.svg"

This should create a random qr-code saved as qr.svg, upload the QR-code to the phone by any means.

Now to initialized the folder that will store the encrypted data.

mkdir cipher
zbarcam --raw -1 | tr -d '\n' | gocryptfs -init -q -xchacha cipher

Scan the QR-Code from the phone and it should initialized the folder ready for encryption.

To mount

mkdir mnt
zbarcam --raw -1 | tr -d '\n' | gocryptfs cipher mnt

Scan the QR-Code again and it should mount cipher to mnt, to test it add file to mnt folder and than check cipher you should see an encrypted file.

It is useful for encrypting key file for the password manager on the work’s machine that has a webcam, given that it is running Linux.

Built with Hugo
Theme Stack designed by Jimmy