tpm2_hmac(1) General Commands Manual tpm2_hmac(1) (NAME) tpm2_hmac - (HMAC) TPM2 (SYNOPSIS) tpm2_hmac [OPTIONS] [ARGUMENT] (DESCRIPTION) tpm2_hmac(1) HMAC TPM . (stdin) . (scheme) NULL sha256 . (STDOUT) -o -hex . (OPTIONS) o -c, --key-context=OBJECT: (context object) HMAC . (handle number) . << (Context Object Format)>> . o -p, --auth=AUTH: -c. o -g, --hash-algorithm=ALGORITHM: () . << >> << (Algorithm Specifiers)>> . << (Supported Hash Algorithms)>> . o --hex hmac "0x". o -o, --output=FILE: HMAC. STDOUT ( ) . o -t, --ticket=FILE: (ticket). o --cphash=FILE (command parameters). cpHash . : cpHash . o ARGUMENT: HMAC . STDIN ( ) . (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 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 bash 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 (HEX) 0x11223344: session:session.ctx+hex:11223344 PCR (PCR Authorizations) PCR "pcr:" PCR . PCR : = PCR << PCR>> . raw-pcr-file PCR tpm2_pcrread(1) . PCR (Examples) PCR sha256 : pcr:sha256:0,1,2,3 AUTH. (Authorization Formatting) TPM2.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 bash 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 (HEX) 0x11223344: session:session.ctx+hex:11223344 PCR (PCR Authorizations) PCR "pcr:" PCR . PCR : = PCR << PCR>> . raw-pcr-file PCR tpm2_pcrread(1) . PCR (Examples) PCR sha256 : pcr:sha256:0,1,2,3 ALGORITHM. (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 (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 abrmd TCTI : 1. `bus_name' : tabrmd ( ). 2. `bus_type' : dbus ( ) `session' `system' . 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 . (EXAMPLES) (Setup) # (primary object) tpm2_createprimary -c primary.ctx # hmac tpm2_create -C primary.ctx -G hmac -c hmac.key HMAC HMAC ( ) stdout : tpm2_hmac -c hmac.key --hex data.in e6eda48a53a9ddbb92f788f6d98e0372d63a408afb11aca43f522a2475a32805 (RETURNS) : o 0 - . o 1 - . o 2 - . o 3 - . o 4 - TCTI. o 5 - (Non supported scheme). tpm2_testparams. (BUGS) (Github Issues) (HELP) (Mailing List) (LICENSE) . (CC BY 4.0) . tpm2-tools tpm2_hmac(1)