'\" t
.\" Title: openpgp-tool
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 11/13/2024
.\" Manual: OpenSC Tools
.\" Source: opensc
.\" Language: English
.\"
.TH "OPENPGP\-TOOL" "1" "11/13/2024" "opensc" "OpenSC Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
openpgp-tool \- utility for accessing visible data OpenPGP smart cards and compatible tokens
.SH "SYNOPSIS"
.HP \w'\fBopenpgp\-tool\fR\ 'u
\fBopenpgp\-tool\fR [\fIOPTIONS\fR]
.SH "DESCRIPTION"
.PP
The
\fBopenpgp\-tool\fR
utility is used for accessing data from the OpenPGP v1\&.1 and v2\&.0 smart cards and compatible tokens like e\&.g\&. GPF CryptoStick v1\&.x, which might not be present in PKCS#15 objects but available in custom files on the card\&. The data can be printed on screen or used by other programs via environment variables\&.
.SH "OPTIONS"
.PP
.PP
\fB\-\-card\-info\fR, \fB\-C\fR
.RS 4
Show card information\&.
.RE
.PP
\fB\-\-del\-key\fR \fIarg\fR
.RS 4
Delete key indicated by
\fIarg\fR\&.
\fIarg\fR
can be
1,
2,
3, or
all\&.
.RE
.PP
\fB\-\-do\fR \fIarg\fR, \fB\-d\fR \fIarg\fR
.RS 4
Dump private data object (DO) indicated by
\fIarg\fR\&.
\fIarg\fR
can be in the form
\fIx\fR,
10\fIx\fR, or
010\fIx\fR
to access
DO 010\fIx\fR, where
\fIx\fR
is
1,
2,
3, or
4\&.
.RE
.PP
\fB\-\-erase\fR, \fB\-E\fR
.RS 4
Erase (i\&.e\&. reset) the card\&.
.RE
.PP
\fB\-\-exec\fR \fIprog\fR, \fB\-x\fR \fIprog\fR
.RS 4
Execute the given program with data in environment variables\&.
.RE
.PP
\fB\-\-gen\-key\fR \fIarg\fR, \fB\-G\fR \fIarg\fR
.RS 4
Generate key with the ID given as
\fIarg\fR\&.
\fIarg\fR
can be one of
1,
2, or
3\&.
.RE
.PP
\fB\-\-help\fR, \fB\-h\fR
.RS 4
Print help message on screen\&.
.RE
.PP
\fB\-\-key\-info\fR, \fB\-K\fR
.RS 4
Show information of keys on the card\&.
.RE
.PP
\fB\-\-key\-type\fR \fIkeytype\fR, \fB\-t\fR \fIkeytype\fR
.RS 4
Specify the type of the key to be generated\&. Supported values for
\fIkeytype\fR
are
rsa
for RSA with 2048 bits,
rsa\fILENGTH\fR
for RSA with a bit length of
\fILENGTH\fR\&. If not given, it defaults to
rsa2048\&.
.RE
.PP
\fB\-\-pin\fR \fIpin\fR
.RS 4
This option can be used to specify the PIN value on the command line\&. If the value is set to
env:\fIVARIABLE\fR, the value of the specified environment variable is used\&. By default, the code is prompted on the command line if needed\&.
.sp
Note that on most operation systems, any user can display the command line of any process on the system using utilities such as
\fBps(1)\fR\&. Therefore, you should prefer passing the codes via an environment variable on an unsecured system\&.
.RE
.PP
\fB\-\-pretty\fR
.RS 4
Print values in pretty format\&.
.RE
.PP
\fB\-\-raw\fR
.RS 4
Print values in raw format, as they are stored on the card\&.
.RE
.PP
\fB\-\-reader\fR \fIarg\fR, \fB\-r\fR \fIarg\fR
.RS 4
Number of the reader to use\&. By default, the first reader with a present card is used\&. If
\fIarg\fR
is an ATR, the reader with a matching card will be chosen\&.
.RE
.PP
\fB\-\-user\-info\fR, \fB\-U\fR
.RS 4
Show card holder information\&.
.RE
.PP
\fB\-\-verify\fR \fIpintype\fR
.RS 4
Verify PIN (CHV1, CHV2 or CHV3)\&.
.RE
.PP
\fB\-\-version\fR, \fB\-V\fR
.RS 4
Print the version of the utility and exit\&.
.RE
.PP
\fB\-\-verbose\fR, \fB\-v\fR
.RS 4
Verbose operation\&. Use several times to enable debug output\&.
.RE
.PP
\fB\-\-wait\fR, \fB\-w\fR
.RS 4
Wait for a card to be inserted\&.
.RE
.SH "AUTHORS"
.PP
\fBopenpgp\-tool\fR
utility was written by Peter Marschall
\&.