VeraCrypt icon indicating copy to clipboard operation
VeraCrypt copied to clipboard

Support "FIDO U2F Security Key"

Open ghost opened this issue 7 years ago • 18 comments

https://www.yubico.com/products/yubikey-hardware/fido-u2f-security-key/

  1. Start Veracrypt-encrypted computer.
  2. Insert the device key
  3. Password input automatically. Windows is starting.

a. Password-less (using device instead of it) for office computer. Robbers never able to boot stolen PC without key. b. Your grandmother who doesn't know her computer well - claiming "why do I have to input password everytime I start my PC boy"

ghost avatar Jan 27 '17 12:01 ghost

You seem to have a huge misunderstanding on what U2F does. U2F does NOT provide static password input. Read this if you don't know what U2F does,

https://www.yubico.com/about/background/fido/

If you need static password input without typing it as usual, your options are:

  1. Use password manager like KeePass and use its Autotype function. (Does not work prior to booting)
  2. Buy $40 or $50 YubiKey (NOT the $18 Blue U2F key), which can store 1 static password.
  3. Buy $80 Mooltipass, which can store multiple static passwords.

voyager-nx24 avatar Feb 25 '17 01:02 voyager-nx24

@ghost It would be great if you also need both (password + U2F) or even (password + U2F + PIM) for the best encryption.

But also the simple U2F only method is great to push general encryption. But not with static passwords, just use the method U2F is designed for.

RAYs3T avatar Jun 01 '17 05:06 RAYs3T

Bump! Is there any new information on this topic?

dmuensterer avatar Oct 11 '20 21:10 dmuensterer

Any new info? I kinda want this in combination with a password.

Merith-TK avatar Jun 16 '21 22:06 Merith-TK

Honestly the fact that arguably the most popular disk encryption software does not feature FIDO2 in 2021 is astonishing. Don't get me wrong - I know this is an open source project and lots of evenings and free time are spent on it. It's just that this feature is imho much more important than many others.

dmuensterer avatar Jun 16 '21 23:06 dmuensterer

Agreed Like the U2F protocol can just be in the actual software, and all it does is first require top level decryption (password+pim+keyfile for example) and then it only decrypts the first section of the veracrypt image/drive, which contains the information needed for the U2F device to function

oh and the U2F has to be a toggle like using kyefiles

Merith-TK avatar Jun 17 '21 16:06 Merith-TK

Just to chime in, you can't use U2F for anything outside signing and and otherwise authentication. Having 2FA for disk encryption seems a bit useless since it would require trusting the bootloader, which might be nasty enough to steal your keys and bypass the 2FA anyway. The best it could do is provide early boot authentication, which might as well be done at the OS.

THAT SAID, FIDO2 is out which is a much better beast. Instead of just signing it can be used to generate a shared secret given a salt. This can be used as a key slot password in Linux's LUKS encryption.

This would be the input for whatever key file VeraCrypt wants. This can already be done with security tokens and smart cards, https://veracrypt.fr/en/Security%20Tokens%20%26%20Smart%20Cards.html but that's not pre-boot. I glanced at some of the code and I'm guessing this is because the pre-boot unlocker can only rely on BIOS functionality.

However, EFI seems to support USB...

Edit: Using this in combination with a password seems a lot trickier, however modern FIDO2 devices let you set a password on the device itself so maybe you could use that.

Edit 2: This same setup works with Yubikeys using their shared secret challenge.

Jookia avatar Jun 23 '21 11:06 Jookia

I was at the very least, thinking that the firmware for FIDO/FIDO2 could be stored in the actual decryption software, or that a small segment of the partition/image can contain a read only firmware that is used for storing the information used for decryption of the rest of it.

Merith-TK avatar Jun 23 '21 16:06 Merith-TK

FIDO/FIDO2 can't store decryption software, but it can store the secret. The issue I think would be not having the USB drivers at boot to talk to the dongle.

Jookia avatar Jun 24 '21 01:06 Jookia

I mean, on UEFI Systems, isnt "secure boot" a thing? for a actual signed bootloaders, wouldnt it be possible to have VeraCrypt encrypted drives use a custom bootloader, that shims itself in between the normal bootloader (like grub) and the actual OS? in this theoretical Signed Veracrypt Bootloader, it could contain the drivers and libraries needed.

the password would be used to unlock the secret for the USB device, and then the secret would be used to encrypt the harddrive. which would then allow it to boot

Merith-TK avatar Jun 24 '21 01:06 Merith-TK

I think for unsigned bootloaders that would work too- the existing VeraCrypt EFI bootloader does this I think. I'm just not sure how much of a USB stack it has. Maybe enough to talk to a FIDO device?

Jookia avatar Jun 24 '21 02:06 Jookia

I mean I dont think it would be too much extra overhead?

Merith-TK avatar Jun 24 '21 19:06 Merith-TK

It shouldn't be overhead, just work to do to add support.

Jookia avatar Jun 25 '21 00:06 Jookia

+1: I just want to let you guys know that I'd also appreciate a support for fido2...

phwi avatar Jan 02 '22 07:01 phwi

there are two options, the hmac-secret extension (luks decryption under systemd-boot) or the Discoverable Credentials / Resident Keys feature of FIDO2 (openssh keygen).

coelner avatar Jun 06 '22 19:06 coelner

The complexity of adding support for any particular hardware device which requires specific driver support to the boot process means not only does VeraCrypt need to support the protocols required by the device but also the drivers. For example, FIDO2 allows for direct USB device connections, NFC (via connected NFC reader - more drivers), or even Bluetooth / BLE. Saying "support FIDO2" means an extreme amount of work to properly support FIDO2 devices according to the standard.

Alternatively, what might be worth focusing on first, would be support for FIDO2 to mount volumes in the OS. That way the OS handles the drivers, connectivity, and even the FIDO2 / security key protocol. This is much lower hanging fruit than supporting FIDO2 for boot decryption. Anyone serious about working on adding FIDO2 support to VeraCrypt should start there IMHO.

amalg avatar Jul 31 '23 17:07 amalg

I could get behind using FIDO2 as an "late stage" final security measure,

Merith-TK avatar Aug 04 '23 05:08 Merith-TK

Trying to get windows relatively safe with yubikey and veracrypt isn't that easy.

PilotJinx avatar Apr 15 '24 13:04 PilotJinx