@@ -18,7 +18,8 @@ Thanks!
18
18
Run
19
19
20
20
```
21
- $ (trezor|keepkey|ledger|jade|onlykey)-gpg init "Roman Zeyde <roman.zeyde@gmail.com>"
21
+ $ (trezor|keepkey|ledger|jade|onlykey)-gpg init
22
+ $ (trezor|keepkey|ledger|jade|onlykey)-gpg add -d "Roman Zeyde <roman.zeyde@gmail.com>"
22
23
```
23
24
24
25
Follow the instructions provided to complete the setup. Keep note of the timestamp value which you'll need if you want to regenerate the key later.
@@ -137,13 +138,14 @@ $ gpg2 --export 'john@doe.bit' | gpg2 --list-packets | grep created | head -n1
137
138
138
139
After your main identity is created, you can add new user IDs using the regular GnuPG commands:
139
140
```
140
- $ trezor-gpg init "Foobar" -vv
141
+ $ trezor-gpg init
142
+ $ trezor-gpg add -d "Foobar" -vv
141
143
$ export GNUPGHOME=${HOME}/.gnupg/trezor
142
144
$ gpg2 -K
143
145
------------------------------------------
144
- sec nistp256/6275E7DA 2017-12-05 [ SC]
146
+ sec nistp256/6275E7DA 1970-01-01 [ SC]
145
147
uid [ ultimate] Foobar
146
- ssb nistp256/35F58F26 2017-12-05 [ E]
148
+ ssb nistp256/35F58F26 1970-01-01 [ E]
147
149
148
150
$ gpg2 --edit Foobar
149
151
gpg> adduid
@@ -159,10 +161,24 @@ gpg> save
159
161
160
162
$ gpg2 -K
161
163
------------------------------------------
162
- sec nistp256/6275E7DA 2017-12-05 [ SC]
164
+ sec nistp256/6275E7DA 1970-01-01 [ SC]
163
165
uid [ ultimate] Xyzzy
164
166
uid [ ultimate] Foobar
165
- ssb nistp256/35F58F26 2017-12-05 [ E]
167
+ ssb nistp256/35F58F26 1970-01-01 [ E]
168
+ ```
169
+
170
+ This adds new user IDs to the same key. You can also add a new key using the `add` command:
171
+ ```
172
+ $ trezor-gpg add "Xyzzy" -vv
173
+ $ gpg2 -K
174
+ ------------------------------------------
175
+ sec nistp256/6275E7DA 1970-01-01 [ SC]
176
+ uid [ ultimate] Foobar
177
+ ssb nistp256/35F58F26 1970-01-01 [ E]
178
+
179
+ sec nistp256/BE61C208 1970-01-01 [ SC]
180
+ uid [ ultimate] Xyzzy
181
+ ssb nistp256/65088366 1970-01-01 [ E]
166
182
```
167
183
168
184
### Generate GnuPG subkeys
@@ -173,7 +189,17 @@ pub rsa2048/90C4064B 2017-10-10 [SC]
173
189
uid [ ultimate] foobar
174
190
sub rsa2048/4DD05FF0 2017-10-10 [ E]
175
191
176
- $ trezor-gpg init "foobar" --subkey
192
+ $ trezor-gpg add "foobar" --subkey
193
+ ```
194
+
195
+ If you have already set the new folder as your default profile, and you want to add the subkey to an existing GnuPG from a previous (e.g. non-hardware) profile, you can specify the previous profile location using `--primary-homedir`:
196
+ ```
197
+ $ gpg2 -k foobar --homedir ~ /.gnupg
198
+ pub rsa2048/90C4064B 2017-10-10 [ SC]
199
+ uid [ ultimate] foobar
200
+ sub rsa2048/4DD05FF0 2017-10-10 [ E]
201
+
202
+ $ trezor-gpg add "foobar" --subkey --primary-homedir ~ /.gnupg
177
203
```
178
204
179
205
[](https://asciinema.org/a/Ick5G724zrZRFsGY7ZUdFSnV1)
0 commit comments