1PKCS15-CRYPT(1) OpenSC Tools PKCS15-CRYPT(1)
2
3
4
6 pkcs15-crypt - perform crypto operations using PKCS#15 smart cards
7
9 pkcs15-crypt [OPTIONS]
10
12 The pkcs15-crypt utility can be used from the command line to perform
13 cryptographic operations such as computing digital signatures or
14 decrypting data, using keys stored on a PKCS#15 compliant smart card.
15
17 --version,
18 Print the OpenSC package release version.
19
20 --aid aid
21 Specify the AID of the on-card PKCS#15 application to bind to. The
22 aid must be in hexadecimal form.
23
24 --decipher, -c
25 Decrypt the contents of the file specified by the --input option.
26 The result of the decryption operation is written to the file
27 specified by the --output option. If this option is not given, the
28 decrypted data is printed to standard output, displaying
29 non-printable characters using their hex notation xNN (see also
30 --raw).
31
32 --input file, -i file
33 Specifies the input file to use. Defaults to stdin if not
34 specified.
35
36 --key id, -k id
37 Selects the ID of the key to use.
38
39 --output file, -o file
40 Any output will be sent to the specified file. Defaults to stdout
41 if not specified.
42
43 --pin pin, -p pin
44 When the cryptographic operation requires a PIN to access the key,
45 pkcs15-crypt will prompt the user for the PIN on the terminal.
46 Using this option allows you to specify the PIN on the command
47 line.
48
49 Note that on most operating systems, the command line of a process
50 can be displayed by any user using the ps(1) command. It is
51 therefore a security risk to specify secret information such as
52 PINs on the command line. If you specify '-' as PIN, it will be
53 read from STDIN.
54
55 --pkcs1
56 By default, pkcs15-crypt assumes that input data has been padded to
57 the correct length (i.e. when computing an RSA signature using a
58 1024 bit key, the input must be padded to 128 bytes to match the
59 modulus length). When giving the --pkcs1 option, however,
60 pkcs15-crypt will perform the required padding using the algorithm
61 outlined in the PKCS #1 standard version 1.5.
62
63 --raw, -R
64 Outputs raw 8 bit data.
65
66 --reader arg, -r arg
67 Number of the reader to use. By default, the first reader with a
68 present card is used. If arg is an ATR, the reader with a matching
69 card will be chosen.
70
71 --md5 --sha-1 --sha-224 --sha-256 --sha-384 --sha-512
72 These options tell pkcs15-crypt that the input file is the result
73 of the specified hash operation. By default, an MD5 hash is
74 expected. Again, the data must be in binary representation.
75
76 --sign, -s
77 Perform digital signature operation on the data read from a file
78 specified using the --input option. By default, the contents of the
79 file are assumed to be the result of an MD5 hash operation. Note
80 that pkcs15-crypt expects the data in binary representation, not
81 ASCII.
82
83 The digital signature is stored, in binary representation, in the
84 file specified by the --output option. If this option is not given,
85 the signature is printed on standard output, displaying
86 non-printable characters using their hex notation xNN (see also
87 --raw).
88
89 --signature-format, --f
90 When signing with ECDSA key this option indicates to pkcs15-crypt
91 the signature output format. Possible values are 'rs'(default) --
92 two concatenated integers (PKCS#11), 'sequence' or 'openssl' -- DER
93 encoded sequence of two integers (OpenSSL).
94
95 --wait, -w
96 Causes pkcs15-crypt to wait for a card insertion.
97
98 --verbose, -v
99 Causes pkcs15-crypt to be more verbose. Specify this flag several
100 times to enable debug output in the OpenSC library.
101
103 pkcs15-init(1), pkcs15-tool(1)
104
106 pkcs15-crypt was written by Juha Yrjölä <juha.yrjola@iki.fi>.
107
108
109
110opensc 02/25/2021 PKCS15-CRYPT(1)