Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udisksctl unlock --key-file fails with BitLocker encrypted disk #1252

Closed
ralfixx opened this issue Feb 6, 2024 · 3 comments · Fixed by #1255
Closed

udisksctl unlock --key-file fails with BitLocker encrypted disk #1252

ralfixx opened this issue Feb 6, 2024 · 3 comments · Fixed by #1255

Comments

@ralfixx
Copy link

ralfixx commented Feb 6, 2024

OS is either Opensuse 15.4, udisks2-2.9.2-150400.3.3.1.x86_64, or Ubuntu 22.04 with udisks 2.9.4-1

I have a USB drive where BitLocker encyption was enabled on Windows.
If I insert this drive in my Linux PC (Opensuse 15.4 or Ubuntu 22.04), I can open the drive interactively, like this:

$ udisksctl unlock -b /dev/sdc1
Passphrase: 
Unlocked /dev/sdc1 as /dev/dm-0.

However, if I put the passphrase in a keyfile, and use that as --key-file, the command fails:

$ echo -n passphrase > /tmp/keyfile
$ udisksctl unlock -b /dev/sdc1 --key-file /tmp/keyfile
Error unlocking /dev/sdc1: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: No key available to unlock device /dev/sdc1

Should --key-file work with BitLocker encryption?

@ralfixx
Copy link
Author

ralfixx commented Feb 7, 2024

Thanks for the reply. If I understand it correctly, --key-file currently does NOT work with BitLocker encryption, only with LUKS encryption?

As for the patch #1255, note that TCRYPT in cryptsetup(8) also mentions --key-file. Does this also need to be checked there?

@vojtechtrefny
Copy link
Member

Thanks for the reply. If I understand it correctly, --key-file currently does NOT work with BitLocker encryption, only with LUKS encryption?

Yes, that's correct.

As for the patch #1255, note that TCRYPT in cryptsetup(8) also mentions --key-file. Does this also need to be checked there?

Keyfiles in TrueCrypt/VeraCrypt are a little bit different, we need a bigger change in udisksctl for that to work, see #1191

@ralfixx
Copy link
Author

ralfixx commented Feb 7, 2024

Thanks for the reply. If I understand it correctly, --key-file currently does NOT work with BitLocker encryption, only with LUKS encryption?

Yes, that's correct.

Thanks for the confirmation. I will switch to LUKS for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants