summaryrefslogtreecommitdiff
path: root/ssh-keygen.1
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-12-30 03:30:09 +0000
committerDamien Miller <djm@mindrot.org>2019-12-30 14:33:54 +1100
commit3e60d18fba1b502c21d64fc7e81d80bcd08a2092 (patch)
tree0ec5f0bd3e34d1290a6c1a068234d39d8d367b35 /ssh-keygen.1
parent1e645fe767f27725dc7fd7864526de34683f7daf (diff)
upstream: remove single-letter flags for moduli options
Move all moduli generation options to live under the -O flag. Frees up seven single-letter flags. NB. this change break existing ssh-keygen commandline syntax for moduli- related operations. Very few people use these fortunately. feedback and ok markus@ OpenBSD-Commit-ID: d498f3eaf28128484826a4fcb343612764927935
Diffstat (limited to 'ssh-keygen.1')
-rw-r--r--ssh-keygen.1142
1 files changed, 78 insertions, 64 deletions
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index 67a57b9f7..9afb92943 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.183 2019/12/30 03:28:41 djm Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.184 2019/12/30 03:30:09 djm Exp $
2.\" 2.\"
3.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -99,20 +99,14 @@
99.Op Fl g 99.Op Fl g
100.Op Fl f Ar input_keyfile 100.Op Fl f Ar input_keyfile
101.Nm ssh-keygen 101.Nm ssh-keygen
102.Fl G Ar output_file 102.Fl M Cm generate
103.Op Fl v 103.Op Fl O Ar option
104.Op Fl b Ar bits 104.Ar
105.Op Fl M Ar memory
106.Op Fl S Ar start_point
107.Nm ssh-keygen 105.Nm ssh-keygen
106.Fl M Cm screen
108.Fl f Ar input_file 107.Fl f Ar input_file
109.Fl T Ar output_file 108.Op Fl O Ar option
110.Op Fl v 109.Ar
111.Op Fl a Ar rounds
112.Op Fl J Ar num_lines
113.Op Fl j Ar start_line
114.Op Fl K Ar checkpt
115.Op Fl W Ar generator
116.Nm ssh-keygen 110.Nm ssh-keygen
117.Fl I Ar certificate_identity 111.Fl I Ar certificate_identity
118.Fl s Ar ca_key 112.Fl s Ar ca_key
@@ -268,11 +262,6 @@ When saving a private key, this option specifies the number of KDF
268(key derivation function) rounds used. 262(key derivation function) rounds used.
269Higher numbers result in slower passphrase verification and increased 263Higher numbers result in slower passphrase verification and increased
270resistance to brute-force password cracking (should the keys be stolen). 264resistance to brute-force password cracking (should the keys be stolen).
271.Pp
272When screening DH-GEX candidates (using the
273.Fl T
274command),
275this option specifies the number of primality tests to perform.
276.It Fl B 265.It Fl B
277Show the bubblebabble digest of specified private or public key file. 266Show the bubblebabble digest of specified private or public key file.
278.It Fl b Ar bits 267.It Fl b Ar bits
@@ -333,12 +322,6 @@ used in conjunction with the
333option to print found keys in a hashed format. 322option to print found keys in a hashed format.
334.It Fl f Ar filename 323.It Fl f Ar filename
335Specifies the filename of the key file. 324Specifies the filename of the key file.
336.It Fl G Ar output_file
337Generate candidate primes for DH-GEX.
338These primes must be screened for
339safety (using the
340.Fl T
341option) before use.
342.It Fl g 325.It Fl g
343Use generic DNS format when printing fingerprint resource records using the 326Use generic DNS format when printing fingerprint resource records using the
344.Fl r 327.Fl r
@@ -379,24 +362,6 @@ This option allows importing keys from other software, including several
379commercial SSH implementations. 362commercial SSH implementations.
380The default import format is 363The default import format is
381.Dq RFC4716 . 364.Dq RFC4716 .
382.It Fl J Ar num_lines
383Exit after screening the specified number of lines
384while performing DH candidate screening using the
385.Fl T
386option.
387.It Fl j Ar start_line
388Start screening at the specified line number
389while performing DH candidate screening using the
390.Fl T
391option.
392.It Fl K Ar checkpt
393Write the last line processed to the file
394.Ar checkpt
395while performing DH candidate screening using the
396.Fl T
397option.
398This will be used to skip lines in the input file that have already been
399processed if the job is restarted.
400.It Fl k 365.It Fl k
401Generate a KRL file. 366Generate a KRL file.
402In this mode, 367In this mode,
@@ -419,9 +384,26 @@ If combined with
419.Fl v , 384.Fl v ,
420a visual ASCII art representation of the key is supplied with the 385a visual ASCII art representation of the key is supplied with the
421fingerprint. 386fingerprint.
422.It Fl M Ar memory 387.It Fl M Cm generate
423Specify the amount of memory to use (in megabytes) when generating 388Generate candidate Diffie-Hellman Group Exchange (DH-GEX) parameters for
424candidate moduli for DH-GEX. 389eventual use by the
390.Sq diffie-hellman-group-exchange-*
391key exchange methods.
392The numbers generated by this operation must be further screened before
393use.
394See the
395.Sx MODULI GENERATION
396section for more information.
397.It Fl M Cm screen
398Screen candidate parameters for Diffie-Hellman Group Exchange.
399This will accept a list of candidate numbers and test that they are
400safe (Sophie Germain) primes with acceptable group generators.
401The results of this operation may be added to the
402.Pa /etc/moduli
403file.
404See the
405.Sx MODULI GENERATION
406section for more information.
425.It Fl m Ar key_format 407.It Fl m Ar key_format
426Specify a key format for key generation, the 408Specify a key format for key generation, the
427.Fl i 409.Fl i
@@ -457,10 +439,20 @@ Please see the
457.Sx CERTIFICATES 439.Sx CERTIFICATES
458section for details. 440section for details.
459.It Fl O Ar option 441.It Fl O Ar option
460Specify a certificate option when signing a key. 442Specify a key/value option.
461See the 443These are specific to the operation that
444.Nm
445has been requested to perform.
446.Pp
447When signing certificates, one of the options listed in the
462.Sx CERTIFICATES 448.Sx CERTIFICATES
463section for a list of available certificate options. 449section may be specified here.
450.Pp
451When performing moduli generation or screening, one of the options
452listed in the
453.Sx MODULI GENERATION
454section may be specified.
455.Pp
464This option may be specified multiple times. 456This option may be specified multiple times.
465.It Fl P Ar passphrase 457.It Fl P Ar passphrase
466Provides the (old) passphrase. 458Provides the (old) passphrase.
@@ -489,8 +481,6 @@ option above).
489Print the SSHFP fingerprint resource record named 481Print the SSHFP fingerprint resource record named
490.Ar hostname 482.Ar hostname
491for the specified public key file. 483for the specified public key file.
492.It Fl S Ar start
493Specify start point (in hex) when generating candidate moduli for DH-GEX.
494.It Fl s Ar ca_key 484.It Fl s Ar ca_key
495Certify (sign) a public key using the specified CA key. 485Certify (sign) a public key using the specified CA key.
496Please see the 486Please see the
@@ -504,10 +494,6 @@ by key ID or serial number.
504See the 494See the
505.Sx KEY REVOCATION LISTS 495.Sx KEY REVOCATION LISTS
506section for details. 496section for details.
507.It Fl T Ar output_file
508Test DH group exchange candidate primes (generated using the
509.Fl G
510option) for safety.
511.It Fl t Cm dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa 497.It Fl t Cm dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa
512Specifies the type of key to create. 498Specifies the type of key to create.
513The possible values are 499The possible values are
@@ -583,8 +569,6 @@ Multiple
583.Fl v 569.Fl v
584options increase the verbosity. 570options increase the verbosity.
585The maximum is 3. 571The maximum is 3.
586.It Fl W Ar generator
587Specify desired generator when testing candidate moduli for DH-GEX.
588.It Fl w Ar provider 572.It Fl w Ar provider
589Specifies a path to a library that will be used when creating 573Specifies a path to a library that will be used when creating
590FIDO authenticator-hosted keys, overriding the default of using 574FIDO authenticator-hosted keys, overriding the default of using
@@ -701,25 +685,25 @@ These candidate primes are then tested for suitability (a CPU-intensive
701process). 685process).
702.Pp 686.Pp
703Generation of primes is performed using the 687Generation of primes is performed using the
704.Fl G 688.Fl M Cm generate
705option. 689option.
706The desired length of the primes may be specified by the 690The desired length of the primes may be specified by the
707.Fl b 691.Fl O Cm bits
708option. 692option.
709For example: 693For example:
710.Pp 694.Pp
711.Dl # ssh-keygen -G moduli-2048.candidates -b 2048 695.Dl # ssh-keygen -M generate -O bits=2048 moduli-2048.candidates
712.Pp 696.Pp
713By default, the search for primes begins at a random point in the 697By default, the search for primes begins at a random point in the
714desired length range. 698desired length range.
715This may be overridden using the 699This may be overridden using the
716.Fl S 700.Fl O Cm start
717option, which specifies a different start point (in hex). 701option, which specifies a different start point (in hex).
718.Pp 702.Pp
719Once a set of candidates have been generated, they must be screened for 703Once a set of candidates have been generated, they must be screened for
720suitability. 704suitability.
721This may be performed using the 705This may be performed using the
722.Fl T 706.Fl M Cm screen
723option. 707option.
724In this mode 708In this mode
725.Nm 709.Nm
@@ -728,16 +712,16 @@ will read candidates from standard input (or a file specified using the
728option). 712option).
729For example: 713For example:
730.Pp 714.Pp
731.Dl # ssh-keygen -T moduli-2048 -f moduli-2048.candidates 715.Dl # ssh-keygen -M screen -f moduli-2048.candidates moduli-2048
732.Pp 716.Pp
733By default, each candidate will be subjected to 100 primality tests. 717By default, each candidate will be subjected to 100 primality tests.
734This may be overridden using the 718This may be overridden using the
735.Fl a 719.Fl O Cm prime-tests
736option. 720option.
737The DH generator value will be chosen automatically for the 721The DH generator value will be chosen automatically for the
738prime under consideration. 722prime under consideration.
739If a specific generator is desired, it may be requested using the 723If a specific generator is desired, it may be requested using the
740.Fl W 724.Fl O Cm generator
741option. 725option.
742Valid generator values are 2, 3, and 5. 726Valid generator values are 2, 3, and 5.
743.Pp 727.Pp
@@ -745,6 +729,36 @@ Screened DH groups may be installed in
745.Pa /etc/moduli . 729.Pa /etc/moduli .
746It is important that this file contains moduli of a range of bit lengths and 730It is important that this file contains moduli of a range of bit lengths and
747that both ends of a connection share common moduli. 731that both ends of a connection share common moduli.
732.Pp
733A number of options are available for moduli generation and screening via the
734.Fl O
735flag:
736.Bl -tag -width Ds -compact
737.Pp
738.It Ic lines Ns = Ns Ar number
739Exit after screening the specified number of lines while performing DH
740candidate screening.
741.Pp
742.It Ic start-line Ns = Ns Ar line-number
743Start screening at the specified line number while performing DH candidate
744screening.
745.Pp
746.It Ic checkpoint Ns = Ns Ar filename
747Write the last line processed to the specified file while performing DH
748candidate screening.
749This will be used to skip lines in the input file that have already been
750processed if the job is restarted.
751.Pp
752.It Ic memory Ns = Ns Ar mbytes
753Specify the amount of memory to use (in megabytes) when generating
754candidate moduli for DH-GEX.
755.Pp
756.It Ic start Ns = Ns Ar hex-value
757Specify start point (in hex) when generating candidate moduli for DH-GEX.
758.Pp
759.It Ic generator Ns = Ns Ar value
760Specify desired generator (in decimal) when testing candidate moduli for DH-GEX.
761.El
748.Sh CERTIFICATES 762.Sh CERTIFICATES
749.Nm 763.Nm
750supports signing of keys to produce certificates that may be used for 764supports signing of keys to produce certificates that may be used for