Shell
$
$ gpg --full-gen-key
gpg (GnuPG) 2.2.40; Copyright (C) 2022 g10 Code GmbH
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Выберите тип ключа:
(1) RSA и RSA (по умолчанию)
(2) DSA и Elgamal
(3) DSA (только для подписи)
(4) RSA (только для подписи)
(14) Имеющийся на карте ключ
Ваш выбор?
gpg: signal Interrupt caught ... exiting
$
----------------------------------------------
А чтобы ключ создать автоматом, нужно создать специальный файл foo:
Shell
$ cat foo
Key-Type: RSA
Name-Real: my_name
%no-protection
%commit
$
Shell
$ gpg --batch --gen-key foo
gpg: сертификат отзыва записан в '/home/user/.gnupg/openpgp-revocs.d/198DB4F2ABE5561DF58D6271ED244FCF9B298DEC.rev'.
$
О таком способе создания ключа я прочёл здесь:
https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
А вот что там сказано о параметре Key-Type:
Где-то даже в инете кто-то искал, какие бываютKey-Type: algo
Starts a new parameter block by giving the type of the primary key. The algorithm must be capable of signing. This is a required parameter. algo may either be an OpenPGP algorithm number or a string with the algorithm name. The special value ‘default’ may be used for algo to create the default key type; in this case a ‘Key-Usage’ shall not be given and ‘default’ also be used for ‘Subkey-Type’.
OpenPGP algorithm number or a string with the algorithm name
Но мой-то случай вот (см. самый первый вывод):
Shell
(1) RSA и RSA (по умолчанию)
(2) DSA и Elgamal
(3) DSA (только для подписи)
(4) RSA (только для подписи)
(14) Имеющийся на карте ключ
Shell
$ gpg --batch --gen-key foo
gpg: foo:1: invalid algorithm
$