Open EvilBit opened 3 years ago
Sounds like a good idea! The following information should be easy enough to obtain:
0x018094AF
existstpm2totp_reseal
determines wether the unseal blob is presentThe following information is not stored permanently at the moment:
/proc/cmdline
for the tpm2_totp_nvindex
/rd.tpm2totp.nvindex=index
argument to cover at least the initramfs use case? I'm not sure if people really use this feature at all (though it might possibly make sense if you store multiple different TOTP secrets, possibly for different operating systems).--label
argument is only used during generation of the QR code containing the TOTP secret. It might make sense to store it in the NV index as well to make resealing easier, but it currently is a variable-length string, so not a good fit for a fixed-size index. We could limit it to e.g. a maximum of 32 characters though.
Having a sub-command à la
tpm2-totp status
to show the currently enrolled configuration would be helpful and very much appreciated.Infos to display could include:
man 1 systemd-cryptenroll
has a nice summary)Possibly/Optionally in YAML format.