diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-12-30 03:30:09 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-12-30 14:33:54 +1100 |
commit | 3e60d18fba1b502c21d64fc7e81d80bcd08a2092 (patch) | |
tree | 0ec5f0bd3e34d1290a6c1a068234d39d8d367b35 /ssh-keygen.1 | |
parent | 1e645fe767f27725dc7fd7864526de34683f7daf (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.1 | 142 |
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. |
269 | Higher numbers result in slower passphrase verification and increased | 263 | Higher numbers result in slower passphrase verification and increased |
270 | resistance to brute-force password cracking (should the keys be stolen). | 264 | resistance to brute-force password cracking (should the keys be stolen). |
271 | .Pp | ||
272 | When screening DH-GEX candidates (using the | ||
273 | .Fl T | ||
274 | command), | ||
275 | this option specifies the number of primality tests to perform. | ||
276 | .It Fl B | 265 | .It Fl B |
277 | Show the bubblebabble digest of specified private or public key file. | 266 | Show 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 | |||
333 | option to print found keys in a hashed format. | 322 | option to print found keys in a hashed format. |
334 | .It Fl f Ar filename | 323 | .It Fl f Ar filename |
335 | Specifies the filename of the key file. | 324 | Specifies the filename of the key file. |
336 | .It Fl G Ar output_file | ||
337 | Generate candidate primes for DH-GEX. | ||
338 | These primes must be screened for | ||
339 | safety (using the | ||
340 | .Fl T | ||
341 | option) before use. | ||
342 | .It Fl g | 325 | .It Fl g |
343 | Use generic DNS format when printing fingerprint resource records using the | 326 | Use 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 | |||
379 | commercial SSH implementations. | 362 | commercial SSH implementations. |
380 | The default import format is | 363 | The default import format is |
381 | .Dq RFC4716 . | 364 | .Dq RFC4716 . |
382 | .It Fl J Ar num_lines | ||
383 | Exit after screening the specified number of lines | ||
384 | while performing DH candidate screening using the | ||
385 | .Fl T | ||
386 | option. | ||
387 | .It Fl j Ar start_line | ||
388 | Start screening at the specified line number | ||
389 | while performing DH candidate screening using the | ||
390 | .Fl T | ||
391 | option. | ||
392 | .It Fl K Ar checkpt | ||
393 | Write the last line processed to the file | ||
394 | .Ar checkpt | ||
395 | while performing DH candidate screening using the | ||
396 | .Fl T | ||
397 | option. | ||
398 | This will be used to skip lines in the input file that have already been | ||
399 | processed if the job is restarted. | ||
400 | .It Fl k | 365 | .It Fl k |
401 | Generate a KRL file. | 366 | Generate a KRL file. |
402 | In this mode, | 367 | In this mode, |
@@ -419,9 +384,26 @@ If combined with | |||
419 | .Fl v , | 384 | .Fl v , |
420 | a visual ASCII art representation of the key is supplied with the | 385 | a visual ASCII art representation of the key is supplied with the |
421 | fingerprint. | 386 | fingerprint. |
422 | .It Fl M Ar memory | 387 | .It Fl M Cm generate |
423 | Specify the amount of memory to use (in megabytes) when generating | 388 | Generate candidate Diffie-Hellman Group Exchange (DH-GEX) parameters for |
424 | candidate moduli for DH-GEX. | 389 | eventual use by the |
390 | .Sq diffie-hellman-group-exchange-* | ||
391 | key exchange methods. | ||
392 | The numbers generated by this operation must be further screened before | ||
393 | use. | ||
394 | See the | ||
395 | .Sx MODULI GENERATION | ||
396 | section for more information. | ||
397 | .It Fl M Cm screen | ||
398 | Screen candidate parameters for Diffie-Hellman Group Exchange. | ||
399 | This will accept a list of candidate numbers and test that they are | ||
400 | safe (Sophie Germain) primes with acceptable group generators. | ||
401 | The results of this operation may be added to the | ||
402 | .Pa /etc/moduli | ||
403 | file. | ||
404 | See the | ||
405 | .Sx MODULI GENERATION | ||
406 | section for more information. | ||
425 | .It Fl m Ar key_format | 407 | .It Fl m Ar key_format |
426 | Specify a key format for key generation, the | 408 | Specify 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 |
458 | section for details. | 440 | section for details. |
459 | .It Fl O Ar option | 441 | .It Fl O Ar option |
460 | Specify a certificate option when signing a key. | 442 | Specify a key/value option. |
461 | See the | 443 | These are specific to the operation that |
444 | .Nm | ||
445 | has been requested to perform. | ||
446 | .Pp | ||
447 | When signing certificates, one of the options listed in the | ||
462 | .Sx CERTIFICATES | 448 | .Sx CERTIFICATES |
463 | section for a list of available certificate options. | 449 | section may be specified here. |
450 | .Pp | ||
451 | When performing moduli generation or screening, one of the options | ||
452 | listed in the | ||
453 | .Sx MODULI GENERATION | ||
454 | section may be specified. | ||
455 | .Pp | ||
464 | This option may be specified multiple times. | 456 | This option may be specified multiple times. |
465 | .It Fl P Ar passphrase | 457 | .It Fl P Ar passphrase |
466 | Provides the (old) passphrase. | 458 | Provides the (old) passphrase. |
@@ -489,8 +481,6 @@ option above). | |||
489 | Print the SSHFP fingerprint resource record named | 481 | Print the SSHFP fingerprint resource record named |
490 | .Ar hostname | 482 | .Ar hostname |
491 | for the specified public key file. | 483 | for the specified public key file. |
492 | .It Fl S Ar start | ||
493 | Specify 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 |
495 | Certify (sign) a public key using the specified CA key. | 485 | Certify (sign) a public key using the specified CA key. |
496 | Please see the | 486 | Please see the |
@@ -504,10 +494,6 @@ by key ID or serial number. | |||
504 | See the | 494 | See the |
505 | .Sx KEY REVOCATION LISTS | 495 | .Sx KEY REVOCATION LISTS |
506 | section for details. | 496 | section for details. |
507 | .It Fl T Ar output_file | ||
508 | Test DH group exchange candidate primes (generated using the | ||
509 | .Fl G | ||
510 | option) 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 |
512 | Specifies the type of key to create. | 498 | Specifies the type of key to create. |
513 | The possible values are | 499 | The possible values are |
@@ -583,8 +569,6 @@ Multiple | |||
583 | .Fl v | 569 | .Fl v |
584 | options increase the verbosity. | 570 | options increase the verbosity. |
585 | The maximum is 3. | 571 | The maximum is 3. |
586 | .It Fl W Ar generator | ||
587 | Specify desired generator when testing candidate moduli for DH-GEX. | ||
588 | .It Fl w Ar provider | 572 | .It Fl w Ar provider |
589 | Specifies a path to a library that will be used when creating | 573 | Specifies a path to a library that will be used when creating |
590 | FIDO authenticator-hosted keys, overriding the default of using | 574 | FIDO authenticator-hosted keys, overriding the default of using |
@@ -701,25 +685,25 @@ These candidate primes are then tested for suitability (a CPU-intensive | |||
701 | process). | 685 | process). |
702 | .Pp | 686 | .Pp |
703 | Generation of primes is performed using the | 687 | Generation of primes is performed using the |
704 | .Fl G | 688 | .Fl M Cm generate |
705 | option. | 689 | option. |
706 | The desired length of the primes may be specified by the | 690 | The desired length of the primes may be specified by the |
707 | .Fl b | 691 | .Fl O Cm bits |
708 | option. | 692 | option. |
709 | For example: | 693 | For 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 |
713 | By default, the search for primes begins at a random point in the | 697 | By default, the search for primes begins at a random point in the |
714 | desired length range. | 698 | desired length range. |
715 | This may be overridden using the | 699 | This may be overridden using the |
716 | .Fl S | 700 | .Fl O Cm start |
717 | option, which specifies a different start point (in hex). | 701 | option, which specifies a different start point (in hex). |
718 | .Pp | 702 | .Pp |
719 | Once a set of candidates have been generated, they must be screened for | 703 | Once a set of candidates have been generated, they must be screened for |
720 | suitability. | 704 | suitability. |
721 | This may be performed using the | 705 | This may be performed using the |
722 | .Fl T | 706 | .Fl M Cm screen |
723 | option. | 707 | option. |
724 | In this mode | 708 | In this mode |
725 | .Nm | 709 | .Nm |
@@ -728,16 +712,16 @@ will read candidates from standard input (or a file specified using the | |||
728 | option). | 712 | option). |
729 | For example: | 713 | For 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 |
733 | By default, each candidate will be subjected to 100 primality tests. | 717 | By default, each candidate will be subjected to 100 primality tests. |
734 | This may be overridden using the | 718 | This may be overridden using the |
735 | .Fl a | 719 | .Fl O Cm prime-tests |
736 | option. | 720 | option. |
737 | The DH generator value will be chosen automatically for the | 721 | The DH generator value will be chosen automatically for the |
738 | prime under consideration. | 722 | prime under consideration. |
739 | If a specific generator is desired, it may be requested using the | 723 | If a specific generator is desired, it may be requested using the |
740 | .Fl W | 724 | .Fl O Cm generator |
741 | option. | 725 | option. |
742 | Valid generator values are 2, 3, and 5. | 726 | Valid 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 . |
746 | It is important that this file contains moduli of a range of bit lengths and | 730 | It is important that this file contains moduli of a range of bit lengths and |
747 | that both ends of a connection share common moduli. | 731 | that both ends of a connection share common moduli. |
732 | .Pp | ||
733 | A number of options are available for moduli generation and screening via the | ||
734 | .Fl O | ||
735 | flag: | ||
736 | .Bl -tag -width Ds -compact | ||
737 | .Pp | ||
738 | .It Ic lines Ns = Ns Ar number | ||
739 | Exit after screening the specified number of lines while performing DH | ||
740 | candidate screening. | ||
741 | .Pp | ||
742 | .It Ic start-line Ns = Ns Ar line-number | ||
743 | Start screening at the specified line number while performing DH candidate | ||
744 | screening. | ||
745 | .Pp | ||
746 | .It Ic checkpoint Ns = Ns Ar filename | ||
747 | Write the last line processed to the specified file while performing DH | ||
748 | candidate screening. | ||
749 | This will be used to skip lines in the input file that have already been | ||
750 | processed if the job is restarted. | ||
751 | .Pp | ||
752 | .It Ic memory Ns = Ns Ar mbytes | ||
753 | Specify the amount of memory to use (in megabytes) when generating | ||
754 | candidate moduli for DH-GEX. | ||
755 | .Pp | ||
756 | .It Ic start Ns = Ns Ar hex-value | ||
757 | Specify start point (in hex) when generating candidate moduli for DH-GEX. | ||
758 | .Pp | ||
759 | .It Ic generator Ns = Ns Ar value | ||
760 | Specify desired generator (in decimal) when testing candidate moduli for DH-GEX. | ||
761 | .El | ||
748 | .Sh CERTIFICATES | 762 | .Sh CERTIFICATES |
749 | .Nm | 763 | .Nm |
750 | supports signing of keys to produce certificates that may be used for | 764 | supports signing of keys to produce certificates that may be used for |