0

Does anyone have a solution for using the Yubikey Security Key as a second factor for file-based crypto containers like VeraCrypt or something else? I know the Security Key doesn't allow PGP, but now I don't have another key.

1 Answer 1

0

I'll assume you're on Linux.

Short answer, from the top of my head: should be no problem.

LUKS can be used to create encrypted files, then you can put a file system in there, and mount the result. Something like the following (untested!):

CONTAINER=yans-encrypted-image-file
DEVICENAME=yans-volume
fallocate -l 10G "$CONTAINER"
cryptsetup luksFormat "$CONTAINER"
sudo cryptsetup  luksOpen "$CONTAINER" "$DEVICENAME"
sudo mkfs.xfs "/dev/mapper/$DEVICENAME"
# Now ready to mount, e.g. via
udisksctl mount -b "/dev/mapper/$DEVICENAME"
# To close:
udisksctl unmount -b "/dev/mapper/$DEVICENAME"
sudo cryptsetup close "$DEVICENAME"

There's plenty of guides out there on how to enroll your Yubikey as LUKS secret provider. How packaging for such things works: sadly kind of depends on your Linux distro, so I'll have to let you research that on your own.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.