Problem generating key

Fixtgene
2013-06-28
2014-12-07
  • Fixtgene

    Fixtgene - 2013-06-28

    I'm new to Enigmail and PGP and I'm having a problem generating keys using the Setup Wizard. I'm using Thunderbird 17.0.7 and Enigmail 1.5.1. I'm following the Quick Start Guide. When I get to the key generation step, the dialog box just hangs. It says it "may take several minutes to generate keys," but it's taking way more than several minutes. I've left it for more than 30 minutes, without browsing or doing anything on my computer to slow down the process, and still it goes nowhere. The green in the progress bar never moves from its starting position. I've tried with one identity and with adding several identities. It doesn't matter. It still hangs at this step, with barely any green in the progress bar. The only option I have is to wait or cancel. Any ideas?

     
    Last edit: Fixtgene 2013-06-28
  • Ludwig Hügelschäfer

    It seems, that gpg(2) is stuck at the point of key generation. Please have a look at OpenPGP -> Debugging Options -> "View logfile". Are there any lines containing [Error]? Please report them here, to help further debugging.

     
  • Fixtgene

    Fixtgene - 2013-06-29

    View logfile was blank. I went into Preferences > Debugging and Log Directory and Test Email was blank. I entered the path and my email as seen here http://www.enigmail.net/documentation/advanced.php#debug then restarted the application as suggested. I then tried to View logfile and now see Logfile has not been created yet! I tried going through the Setup Wizard again and then View logfile but same message. I'm also alternately seeing Please restart application to view logfile. I do but then get the other message. How does the logfile get created?

     
    Last edit: Fixtgene 2013-06-29
  • Fixtgene

    Fixtgene - 2013-06-30

    Can anyone advise about the logfile? I cannot access it.

     
  • Patrick Brunschwig

    The log file will be called enigdbug.txt and will be created in the directory that you specified. The directory that you specify must exist.

    The log file gets created once you try to access some Enigmail functionality.

     
  • rod

    rod - 2013-08-08

    I am having the exact same problem. Did anyone ever find a solution?

    Here are the lines I think are relevant from the log file:

    2013-08-08 07:52:47.484 [DEBUG] enigmailCommon.jsm: generateKey: subprocess = [object Object]
    2013-08-08 07:52:47.484 enigmailKeygen.js: Start: gKeygenRequest = [object Object]
    2013-08-08 07:52:48.275 [DEBUG] enigmailKeygen.js: onDataAvailable() gpg: Generating key

    2013-08-08 07:52:48.276 [DEBUG] enigmailKeygen.js: onDataAvailable() gpg: -:8: missing argument

    2013-08-08 07:52:48.364 [DEBUG] enigmailKeygen.js: Terminate:

     
    Last edit: rod 2013-08-08
  • Fictive

    Fictive - 2013-11-23

    Log file and everything related. http://pastebin.com/W4BFwx4U

    Below can be found everything that I believe is essential to this bug:

    Enigmail version: 1.6
    GnuPG Version: 1.4.7
    Thunderbird: 24.1.1

    Relevant part from the log file:

    2013-11-23 12:43:46.046 [CONSOLE] "C:\Program Files (x86)\Git\bin\gpg.exe" --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --gen-key2013-11-23 12:43:46.046 [CONSOLE] %echo Generating key
    Key-Type: RSA
    Key-Usage: sign,auth
    Key-Length: 2048
    Subkey-Type: RSA
    Subkey-Usage: encrypt
    Subkey-Length: 2048
    Name-Real:
    Name-Email: name@domain.tld
    Expire-Date: 1825

    2013-11-23 12:43:46.050 [DEBUG] enigmailCommon.jsm: generateKey: subprocess = [object Object]
    2013-11-23 12:43:46.050 enigmailKeygen.js: Start: gKeygenRequest = [object Object]
    2013-11-23 12:43:46.094 [DEBUG] enigmailSetupWizard.js: genKey - onDataAvailable() gpg: Generating key
    gpg: -:8: missing argument

     
  • Patrick Brunschwig

    Your problem is that you didn't specify a "real name" in your email account. You cannot generate a key in Enigmail without specifying your own name; the email address as such is not sufficient.

     
  • Adam Foldes

    Adam Foldes - 2014-12-06

    I have a similar problem. I use Thunderbird 31.2.0 and Enigmail 1.7.2 under Ubuntu 14.10. When I start the Enigmail Setup Wizard and go through all the steps, in the end it fails to generate a key. The orange/brown line in the key generation console gets stuck around 2/3 in its progress and then nothing happens. It never concludes nor provides my key.

    Here is my log file: http://pastebin.com/7ULMLwXm

     
  • Patrick Brunschwig

    Thanks for the log file. I'm not entirely sure what's going on here. It seems that the key generation in GnuPG did not finish until it got aborted. From what I can tell, GnuPG started to search for large prime numbers (and actually found 3 of them) but the result seemed to be unsatisfactory, thus another prime number was searched. This process continued until you aborted it.

    I'm not an expert on key generation, but I'd say there was not enough entropy to create random numbers. I'd retry the wizard. While key generation is progressing, try moving the mouse, surf on the internet, or type some text in an editor.

     
  • Adam Foldes

    Adam Foldes - 2014-12-06

    I tried again twice, but it didn't work out. The latest one is this: http://pastebin.com/pLRRQi9q

    There's one line in Hungarian

    2014-12-06 21:28:53.703 [DEBUG] enigmailSetupWizard.js: genKey - onDataAvailable() Nem írható nyilvánoskulcs-karikát találtam: eof
    gpg: key generation failed: eof
    [GNUPG:] KEY_NOT_CREATED

    "Nem írható nyilvánoskulcs-karikát találtam" means in Hungarian with proper character encoding that I have found a non-writeable keyring.

    Any other idea?

    Thank you

     
  • Ludwig Hügelschäfer

    Found the corresponding string in hu.po of gnupg source code:

    msgid "no suitable card key found: %s\n"
    msgstr "Nem ÌrhatÛ titkoskulcs-karik·t tal·ltam: %s\n"

    Do you use a smartcard?

     
  • Adam Foldes

    Adam Foldes - 2014-12-07

    I don't know what a smartcard is, so I guess I don't use any.

    "Nem ÌrhatÛ titkoskulcs-karik·t tal·ltam" means "I have found a non-writeable secret keyring"

     
  • Ludwig Hügelschäfer

    Ok, thanks for the clarification. It seems the hungarian translation of gnupg is in a horrible state. It is very old and lots of translation have been marked as "fuzzy". Additionally, all changes to the translation in the last 8 years are machine generated and no string changes have been made, so hungarian output may be a completely misleading. Are you able to switch gnupg language to english for your platform, so that we get a correct error output?

    If we go for the non writeable secret keyring: What are the permissions in your gnupg directory? Calling

    gpg(2) --version
    

    on the command line will show you where your gnupg directory is located.

     
  • Patrick Brunschwig

    I would say your problem is that the directory or the files in ~/.gnupg has/have wrong file permissions, or are not owned by you.

     
  • Adam Foldes

    Adam Foldes - 2014-12-07

    Ludwig: I don't know how to switch gnupg language. I could only switch the language of Enigmail to English.

    gpg(2) --version returns with an error message that there is a syntactic error
    gpg -- version returns with the following (unfortunately partly in Hungarian):

    gpg (GnuPG) 1.4.16
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Home: ~/.gnupg
    Támogatott algoritmusok:
    Nyilvános kulcsú (pubkey): RSA, RSA-E, RSA-S, ELG-E, DSA
    Rejtjelező (cipher): IDEA, 3DES, CAST5, BLOWFISH, AES, AES192,
    AES256, TWOFISH, CAMELLIA128, CAMELLIA192,
    CAMELLIA256
    Kivonatoló (hash): MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512,
    SHA224
    Tömörítő (compression): tömörítetlen, ZIP, ZLIB, BZIP2

    I don't know if its relevant, when in Enigmail -> Preferences -> Debugging I tested the e-mail, it said "Enigmail is working properly. For details, check the Console available from the Enigmail menu"

    when I wanted to leave the console by clicking OK, it gave an alert "Cannot connect to gpg-agent. Maybe your system uses a specialized tool for passphrase handling such as gnome-keyring or seahorse-agent. Unfortunately Enigmail cannot control the passphrase timeout for the tool you are using. Therefore the respective timeout settings in Enigmail are disregarded."

    Patrick:
    What could I do about the file permissions? I'm the admin of my computer and I can change as sudo whatever needed, but I don't know what permissions should I change.

     
  • Patrick Brunschwig

    I would do this (as user, not admin):

    rm -rf ~/.gnupg
    mkdir ~/.gnupg
    chmod 0700 ~/.gnupg
    
     
  • Adam Foldes

    Adam Foldes - 2014-12-07

    It did the trick. Now it seems to function properly. Thank you.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks