this post was submitted on 19 Oct 2023
58 points (92.6% liked)
Linux
48074 readers
895 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yet another reason why I wouldn't put anything important on a tpm encrypted volume 😹 I just don't trust it
[This comment has been deleted by an automated system]
That's true, but the issue is that cryptsetup does not accept the recovery key as a passphrase for the disk. Once the tpm gets reset, the user has to always enter the recovery key and cannot implement a new key to luks and the tpm.
[This comment has been deleted by an automated system]
I wasn't blaming cryptsetup, my mistake if it came across as though I did.
Thank you for taking the time to look into a possible fix, I might just reinstall with tpm-backed fde again to see if this really works.
@Skull giver -- I mentioned this above, but couldn't link it to you.
I like the code but the
go run recover.go 2> key.text
does not redirect the key to a file. It does not get input of the recovery key, so errors. Could you please add a few lines to write it directly to that file, instead of displaying it? (or output to both?)As someone thought, what is displayed onscreen is jibberish, because console cannot display raw hex characters... I'm thinking the LUKS key in the keyslot is raw or hex.
As I now know, it is translated. And we can get the recovery key (hopefully) translated the other way around...
If I can just find the valid key value, and write it to a file, then I can help @inchbinjasokreativ to write it back to his TPM. I've already written a BASH script to do that, but am just missing that key-file. I have the problem replicated to a VM, so can test it on that first.
Success! I have a working key file...
Success on the first volume, which I picked as first because it was only 53M in size. Mounted it to /mnt... And guess what I found inside it?
That is a key, but not connected to either LUKS container there... I dumped the headers of both LUKS. There are 2 key-slots, and the key translated from the recovery key is in slot one of both containers, The second key-slot's key must be the TPM's key, which is unknown if that is stored anywhere except the TPM...
But is shouldn't matter now... Because that key-file did work to add a new passphrase to both LUKS containers.
Thank you @Skull giver.
[This comment has been deleted by an automated system]
Yeah I’m hybrid Windows/Linux user, but many of my drives are Bitlocker encrypted. I need to install a bios update. To do so, it requires me to decrypt every bitlocker drive and not just the OS drive. Because the TPM keystore is based on the OS key store for each bitlocker drive. It’s frustrating, but it makes sense, so I’m all for additional security