Skip to content

Instantly share code, notes, and snippets.

@hughsaunders
Created January 29, 2013 12:58
Show Gist options
  • Save hughsaunders/4664040 to your computer and use it in GitHub Desktop.
Save hughsaunders/4664040 to your computer and use it in GitHub Desktop.
gpg demonstration
hugh3869@hughsaunders:/tmp$ gpg --gen-key
gpg (GnuPG) 1.4.11; Copyright (C) 2010 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
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 10y
Key expires at Fri 27 Jan 2023 12:52:08 GMT
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 E-mail Address in this form:
"Heinrich Heine (Der Dichter) <[email protected]>"
Real name: Hugh Saunders
E-mail address: [email protected]
Comment:
You selected this USER-ID:
"Hugh Saunders <[email protected]>"
Change (N)ame, (C)omment, (E)-mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.
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, use 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 244 more bytes)
s
sdf
...........................................................+++++
.........+++++
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, use 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 220 more bytes)
..+++++
.+++++
gpg: key D5447481 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
gpg: next trustdb check due at 2023-01-27
pub 4096R/D5447481 2013-01-29 [expires: 2023-01-27]
Key fingerprint = 27BB 20E8 F607 00FF E9F5 ACCB 990C 46AD D544 7481
uid Hugh Saunders <[email protected]>
sub 4096R/307A39EF 2013-01-29 [expires: 2023-01-27]
hugh3869@hughsaunders:/tmp/gpg$ gpg -e ubuntu-12.04.1-desktop-amd64.iso
You did not specify a user ID. (you may use "-r")
Current recipients:
Enter the user ID. End with an empty line: [email protected]
Current recipients:
4096R/307A39EF 2013-01-29 "Hugh Saunders <[email protected]>"
Enter the user ID. End with an empty line:
hugh3869@hughsaunders:/tmp/gpg$ du -hs *
695M ubuntu-12.04.1-desktop-amd64.iso
684M ubuntu-12.04.1-desktop-amd64.iso.gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment