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 N, -r N
67 Selects the N-th smart card reader configured by the system. If
68 unspecified, pkcs15-crypt will use the first reader found.
69
70 --sha-1
71 This option tells pkcs15-crypt that the input file is the result of
72 an SHA1 hash operation, rather than an MD5 hash. Again, the data
73 must be in binary representation.
74
75 --sign, -s
76 Perform digital signature operation on the data read from a file
77 specified using the --input option. By default, the contents of the
78 file are assumed to be the result of an MD5 hash operation. Note
79 that pkcs15-crypt expects the data in binary representation, not
80 ASCII.
81
82 The digital signature is stored, in binary representation, in the
83 file specified by the --output option. If this option is not given,
84 the signature is printed on standard output, displaying
85 non-printable characters using their hex notation xNN (see also
86 --raw).
87
88 --signature-format, --f
89 When signing with ECDSA key this option indicates to pkcs15-crypt
90 the signature output format. Possible values are 'rs'(default) --
91 two concatanated integers (PKCS#11), 'sequence' or 'openssl' -- DER
92 encoded sequence of two integeres (OpenSSL).
93
94 --verbose, -v
95 Causes pkcs15-crypt to be more verbose. Specify this flag several
96 times to enable debug output in the OpenSC library.
97
99 pkcs15-init(1), pkcs15-tool(1)
100
101
102
103opensc 10/30/2018 PKCS15-CRYPT(1)