1tpm2_nvread(1)              General Commands Manual             tpm2_nvread(1)
2
3
4

NAME

6       tpm2_nvread(1) - Read the data stored in a Non-Volatile (NV)s index.
7

SYNOPSIS

9       tpm2_nvread [OPTIONS]
10

DESCRIPTION

12       tpm2_nvread(1) - Read the data stored in a Non-Volatile (NV)s index.
13

OPTIONS

15       · -x, –index=NV_INDEX: Specifies the index to define the space at.
16
17       · -a,  –auth-handle=SECRET_DATA_FILE:  specifies the handle used to au‐
18         thorize:
19
20         · 0x40000001 for TPM_RH_OWNER
21
22         · 0x4000000C for TPM_RH_PLATFORM
23
24       · -f, –output=FILE: file to write data
25
26       · -P, –handle-passwd=HANDLE_PASSWORD: specifies the password  of  auth‐
27         Handle.   Passwords should follow the “password formatting standards,
28         see section”Password Formatting“.
29
30       · -s, –size=SIZE: Specifies the size of  data  to  be  read  in  bytes,
31         starting  from  0  if offset is not specified.  If not specified, the
32         size of the data as reported by the public portion of the index  will
33         be used.
34
35       · -o,  –offset=OFFSET:  The offset within the NV index to start reading
36         from.
37
38       · -S, –input-session-handle=SIZE: Optional Input session handle from  a
39         policy session for authorization.
40
41       · -L, –set-list==PCR_SELECTION_LIST:
42
43         The  list  of  pcr  banks and selected PCRs' ids.  PCR_SELECTION_LIST
44         values should follow the pcr bank specifiers standards,  see  section
45         “PCR Bank Specfiers”.
46
47       · -F,**–pcr-input-file=PCR_INPUT_FILE
48
49         Optional  Path or Name of the file containing expected pcr values for
50         the specified index.  Default is to read the current PCRs per the set
51         list.
52

COMMON OPTIONS

54       This  collection of options are common to many programs and provide in‐
55       formation that many users may expect.
56
57       · -h, –help: Display the tools manpage.  This requires the manpages  to
58         be installed or on MANPATH, See man(1) for more details.
59
60       · -v,  –version:  Display  version information for this tool, supported
61         tctis and exit.
62
63       · -V, –verbose: Increase the information that the tool  prints  to  the
64         console  during  its  execution.  When using this option the file and
65         line number are printed.
66
67       · -Q, –quiet: Silence normal tool output to stdout.
68
69       · -Z, –enable-errata: Enable the application of errata fixups.   Useful
70         if  an  errata fixup needs to be applied to commands sent to the TPM.
71         # TCTI ENVIRONMENT
72
73       This collection of environment variables that may be used to  configure
74       the various TCTI modules available.
75
76       The  values  passed  through  these  variables  can  be overridden on a
77       per-command basis using the available command line options, see the TC‐
78       TI_OPTIONS section.
79
80       The variables respected depend on how the software was configured.
81
82       · TPM2TOOLS_TCTI_NAME:  Select the TCTI used for communication with the
83         next component down the TSS stack.  In most configurations this  will
84         be  the  TPM but it could be a simulator or proxy.  The current known
85         TCTIs are:
86
87         · tabrmd   -   The    new    resource    manager,    called    tabrmd
88           (https://github.com/01org/tpm2-abrmd).
89
90         · socket  -  Typically used with the old resource manager, or talking
91           directly to a simulator.
92
93         · device - Used when talking directly to a TPM device file.
94
95       · TPM2TOOLS_DEVICE_FILE: When using the device TCTI,  specify  the  TPM
96         device file.  The default is “/dev/tpm0”.
97
98         Note:  Using  the tpm directly requires the users to ensure that con‐
99         current access does not occur and that they manage the tpm resources.
100         These  tasks  are  usually managed by a resource manager.  Linux 4.12
101         and greater supports an in kernel resource manager  at  “/dev/tpmrm”,
102         typically “/dev/tpmrm0”.
103
104       · TPM2TOOLS_SOCKET_ADDRESS: When using the socket TCTI, specify the do‐
105         main name or IP address used.  The default is 127.0.0.1.
106
107       · TPM2TOOLS_SOCKET_PORT: When using the socket TCTI, specify  the  port
108         number used.  The default is 2321.
109

TCTI OPTIONS

111       This  collection  of options are used to configure the varous TCTI mod‐
112       ules available.  They override any environment variables.
113
114       · -T, –tcti=TCTI_NAME[:TCTI_OPTIONS]: Select the TCTI used for communi‐
115         cation  with the next component down the TSS stack.  In most configu‐
116         rations   this    will    be    the    resource    manager:    tabrmd
117         (https://github.com/01org/tpm2-abrmd)  Optionally,  tcti specific op‐
118         tions can appended to TCTI_NAME by appending a : to TCTI_NAME.
119
120         · For the device TCTI, the TPM device file for use by the device TCTI
121           can  be  specified.   The  default  is  /dev/tpm0.  Example: -T de‐
122           vice:/dev/tpm0
123
124         · For the socket TCTI, the domain name or IP address and port  number
125           used by the socket can be specified.  The default are 127.0.0.1 and
126           2321.  Example: -T socket:127.0.0.1:2321
127
128         · For the abrmd TCTI, it takes no options.  Example: -T abrmd
129

Password Formatting

131       Passwords are interpreted in  two  forms,  string  and  hex-string.   A
132       string password is not interpreted, and is directly used for authoriza‐
133       tion.  A hex-string, is converted from a hexidecimal form into  a  byte
134       array  form, thus allowing passwords with non-printable and/or terminal
135       un-friendly characters.
136
137       By default passwords are assumed to be in the  string  form.   Password
138       form is specified with special prefix values, they are:
139
140       · str:  -  Used  to indicate it is a raw string.  Useful for escaping a
141         password that starts with the “hex:” prefix.
142
143       · hex: - Used when specifying a password in hex string format.
144

EXAMPLES

146       To read 32 bytes from an index starting at offset 0:
147
148              tpm2_nvread -x 0x1500016 -a 0x40000001 -s 32
149

RETURNS

151       0 on success or 1 on failure.
152

BUGS

154       Github Issues (https://github.com/01org/tpm2-tools/issues)
155

HELP

157       See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
158
159
160
161tpm2-tools                      SEPTEMBER 2017                  tpm2_nvread(1)
Impressum