Here's a specific scenario that I have.
I want to have subkeys on my laptop and store the master key safely.
So I went ahead and created new keys:
gpg --gen-key
gpg (GnuPG/MacGPG2) 2.0.20; 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)
Your selection? 1
RSA keys may be between 1024 and 8192 bits long.
What keysize do you want? (2048) 1024
Requested keysize is 1024 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) 0
Key does not expire at all
Is this correct? (y/N) y
GnuPG needs to construct a user ID to identify your key.
Real name: John Nash
Email address: jnash@somedomain.com
Comment:
You selected this USER-ID:
"John Nash <jnash@somedomain.com>"
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.
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 6750A605 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: 4 signed: 1 trust: 0-, 0q, 0n, 0m, 0f, 4u
gpg: depth: 1 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 1f, 0u
gpg: next trustdb check due at 2015-01-02
pub 1024R/6750A605 2014-09-10
Key fingerprint = BAB9 E8A4 4191 1B99 F8D1 ED09 544A F1E9 6750 A605
uid John Nash <jnash@somedomain.com>
sub 1024R/68E051E2 2014-09-10
And as seen, I have created a default set of keys that generated a subkey for encryption. After I've created a new signing key:
gpg --edit-key jnash
gpg (GnuPG/MacGPG2) 2.0.20; 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.
Secret key is available.
pub 1024R/6750A605 created: 2014-09-10 expires: never usage: SC
trust: ultimate validity: ultimate
sub 1024R/68E051E2 created: 2014-09-10 expires: never usage: E
[ultimate] (1). John Nash <jnash@somedomain.com>
gpg> addkey
Key is protected.
You need a passphrase to unlock the secret key for
user: "John Nash <jnash@somedomain.com>"
1024-bit RSA key, ID 6750A605, created 2014-09-10
Please select what kind of key you want:
(3) DSA (sign only)
(4) RSA (sign only)
(5) Elgamal (encrypt only)
(6) RSA (encrypt only)
Your selection? 4
RSA keys may be between 1024 and 8192 bits long.
What keysize do you want? (2048) 1024
Requested keysize is 1024 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) 0
Key does not expire at all
Is this correct? (y/N) y
Really create? (y/N) y
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.
pub 1024R/6750A605 created: 2014-09-10 expires: never usage: SC
trust: ultimate validity: ultimate
sub 1024R/68E051E2 created: 2014-09-10 expires: never usage: E
sub 1024R/C1DC3BB6 created: 2014-09-10 expires: never usage: S
[ultimate] (1). John Nash <jnash@somedomain.com>
This left me with the following subkeys:
pub 1024R/6750A605 created: 2014-09-10 expires: never usage: SC
trust: ultimate validity: ultimate
sub 1024R/68E051E2 created: 2014-09-10 expires: never usage: E
sub 1024R/C1DC3BB6 created: 2014-09-10 expires: never usage: S
After I've exported the subkeys and the master key from the key ring:
gpg --export-secret-key jnash --armor > masterkey
gpg --export-secret-subkeys jnash --armor > subkeys
gpg --delete-secret-key jnash
And imported the subkeys only with gpg --import subkeys
that left me with the following output when running gpg -K
sec# 1024R/6750A605 2014-09-10
uid John Nash <jnash@somedomain.com>
ssb 1024R/68E051E2 2014-09-10
ssb 1024R/C1DC3BB6 2014-09-10
From my understanding, now I don't have the master key anymore and this computer is ready to go on travel.
Now, let's say I got stolen and my keys are compromised.
I will need to revoke 68E051E2
and C1DC3BB6
right?
But after doing so and replacing them with new ones, I won't be able to open old stuff that was encrypted and signed with both keys, will I?
-- Disclaimer: The data above is just a sample one. I would never have keys with only 1024 in key size.