pkcs11-keygen.html revision 5347c0fcb04eaea19d9f39795646239f487c6207
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews - Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews - This Source Code Form is subject to the terms of the Mozilla Public
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews - License, v. 2.0. If a copy of the MPL was not distributed with this
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews - file, You can obtain one at http://mozilla.org/MPL/2.0/.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<a name="man.pkcs11-keygen"></a><div class="titlepage"></div>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<p><span class="application">pkcs11-keygen</span> — generate keys on a PKCS#11 device</p>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<div class="cmdsynopsis"><p><code class="command">pkcs11-keygen</code> {-a <em class="replaceable"><code>algorithm</code></em>} [<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>] [<code class="option">-e</code>] [<code class="option">-i <em class="replaceable"><code>id</code></em></code>] [<code class="option">-m <em class="replaceable"><code>module</code></em></code>] [<code class="option">-P</code>] [<code class="option">-p <em class="replaceable"><code>PIN</code></em></code>] [<code class="option">-q</code>] [<code class="option">-S</code>] [<code class="option">-s <em class="replaceable"><code>slot</code></em></code>] {label}</p></div>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews <span class="command"><strong>pkcs11-keygen</strong></span> causes a PKCS#11 device to generate
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews a new key pair with the given <code class="option">label</code> (which must be
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews unique) and with <code class="option">keysize</code> bits of prime.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<div class="variablelist"><dl class="variablelist">
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Specify the key algorithm class: Supported classes are RSA,
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews DSA, DH, and ECC. In addition to these strings, the
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews <code class="option">algorithm</code> can be specified as a DNSSEC
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews signing algorithm that will be used with this key; for
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews example, NSEC3RSASHA1 maps to RSA, and ECDSAP256SHA256 maps
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews to ECC. The default class is "RSA".
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Create the key pair with <code class="option">keysize</code> bits of
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews prime. For ECC keys, the only valid values are 256 and 384,
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews and the default is 256.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews For RSA keys only, use a large exponent.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<dt><span class="term">-i <em class="replaceable"><code>id</code></em></span></dt>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Create key objects with id. The id is either
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews an unsigned short 2 byte or an unsigned long 4 byte number.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<dt><span class="term">-m <em class="replaceable"><code>module</code></em></span></dt>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Specify the PKCS#11 provider module. This must be the full
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews path to a shared library object implementing the PKCS#11 API
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews for the device.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Set the new private key to be non-sensitive and extractable.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews The allows the private key data to be read from the PKCS#11
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews device. The default is for private keys to be sensitive and
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews non-extractable.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<dt><span class="term">-p <em class="replaceable"><code>PIN</code></em></span></dt>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Specify the PIN for the device. If no PIN is provided on
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews the command line, <span class="command"><strong>pkcs11-keygen</strong></span> will
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews prompt for it.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Quiet mode: suppress unnecessary output.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews For Diffie-Hellman (DH) keys only, use a special prime of
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews 768, 1024 or 1536 bit size and base (aka generator) 2.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews If not specified, bit size will default to 1024.
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews<dt><span class="term">-s <em class="replaceable"><code>slot</code></em></span></dt>
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews Open the session with the given PKCS#11 slot. The default is
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews <span class="citerefentry"><span class="refentrytitle">pkcs11-destroy</span>(8)</span>,
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews <span class="citerefentry"><span class="refentrytitle">pkcs11-list</span>(8)</span>,
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews <span class="citerefentry"><span class="refentrytitle">pkcs11-tokens</span>(8)</span>,
819fe493f97078521bb6b9a7b97583bef89f5abcMark Andrews <span class="citerefentry"><span class="refentrytitle">dnssec-keyfromlabel</span>(8)</span>