Center European Research Science informatics

...because open source matters

  • Increase font size
  • Default font size
  • Decrease font size
Home Creating GPG Keys

Creating GPG Keys

E-mail Print PDF

Create yourself a GPG Key ....  Step-By-Step live demo

Take note that commands, options and or question/answers are all in Bold!
bash-4.3# gpg --gen-key
gpg (GnuPG) 1.4.19; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 4096
Requested keysize is 4096 bits
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0) 0
Key does not expire at all
Is this correct? (y/N) y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) "

Real name: Wayne Marshall HORSTMANN
Email address: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Comment: Research Scientist
You selected this USER-ID:
"Wayne Marshall HORSTMANN (Research Scientist) "

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

Enter passphrase: **********
Repeat passphrase: **********


We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 187 more bytes)
.............+++++
...+++++
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 133 more bytes)
.....+++++
+++++
gpg: key BEEE5BD7 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
pub   4096R/BEEE5BD7 2015-09-17
Key fingerprint = E5F7 317E E020 572D F483  3910 7933 B2A3 BEEE 5BD7
uid                  Wayne Marshall HORSTMANN (Research Scientist)
sub   4096R/634A4F19 2015-09-17

bash-4.3#
bash-4.3# gpg --keyserver hkp://pgp.mit.edu --send-keys BEEE5BD7

gpg: sending key BEEE5BD7 to hkp server pgp.mit.edu
bash-4.3#


bash-4.3# gpg --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub   4096R/BEEE5BD7 2015-09-17
uid                  Wayne Marshall HORSTMANN (Research Scientist)
sub   4096R/634A4F19 2015-09-17
bash-4.3#

How to sign multiple files
That will sign everything in a given directory, but won't recurse.
'ls -R' will recurse, but won't give you filenames in a usable format to pass
It will also attempt to sign everything in addition to the images

find . -name "*.jpeg" -print

is probably more along the lines of what you're looking for instead of ls above

for i in $(find . -name "*.jpeg" -print \;)
do
gpg -b $i -o ${i}.sig
done

You may wish to use one of the --passphrase options,eg
'--passphrase-file ' or '--passphrase ', or temporarily remove the
passphrase from the signing key to spare yourself the 'joy' of typing the
passphrase potentially 100s of times.

Some reason you moved the thread to GnuPG-Users from PGP-Basics?

Last Updated on Monday, 21 September 2015 17:24  

Newsflash

PACKAGE NAME:     dansguardian-2.12.0.3-x86_64-1mos
COMPRESSED PACKAGE SIZE:     380K
UNCOMPRESSED PACKAGE SIZE:     1.5M

PACKAGE DESCRIPTION:
dansguardian: dansguardian (web content filter)
dansguardian:
dansguardian: DansGuardian is a web content filter. It filters the actual
dansguardian: content of pages based on many methods including phrase matching,
dansguardian: PICS filtering and URL filtering. It does not purely filter
dansguardian: based on a banned list of sites like lesser totally commercial
dansguardian: filters. DansGuardian is designed to be completely flexible and
dansguardian: allows you to tailor the filtering to your exact needs.
dansguardian: