File: pkcs15-crypt.1.xml

package info (click to toggle)
opensc 0.16.0-3%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,552 kB
  • sloc: ansic: 131,429; sh: 12,276; xml: 3,646; makefile: 566; cpp: 187; lex: 92
file content (209 lines) | stat: -rw-r--r-- 7,434 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?xml version="1.0" encoding="UTF-8"?>
<refentry id="pkcs15-crypt">
	<refmeta>
		<refentrytitle>pkcs15-crypt</refentrytitle>
		<manvolnum>1</manvolnum>
		<refmiscinfo class="productname">OpenSC</refmiscinfo>
		<refmiscinfo class="manual">OpenSC Tools</refmiscinfo>
		<refmiscinfo class="source">opensc</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>pkcs15-crypt</refname>
		<refpurpose>perform crypto operations using PKCS#15 smart cards</refpurpose>
	</refnamediv>

	<refsynopsisdiv>
		<cmdsynopsis>
			<command>pkcs15-crypt</command>
			<arg choice="opt"><replaceable class="option">OPTIONS</replaceable></arg>
		</cmdsynopsis>
	</refsynopsisdiv>

	<refsect1>
		<title>Description</title>
		<para>
			The <command>pkcs15-crypt</command> utility can be used from the
			command line to perform cryptographic operations such as computing
			digital signatures or decrypting data, using keys stored on a PKCS#15
			compliant smart card.
		</para>
	</refsect1>

	<refsect1>
		<title>Options</title>
		<para>
			<variablelist>
                                <varlistentry>
                                        <term>
                                                <option>--version</option>,
                                        </term>
                                        <listitem><para>Print the OpenSC package release version.</para></listitem>
                                </varlistentry>
				<varlistentry>
					<term>
						<option>--aid</option> <replaceable>aid</replaceable>
					</term>
					<listitem><para>Specify the AID of the on-card PKCS#15 application
					to bind to. The <replaceable>aid</replaceable> must be in hexadecimal
					form.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--decipher</option>,
						<option>-c</option>
					</term>
					<listitem><para>Decrypt the contents of the file specified by
					the <option>--input</option> option. The result of the
					decryption operation is written to the file specified by the
					<option>--output</option> option. If this option is not given,
					the decrypted data is printed to standard output, displaying
					non-printable characters using their hex notation xNN (see also
					<option>--raw</option>).</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--input</option> <replaceable>file</replaceable>,
						<option>-i</option> <replaceable>file</replaceable>
					</term>
					<listitem><para>Specifies the input file to use. Defaults to stdin if
					not specified.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--key</option> <replaceable>id</replaceable>,
						<option>-k</option> <replaceable>id</replaceable>
					</term>
					<listitem><para>Selects the ID of the key to use.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--output</option> <replaceable>file</replaceable>,
						<option>-o</option> <replaceable>file</replaceable>
					</term>
					<listitem><para>Any output will be sent to the specified file. Defaults
					to stdout if not specified.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--pin</option> <replaceable>pin</replaceable>,
						<option>-p</option> <replaceable>pin</replaceable>
					</term>
					<listitem><para>When the cryptographic operation requires a
					PIN to access the key, <command>pkcs15-crypt</command> will
					prompt the user for the PIN on the terminal. Using this option
					allows you to specify the PIN on the command line.</para>
					<para>Note that on most operating systems, the command line of
					a process can be displayed by any user using the ps(1)
					command. It is therefore a security risk to specify
					secret information such as PINs on the command line.
					If you specify '-' as PIN, it will be read from STDIN.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--pkcs1</option>
					</term>
					<listitem><para>By default, <command>pkcs15-crypt</command>
					assumes that input data has been padded to the correct length
					(i.e. when computing an RSA signature using a 1024 bit key,
					the input must be padded to 128 bytes to match the modulus
					length). When giving the <option>--pkcs1</option> option,
					however, <command>pkcs15-crypt</command> will perform the
					required padding using the algorithm outlined in the
					PKCS #1 standard version 1.5.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--raw</option>,
						<option>-R</option>
					</term>
					<listitem><para>Outputs raw 8 bit data.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--reader</option> <replaceable>N</replaceable>,
						<option>-r</option> <replaceable>N</replaceable>
					</term>
					<listitem><para>Selects the <replaceable>N</replaceable>-th smart
					card reader configured by the system. If unspecified,
					<command>pkcs15-crypt</command> will use the first reader
					found.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--sha-1</option>
					</term>
					<listitem><para>This option tells <command>pkcs15-crypt</command>
					that the input file is the result of an SHA1 hash operation,
					rather than an MD5 hash. Again, the data must be in binary
					representation.</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--sign</option>,
						<option>-s</option>
					</term>
					<listitem><para>Perform digital signature operation on
					the data read from a file specified using the <option>--input</option>
					option. By default, the contents of the file are assumed to
					be the result of an MD5 hash operation.
					Note that <command>pkcs15-crypt</command>
					expects the data in binary representation, not ASCII.</para>
					<para>The digital signature is stored, in binary representation,
					in the file specified by the <option>--output</option> option. If
					this option is not given, the signature is printed on standard
					output, displaying non-printable characters using their hex notation
					<literal>x</literal><replaceable>NN</replaceable>
					(see also <option>--raw</option>).</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--signature-format</option>,
						<option>--f</option>
					</term>
					<listitem><para>When signing with ECDSA key this option indicates
					to <command>pkcs15-crypt</command> the signature output format.
					Possible values are 'rs'(default) -- two concatanated
					integers (PKCS#11), 'sequence' or 'openssl' -- DER encoded sequence
					of two integeres (OpenSSL).</para></listitem>
				</varlistentry>

				<varlistentry>
					<term>
						<option>--verbose</option>,
						<option>-v</option>
					</term>
					<listitem><para>Causes <command>pkcs15-crypt</command> to be more
					verbose. Specify this flag several times to enable debug output
					in the OpenSC library.</para></listitem>
				</varlistentry>
			</variablelist>
		</para>
	</refsect1>

	<refsect1>
		<title>See also</title>
		<para>
			<citerefentry>
				<refentrytitle>pkcs15-init</refentrytitle>
				<manvolnum>1</manvolnum>
			</citerefentry>,
			<citerefentry>
				<refentrytitle>pkcs15-tool</refentrytitle>
				<manvolnum>1</manvolnum>
			</citerefentry>
		</para>
	</refsect1>

</refentry>