How to initialize a used TPM2 module and thoughts on clevis
A message that is not in the archive (sent off-list or not yet received): [email protected]
Roberts
Thanks Javier,
Seems to have the same bug:
- https://github.com/fedora-iot/clevis-pin-tpm2/blob/main/src/utils.rs#L99
I filled issue:
https://github.com/fedora-iot/clevis-pin-tpm2/issues/20
Thanks,
Bill
________________________________
From: Javier Martinez Canillas <javierm(a)redhat.com>
Sent: Tuesday, August 16, 2022 12:29 PM
To: Roberts, William C <william.c.roberts(a)intel.com>; tpm2(a)bitzap.e4ward.com <tpm2(a)bitzap.e4ward.com>; tpm2(a)lists.01.org <tpm2(a)lists.01.org>
Subject: Re: [tpm2] Re: How to initialize a used TPM2 module and thoughts on clevis
Hello Bill,
Quoted 20 lines · William C
+ Javier
Quoted 7 lines · Tim K
Very useful, thank you!
Quoted 4 lines
and YES. This is required to keep someone from wiping all the keys in
the owner hierarchy which would include your disk encryption keys. You also want to set the lockoutauth as well.Quoted 8 lines
It appears clevis uses the owner hierarchy by default. If I set an owner password, what are the implications, does clevis need to know the owner password when it creates its own key and then encrypts/decrypts its own key?
This is how I'm trying to use it to encrypt a single file on disk (not the entire disk/LUKS):
https://manpages.ubuntu.com/manpages/focal/man1/clevis-encrypt-tpm2.1.html
Quoted 8 lines
Looking at the source[1,2], it appears they call
tpm2_createprimaryon encrypt which would require owner auth, calltpm2_createsave the key and then on decrypt calltpm2_createprimarywhich requires owner auth and then calltpm2_loadto load the key under that primary object.I don't see an option to use the SRK, this looks like an oversight or I am missing something. Javier, do you know?
I don't remember anymore why this was done that way. I haven't worked on TPM stuff for a while and paged out of my head all the details... sorry.
But in case is useful, there's a new clevis tpm2 pin that is a rewrite and and supports more features such as PCR Authorized Policies. Please take a look, since it maybe be doing the correct thing and if not, you can file an issue for that:
https://github.com/fedora-iot/clevis-pin-tpm2
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat