keybase / keybase/keybase-issues

`Export my private key from Keybase` exporting old private key after `Update my key`

Open
#3,210 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
899
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Website not exporting new private key after re-importing.

Here is what I did:

**Export from Keybase, import to GPG**
- Profile > (key) edit > Export my private key from Keybase > Copy key text
- Paste > `keybase.secret.key`
- `$ gpg --import keybase.secret.key`

**Add new email to key**
- `gpg --edit-key A887B2AE172FD5C8`
```bash
`gpg> adduid`
`Real name: Tim Turner`
`Email address: info@ronin-design.com`
`Comment: `
You selected this USER-ID:
"Tim Turner "

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O

gpg> quit
Save changes? (y/N) y
```

**We see key has been updated**

`$ gpg --list-secret-keys --keyid-format LONG`
```bash
-------------------------------
sec 4096R/A887B2AE172FD5C8 2016-07-06
uid Tim Turner
uid Tim Turner
uid Tim Turner
ssb 2048R/CABD69B0800C3813 2016-07-06
ssb 2048R/574A70C12290AED8 2016-07-06
```

`$ gpg --list-keys --keyid-format LONG`
```bash
-------------------------------
pub 4096R/A887B2AE172FD5C8 2016-07-06
uid Tim Turner
uid Tim Turner
uid Tim Turner
sub 2048R/CABD69B0800C3813 2016-07-06 [expires: 2024-07-04]
sub 2048R/574A70C12290AED8 2016-07-06 [expires: 2024-07-04]
```

**Export from GPG, import back into Keybase**

- `$ gpg --armor --export A887B2AE172FD5C8` > Copy
- Profile > (key) edit > Update my key (I edited it elsewhere) > Paste

**Get updated public key**
Both methods result in new public key showing new, 3rd email address:
- Profile > [click key fingerprint](https://keybase.io/tturner/#show-public) > Copy
- Paste > tmp_pub1.key
- `$ gpg tmp_pub1.key`
```bash
pub 4096R/172FD5C8 2016-07-06 Tim Turner
uid Tim Turner
uid Tim Turner
sub 2048R/800C3813 2016-07-06 [expires: 2024-07-04]
sub 2048R/2290AED8 2016-07-06 [expires: 2024-07-04]
```

Pulling raw pub key directly, I get same result:
- `$ wget -O tmp_pub2.key 'https://keybase.io/tturner/pgp_keys.asc?fingerprint=0f71f733bd327712f256121ca887b2ae172fd5c8'`
- `$ gpg tmp_pub2.key`
```bash
pub 4096R/172FD5C8 2016-07-06 Tim Turner
uid Tim Turner
uid Tim Turner
sub 2048R/800C3813 2016-07-06 [expires: 2024-07-04]
sub 2048R/2290AED8 2016-07-06 [expires: 2024-07-04]
```

However, if I now try to export my private key again, I get the old / original private key instead of the new, edited private key which I just imported:

- Profile > (key) edit > Export my private key from Keybase > Copy key text
- Paste > `tmp_secret.new.key`
- `$ gpg tmp_secret.new.key`
```bash
sec 4096R/172FD5C8 2016-07-06 Tim Turner
uid Tim Turner
ssb 2048R/800C3813 2016-07-06
ssb 2048R/2290AED8 2016-07-06
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue through Profile > key edit > Update my key and Export my private key from Keybase, then compare the exported key with the edited key shown by gpg. The issue is resolved when the export includes the newly added info@ronin-design.com user ID and the updated key material rather than the original key.

Written by the indexing model from the issue text.

Assessment

Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.