keybase / keybase/client

decrypt pgp msg using keybase cmd (importing private key issue)

Open
#12,185 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

I'm having trouble decrypting a PGP message using Keybase command on Windows (`version 1.0.48-20180516084028+b56432f520`), also I do not (and don't intend to) store my private key in the Keybase servers. I've also tried to locally import my private key to my keybase client. I have GnuPG installed `gpg (GnuPG) 2.2.7 / libgcrypt 1.8.2` and my private/public key appears upon `gpg -K` and `gpg -k` command.

When i initially tried to decrypt a PGP test message using the Keybase command:

`keybase pgp decrypt -i pgpmsg.asc`

I received the following message (even though I was already logged into Keybase) :
> ERROR No username known

I tried to decrypt it again after I had prompted '`keybase logout`' and '`keybase login`', then I received the following error message:
> ERROR decrypt error: unable to find a PGP decryption key for this message

I then tried to import the secret key from the local GnuPG keychain using the command:
`keybase pgp select --only-import`

Which returns the following error message:
> ERROR Key has private part stubbed - cannot import to Keybase keychain. Try again with --no-import.

I am able to encrypt and decrypt messages using gpg just fine, I'm only having problems with Keybase handling the pgp decrypt. I hope this is possible without storing my private key on Keybase servers (`keybase pgp import -i privatekey.asc`).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported Windows flow with `keybase pgp decrypt -i pgpmsg.asc` and `keybase pgp select --only-import`, using the stated GnuPG setup. Trace how the client handles a stubbed private key and local decryption; done means local PGP decryption works without storing the private key on Keybase servers.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, cryptography, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.