attila-lendvai / gpg-keygen

Generate PGP keys with GnuPG, following best practices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error. used gpg2, key lenght 8192

snkreg opened this issue · comments

$ ./gpg-keygen.py --master-key-length 8192
*** Temporary directory for sensitive data will be '/run/shm/gpg-key-gen3be6gua4'. Make sure it's either on a volatile storage (e.g. /run/shm/ on linux), or it's deleted using 'srm' (secure-delete) once it's not needed!
*** You will repeatedly be asked for various passphrases in blocking windows, so it's a good idea to keep the log messages in this window visible.
*** Error reached toplevel, exiting.
*** Traceback (most recent call last):
*** File "./gpg-keygen.py", line 309, in
*** generateEverything(args)
*** File "./gpg-keygen.py", line 237, in generateEverything
*** generateMasterKey(args)
*** File "./gpg-keygen.py", line 132, in generateMasterKey
*** if getMasterKeyFingerprint(failIfMissing = False) != None:
*** File "./gpg-keygen.py", line 112, in getMasterKeyFingerprint
*** output = runGpg("--with-colons --list-secret-keys").splitlines()
*** File "./gpg-keygen.py", line 105, in runGpg
*** return run(gpgCommandLine(_args), *_kwargs)[0]
*** File "./gpg-keygen.py", line 95, in run
*** raise ShellCommandError(command, process.returncode, stdout, stderr)
*** ShellCommandError: Shell command returned with return code: 127
*** stdout: {{{b''}}}, stderr: {{{b'/bin/sh: 1: gpg2: not found\n'}}}

you need to install gpg2 (the package is called gnupg2 on debian).

but 8k keys are not worth it, and have been hard limited to 4k in newer versions of gpg. i've updated the readme to mention that the security of RSA keys doesn't scale well beyond 2048 bits.