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