Are GnuPG 1 and GnuPG 2 compatible with each other?












76















With Macports, I realize that there are ports gnupg and a newer gnupg2. I'd like to use GnuPG to encrypt files. Should I install both, or just one is enough? If I installed both, are both compatible with each other? Does it matter which one I install first matter at all?










share|improve this question





























    76















    With Macports, I realize that there are ports gnupg and a newer gnupg2. I'd like to use GnuPG to encrypt files. Should I install both, or just one is enough? If I installed both, are both compatible with each other? Does it matter which one I install first matter at all?










    share|improve this question



























      76












      76








      76


      12






      With Macports, I realize that there are ports gnupg and a newer gnupg2. I'd like to use GnuPG to encrypt files. Should I install both, or just one is enough? If I installed both, are both compatible with each other? Does it matter which one I install first matter at all?










      share|improve this question
















      With Macports, I realize that there are ports gnupg and a newer gnupg2. I'd like to use GnuPG to encrypt files. Should I install both, or just one is enough? If I installed both, are both compatible with each other? Does it matter which one I install first matter at all?







      gnupg






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 '15 at 12:56









      Jens Erat

      12.8k114660




      12.8k114660










      asked Oct 6 '13 at 23:23









      qazwsxqazwsx

      3,080154771




      3,080154771






















          1 Answer
          1






          active

          oldest

          votes


















          81














          GnuPG 1



          GnuPG 1.4 ("classic") will stay for embedded and server usage, as it brings less dependencies and smaller binaries. Earlier, it was often installed as gpg, today it is more often named gpg1 (depending on distribution).



          From the GnuPG 1.4 man page:




          This is the standalone version of gpg. For desktop use you should consider using gpg2 from the GnuPG-2 package (On some platforms gpg2 is installed under the name gpg)




          GnuPG 2



          GnuPG 2.0 is a redesigned version of GnuPG -- but changes are mostly on internal level. The newer version is split into multiple modules, for example there are also modules for X.509 (used by S/MIME).



          From man gpg2:




          In contrast to the standalone version gpg, which is more suited for
          server and embedded platforms, this version is commonly installed under
          the name gpg2 and more targeted to the desktop as it requires several
          other modules to be installed.




          GnuPG 2.1



          An important change came with GnuPG 2.1, which combines the formerly separated public and private keyrings (pubring.gpg vs. secring.gpg) into the public keyring. This has been implemented in a manner keeping things compatible, so you can still use GnuPG 1 when GnuPG 2.1 integrated the private keyring, but changes to the private keys will not show up for the respective other implementation. From the changelog:




          [...] allows co-existence of older GnuPG versions with GnuPG 2.1. However, any change to the private keys using the new gpg will not show up when using pre-2.1 versions of GnuPG and vice versa.






          To directly answer your question:




          Should I install both, or just one is enough?
          Does it matter which one I install first matter at all?




          Just install both. They don't interfere anyway. Install gpg (if not installed anyway) for other applications that access it (like package managers, mail clients, ...), and gpg2 for "direct use" on the command line.




          If I installed both, are both compatible with each other?




          Both implement the OpenPGP protocol, so they're compatible to each other regarding data shared among them. Additionally, they're (mostly) using the same commands and options, so most of the time you could switch between them arbitrarily.



          GnuPG 2.1 makes changes to the private keyring invisible to pre-GnuPG 2.1 implementations (see above in the GnuPG 2.1 section).






          share|improve this answer





















          • 1





            gpg2 doesn't seem to see the private keys that gpg sees. For instance, gpg2 --list-secret-keys gives no output, but gpg --list-secret-keys does give output.

            – Flimm
            Jul 23 '16 at 10:15






          • 5





            This is exactly what I described with the important difference between GnuPG 2 and 2.1: GnuPG 2.1 stores private keys in another file. Your private keys are stored in GnuPG 1.4's secring.gpg, which is not queried by GnuPG 2.1. Copy them to GnuPG 2.1 through gpg --export-secret-keys [key-id] | gpg2 --import.

            – Jens Erat
            Jul 23 '16 at 10:22











          • gpg2 actually automatically imported the gpg keys for me (cygwin)

            – lucidbrot
            Nov 6 '17 at 15:36











          • See also: lists.gnupg.org/pipermail/gnupg-users/2018-January/059816.html

            – Ben Creasy
            May 29 '18 at 1:13











          • This answer may be a little out of date. On Ubuntu 18.04 bionic the gpgv1 package is described as "deprecated "classic" version" and gpgv2 is described as "dummy transitional package." Installing the plain gpg package gives gpg version 2.2.4. So it appears that gpgv1 is going away and gpgv2 (referred to simply as "gpg") is the new standard.

            – Mark Doliner
            Feb 7 at 22:10













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f655246%2fare-gnupg-1-and-gnupg-2-compatible-with-each-other%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          81














          GnuPG 1



          GnuPG 1.4 ("classic") will stay for embedded and server usage, as it brings less dependencies and smaller binaries. Earlier, it was often installed as gpg, today it is more often named gpg1 (depending on distribution).



          From the GnuPG 1.4 man page:




          This is the standalone version of gpg. For desktop use you should consider using gpg2 from the GnuPG-2 package (On some platforms gpg2 is installed under the name gpg)




          GnuPG 2



          GnuPG 2.0 is a redesigned version of GnuPG -- but changes are mostly on internal level. The newer version is split into multiple modules, for example there are also modules for X.509 (used by S/MIME).



          From man gpg2:




          In contrast to the standalone version gpg, which is more suited for
          server and embedded platforms, this version is commonly installed under
          the name gpg2 and more targeted to the desktop as it requires several
          other modules to be installed.




          GnuPG 2.1



          An important change came with GnuPG 2.1, which combines the formerly separated public and private keyrings (pubring.gpg vs. secring.gpg) into the public keyring. This has been implemented in a manner keeping things compatible, so you can still use GnuPG 1 when GnuPG 2.1 integrated the private keyring, but changes to the private keys will not show up for the respective other implementation. From the changelog:




          [...] allows co-existence of older GnuPG versions with GnuPG 2.1. However, any change to the private keys using the new gpg will not show up when using pre-2.1 versions of GnuPG and vice versa.






          To directly answer your question:




          Should I install both, or just one is enough?
          Does it matter which one I install first matter at all?




          Just install both. They don't interfere anyway. Install gpg (if not installed anyway) for other applications that access it (like package managers, mail clients, ...), and gpg2 for "direct use" on the command line.




          If I installed both, are both compatible with each other?




          Both implement the OpenPGP protocol, so they're compatible to each other regarding data shared among them. Additionally, they're (mostly) using the same commands and options, so most of the time you could switch between them arbitrarily.



          GnuPG 2.1 makes changes to the private keyring invisible to pre-GnuPG 2.1 implementations (see above in the GnuPG 2.1 section).






          share|improve this answer





















          • 1





            gpg2 doesn't seem to see the private keys that gpg sees. For instance, gpg2 --list-secret-keys gives no output, but gpg --list-secret-keys does give output.

            – Flimm
            Jul 23 '16 at 10:15






          • 5





            This is exactly what I described with the important difference between GnuPG 2 and 2.1: GnuPG 2.1 stores private keys in another file. Your private keys are stored in GnuPG 1.4's secring.gpg, which is not queried by GnuPG 2.1. Copy them to GnuPG 2.1 through gpg --export-secret-keys [key-id] | gpg2 --import.

            – Jens Erat
            Jul 23 '16 at 10:22











          • gpg2 actually automatically imported the gpg keys for me (cygwin)

            – lucidbrot
            Nov 6 '17 at 15:36











          • See also: lists.gnupg.org/pipermail/gnupg-users/2018-January/059816.html

            – Ben Creasy
            May 29 '18 at 1:13











          • This answer may be a little out of date. On Ubuntu 18.04 bionic the gpgv1 package is described as "deprecated "classic" version" and gpgv2 is described as "dummy transitional package." Installing the plain gpg package gives gpg version 2.2.4. So it appears that gpgv1 is going away and gpgv2 (referred to simply as "gpg") is the new standard.

            – Mark Doliner
            Feb 7 at 22:10


















          81














          GnuPG 1



          GnuPG 1.4 ("classic") will stay for embedded and server usage, as it brings less dependencies and smaller binaries. Earlier, it was often installed as gpg, today it is more often named gpg1 (depending on distribution).



          From the GnuPG 1.4 man page:




          This is the standalone version of gpg. For desktop use you should consider using gpg2 from the GnuPG-2 package (On some platforms gpg2 is installed under the name gpg)




          GnuPG 2



          GnuPG 2.0 is a redesigned version of GnuPG -- but changes are mostly on internal level. The newer version is split into multiple modules, for example there are also modules for X.509 (used by S/MIME).



          From man gpg2:




          In contrast to the standalone version gpg, which is more suited for
          server and embedded platforms, this version is commonly installed under
          the name gpg2 and more targeted to the desktop as it requires several
          other modules to be installed.




          GnuPG 2.1



          An important change came with GnuPG 2.1, which combines the formerly separated public and private keyrings (pubring.gpg vs. secring.gpg) into the public keyring. This has been implemented in a manner keeping things compatible, so you can still use GnuPG 1 when GnuPG 2.1 integrated the private keyring, but changes to the private keys will not show up for the respective other implementation. From the changelog:




          [...] allows co-existence of older GnuPG versions with GnuPG 2.1. However, any change to the private keys using the new gpg will not show up when using pre-2.1 versions of GnuPG and vice versa.






          To directly answer your question:




          Should I install both, or just one is enough?
          Does it matter which one I install first matter at all?




          Just install both. They don't interfere anyway. Install gpg (if not installed anyway) for other applications that access it (like package managers, mail clients, ...), and gpg2 for "direct use" on the command line.




          If I installed both, are both compatible with each other?




          Both implement the OpenPGP protocol, so they're compatible to each other regarding data shared among them. Additionally, they're (mostly) using the same commands and options, so most of the time you could switch between them arbitrarily.



          GnuPG 2.1 makes changes to the private keyring invisible to pre-GnuPG 2.1 implementations (see above in the GnuPG 2.1 section).






          share|improve this answer





















          • 1





            gpg2 doesn't seem to see the private keys that gpg sees. For instance, gpg2 --list-secret-keys gives no output, but gpg --list-secret-keys does give output.

            – Flimm
            Jul 23 '16 at 10:15






          • 5





            This is exactly what I described with the important difference between GnuPG 2 and 2.1: GnuPG 2.1 stores private keys in another file. Your private keys are stored in GnuPG 1.4's secring.gpg, which is not queried by GnuPG 2.1. Copy them to GnuPG 2.1 through gpg --export-secret-keys [key-id] | gpg2 --import.

            – Jens Erat
            Jul 23 '16 at 10:22











          • gpg2 actually automatically imported the gpg keys for me (cygwin)

            – lucidbrot
            Nov 6 '17 at 15:36











          • See also: lists.gnupg.org/pipermail/gnupg-users/2018-January/059816.html

            – Ben Creasy
            May 29 '18 at 1:13











          • This answer may be a little out of date. On Ubuntu 18.04 bionic the gpgv1 package is described as "deprecated "classic" version" and gpgv2 is described as "dummy transitional package." Installing the plain gpg package gives gpg version 2.2.4. So it appears that gpgv1 is going away and gpgv2 (referred to simply as "gpg") is the new standard.

            – Mark Doliner
            Feb 7 at 22:10
















          81












          81








          81







          GnuPG 1



          GnuPG 1.4 ("classic") will stay for embedded and server usage, as it brings less dependencies and smaller binaries. Earlier, it was often installed as gpg, today it is more often named gpg1 (depending on distribution).



          From the GnuPG 1.4 man page:




          This is the standalone version of gpg. For desktop use you should consider using gpg2 from the GnuPG-2 package (On some platforms gpg2 is installed under the name gpg)




          GnuPG 2



          GnuPG 2.0 is a redesigned version of GnuPG -- but changes are mostly on internal level. The newer version is split into multiple modules, for example there are also modules for X.509 (used by S/MIME).



          From man gpg2:




          In contrast to the standalone version gpg, which is more suited for
          server and embedded platforms, this version is commonly installed under
          the name gpg2 and more targeted to the desktop as it requires several
          other modules to be installed.




          GnuPG 2.1



          An important change came with GnuPG 2.1, which combines the formerly separated public and private keyrings (pubring.gpg vs. secring.gpg) into the public keyring. This has been implemented in a manner keeping things compatible, so you can still use GnuPG 1 when GnuPG 2.1 integrated the private keyring, but changes to the private keys will not show up for the respective other implementation. From the changelog:




          [...] allows co-existence of older GnuPG versions with GnuPG 2.1. However, any change to the private keys using the new gpg will not show up when using pre-2.1 versions of GnuPG and vice versa.






          To directly answer your question:




          Should I install both, or just one is enough?
          Does it matter which one I install first matter at all?




          Just install both. They don't interfere anyway. Install gpg (if not installed anyway) for other applications that access it (like package managers, mail clients, ...), and gpg2 for "direct use" on the command line.




          If I installed both, are both compatible with each other?




          Both implement the OpenPGP protocol, so they're compatible to each other regarding data shared among them. Additionally, they're (mostly) using the same commands and options, so most of the time you could switch between them arbitrarily.



          GnuPG 2.1 makes changes to the private keyring invisible to pre-GnuPG 2.1 implementations (see above in the GnuPG 2.1 section).






          share|improve this answer















          GnuPG 1



          GnuPG 1.4 ("classic") will stay for embedded and server usage, as it brings less dependencies and smaller binaries. Earlier, it was often installed as gpg, today it is more often named gpg1 (depending on distribution).



          From the GnuPG 1.4 man page:




          This is the standalone version of gpg. For desktop use you should consider using gpg2 from the GnuPG-2 package (On some platforms gpg2 is installed under the name gpg)




          GnuPG 2



          GnuPG 2.0 is a redesigned version of GnuPG -- but changes are mostly on internal level. The newer version is split into multiple modules, for example there are also modules for X.509 (used by S/MIME).



          From man gpg2:




          In contrast to the standalone version gpg, which is more suited for
          server and embedded platforms, this version is commonly installed under
          the name gpg2 and more targeted to the desktop as it requires several
          other modules to be installed.




          GnuPG 2.1



          An important change came with GnuPG 2.1, which combines the formerly separated public and private keyrings (pubring.gpg vs. secring.gpg) into the public keyring. This has been implemented in a manner keeping things compatible, so you can still use GnuPG 1 when GnuPG 2.1 integrated the private keyring, but changes to the private keys will not show up for the respective other implementation. From the changelog:




          [...] allows co-existence of older GnuPG versions with GnuPG 2.1. However, any change to the private keys using the new gpg will not show up when using pre-2.1 versions of GnuPG and vice versa.






          To directly answer your question:




          Should I install both, or just one is enough?
          Does it matter which one I install first matter at all?




          Just install both. They don't interfere anyway. Install gpg (if not installed anyway) for other applications that access it (like package managers, mail clients, ...), and gpg2 for "direct use" on the command line.




          If I installed both, are both compatible with each other?




          Both implement the OpenPGP protocol, so they're compatible to each other regarding data shared among them. Additionally, they're (mostly) using the same commands and options, so most of the time you could switch between them arbitrarily.



          GnuPG 2.1 makes changes to the private keyring invisible to pre-GnuPG 2.1 implementations (see above in the GnuPG 2.1 section).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 8 at 21:06

























          answered Oct 7 '13 at 0:16









          Jens EratJens Erat

          12.8k114660




          12.8k114660








          • 1





            gpg2 doesn't seem to see the private keys that gpg sees. For instance, gpg2 --list-secret-keys gives no output, but gpg --list-secret-keys does give output.

            – Flimm
            Jul 23 '16 at 10:15






          • 5





            This is exactly what I described with the important difference between GnuPG 2 and 2.1: GnuPG 2.1 stores private keys in another file. Your private keys are stored in GnuPG 1.4's secring.gpg, which is not queried by GnuPG 2.1. Copy them to GnuPG 2.1 through gpg --export-secret-keys [key-id] | gpg2 --import.

            – Jens Erat
            Jul 23 '16 at 10:22











          • gpg2 actually automatically imported the gpg keys for me (cygwin)

            – lucidbrot
            Nov 6 '17 at 15:36











          • See also: lists.gnupg.org/pipermail/gnupg-users/2018-January/059816.html

            – Ben Creasy
            May 29 '18 at 1:13











          • This answer may be a little out of date. On Ubuntu 18.04 bionic the gpgv1 package is described as "deprecated "classic" version" and gpgv2 is described as "dummy transitional package." Installing the plain gpg package gives gpg version 2.2.4. So it appears that gpgv1 is going away and gpgv2 (referred to simply as "gpg") is the new standard.

            – Mark Doliner
            Feb 7 at 22:10
















          • 1





            gpg2 doesn't seem to see the private keys that gpg sees. For instance, gpg2 --list-secret-keys gives no output, but gpg --list-secret-keys does give output.

            – Flimm
            Jul 23 '16 at 10:15






          • 5





            This is exactly what I described with the important difference between GnuPG 2 and 2.1: GnuPG 2.1 stores private keys in another file. Your private keys are stored in GnuPG 1.4's secring.gpg, which is not queried by GnuPG 2.1. Copy them to GnuPG 2.1 through gpg --export-secret-keys [key-id] | gpg2 --import.

            – Jens Erat
            Jul 23 '16 at 10:22











          • gpg2 actually automatically imported the gpg keys for me (cygwin)

            – lucidbrot
            Nov 6 '17 at 15:36











          • See also: lists.gnupg.org/pipermail/gnupg-users/2018-January/059816.html

            – Ben Creasy
            May 29 '18 at 1:13











          • This answer may be a little out of date. On Ubuntu 18.04 bionic the gpgv1 package is described as "deprecated "classic" version" and gpgv2 is described as "dummy transitional package." Installing the plain gpg package gives gpg version 2.2.4. So it appears that gpgv1 is going away and gpgv2 (referred to simply as "gpg") is the new standard.

            – Mark Doliner
            Feb 7 at 22:10










          1




          1





          gpg2 doesn't seem to see the private keys that gpg sees. For instance, gpg2 --list-secret-keys gives no output, but gpg --list-secret-keys does give output.

          – Flimm
          Jul 23 '16 at 10:15





          gpg2 doesn't seem to see the private keys that gpg sees. For instance, gpg2 --list-secret-keys gives no output, but gpg --list-secret-keys does give output.

          – Flimm
          Jul 23 '16 at 10:15




          5




          5





          This is exactly what I described with the important difference between GnuPG 2 and 2.1: GnuPG 2.1 stores private keys in another file. Your private keys are stored in GnuPG 1.4's secring.gpg, which is not queried by GnuPG 2.1. Copy them to GnuPG 2.1 through gpg --export-secret-keys [key-id] | gpg2 --import.

          – Jens Erat
          Jul 23 '16 at 10:22





          This is exactly what I described with the important difference between GnuPG 2 and 2.1: GnuPG 2.1 stores private keys in another file. Your private keys are stored in GnuPG 1.4's secring.gpg, which is not queried by GnuPG 2.1. Copy them to GnuPG 2.1 through gpg --export-secret-keys [key-id] | gpg2 --import.

          – Jens Erat
          Jul 23 '16 at 10:22













          gpg2 actually automatically imported the gpg keys for me (cygwin)

          – lucidbrot
          Nov 6 '17 at 15:36





          gpg2 actually automatically imported the gpg keys for me (cygwin)

          – lucidbrot
          Nov 6 '17 at 15:36













          See also: lists.gnupg.org/pipermail/gnupg-users/2018-January/059816.html

          – Ben Creasy
          May 29 '18 at 1:13





          See also: lists.gnupg.org/pipermail/gnupg-users/2018-January/059816.html

          – Ben Creasy
          May 29 '18 at 1:13













          This answer may be a little out of date. On Ubuntu 18.04 bionic the gpgv1 package is described as "deprecated "classic" version" and gpgv2 is described as "dummy transitional package." Installing the plain gpg package gives gpg version 2.2.4. So it appears that gpgv1 is going away and gpgv2 (referred to simply as "gpg") is the new standard.

          – Mark Doliner
          Feb 7 at 22:10







          This answer may be a little out of date. On Ubuntu 18.04 bionic the gpgv1 package is described as "deprecated "classic" version" and gpgv2 is described as "dummy transitional package." Installing the plain gpg package gives gpg version 2.2.4. So it appears that gpgv1 is going away and gpgv2 (referred to simply as "gpg") is the new standard.

          – Mark Doliner
          Feb 7 at 22:10




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f655246%2fare-gnupg-1-and-gnupg-2-compatible-with-each-other%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix