New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to export private key from keybase with API or kbpgp.js? #1912

Closed
lettergram opened this Issue Dec 10, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@lettergram

lettergram commented Dec 10, 2015

I have the desire to access my private key stored in keybase. However, when I login and view: user.private_keys, there doesn't appear that a private key stored the same way as user.public_keys.

When I view: user.private_keys.primary.bundle there does appear to be a string that could be a private key, but I don't know how to format it into a usable pirvate_key. It looks like the string is either encrypted or encoded differently than normal.

Basically, you can export your public key from keybase, is that functionality available in the API, or some other method I don't know about?

@oconnor663

This comment has been minimized.

Show comment
Hide comment
@oconnor663

oconnor663 Dec 10, 2015

The string you're seeing is Base64(MessagePack(some stuff + TripleSec(your private key))). You could decrypt it, but it will be inconvenient. You probably want to export your private key with this little menu:

image

oconnor663 commented Dec 10, 2015

The string you're seeing is Base64(MessagePack(some stuff + TripleSec(your private key))). You could decrypt it, but it will be inconvenient. You probably want to export your private key with this little menu:

image

@oconnor663 oconnor663 closed this Dec 10, 2015

@malgorithms

This comment has been minimized.

Show comment
Hide comment
@malgorithms

malgorithms Dec 11, 2015

Contributor

If you're running the Go client of Keybase ( keybase.io/download ) this also works:

keybase pgp export --secret

That'll decrypt + export your PGP secret key, which you can pipe into gpg or a file or whatever you want.

Contributor

malgorithms commented Dec 11, 2015

If you're running the Go client of Keybase ( keybase.io/download ) this also works:

keybase pgp export --secret

That'll decrypt + export your PGP secret key, which you can pipe into gpg or a file or whatever you want.

@leonardishere

This comment has been minimized.

Show comment
Hide comment
@leonardishere

leonardishere Feb 23, 2018

The string you're seeing is Base64(MessagePack(some stuff + TripleSec(your private key))). You could decrypt it, but it will be inconvenient.

Assuming I have a situation that requires I do it in code, how would I do that? I already have the login code and can retrieve my user object that has the bundled private key, how do I unbundle it?

leonardishere commented Feb 23, 2018

The string you're seeing is Base64(MessagePack(some stuff + TripleSec(your private key))). You could decrypt it, but it will be inconvenient.

Assuming I have a situation that requires I do it in code, how would I do that? I already have the login code and can retrieve my user object that has the bundled private key, how do I unbundle it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment