CREATEPRIMARY(1)

πŸ“¦
version 1045 Β· 3 versions
, in debian bookworm, ubuntu jammy, ubuntu noble, ubuntu questing

πŸ‘‘ NAME

okay so the page is called CREATEPRIMARY(1), it lives in the User Commands manual (section 1, bestie πŸ’…), and the whole thing is about a little program named createprimary.

createprimary β€” Runs TPM2_CreatePrimary 🫢


πŸ’– DESCRIPTION

bestie. sit down. first line of the description and I need you to see it with your own eyes:

--version-string=v1045 is not a valid option

that's it. that's the sentence. it's giving "we're just gonna say that up front". πŸ™ˆ

anyway, the actual vibe: createprimary creates a primary storage key ✨ and, as established, it Runs TPM2_CreatePrimary.

here's the whole flag situation, exactly as the page spells it out:

  • -hi hierarchy (e, o, p, n) β€” default null
  • -pwdp password for hierarchy β€” default empty
  • -pwdpi password file name for hierarchy β€” default empty
  • -pwdk password for key β€” default empty
  • -iu inPublic unique field file β€” default none
  • -opu public key file name β€” default do not save
  • oipem public key PEM format file name β€” default do not save
  • -tk output ticket file name
  • -ch output creation hash file name

πŸ”‘ Asymmetric Key Algorithm

  • -rsa β€” this one is the default ✨
  • -ecc curve

and the curves you can hand it:

  • bnp256
  • nistp256
  • nistp384

🌸 Key attributes

  • -bl data blob for unseal (create only)
  • -if data file name
  • -den β€” decryption, RSA, not storage, NULL scheme
  • -deo β€” decryption, RSA, not storage, OAEP scheme
  • -des β€” encryption/decryption, AES symmetric
  • -116 β€” for TPM rev 116 compatibility

πŸ’œ the storage / purpose girlies

  • -st β€” storage [default for primary keys]
  • -si β€” signing
  • -sir β€” restricted signing
  • -dau β€” create unrestricted ECDAA key pair
  • -dar β€” create restricted ECDAA key pair
  • -kh β€” keyed hash (hmac)
  • -dp β€” derivation parent
  • -gp β€” general purpose, not storage

πŸŽ€ attributes, the sequel

  • -kt β€” and yes, it (can be specified more than once) πŸ‘€
    • f β€” fixedTPM (default for primary keys and derivation parents)
    • p β€” fixedParent (default for primary keys and derivation parents)
    • nf β€” no fixedTPM (default for non-primary keys)
    • np β€” no fixedParent (default for non-primary keys)
  • -da β€” object subject to DA protection) (default no) ⟡ yes the stray ) is in the original, I don't make the rules πŸ’€
  • -pol policy file β€” default empty
  • -uwa β€” userWithAuth attribute clear (default set)
  • -nalg name hash algorithm (sha1, sha256, sha384) β€” default sha256
  • -halg scheme hash algorithm (sha1, sha256, sha384) β€” default sha256

πŸ¦‹ sessions

  • -se[0-2] β€” session handle / attributes (default PWAP)
    • 01 β€” continue
    • 20 β€” command decrypt
    • 40 β€” response encrypt

and then. AND THEN. bestie, another one:

--version is not a valid option

like. okay. noted. πŸ’€

and then it just... says the whole thing again:

createprimary creates a primary storage key

Runs TPM2_CreatePrimary

  • -hi hierarchy (e, o, p, n) β€” default null
  • -pwdp password for hierarchy β€” default empty
  • -pwdpi password file name for hierarchy β€” default empty
  • -pwdk password for key β€” default empty
  • -iu inPublic unique field file β€” default none
  • -opu public key file name β€” default do not save
  • oipem public key PEM format file name β€” default do not save
  • -tk output ticket file name
  • -ch output creation hash file name

Asymmetric Key Algorithm:

  • -rsa β€” default ✨
  • -ecc curve

curves:

  • bnp256
  • nistp256
  • nistp384

Key attributes:

  • -bl data blob for unseal (create only)
  • -if data file name
  • -den β€” decryption, RSA, not storage, NULL scheme
  • -deo β€” decryption, RSA, not storage, OAEP scheme
  • -des β€” encryption/decryption, AES symmetric
  • -116 β€” for TPM rev 116 compatibility
  • -st β€” storage [default for primary keys]
  • -si β€” signing
  • -sir β€” restricted signing
  • -dau β€” create unrestricted ECDAA key pair
  • -dar β€” create restricted ECDAA key pair
  • -kh β€” keyed hash (hmac)
  • -dp β€” derivation parent
  • -gp β€” general purpose, not storage
  • -kt β€” (can be specified more than once)
    • f β€” fixedTPM (default for primary keys and derivation parents)
    • p β€” fixedParent (default for primary keys and derivation parents)
    • nf β€” no fixedTPM (default for non-primary keys)
    • np β€” no fixedParent (default for non-primary keys)
  • -da β€” object subject to DA protection) (default no)
  • -pol policy file β€” default empty
  • -uwa β€” userWithAuth attribute clear (default set)
  • -nalg name hash algorithm (sha1, sha256, sha384) β€” default sha256
  • -halg scheme hash algorithm (sha1, sha256, sha384) β€” default sha256
  • -se[0-2] β€” session handle / attributes (default PWAP)
    • 01 β€” continue
    • 20 β€” command decrypt
    • 40 β€” response encrypt

periodt. that's the description, twice, because the page said so and I respect the page. πŸ’…


🌈 SEE ALSO

the full documentation for createprimary is maintained as a Texinfo manual. and if the info and createprimary programs are properly installed at your site, then this:

info createprimary

should give you access to the complete manual. no cap, that's the whole see-also. 🫢


sign-off time, bestie: this page's footer reads createprimary, dated July 2017, and the title down there is CREATEPRIMARY(1) β€” so that's createprimary, July 2017, CREATEPRIMARY(1). iconic. slay. bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from