keybase / keybase/keybase-issues

Keybase decides valid gpg key is expired

Open
#3,499 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

Found while debugging keybase/keybase-issues#3458

I built my key originally with a built in expiration date. Then I update this yearly. I do this so that the key will auto-expire if people have out of date keyrings, rather than being forced to issue a revocation certificate that many people will just never load on to their systems.

On my system, examining the private key only claims it's expired:

```
master-blaster:arduino_flashforth grant$ gpg --list-secret-keys
gpg: please do a --check-trustdb
/Users/grant/.gnupg/secring.gpg
-------------------------------
sec# 2048R/E3B5806F 2010-01-11 [expires: 2015-01-03]
uid Grant T. Olson (Grant - home email)
uid Grant T. Olson (Personal email)
uid Grant T. Olson (pikimal)
ssb 2048R/6A8F7CF6 2010-01-11
ssb 2048R/A18A54D6 2010-03-01
ssb 2048R/D53982CE 2010-08-31

```

However looking at the public key info it is valid:

```
master-blaster:arduino_flashforth grant$ gpg --list-keys E3B5806F
gpg: please do a --check-trustdb
pub 2048R/E3B5806F 2010-01-11 [expires: 2020-01-01]
uid [ultimate] Grant T. Olson (Personal email)
uid [ultimate] Grant T. Olson (pikimal)
uid [ultimate] Grant T Olson
sub 2048R/A18A54D6 2010-03-01 [expires: 2020-01-01]
sub 2048R/D53982CE 2010-08-31 [expires: 2020-01-01]
sub 2048R/6A8F7CF6 2010-01-11 [expires: 2020-01-01]

```

Editing key also shows it as valid:

```
master-blaster:arduino_flashforth grant$ gpg --edit-key E3B5806F
gpg (GnuPG/MacGPG2) 2.0.30; Copyright (C) 2015 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.

gpg: please do a --check-trustdb
pub 2048R/E3B5806F created: 2010-01-11 expires: 2020-01-01 usage: SC
trust: ultimate validity: ultimate
sub 2048R/A18A54D6 created: 2010-03-01 expires: 2020-01-01 usage: S
sub 2048R/D53982CE created: 2010-08-31 expires: 2020-01-01 usage: A
sub 2048R/6A8F7CF6 created: 2010-01-11 expires: 2020-01-01 usage: E
[ultimate] (1). Grant T. Olson (Personal email)
[ultimate] (2) Grant T. Olson (pikimal)
[ultimate] (3) Grant T Olson
[ revoked] (4) MyBitSafe Support
[ revoked] (5) Grant T. Olson (Grant - home email)
Please note that the shown key validity is not necessarily correct
unless you restart the program.
```

And I can sign and verify documents:

```
master-blaster:arduino_flashforth grant$ echo foo | gpg2 --sign | gpg2 --verify

You need a passphrase to unlock the secret key for
user: "Grant T. Olson (Personal email) "
2048-bit RSA key, ID A18A54D6, created 2010-03-01 (main key ID E3B5806F)

gpg: Signature made Thu Sep 5 11:13:09 2019 EDT using RSA key ID A18A54D6
gpg: please do a --check-trustdb
gpg: Good signature from "Grant T. Olson (Personal email) " [ultimate]
gpg: aka "Grant T. Olson (pikimal) " [ultimate]
gpg: aka "Grant T Olson " [ultimate]

```

To be able to verify this key correctly, keybase needs to parse the additional certifications contained in the public key block.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the discrepancy with the supplied gpg commands and public key block, then trace how Keybase parses key certifications and expiration data. Done means the additional certifications are recognized so a key valid through 2020 is not reported as expired; no repository file or test is identified in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
cryptography, 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.