Section: General Commands Manual (1)
Updated: SEPTEMBER 2017
Page Index


tpm2_quote(1) - Provide a quote and signature from the TPM.  


tpm2_quote [OPTIONS]  


tpm2_quote(1) Provide quote and signature for given list of PCRs in given algorithm/banks.  


-k, -ak-handle=AK_HANDLE:

Handle of existing AK.

-c, -ak-context=AK_CONTEXT_FILE:

Filename for the existing AK's context.

-P, -ak-password=AK_PASSWORD:

specifies the password of AK_HANDLE. Passwords should follow the password formatting standards, see section "Password Formatting".

-l, -id-list=PCR_ID_LIST

The comma separated list of selected PCRs' ids, 0~23 e.g. "4,5,6".


The list of pcr banks and selected PCRs' ids for each bank. PCR_SELECTION_LIST values should follow the pcr bank specifiers standards, see section "PCR Bank Specfiers".

-m, -message:

message output file, records the quote message that makes up the data that is signed by the TPM.

-s, -signature:

signature output file, records the signature in the format specified via the -f option.

-f, -format

Format selection for the signature output file. See section "Signature Format Specifiers".

-q, -qualify-data:

Data given as a Hex string to qualify the quote, optional. This is typically used to add a nonce against replay attacks.

-S, -input-session-handle=SESSION_HANDLE: Optional Input session handle from a policy session for authorization.
-G, -sig-hash-algorithm:

Hash algorithm for signature.



This collection of options are common to many programs and provide information that many users may expect.

-h, -help: Display the tools manpage. This requires the manpages to be installed or on MANPATH, See man(1) for more details.
-v, -version: Display version information for this tool, supported tctis and exit.
-V, -verbose: Increase the information that the tool prints to the console during its execution. When using this option the file and line number are printed.
-Q, -quiet: Silence normal tool output to stdout.
-Z, -enable-errata: Enable the application of errata fixups. Useful if an errata fixup needs to be applied to commands sent to the TPM. # TCTI ENVIRONMENT

This collection of environment variables that may be used to configure the various TCTI modules available.

The values passed through these variables can be overridden on a per-command basis using the available command line options, see the TCTI_OPTIONS section.

The variables respected depend on how the software was configured.

TPM2TOOLS_TCTI_NAME: Select the TCTI used for communication with the next component down the TSS stack. In most configurations this will be the TPM but it could be a simulator or proxy. The current known TCTIs are:
tabrmd - The new resource manager, called tabrmd (
socket - Typically used with the old resource manager, or talking directly to a simulator.
device - Used when talking directly to a TPM device file.
TPM2TOOLS_DEVICE_FILE: When using the device TCTI, specify the TPM device file. The default is "/dev/tpm0".

Note: Using the tpm directly requires the users to ensure that concurrent access does not occur and that they manage the tpm resources. These tasks are usually managed by a resource manager. Linux 4.12 and greater supports an in kernel resource manager at "/dev/tpmrm", typically "/dev/tpmrm0".

TPM2TOOLS_SOCKET_ADDRESS: When using the socket TCTI, specify the domain name or IP address used. The default is
TPM2TOOLS_SOCKET_PORT: When using the socket TCTI, specify the port number used. The default is 2321.


This collection of options are used to configure the varous TCTI modules available. They override any environment variables.

-T, -tcti=TCTI_NAME[:TCTI_OPTIONS]: Select the TCTI used for communication with the next component down the TSS stack. In most configurations this will be the resource manager: tabrmd ( Optionally, tcti specific options can appended to TCTI_NAME by appending a : to TCTI_NAME.
For the device TCTI, the TPM device file for use by the device TCTI can be specified. The default is /dev/tpm0. Example: -T device:/dev/tpm0
For the socket TCTI, the domain name or IP address and port number used by the socket can be specified. The default are and 2321. Example: -T socket:
For the abrmd TCTI, it takes no options. Example: -T abrmd

Password Formatting

Passwords are interpreted in two forms, string and hex-string. A string password is not interpreted, and is directly used for authorization. A hex-string, is converted from a hexidecimal form into a byte array form, thus allowing passwords with non-printable and/or terminal un-friendly characters.

By default passwords are assumed to be in the string form. Password form is specified with special prefix values, they are:

str: - Used to indicate it is a raw string. Useful for escaping a password that starts with the "hex:" prefix.
hex: - Used when specifying a password in hex string format.

PCR Bank Specfiers

PCR Bank Selection lists follow the below specification:


multiple banks may be separated by `+'.

For example:


will select PCRs 3 and 4 from the SHA bank and PCRs 5 and 6 from the SHA256 bank.  


PCR Selections allow for up to 5 hash to pcr selection mappings. This is a limitaion in design in the single call to the tpm to get the pcr values.  

Signature Format Specifiers

Format selection for the signature output file. tss (the default) will output a binary blob according to the TPM 2.0 specification and any potential compiler padding. The option plain will output the plain signature data as defined by the used cryptographic algorithm. # EXAMPLES

tpm2_quote -k 0x81010002 -P abc123 -g sha1 -l 16,17,18
tpm2_quote -c ak.context -P "str:abc123" -g sha1 -l 16,17,18
tpm2_quote -k 0x81010002 -g sha1 -l 16,17,18
tpm2_quote -c ak.context -g sha1 -l 16,17,18
tpm2_quote -k 0x81010002 -P "hex:123abc" -L sha1:16,17,18+sha256:16,17,18 -q 11aa22bb



0 on success or 1 on failure.  


Github Issues (  


See the Mailing List (



Password Formatting
PCR Bank Specfiers
Signature Format Specifiers