@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.