4 Replies Latest reply on Oct 21, 2014 9:53 AM by vjou

    How to create a public key with gnupg

    vjou

      I'm trying to encrypt the password on Edison for email client. I installed gnugp and it seems working. But it requires me a Passphrase (but it did not wait for input) and cancels key generation as shown below.

      root@Edison1:~# gpg --gen-key

      ...
      Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
      You need a Passphrase to protect your secret key.

       

      gpg: problem with the agent: No pinentry
      gpg: Key generation canceled.

      The problem I guessed was gpg-agent was calling pinentry but Edison did not have a window to popup for passphrase. pinentry-curses seemed to help to disable using window interface for passphrase, but I could not find it in Yocto package list. Though I'm trying combinations of options for gpg and gpg-agent, I'm still not making it work.

      How can I make gnupg to generate a public key?

       

      Thank you,

      vjou

        • 1. Re: How to create a public key with gnupg
          mhahn

          Have you tried compiling ftp://ftp.gnupg.org/gcrypt/pinentry/pinentry-0.8.4.tar.bz2?

          Probably would require configure settings such as --enable-pinentry-qt4=no --enable-pinentry-qt4-clipboard=no --enable-pinentry-curses --enable-embedded=no --enable-pinentry-qt=no --enable-pinentry-gtk2=no --enable-pinentry-gtk=no --enable-pinentry-tty --disable-gtktest

          1 of 1 people found this helpful
          • 2. Re: How to create a public key with gnupg
            vjou

            Hi, mhahn,

             

            Thank you for your advise.

             

            I have not tried compiling pinentry-0.8.4 yet. I had only tried bitbake pinentry because it was in Yocto Package list. The bitbake started but it did not seem working. So, I should try compiling pinentry.

            vjou@vjou-Aspire-5745DG:~/Documents/IntelEdison/edison-src/build$ bitbake pinentry
            Loading cache: 100% |##############################################################| ETA:  00:00:00
            Loaded 1272 entries from dependency cache.
            ERROR: Nothing PROVIDES 'pinentry'

            Summary: There was 1 ERROR message shown, returning a non-zero exit code.

             

            I am a kind of newbie about Linux as well as embedded one. I setup Ubuntu on my PC only for Edison last week and this is my own first Linux PC. Though I was impressed that setting up bitbake was very easy, I did not think about setting up compiling environment because setting up the environment looked harder to me. It must be time for me to setup new environment.

             

            Or, I may give Debian a try. ubilinux seems available for Edison now.

             

            Thanks again,

            vjou

            • 3. Re: How to create a public key with gnupg
              mhahn

              if looking into Yocto / bitbake - just take the recipe at oe-core/pinentry_0.8.4.bb at master · openembedded/oe-core · GitHub. Should build fine

              • 4. Re: How to create a public key with gnupg
                vjou

                Thanks for your advice, I finally made pinentry_0.8.4-r0_core2-32.ipk.

                 

                I misunderstood how pinentry works. pinentry did not require GUI window and worked with terminal. That was good. But, generating key may be a too much burden for Edison. When gpg --gen-key started generating key after my entering passphrase, Edison's response became slow. After the key generation returned, Edison started acting strange. I rebooted Edison, but, it was still not responding correctly. I'm going to flash Edison.

                 

                Now, I realized I just needed encryption and decryption on Edison and I may be able to use a key that is generated somewhere else. So, I will create a key on my PC and try to use it with gpg on Edison.