TPM2KEY-TOOL(8)
β¨ TPM2KEY-TOOL(8) β¨
okay so bestie, welcome to the TPM2KEY-TOOL(8) page β the manual for parsing and comparing TPM 2.0 keys. yes, that's the whole vibe. let's get into it π
πΈ NAME πΈ
tpm2key-tool β parse and compare TPM 2.0 key files π
π¦ SYNOPSIS π¦
tpm2key-tool [-d|--debug] parse key-file
tpm2key-tool [-d|--debug] cmp key-file-1 key-file-2
tpm2key-tool [-h|--help]
π DESCRIPTION π
tpm2key-tool is a command-line utility that's literally built to parse, inspect, and compare TPM 2.0 private key files. no cap, that's the job. and these files? they're typically stored in the standard ASN.1 DER-encoded format, which is defined by the TPM2.0 key file specification β aka the TSS PrivKey format. iykyk π
π OPTIONS π
here's the full list of options tpm2key-tool recognizes, bestie β every single one:
-d,--debugβ turns on verbose debug logging. so if you're nosy (same) this is your moment π-h,--helpβ shows a help message and then bounces. exit stage left π«Ά
β SUBCOMMANDS β
parse key-fileβ decodes the TPM 2.0 key file you point it at and prints a detailed, human-readable summary. iconic. that summary includes structural elements like:- the TSSPrivKey type (OID)
- the key's description (if it's present β sometimes it's not, and that's fine)
- the parent handle and public key
- any option or authorization policies, including the policy steps and command codes π
cmp key-file-1 key-file-2β compares two TPM 2.0 key files to figure out whether they share the same base key. this one's especially useful for verifying if two keys were derived or wrapped under the same parent, or if they represent the same underlying TPM object but with different policies. so basically a vibe check for keys π§
π EXIT STATUS π
the utility returns these exit status codes β memorize them fr fr:
0β success. and for thecmpsubcommand specifically, it means both key files represent or share the same base key π1β returned by thecmpsubcommand only: the keys are valid but they do not share the same base key. so valid, just not matching π2β an error happened. like invalid usage, or a specified key file couldn't be read, parsed, or decoded. sad times π
π₯ SEE ALSO π₯
and that's the whole page, bestie π version 0.6.6, dated September 18, 2026 β go forth and parse those keys πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: pcr-oracle 0.6.6-160000.1.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pcr-oracle 0.6.6-160000.1.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pcr-oracle 0.6.6-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms