Blame doc/invoke-tpmtool.texi

Packit aea12f
@node tpmtool Invocation
Packit aea12f
@subsection Invoking tpmtool
Packit aea12f
@pindex tpmtool
Packit aea12f
@ignore
Packit aea12f
#  -*- buffer-read-only: t -*- vi: set ro:
Packit aea12f
#
Packit aea12f
# DO NOT EDIT THIS FILE   (invoke-tpmtool.texi)
Packit aea12f
#
Packit aea12f
# It has been AutoGen-ed
Packit aea12f
# From the definitions    ../src/tpmtool-args.def
Packit aea12f
# and the template file   agtexi-cmd.tpl
Packit aea12f
@end ignore
Packit aea12f
Packit aea12f
Packit aea12f
Program that allows handling cryptographic data from the TPM chip.
Packit aea12f
Packit aea12f
This section was generated by @strong{AutoGen},
Packit aea12f
using the @code{agtexi-cmd} template and the option descriptions for the @code{tpmtool} program.
Packit aea12f
This software is released under the GNU General Public License, version 3 or later.
Packit aea12f
Packit aea12f
Packit aea12f
@anchor{tpmtool usage}
Packit aea12f
@subheading tpmtool help/usage (@option{--help})
Packit aea12f
@cindex tpmtool help
Packit aea12f
Packit aea12f
This is the automatically generated usage text for tpmtool.
Packit aea12f
Packit aea12f
The text printed is the same whether selected with the @code{help} option
Packit aea12f
(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
Packit aea12f
the usage text by passing it through a pager program.
Packit aea12f
@code{more-help} is disabled on platforms without a working
Packit aea12f
@code{fork(2)} function.  The @code{PAGER} environment variable is
Packit aea12f
used to select the program, defaulting to @file{more}.  Both will exit
Packit aea12f
with a status code of 0.
Packit aea12f
Packit aea12f
@exampleindent 0
Packit aea12f
@example
Packit Service 991b93
tpmtool - GnuTLS TPM tool
Packit Service 991b93
Usage:  tpmtool [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Packit Service 991b93
Packit Service 991b93
   -d, --debug=num            Enable debugging
Packit Service 991b93
                                - it must be in the range:
Packit Service 991b93
                                  0 to 9999
Packit Service 991b93
       --infile=file          Input file
Packit Service 991b93
                                - file must pre-exist
Packit Service 991b93
       --outfile=str          Output file
Packit Service 991b93
       --generate-rsa         Generate an RSA private-public key pair
Packit Service 991b93
       --register             Any generated key will be registered in the TPM
Packit Service 991b93
                                - requires the option 'generate-rsa'
Packit Service 991b93
       --signing              Any generated key will be a signing key
Packit Service 991b93
                                - requires the option 'generate-rsa'
Packit Service 991b93
                                -- and prohibits the option 'legacy'
Packit Service 991b93
       --legacy               Any generated key will be a legacy key
Packit Service 991b93
                                - requires the option 'generate-rsa'
Packit Service 991b93
                                -- and prohibits the option 'signing'
Packit Service 991b93
       --user                 Any registered key will be a user key
Packit Service 991b93
                                - requires the option 'register'
Packit Service 991b93
                                -- and prohibits the option 'system'
Packit Service 991b93
       --system               Any registered key will be a system key
Packit Service 991b93
                                - requires the option 'register'
Packit Service 991b93
                                -- and prohibits the option 'user'
Packit Service 991b93
       --pubkey=str           Prints the public key of the provided key
Packit Service 991b93
       --list                 Lists all stored keys in the TPM
Packit Service 991b93
       --delete=str           Delete the key identified by the given URL (UUID).
Packit Service 991b93
       --test-sign=str        Tests the signature operation of the provided object
Packit Service 991b93
       --sec-param=str        Specify the security level [low, legacy, medium, high, ultra].
Packit Service 991b93
       --bits=num             Specify the number of bits for key generate
Packit Service 991b93
       --inder                Use the DER format for keys.
Packit Service 991b93
                                - disabled as '--no-inder'
Packit Service 991b93
       --outder               Use DER format for output keys
Packit Service 991b93
                                - disabled as '--no-outder'
Packit Service 991b93
       --srk-well-known       SRK has well known password (20 bytes of zeros)
Packit Service 991b93
   -v, --version[=arg]        output version information and exit
Packit Service 991b93
   -h, --help                 display extended usage information and exit
Packit Service 991b93
   -!, --more-help            extended usage information passed thru pager
Packit Service 991b93
Packit Service 991b93
Options are specified by doubled hyphens and their name or by a single
Packit Service 991b93
hyphen and the flag character.
Packit Service 991b93
Packit Service 991b93
Program that allows handling cryptographic data from the TPM chip.
Packit Service 991b93
Packit aea12f
@end example
Packit aea12f
@exampleindent 4
Packit aea12f
Packit aea12f
@anchor{tpmtool debug}
Packit aea12f
@subheading debug option (-d)
Packit aea12f
Packit aea12f
This is the ``enable debugging'' option.
Packit aea12f
This option takes a number argument.
Packit aea12f
Specifies the debug level.
Packit aea12f
@anchor{tpmtool generate-rsa}
Packit aea12f
@subheading generate-rsa option
Packit aea12f
Packit aea12f
This is the ``generate an rsa private-public key pair'' option.
Packit aea12f
Generates an RSA private-public key pair in the TPM chip. 
Packit aea12f
The key may be stored in file system and protected by a PIN, or stored (registered)
Packit aea12f
in the TPM chip flash.
Packit aea12f
@anchor{tpmtool user}
Packit aea12f
@subheading user option
Packit aea12f
Packit aea12f
This is the ``any registered key will be a user key'' option.
Packit aea12f
Packit aea12f
@noindent
Packit aea12f
This option has some usage constraints.  It:
Packit aea12f
@itemize @bullet
Packit aea12f
@item
Packit aea12f
must appear in combination with the following options:
Packit aea12f
register.
Packit aea12f
@item
Packit aea12f
must not appear in combination with any of the following options:
Packit aea12f
system.
Packit aea12f
@end itemize
Packit aea12f
Packit aea12f
The generated key will be stored in a user specific persistent storage.
Packit aea12f
@anchor{tpmtool system}
Packit aea12f
@subheading system option
Packit aea12f
Packit aea12f
This is the ``any registered key will be a system key'' option.
Packit aea12f
Packit aea12f
@noindent
Packit aea12f
This option has some usage constraints.  It:
Packit aea12f
@itemize @bullet
Packit aea12f
@item
Packit aea12f
must appear in combination with the following options:
Packit aea12f
register.
Packit aea12f
@item
Packit aea12f
must not appear in combination with any of the following options:
Packit aea12f
user.
Packit aea12f
@end itemize
Packit aea12f
Packit aea12f
The generated key will be stored in system persistent storage.
Packit aea12f
@anchor{tpmtool test-sign}
Packit aea12f
@subheading test-sign option
Packit aea12f
Packit aea12f
This is the ``tests the signature operation of the provided object'' option.
Packit aea12f
This option takes a string argument @file{url}.
Packit aea12f
It can be used to test the correct operation of the signature operation.
Packit aea12f
This operation will sign and verify the signed data.
Packit aea12f
@anchor{tpmtool sec-param}
Packit aea12f
@subheading sec-param option
Packit aea12f
Packit aea12f
This is the ``specify the security level [low, legacy, medium, high, ultra].'' option.
Packit aea12f
This option takes a string argument @file{Security parameter}.
Packit aea12f
This is alternative to the bits option. Note however that the
Packit aea12f
values allowed by the TPM chip are quantized and given values may be rounded up.
Packit aea12f
@anchor{tpmtool inder}
Packit aea12f
@subheading inder option
Packit aea12f
Packit aea12f
This is the ``use the der format for keys.'' option.
Packit aea12f
Packit aea12f
@noindent
Packit aea12f
This option has some usage constraints.  It:
Packit aea12f
@itemize @bullet
Packit aea12f
@item
Packit aea12f
can be disabled with --no-inder.
Packit aea12f
@end itemize
Packit aea12f
Packit aea12f
The input files will be assumed to be in the portable
Packit aea12f
DER format of TPM. The default format is a custom format used by various
Packit aea12f
TPM tools
Packit aea12f
@anchor{tpmtool outder}
Packit aea12f
@subheading outder option
Packit aea12f
Packit aea12f
This is the ``use der format for output keys'' option.
Packit aea12f
Packit aea12f
@noindent
Packit aea12f
This option has some usage constraints.  It:
Packit aea12f
@itemize @bullet
Packit aea12f
@item
Packit aea12f
can be disabled with --no-outder.
Packit aea12f
@end itemize
Packit aea12f
Packit aea12f
The output will be in the TPM portable DER format.
Packit aea12f
@anchor{tpmtool srk-well-known}
Packit aea12f
@subheading srk-well-known option
Packit aea12f
Packit aea12f
This is the ``srk has well known password (20 bytes of zeros)'' option.
Packit aea12f
This option has no @samp{doc} documentation.
Packit aea12f
@anchor{tpmtool exit status}
Packit aea12f
@subheading tpmtool exit status
Packit aea12f
Packit aea12f
One of the following exit values will be returned:
Packit aea12f
@table @samp
Packit aea12f
@item 0 (EXIT_SUCCESS)
Packit aea12f
Successful program execution.
Packit aea12f
@item 1 (EXIT_FAILURE)
Packit aea12f
The operation failed or the command syntax was not valid.
Packit aea12f
@end table
Packit aea12f
@anchor{tpmtool See Also}
Packit aea12f
@subheading tpmtool See Also
Packit aea12f
    p11tool (1), certtool (1)
Packit aea12f
@anchor{tpmtool Examples}
Packit aea12f
@subheading tpmtool Examples
Packit aea12f
To generate a key that is to be stored in file system use:
Packit aea12f
@example
Packit aea12f
$ tpmtool --generate-rsa --bits 2048 --outfile tpmkey.pem
Packit aea12f
@end example
Packit aea12f
Packit aea12f
To generate a key that is to be stored in TPM's flash use:
Packit aea12f
@example
Packit aea12f
$ tpmtool --generate-rsa --bits 2048 --register --user
Packit aea12f
@end example
Packit aea12f
Packit aea12f
To get the public key of a TPM key use:
Packit aea12f
@example
Packit aea12f
$ tpmtool --pubkey tpmkey:uuid=58ad734b-bde6-45c7-89d8-756a55ad1891;storage=user \
Packit aea12f
          --outfile pubkey.pem
Packit aea12f
@end example
Packit aea12f
Packit aea12f
or if the key is stored in the file system:
Packit aea12f
@example
Packit aea12f
$ tpmtool --pubkey tpmkey:file=tmpkey.pem --outfile pubkey.pem
Packit aea12f
@end example
Packit aea12f
Packit aea12f
To list all keys stored in TPM use:
Packit aea12f
@example
Packit aea12f
$ tpmtool --list
Packit aea12f
@end example