If you want a graphical user interface (GUI) for the GNU Privacy Guard (GPG) program for Windows, you can use Gpg4win
[ More Info ]
|
|
[ More Info ]
C:\Documents
and Settings\username\Application Data\gnupg
on a Windows
XP system, where username is the username for the account under which
the user logs into the system.
You can create new empty keyrings with gpg --list-keys
.
C:\Program Files\GNU\GnuPG>gpg --list-keys gpg: keyring `C:/Documents and Settings/JDoe/Application Data/gnupg\pubring.gpg ' created gpg: C:/Documents and Settings/JDoe/Application Data/gnupg\trustdb.gpg: trustdb created
Note: gpg uses the forward slash, "/", which is used on Unix, Linux, and other operating systems to separate directories, in its output, though Windows actually uses a backward slash, "\".
If you need to transfer keyrings from a Linux or Unix system to a Windows
system, the keyrings are likely to be stored in ~/.gnupg
on that system, i.e. in a .gnupg
beneath a user's home
directory. Transfer the .gpg
files, i.e. pubring.gpg,
secring.gpg, trustdb.gpg
To import someone's public key into the public keyring, you can use the instructions at Importing a Public Key with GPG.
Suppose you have received the following key by email or see it on a webpage. (the key below is from the The Linux Kernel Archives OpenPGP Signature webpage.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.3 (GNU/Linux)
Comment: For info see http://www.gnupg.org
mQGiBDnirDkRBADCTL/iUTeZKb0tiAcKdZdsUP/KSnrGGjlinolUAsUC0D6/hUB1
RdCpJOOERTIEr1yvehqDM7veRhNMoxJNQxa/sSrkywey5qc8uaskUNEqenimq/70
bahWJeoWXjad68mQFh65lULnHQrrioeJnh9UpyGJppNb/yIjdnymH9aYEwCglgP7
UegBzH22h8NVQEK2PWWbyUUD/jQA4lI0wRWcL9HpkYkHcH0LTKRB9zYpQYtyvzJi
yTGwJyFMfYNXy0RT11dICeLkf3HMR84hkPERKMhALobLxVUbfc7j2AygmzGphWGy
DH/xjptQP/zrsq87ylYRONK18w1J42cm+yZa4XThMDPJMrb9/l8qnxU1JnW7W1al
HKTpBACbs+91KLqrnIGcF44TMwxgUj5CUrayPoEnLU+ZMBqfSjmu8RqEYmTxJCKv
7erBFSuazBGj5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nlxiKrBjaO9C1DSAKBpjqaga8dQe1Z
kLOI2F7IWFeKV2LaMl+ZvvfWMECNcqNW2fkCuP9Fpz5K+xg21TwovVy93aWKgFL6
06jK51oQp3fW86xXK9ZGKYqQiEYEGBECAAYFAjnir5wACgkQyGugalF9Dw5M9QCg
hhmHalzWf8B3AVrjPrtrRHA1vlgAn3YRlU5l0V5W1iXvHXQCUHIESpgm
=SZZb
-----END PGP PUBLIC KEY BLOCK-----
gpg --import
. The gpg program
will start awaiting your input.gpg --import ftpadmin.txt
gpg --keyserver wwwkeys.pgp.net
--recv-keys 0x517D0F0E
presuming you know the key
id is the hexadecimal value 517D0F0E.
After you have imported a key, you can verify it is on your keyring
using the command gpg --list-keys
. You can delete a key
with the command gpg --delete-keys
. E.g., suppose I have
the ftpadmin@kernel69296.org public key on my keyring, but wish to delete it.
I can issue the command gpg --delete-keys ftpadmin@kernel69296.org
to remove it from the public keyring. It is possible that you may have
multiple public keys for the same email address. Perhaps you have one that
is no longer used by the person to which it belongs and want to delete
that specific one. You can use the key id associated with that one,
e.g. gpg --delete-keys 517D0F0E
in this case.
The key id is the sequence of numbers and letters after the slash that
you see when you list the keys on the keyring. E.g. for the
Linux Kernel Archives Verification Key, I see the following, if I
issue the command gpg --list-keys
when it
is on my public keyring:
pub 1024D/517D0F0E 2000-10-10 Linux Kernel Archives Verification Key
<ftpadmin@kernel69296.org>
sub 4096g/E50A8F2A 2000-10-10
In this case, the key ID is 517D0F0E
References:
If you need to locate someone's PGP key on a PGP server using
gpg --search-keys --keyserver <servername>
<name>
, where "servername" is the name of the PGP server where
the key is stored and "name" is the person's name. For instance,
suppose the person's last name is Pacheo and the applicable key server
is server1.somewhere.com, then you would use
gpg --search-keys --keyserver server1.somewhere.com pacheo
.
If there were multiple keys on the server that matched, you would see
a numbered list of all matching keys and would be prompted to enter
the number for the one you want. Once you select the one you want,
you should see a message indicating the public key for the person has
been imported to your keyring. If you issue the command
gpg --list-keys
, you should see the new key listed.
If the email address associated with the new key was pacheo@abcxyz.com and
you wanted to send the file confinfo.xls as an encrypted attachment to
an email to the person, you could use gpg --encrypt -r pacheo@abcxyz.com
confinfo.xls
. Gnupg would then
create a new encrypted version of the
file called confinfo.xls.gpg, which you could attach to your email. The
recipient, who you specify with the "-r" option, would then need a program on
his end, such as gnupg, PGP, etc. that could decrypt the file, producing a
duplicate of the original confinfo.xls file.
In the above example, you would be using the person's public key to encrypt the file. Only someone who has the associated private key, which should only be that person or someone he very much trusts, will be able to decrypt the file. You don't need his private key to encrypt the file, only the public key, which he can make available to anyone via the key server.