tpm2_createak(1) General Commands Manual tpm2_createak(1) (NAME) tpm2_createak - (attestation key) (endorsement hierarchy). (SYNOPSIS) tpm2_createak [] (DESCRIPTION) tpm2_createak(1) - (AK) (endorsement hierarchy) . (context) -c . YAML (stdout) : loaded-key: name: 000bac149518baa05540a0678bd9b624f8a98d042e46c60f4d098ba394d36fc49268 (OPTIONS) o -P, --eh-auth=AUTH: (endorsement hierarchy). o -p, --ak-auth=AUTH . o -C, --ek-context=OBJECT: (EK). o -c, --ak-context=FILE: (object context) . o -G, --key-algorithm=ALGORITHM: . : o ecc - NIST_P256. ( ecc384 ecc_nist_p384). o rsa - RSA2048. o keyedhash - hmac. o -a, --attributes=ATTRIBUTES: . : "restricted|userwithauth|sign|fixedtpm|fixedparent|sensitivedataorigin" TPM 2.0 Keys for Device Identity and Attestation . "adminwithpolicy" : "restricted|userwithauth|...|adminwithpolicy" o -g, --hash-algorithm=ALGORITHM: (digest) . o -s, --signing-algorithm=ALGORITHM: . o -u, --public=FILE: (public) . o -n, --ak-name=FILE: . o -r, --private=FILE: . (Protection Details) TPM ( ). (transient) TPM ( ) TPM . tpm2_create(1) -r . (blob) . HMAC . : o https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-1-Architecture-01.38.pdf (duplication blobs) . tpm2_duplicate(1) . o -f, --format: . "tss" () (binary blob) TPM 2.0 . "pem" PEM OpenSSL . "der" DER OpenSSL . "tpmt" TPMT_PUBLIC TPM 2.0 . . o -q, --ak-qualified-name=FILE: (qualified name) . ( EK) . (bind) . (References) (Context Object Format) (context object) (handle) : o (transient) TPM . o : o owner: (owner hierarchy) o platform: (platform hierarchy) o endorsement: (endorsement hierarchy) o lockout: (lockout control persistent object) o (handle) 0x81010013 . (Authorization Formatting) TPM 2.0 : 1. (Password) 2. HMAC 3. (Sessions) : " (EMPTY PASSWORD) ". auth HMAC . . . HMAC ( tpm2_startauthsession(1)). (Passwords) . : . (String) "str:" ( ) . (Examples) foobar str:foobar (Hex-string) "hex:" . (Example) hex:1122334455667788 (File) "file:" "-" (stdin). . (Examples) # stdin file:- # file:path/to/password/file # stdin echo: echo foobar | tpm2_tool -p file:- # here-string stdin: tpm2_tool -p file:- <<< foobar (Sessions) (policy session) session . tpm2_startauthsession(1) . auth ( ) + (Passwords) . (Examples) session.ctx: session:session.ctx session.ctx auth mypassword: session:session.ctx+mypassword session.ctx auth 0x11223344: session:session.ctx+hex:11223344 PCR (PCR Authorizations) PCR "pcr:" PCR . PCR : = PCR " PCR (PCR bank specifiers)" . raw-pcr-file PCR tpm2_pcrread(1) . PCR (Examples) PCR sha256 : pcr:sha256:0,1,2,3 AUTH. (Algorithm Specifiers) " (nice-names)" . : . TPM . (Simple specifiers) . . " " . (Asymmetric) o rsa o ecc (Symmetric) o aes o camellia o sm4 (Hashing Algorithms) o sha1 o sha256 o sha384 o sha512 o sm3_256 o sha3_256 o sha3_384 o sha3_512 (Keyed Hash) o hmac o xor (Signing Schemes) o rsassa o rsapss o ecdsa o ecdaa o ecschnorr o sm2 (Asymmetric Encryption Schemes) o oaep o rsaes o ecdh (Modes) o ctr o ofb o cbc o cfb o ecb (Misc) o null (Complex Specifiers) TPM . : :: (Type Specifiers) . . o aes - AES: aes128. o aes128 - AES (ctr|ofb|cbc|cfb|ecb). null . o aes192 - aes128 . o aes256 - aes128 . o sm4 - SM4: sm4128. o sm4128 sm4_128 - SM4 (ctr|ofb|cbc|cfb|ecb). null . o ecc - ecc256. o ecc192 ecc_nist_p192 - NIST ECC. o ecc224 ecc_nist_p224 - NIST ECC. o ecc256 ecc_nist_p256 - NIST ECC. o ecc384 ecc_nist_p384 - NIST ECC. o ecc521 ecc_nist_p521 - NIST ECC. o ecc_sm2 ecc_sm2_p256 - SM2. o rsa - RSA: rsa2048. o rsa1024 - RSA . o rsa2048 - RSA . o rsa3072 - RSA . o rsa4096 - RSA . (Scheme Specifiers) . (Signing Schemes) (Asymmetric Encryption Schemes) . . sha256 . . (Hash Optional Scheme Specifiers) : oaep-sha256. o oaep o ecdh o rsassa o rsapss o ecdsa o ecschnorr o sm2 (Multiple Option Scheme Specifiers) ( UINT16) (-) . * ecdaa ecdaa4-sha256. . (No Option Scheme Specifiers) . * rsaes (Symmetric Details Specifiers) (type) . . aes128cfb . (Examples) rsa2048 rsaes (Create an rsa2048 key with an rsaes asymmetric encryption scheme) tpm2_create -C parent.ctx -G rsa2048:rsaes -u key.pub -r key.priv ecc256 ecdaa sha384 (Create an ecc256 key with an ecdaa signing scheme with a count of 4 and sha384 hash) tpm2_create -C parent.ctx -G ecc256:ecdaa4-sha384 -u key.pub -r key.priv ALGORITHM. (Signature Format Specifiers) . tss () (binary blob) TPM 2.0 (compiler padding) . plain . FORMAT. (COMMON OPTIONS) . o -h --help=[man|no-man]: (manpage) . man (manpager) . "man" "man" man stderr . "no-man" man stdout . MANPATH man(1) . o -v --version: TCTI . o -V --verbose: . . o -Q --quiet: stdout. o -Z --enable-errata: (errata fixups). TPM . TPM2TOOLS_ENABLE_ERRATA . o -z --pwd-session: HMAC . (clear text) TPM . (unsalted) OpenSSL FIPS . auth (salted) . o -R --autoflush: (autoflush) . . TPM2TOOLS_AUTOFLUSH yes true . . TCTI (TCTI Configuration) TCTI " (Transmission Interface)" TPM . TCTI TPM . TCTI : 1. -T --tcti 2. : TPM2TOOLS_TCTI. : . TCTI : o tabrmd - tabrmd . tabrmd abrmd tcti . o mssim - TPM . o device - TPM . o none - TPM . TPM TCTI . TCTI . "none" . : : . TCTI (TCTI Defaults) TCTI TCTI dlopen(3) . TCTI tabrmd device mssim . -v TCTI . - "default-tcti" TCTI . TCTI (Custom TCTIs) TCTI TCTI . dlopen(3) tcti-name . dlopen(3) . TCTI (TCTI OPTIONS) TCTI : o device: TCTI device TPM . /dev/tpm0 . : -T device:/dev/tpm0 export TPM2TOOLS_TCTI="device:/dev/tpm0" o mssim: TCTI mssim IP . 127.0.0.1 2321 . : -T mssim:host=localhost,port=2321 export TPM2TOOLS_TCTI="mssim:host=localhost,port=2321" o abrmd: TCTI abrmd - <<,>> . <<=>> . o abrmd TCTI : 1. <> : tabrmd ( ). 2. <> : dbus ( ) <> <>. tabrmd tcti bus_name=com.example.FooBar: \--tcti=tabrmd:bus_name=com.example.FooBar tcti (abrmd) bus_type=session: \--tcti:bus_type=session : abrmd tabrmd . TCTI . (EXAMPLES) (Create an Attestation Key and make it persistent) tpm2_createek -c ek.handle -G rsa -u ek.pub tpm2_createak -C ek.handle -c ak.ctx -u ak.pub -n ak.name tpm2_evictcontrol -C o -c ak.ctx 0x81010002 (RETURNS) : o 0 - . o 1 - . o 2 - . o 3 - . o 4 - TCTI. o 5 - . tpm2_testparams. (BUGS) (Github Issues) (HELP) (Mailing List) (LICENSE) . (CC BY 4.0) . tpm2-tools tpm2_createak(1)