Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 1 | ndnsec-key-gen |
| 2 | ============== |
| 3 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 4 | Synopsis |
| 5 | -------- |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 6 | |
Zhiyi Zhang | 4c68b6e | 2020-04-20 16:13:21 -0700 | [diff] [blame^] | 7 | **ndnsec-key-gen** [**-h**] [**-n**] [**-t** *type*] |
| 8 | [**-k** *keyidtype*\|\ **--keyid** *keyid*] *identity* |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 9 | |
| 10 | Description |
| 11 | ----------- |
| 12 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 13 | :program:`ndnsec-key-gen` generates a key pair for the specified *identity* and |
| 14 | sets the generated public key as the identity's default key. |
| 15 | :program:`ndnsec-key-gen` will also create a signing request for the generated key. |
| 16 | The signing request will be written to the standard output in base64 encoding. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 17 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 18 | By default, it will also set the identity as the user's default identity. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 19 | |
| 20 | Options |
| 21 | ------- |
| 22 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 23 | .. option:: -n, --not-default |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 24 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 25 | Do not set the identity as the user's default identity. |
Alexander Afanasyev | 2a047eb | 2014-11-30 22:45:02 -0800 | [diff] [blame] | 26 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 27 | Note that if no other identity/key/certificate exists, then the identity |
| 28 | will become the default regardless of this option. |
Yingdi Yu | 7d8644a | 2014-12-01 22:55:49 -0800 | [diff] [blame] | 29 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 30 | .. option:: -t <type>, --type <type> |
| 31 | |
Zhiyi Zhang | 4c68b6e | 2020-04-20 16:13:21 -0700 | [diff] [blame^] | 32 | Type of key to generate. "r" for RSA (the default), "e" for ECDSA. |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 33 | |
| 34 | .. option:: -k <keyidtype>, --keyid-type <keyidtype> |
| 35 | |
Zhiyi Zhang | 4c68b6e | 2020-04-20 16:13:21 -0700 | [diff] [blame^] | 36 | Type of KeyId for the generated key. "r" for a 64-bit random number (the default |
| 37 | unless **--keyid** is specified), "h" for the SHA-256 of the public key. |
| 38 | |
| 39 | .. option:: --keyid <keyid> |
| 40 | |
| 41 | User-specified KeyId. Must be a non-empty generic name component. |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 42 | |
| 43 | Example |
| 44 | ------- |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 45 | |
| 46 | :: |
| 47 | |
| 48 | $ ndnsec-key-gen /ndn/test/david |
| 49 | Bv0DAAc9CANuZG4IBHRlc3QIBWRhdmlkCANLRVkIEWtzay0xMzk2OTEzMDU4MTk2 |
| 50 | CAdJRC1DRVJUCAgAAAFFPoG0ohQDGAECFf0BeDCCAXQwIhgPMjAxNDA0MDcyMzI0 |
| 51 | MThaGA8yMDM0MDQwMjIzMjQxOFowKjAoBgNVBCkTIS9uZG4vdGVzdC9kYXZpZC9r |
| 52 | c2stMTM5NjkxMzA1ODE5NjCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEB |
| 53 | ALS6udLacpydecxMRIfZeo74fxzpsITqaa/4UxD2FJ9lU4dtfiSSIOaRwAB/w0K/ |
| 54 | A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