Version: 1.2.1 (using KDE 4.5.5) OS: Linux If trying to generate a key pair with the standard dialog, not in expert mode, the process never finishes. After the last step, "Enter the passphrase" and clicking ok, the key is not generated, the program enters in an endless loop with no results and is necessary to kill the process gpg, after that kgpg shows the message "gpg did not finish. Cannot generate a new key pair". During the loop gpg and kpgp show not cpu usage. If trying in expert mode, the command driven mode works perfect. I don't think is a problem of generating random bytes because I do the same, to generate random bytes, in basic and expert mode and in expert mode doesn't take more than 20 seconds. Reproducible: Always Steps to Reproduce: Try to generate a new key pair, not in expert mode. I'm using the 64 bits version.
There is an error, the version is kgpg 2.4.1 in kde 4.5.5
Please prepare KGpg until the password is entered. Please use a fake password as this will be in the logfile later. Then go to a terminal and do: ps -C kgpg -> this will give you the process id of KGpg strace -f -o kgpg.log -s 256 -p put_the_process_if_of_the_last_command_here -> wait for some seconds until you think that KGpg was in that endless loop for sure and the key generation should have been finished. Interrupt strace (Ctrl-C). Have a look into the logfile. I suspect some short sequence of lines repeating _tons_ of times. Please reduce them to only 2 or 3 occurences. Then attach the logfile to this bug. strace is a program you likely need to install as it's not in the default package selection of most distros.
Created attachment 57449 [details] kgpg strace log
The most repetitive sequence that I could find is: 5645 poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=10, events=POLLIN}, {fd=15, events=POLLIN}, {fd=17, events=POLLIN}, {fd=21, events=POLLIN}], 8, -1) = 1 ([{fd=8, revents=POLLIN}]) 5645 read(8, "\34\0\375\257}\2\0\0\210\1\0\0\3353\v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096) = 32 5645 read(8, 0x876584, 4096) = -1 EAGAIN (Resource temporarily unavailable) 5645 read(8, 0x876584, 4096) = -1 EAGAIN (Resource temporarily unavailable) 5645 read(8, 0x876584, 4096) = -1 EAGAIN (Resource temporarily unavailable) Hope it helps!
Yes, the log helps indeed. The chosen algorithm is not supported by GnuPG (I suspect it's the ElGamal subkey). KGpg doesn't get that and waits for a different reply. I will go and fix this up but that can take a while.
SVN commit 1222430 by dakon: immediately stop if GnuPG tells us the key can not be generated CCBUG:263805 M +3 -1 kgpggeneratekey.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1222430
SVN commit 1222431 by dakon: backport key generation fixes BUG:263805 backport of r1222429 and r1222430 M +4 -4 kgpggeneratekey.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1222431
*** Bug 269235 has been marked as a duplicate of this bug. ***