blob: 0d68b8637d73d0a6599864f5fc09868573d4b5e2 [file] [log] [blame]
Alexander Afanasyev151a8552014-04-11 00:54:43 -07001ndnsec-key-gen
2==============
3
Davide Pesaventob310efb2019-04-11 22:10:24 -04004Synopsis
5--------
Alexander Afanasyev151a8552014-04-11 00:54:43 -07006
Davide Pesaventob310efb2019-04-11 22:10:24 -04007**ndnsec-key-gen** [**-h**] [**-n**] [**-t** *type*] [**-k** *keyidtype*] *identity*
Alexander Afanasyev151a8552014-04-11 00:54:43 -07008
9Description
10-----------
11
Davide Pesaventob310efb2019-04-11 22:10:24 -040012:program:`ndnsec-key-gen` generates a key pair for the specified *identity* and
13sets the generated public key as the identity's default key.
14:program:`ndnsec-key-gen` will also create a signing request for the generated key.
15The signing request will be written to the standard output in base64 encoding.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070016
Davide Pesaventob310efb2019-04-11 22:10:24 -040017By default, it will also set the identity as the user's default identity.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070018
19Options
20-------
21
Davide Pesaventob310efb2019-04-11 22:10:24 -040022.. option:: -n, --not-default
Alexander Afanasyev151a8552014-04-11 00:54:43 -070023
Davide Pesaventob310efb2019-04-11 22:10:24 -040024 Do not set the identity as the user's default identity.
Alexander Afanasyev2a047eb2014-11-30 22:45:02 -080025
Davide Pesaventob310efb2019-04-11 22:10:24 -040026 Note that if no other identity/key/certificate exists, then the identity
27 will become the default regardless of this option.
Yingdi Yu7d8644a2014-12-01 22:55:49 -080028
Davide Pesaventob310efb2019-04-11 22:10:24 -040029.. option:: -t <type>, --type <type>
30
31 Type of key to generate. "r" for RSA (default), "e" for ECDSA.
32
33.. option:: -k <keyidtype>, --keyid-type <keyidtype>
34
35 Type of KeyId for the generated key. "r" for 64-bit random number (default),
36 "h" for SHA256 of the public key.
37
38Example
39-------
Alexander Afanasyev151a8552014-04-11 00:54:43 -070040
41::
42
43 $ ndnsec-key-gen /ndn/test/david
44 Bv0DAAc9CANuZG4IBHRlc3QIBWRhdm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