· 8 years ago · Jul 15, 2017, 10:34 AM
1$ gpg --expert --gen-key
2
3Your selection? 8
4
5Your selection? s
6
7Your selection? e
8
9Your selection? q
10
11What keysize do you want? (2048) 4096
12Key is valid for? (0) 3y
13Is this correct? (y/N)y
14
15$ gpg --expert --edit-key john.doe@example.com
16gpg> addkey
17
18Your selection? 8
19Your selection? e
20Your selection? q
21
22What keysize do you want? (2048) 3072
23Key is valid for? (0) 6m
24Is this correct? (y/N)y
25Really create? (y/N) y
26
27gpg> save
28
29$ gpg -a --export-secret-key john.doe@example.com > secret_key
30$ gpg -a --gen-revoke john.doe@example.com > revocation_cert.gpg
31
32$ gpg -a --export-secret-subkeys john.doe@example.com > secret_subkeys.gpg
33$ gpg --delete-secret-keys john.doe@example.com
34Delete this key from the keyring? (y/N) y
35This is a secret key! - really delete? (y/N) y
36$ gpg --import secret_subkeys.gpg
37
38$ gpg -a --export-secret-keys john.doe@example.com > laptop_keys_secret.gpg
39$ gpg -a --export john.doe@example.com > laptop_keys_public.gpg
40
41$ gpg --import laptop_keys_public.gpg
42$ gpg --import laptop_keys_secret.gpg