.\" Automatically generated by Pandoc 2.0.6 .\" .TH "tpm2_getpubak" "1" "SEPTEMBER 2017" "tpm2\-tools" "General Commands Manual" .hy .SH NAME .PP \f[B]tpm2_getpubak\f[](1) \- Generate attestation key with given algorithm under the endorsement hierarchy. .SH SYNOPSIS .PP \f[B]tpm2_getpubak\f[] [\f[I]OPTIONS\f[]] .SH DESCRIPTION .PP \f[B]tpm2_getpubak\f[](1) \- Generate attestation key with given algorithm under endorsement hierarchy, make it persistent with given ak handle, and return pub AK and AK name. If any passwd option is missing, assume NULL. .PP The tool outputs to stdout a YAML representation of the loaded key handle as well as it's name, for example: .IP .nf \f[C] loaded\-key: \ \ handle:\ 800000ff \ \ name:\ 000bac149518baa05540a0678bd9b624f8a98d042e46c60f4d098ba394d36fc49268 \f[] .fi .SH OPTIONS .IP \[bu] 2 \f[B]\-e\f[], \f[B]\[en]endorse\-passwd\f[]=\f[I]ENDORSE_PASSWORD\f[]: Specifies current endorsement password, defaults to NULL. Passwords should follow the \[lq]password formatting standards, see section\[rq]Password Formatting“. .IP \[bu] 2 \f[B]\-P\f[], \f[B]\[en]ak\-passwd\f[]=\f[I]AK_PASSWORD\f[] Specifies the AK password when created, defaults to NULL. Same formatting as the endorse password value or \-e option. .IP \[bu] 2 \f[B]\-o\f[], \f[B]\[en]owner\-passwd\f[]=\f[I]OWNER_PASSWORD\f[] Specifies the current owner password, defaults to NULL. Same formatting as the endorse password value or \-e option. .IP \[bu] 2 \f[B]\-E\f[], \f[B]\[en]ek\-handle\f[]=\f[I]EK_HANDLE\f[]: Specifies the handle used to make EK persistent. .IP \[bu] 2 \f[B]\-k\f[], \f[B]\[en]ak\-handle\f[]=\f[I]AK_HANDLE\f[]: Specifies the handle used to make AK persistent. .IP \[bu] 2 \f[B]\-g\f[], \f[B]\[en]alg\f[]=\f[I]ALGORITHM\f[]: Specifies the algorithm type of AK. Algorithms should follow the " formatting standards, see section \[lq]Algorithm Specifiers\[rq]. See section \[lq]Supported Public Object Algorithms\[rq] for a list of supported object algorithms. .IP \[bu] 2 \f[B]\-g\f[], \f[B]\[en]alg\f[]=\f[I]ALGORITHM\f[]: Like \-g, but specifies the algorithm of sign. See section \[lq]Supported Signing Algorithms\[rq] for details. .IP \[bu] 2 \f[B]\-f\f[], \f[B]\[en]file\f[]=\f[I]FILE\f[]: Specifies the file used to save the public portion of AK. This will be a binary data structure corresponding to the TPM2B_PUBLIC struct in the specification. .IP \[bu] 2 \f[B]\-n\f[], \f[B]\[en]ak\-name\f[]=\f[I]NAME\f[]: Specifies the file used to save the ak name, optional. .SH COMMON OPTIONS .PP This collection of options are common to many programs and provide information that many users may expect. .IP \[bu] 2 \f[B]\-h\f[], \f[B]\[en]help\f[]: Display the tools manpage. This requires the manpages to be installed or on \f[I]MANPATH\f[], See man(1) for more details. .IP \[bu] 2 \f[B]\-v\f[], \f[B]\[en]version\f[]: Display version information for this tool, supported tctis and exit. .IP \[bu] 2 \f[B]\-V\f[], \f[B]\[en]verbose\f[]: Increase the information that the tool prints to the console during its execution. When using this option the file and line number are printed. .IP \[bu] 2 \f[B]\-Q\f[], \f[B]\[en]quiet\f[]: Silence normal tool output to stdout. .IP \[bu] 2 \f[B]\-Z\f[], \f[B]\[en]enable\-errata\f[]: Enable the application of errata fixups. Useful if an errata fixup needs to be applied to commands sent to the TPM. # TCTI ENVIRONMENT .PP This collection of environment variables that may be used to configure the various TCTI modules available. .PP The values passed through these variables can be overridden on a per\-command basis using the available command line options, see the \f[I]TCTI_OPTIONS\f[] section. .PP The variables respected depend on how the software was configured. .IP \[bu] 2 \f[I]TPM2TOOLS_TCTI_NAME\f[]: 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: .RS 2 .IP \[bu] 2 tabrmd \- The new resource manager, called tabrmd (https://github.com/01org/tpm2-abrmd). .IP \[bu] 2 socket \- Typically used with the old resource manager, or talking directly to a simulator. .IP \[bu] 2 device \- Used when talking directly to a TPM device file. .RE .IP \[bu] 2 \f[I]TPM2TOOLS_DEVICE_FILE\f[]: When using the device TCTI, specify the TPM device file. The default is \[lq]/dev/tpm0\[rq]. .RS 2 .PP 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 \[lq]/dev/tpmrm\f[B]\f[]\[rq], typically \[lq]/dev/tpmrm0\[rq]. .RE .IP \[bu] 2 \f[I]TPM2TOOLS_SOCKET_ADDRESS\f[]: When using the socket TCTI, specify the domain name or IP address used. The default is 127.0.0.1. .IP \[bu] 2 \f[I]TPM2TOOLS_SOCKET_PORT\f[]: When using the socket TCTI, specify the port number used. The default is 2321. .SH TCTI OPTIONS .PP This collection of options are used to configure the varous TCTI modules available. They override any environment variables. .IP \[bu] 2 \f[B]\-T\f[], \f[B]\[en]tcti\f[]=\f[I]TCTI_NAME\f[]\f[B][\f[]:\f[I]TCTI_OPTIONS\f[]\f[B]]\f[]: Select the TCTI used for communication with the next component down the TSS stack. In most configurations this will be the resource manager: tabrmd (https://github.com/01org/tpm2-abrmd) Optionally, tcti specific options can appended to \f[I]TCTI_NAME\f[] by appending a \f[B]:\f[] to \f[I]TCTI_NAME\f[]. .RS 2 .IP \[bu] 2 For the device TCTI, the TPM device file for use by the device TCTI can be specified. The default is /dev/tpm0. Example: \f[B]\-T device:/dev/tpm0\f[] .IP \[bu] 2 For the socket TCTI, the domain name or IP address and port number used by the socket can be specified. The default are 127.0.0.1 and 2321. Example: \f[B]\-T socket:127.0.0.1:2321\f[] .IP \[bu] 2 For the abrmd TCTI, it takes no options. Example: \f[B]\-T abrmd\f[] .RE .SH Password Formatting .PP 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. .PP By default passwords are assumed to be in the string form. Password form is specified with special prefix values, they are: .IP \[bu] 2 str: \- Used to indicate it is a raw string. Useful for escaping a password that starts with the \[lq]hex:\[rq] prefix. .IP \[bu] 2 hex: \- Used when specifying a password in hex string format. .SH Supported Signing Algorithms .PP Supported algorithms are: .IP \[bu] 2 \f[B]0x5\f[] or \f[B]hmac\f[] for \f[B]TPM_ALG_HMAC\f[] \f[B](default)\f[] .IP \[bu] 2 \f[B]0x14\f[] or \f[B]rsassa\f[] for \f[B]TPM_ALG_RSASSA\f[] .IP \[bu] 2 \f[B]0x16\f[] or \f[B]rsapss\f[] for \f[B]TPM_ALG_RSAPSS\f[] .IP \[bu] 2 \f[B]0x18\f[] or \f[B]ecdsa\f[] for \f[B]TPM_ALG_ECDSA\f[] .IP \[bu] 2 \f[B]0x1A\f[] or \f[B]ecdaa\f[] for \f[B]TPM_ALG_ECDAA\f[] .IP \[bu] 2 \f[B]0x1B\f[] or \f[B]sm2\f[] for \f[B]TPM_ALG_SM2\f[] .IP \[bu] 2 \f[B]0x1C\f[] or \f[B]ecschnorr\f[] for \f[B]TPM_ALG_ECSCHNORR\f[] .PP \f[B]NOTE\f[]: Your TPM may not support all algorithms. .SH Supported Public Object Algorithms .PP Supported public object algorithms are: .IP \[bu] 2 \f[B]0x1\f[] or \f[B]rsa\f[] for \f[B]TPM_ALG_RSA\f[] (\f[B]default\f[]). .IP \[bu] 2 \f[B]0x8\f[] or \f[B]keyedhash\f[] for \f[B]TPM_ALG_KEYEDHASH\f[]. .IP \[bu] 2 \f[B]0x23\f[] or \f[B]ecc\f[] for \f[B]TPM_ALG_ECC\f[]. .IP \[bu] 2 \f[B]0x25\f[] or \f[B]symcipher\f[] for \f[B]TPM_ALG_SYMCIPHER\f[]. .PP \f[B]NOTE\f[]: Your TPM may not support all algorithms. .SH Algorithm Specfiers .PP Options that take algorithms support \[lq]nice\-names\[rq]. Nice names, like sha1 can be used in place of the raw hex for sha1: 0x4. The nice names are converted by stripping the leading \f[B]TPM_ALG_\f[] from the Algorithm Name field and converting it to lower case. For instance \f[B]TPM_ALG_SHA3_256\f[] becomes \f[B]sha3_256\f[]. .PP The algorithms can be found at: .SH EXAMPLES .IP .nf \f[C] tpm2_getpubak\ \-e\ abc123\ \-P\ abc123\ \-o\ passwd\ \-E\ 0x81010001\ \-k\ 0x81010002\ \-f\ ./ak.pub\ \-n\ ./ak.name tpm2_getpubak\ \-e\ 1a1b1c\ \-P\ 123abc\ \-o\ 1a1b1c\ \-X\ \-E\ 0x81010001\ \-k\ 0x81010002\ \-f\ ./ak.pub\ \-n\ ./ak.name \f[] .fi .SH RETURNS .PP 0 on success or 1 on failure. .SH BUGS .PP Github Issues (https://github.com/01org/tpm2-tools/issues) .SH HELP .PP See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)