tpm2_activatecredential(1) General Commands Manual tpm2_activatecredential(1) (NAME) tpm2_activatecredential(1) - (SYNOPSIS) tpm2_activatecredential [] (DESCRIPTION) tpm2_activatecredential(1) - TPM . (attestation scheme) TPM TPM . (OPTIONS) o -c, --credentialedkey-context=OBJECT: (CA). o -C, --credentialkey-context=OBJECT: (random seed) . o -p, --credentialedkey-auth=AUTH: -c. o -P, --credentialkey-auth=AUTH: -C. o -i, --credential-blob=FILE: (credential blob) tpm2_makecredential(1). o -o, --certinfo-data=FILE: . o --cphash=FILE . cpHash . : cpHash rphash . o --rphash=FILE . rpHash . o -S, --session=FILE: tpm2_startauthsession. / . (References) (Context Object Format) (handle) : o (transient) TPM . o : o owner: (owner hierarchy) o platform: (platform hierarchy) o endorsement: / (endorsement hierarchy) o lockout: (lockout control persistent object) o ( 0x81010013) . (Authorization Formatting) TPM2.0 : 1. (Password) 2. HMAC 3. (Sessions) : " (EMPTY PASSWORD) ". (auth values) HMAC . . . HMAC ( tpm2_startauthsession(1) ). (Passwords) . : . (String) "str:" ( ) . (Examples) foobar str:foobar (Hex-string) "hex:" . (Example) hex:1122334455667788 (File) "file:" "-" (stdin) . . (Examples) # file:- # file:path/to/password/file # stdin echo: echo foobar | tpm2_tool -p file:- # here-string stdin: tpm2_tool -p file:- <<< foobar (Sessions) session . tpm2_startauthsession(1) . ( ) + (Passwords) . (Examples) session.ctx: session:session.ctx session.ctx mypassword: session:session.ctx+mypassword session.ctx 0x11223344: session:session.ctx+hex:11223344 PCR (PCR Authorizations) "pcr:" (minilanguage) PCR PCR . PCR : = PCR " PCR" . raw-pcr-file PCR tpm2_pcrread(1) . PCR (Examples) PCR sha256 : pcr:sha256:0,1,2,3 AUTH. (COMMON OPTIONS) . o -h, --help=[man|no-man]: . (manpager) . "man" "man" man (stderr) . "no-man" man (stdout) . manpages MANPATH man(1) . o -v, --version: TCTI . o -V, --verbose: . . o -Q, --quiet: (stdout). o -Z, --enable-errata: (errata fixups). errata TPM . TPM2TOOLS_ENABLE_ERRATA . o -z, --pwd-session: HMAC . (clear text) TPM . (unsalted) OpenSSL FIPS . (auth values) (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 (off-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 TCTI . /dev/tpm0 . : -T device:/dev/tpm0 export TPM2TOOLS_TCTI="device:/dev/tpm0" o mssim: TCTI mssim IP (port) . 127.0.0.1 2321 . : -T mssim:host=localhost,port=2321 export TPM2TOOLS_TCTI="mssim:host=localhost,port=2321" o abrmd: TCTI abrmd - `,' . `=' . o TCTI abrmd : 1. `bus_name' : tabrmd ( ). 2. `bus_type' : dbus ( ) `session' `system' . tcti tabrmd bus_name=com.example.FooBar: \--tcti=tabrmd:bus_name=com.example.FooBar tcti (abrmd) bus_type=session: \--tcti:bus_type=session : abrmd tabrmd . (EXAMPLES) echo "12345678" > secret.data tpm2_createek -Q -c 0x81010001 -G rsa -u ek.pub tpm2_createak -C 0x81010001 -c ak.ctx -G rsa -g sha256 -s rsassa -u ak.pub \ -n ak.name -p akpass> ak.out file_size=`stat --printf="%s" ak.name` loaded_key_name=`cat ak.name | xxd -p -c $file_size` tpm2_makecredential -Q -e ek.pub -s secret.data -n $loaded_key_name \ -o mkcred.out tpm2_startauthsession --policy-session -S session.ctx tpm2_policysecret -S session.ctx -c e tpm2_activatecredential -Q -c ak.ctx -C 0x81010001 -i mkcred.out \ -o actcred.out -p akpass -P"session:session.ctx" tpm2_flushcontext session.ctx (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_activatecredential(1)