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

NAME

6       tpm2_rsadecrypt(1)  -  Performs  an  RSA Decryption operation using the
7       TPM.
8

SYNOPSIS

10       tpm2_tpm2_rsadecrypt [OPTIONS]
11

DESCRIPTION

13       tpm2_rsadecrypt(1) performs RSA decryption using the indicated  padding
14       scheme  according  to  IETF RFC 3447 (PKCS#1).  The scheme of keyHandle
15       should not be TPM_ALG_NULL.
16
17       The key referenced by keyHandle is required to be:
18
19       1. an RSA key
20
21       2. Have the attribute decrypt SET in it's attributes.
22

OPTIONS

24       · -k, –key-handle=KEY_HANDLE:
25
26         the public portion of RSA key to use for decryption.
27
28       · -c, –key-context=KEY_CONTEXT_FILE:
29
30         filename of the key context used for the operation.
31
32       · -P, –pwdk=KEY_PASSWORD:
33
34         specifies the password of KEY_HANDLE.  Passwords  should  follow  the
35         password formatting standards, see section “Password Formatting”.
36
37       · -I, –in-file=INPUT:
38
39         Input file path, containing the data to be decrypted.
40
41       · -o, –out-file=OUTPUT_FILE:
42
43         Output file path, record the decrypted data.
44
45       · -S, –input-session-handle=SESSION_HANDLE:
46
47         Optional  Input  session  handle from a policy session for authoriza‐
48         tion.
49

COMMON OPTIONS

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

TCTI OPTIONS

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

Password Formatting

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

EXAMPLES

143              tpm2_rsadecrypt -k 0x81010001 -I encrypted.in -o plain.out
144

RETURNS

146       0 on success or 1 on failure.
147

BUGS

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

HELP

152       See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
153
154
155
156tpm2-tools                      SEPTEMBER 2017              tpm2_rsadecrypt(1)
Impressum