Skip to content

Instantly share code, notes, and snippets.

@bartprokop
Created December 13, 2013 11:23
Show Gist options
  • Save bartprokop/7942959 to your computer and use it in GitHub Desktop.
Save bartprokop/7942959 to your computer and use it in GitHub Desktop.
C:\opt>gpg --gen-key --expert
gpg (GnuPG) 2.0.22; Copyright (C) 2013 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)
(7) DSA (set your own capabilities)
(8) RSA (set your own capabilities)
Your selection? 8
Possible actions for a RSA key: Sign Certify Encrypt Authenticate
Current allowed actions: Sign Certify Encrypt
(S) Toggle the sign capability
(E) Toggle the encrypt capability
(A) Toggle the authenticate capability
(Q) Finished
Your selection? a
Possible actions for a RSA key: Sign Certify Encrypt Authenticate
Current allowed actions: Sign Certify Encrypt Authenticate
(S) Toggle the sign capability
(E) Toggle the encrypt capability
(A) Toggle the authenticate capability
(Q) Finished
Your selection? q
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 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) 385
Key expires at 01/02/15 12:11:49 Central European Standard Time
Is this correct? (y/N) y
GnuPG needs to construct a user ID to identify your key.
Real name: Bart Prokop
Email address: [email protected]
Comment: 2014
You selected this USER-ID:
"Bart Prokop (2014) <[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, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: key C83558F3 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: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
gpg: next trustdb check due at 2015-01-02
pub 2048R/C83558F3 2013-12-13 [expires: 2015-01-02]
Key fingerprint = 85AC B7A4 5E9A 73D4 DDA0 38A7 244E A73A C835 58F3
uid Bart Prokop (2014) <[email protected]>
C:\opt>gpg --output revoke2014.asc --gen-revoke 2014
sec 2048R/C83558F3 2013-12-13 Bart Prokop (2014) <[email protected]>
Create a revocation certificate for this key? (y/N) y
Please select the reason for the revocation:
0 = No reason specified
1 = Key has been compromised
2 = Key is superseded
3 = Key is no longer used
Q = Cancel
(Probably you want to select 1 here)
Your decision? 3
Enter an optional description; end it with an empty line:
>
Reason for revocation: Key is no longer used
(No description given)
Is this okay? (y/N) y
You need a passphrase to unlock the secret key for
user: "Bart Prokop (2014) <[email protected]>"
2048-bit RSA key, ID C83558F3, created 2013-12-13
gpg: AllowSetForegroundWindow(7520) failed: Access is denied.
ASCII armored output forced.
Revocation certificate created.
Please move it to a medium which you can hide away; if Mallory gets
access to this certificate he can use it to make your key unusable.
It is smart to print this certificate and store it away, just in case
your media become unreadable. But have some caution: The print system of
your machine might store the data and make it available to others!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment