SIGNED_TPM2_POLICY(1)

πŸ“¦ version 4.3.0, in opensuse-leap 16.0

signed_tpm2_policy(1) β€” User Commands πŸ’…βœ¨

okay so this is signed_tpm2_policy(1), a User Commands girlie who adds, removes, and lists signed policies. the TPM is TPM-ing, the policy is policy-ing, and we are seated. πŸŽ€

🌸 NAME 🌸

signed_tpm2_policy β€” add, remove and list signed policies.

πŸ¦‹ SYNOPSIS πŸ¦‹

signed_tpm2_policy <cmd> [options] <tpmkey> [<arg>]

bestie, that's the whole shape of it. 🫢

πŸŽ€ DESCRIPTION πŸŽ€

<cmd> is one of add, rm or ls. and [arg] is the private key for the add command or the policy number for the rm command. that's the map, periodt. πŸ’…

✨ OPTIONS ✨

here's the first pass of the options, with every flag accounted for:

  • -a, --auth β€” require a password for the key; default [NO] πŸ’–
  • -h, --help β€” print this help message
  • -c, --key-policy <pubkey> β€” specify a policy for the TPM key
  • -i, --import <pubkey> β€” create an importable key with the outer wrapper encrypted to <pubkey>
  • -x, --pcr-lock <pcrs> β€” lock the created key to the specified PCRs by current value; see PCR VALUES for details about formatting
  • --locality <loc> β€” can only be used in a set of localities described by the <loc> bitmap
  • --signed-policy <key> β€” add a signed policy directive that allows policies signed by the specified public <key> to authorize use of the key
  • --secret <handle> β€” tie authorization of the key to the Authorization of a different object identified by <handle>
  • -n, --policy-name <name> β€” optional name to annotate the policy with
the original page literally repeats this whole block, so here it is again. not a glitch, bestie β€” twice the slay, same facts. 🫢
  • -a, --auth β€” require a password for the key; default [NO] πŸ’–
  • -h, --help β€” print this help message
  • -c, --key-policy <pubkey> β€” specify a policy for the TPM key
  • -i, --import <pubkey> β€” create an importable key with the outer wrapper encrypted to <pubkey>
  • -x, --pcr-lock <pcrs> β€” lock the created key to the specified PCRs by current value; see PCR VALUES for details about formatting
  • --locality <loc> β€” can only be used in a set of localities described by the <loc> bitmap
  • --signed-policy <key> β€” add a signed policy directive that allows policies signed by the specified public <key> to authorize use of the key
  • --secret <handle> β€” tie authorization of the key to the Authorization of a different object identified by <handle>
  • -n, --policy-name <name> β€” optional name to annotate the policy with

🧚 PCR VALUES 🧚

the PCR values are specified as:

<bank>:<list>

<bank> is any supported PCR hash bank, and the list specifies the PCRs to lock the key to β€” both as comma separated individual values and as comma separated ranges. so:

  • sha256:1,3 means PCRs 1 and 3 in the sha256 bank
  • sha512:1,3-5 means PCRs 1, 3, 4 and 5 in the sha512 bank

πŸ’œ SECRETS IN OTHER OBJECTS πŸ’œ

when the option --secrets <handle> is used, it creates a key whose authorization password is conditioned on the password of a different object identified by <handle>. usually this is a permanent NV index, but could be any object. the design of this policy is to allow the password to be changed without updating the key β€” simply by changing the authorization of the other object. because OpenSSL can only request a single password, keys with a --secret policy may not additionally have an --auth option to also require passing in the password embedded in the key.

🚨 that last bit is a hard caveat, not a vibe suggestion: no extra --auth on top of a --secret policy. periodt. πŸ’€

πŸ“ EXAMPLES πŸ“

list all signed policies:

signed_tpm2_policy ls key.tpm

the output is a numbered list of policies (with optional names). 🌸

remove the first policy:

signed_tpm2_policy rm key.tpm 1

add a new policy with name 'thispolicy' locked to pcr16 using the private policy.key:

signed_tpm2_policy add --name thispolicy --pcr-lock sha256:16 key.tmp policy.key

copy those exactly, bestie. key.tmp is literally what the page says. πŸ™ˆ

πŸ’€ REPORTING BUGS πŸ’€

  • Report bugs to <openssl-tpm2-engine@groups.io>
  • Report bugs to <openssl-tpm2-engine@groups.io>

yes, it appears twice in the original, so it appears twice here. no cap. πŸ’€

🌈 SEE ALSO 🌈

go see create_tpm2_key(1). πŸ‘‘


mwah πŸ’– okay that's the page. the footer's source/version bit is Usage: ./signed_tpm2_policy <c... and the date is August 2024. stay signed, stay policy-ing, and remember: the ... is literally there. πŸŽ€βœ¨