GnuPG question: moving keys onto auxilary keyrings - PGP

This is a discussion on GnuPG question: moving keys onto auxilary keyrings - PGP ; All my public and secret keys are in the usual files, ~/.gnupg/pubring.gpg and ~/.gnupg/secring.gpg. But I wish to rationalize my main keyrings by moving used rarely public and secret keys into files such as ~/.gnupg/pubaux.gpg and ~/gnupg/secaux.gpg. I believe I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: GnuPG question: moving keys onto auxilary keyrings

  1. GnuPG question: moving keys onto auxilary keyrings

    All my public and secret keys are in the usual files,
    ~/.gnupg/pubring.gpg and ~/.gnupg/secring.gpg. But I wish to
    rationalize my main keyrings by moving used rarely public and
    secret keys into files such as ~/.gnupg/pubaux.gpg and
    ~/gnupg/secaux.gpg.

    I believe I understand how the --keyring and --secret-keyring
    options work with keys that are already in the other files.

    But how do I create the auxilary keyrings and move keys from the
    main ones onto them? This I can not figure out?

    Thanks!


  2. Re: GnuPG question: moving keys onto auxilary keyrings

    Nomen Nescio wrote:

    > But how do I create the auxilary keyrings and move keys from the
    > main ones onto them? This I can not figure out?


    Make a copy of your ~/.gnupg
    cp -a .gnupg gpgnew

    Point gpg to your new directory
    gpg --homedir ~/gpgnew
    or export GNUPGHOME=~/gpgnew

    Once in the new homedir trim the keys to your liking then rename the rings
    to your liking then move the rings to the old $GNUPGHOME.

    Set the --keyring and --secret-keyring in the options file in your old
    $GNUPGHOME

    export GNUPGHOME=~/.gnupg

    Restart the gpg.

    I never did this myself but if I ever had a need to do it those would be my
    logical steps.

    --
    Jabber: molchun@jabber.org
    PGP ID: 0x304563A8


  3. Re: GnuPG question: moving keys onto auxilary keyrings

    In alt.security.pgp Nomen Nescio wrote:
    > All my public and secret keys are in the usual files,
    > ~/.gnupg/pubring.gpg and ~/.gnupg/secring.gpg. But I wish to
    > rationalize my main keyrings by moving used rarely public and
    > secret keys into files such as ~/.gnupg/pubaux.gpg and
    > ~/gnupg/secaux.gpg.
    >
    > I believe I understand how the --keyring and --secret-keyring
    > options work with keys that are already in the other files.
    >
    > But how do I create the auxilary keyrings and move keys from the
    > main ones onto them? This I can not figure out?


    touch ~/.gnupg/pubaux.gpg
    gpg --export keys-i-want-to-move > keys.tmp
    gpg --delete-key keys-i-want-to-move
    gpg --no-default-keyring --keyring pubaux.gpg --import keys.tmp

    Now you have keys in both pubring.gpg and pubaux.gpg

    David

  4. Re: GnuPG question: moving keys onto auxilary keyrings

    In article , nobody@dizum.com
    says...
    > All my public and secret keys are in the usual files,
    > ~/.gnupg/pubring.gpg and ~/.gnupg/secring.gpg. But I wish to
    > rationalize my main keyrings by moving used rarely public and
    > secret keys into files such as ~/.gnupg/pubaux.gpg and
    > ~/gnupg/secaux.gpg.
    >
    > I believe I understand how the --keyring and --secret-keyring
    > options work with keys that are already in the other files.
    >
    > But how do I create the auxilary keyrings and move keys from the
    > main ones onto them? This I can not figure out?
    >
    > Thanks!
    >


    gpg --export-secret-keys ...(rest of the command)...
    gpg --export-keys ...(rest of the command)...

    Those two will let you export both the public and secret keys in your key-
    ring. (I just moved some secret keys over to a 2nd machine, but since I put
    them into the main keyring, I just used the "gpg --import ..." command
    instead of what David Shaw said). I think I figured out "--export-secret-
    keys" on my own, because I don't see it listed in the usage text.

    gpg --delete-secret-keys ...
    gpg --delete-keys ...

    Will allow you to then delete those keys from your primary keyring. David's
    post shows how to specify which keyring file you're working with.

+ Reply to Thread