Skip to content
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

Offline methods to setup KeepKeys and configure/introspect accounts #633

Open
nuke-web3 opened this issue Jun 2, 2023 · 3 comments
Open

Comments

@nuke-web3
Copy link

I want a way to be able in an clean OS and 100% offline environment:

  1. Setup a new device with old firmware and bootloader
  2. Configure the BIP39 passphrase option
  3. View accounts on the app interface
  4. View accounts on the KeepKey's screen

Is this presently possible?

In essence I would like the ability to use the keepkey to manage many accounts offline and "sneaker net" at least the public keys/accounts to use elsewhere. Ideally I would love to be able to actually use an QR code protocol to also airgap a device that I use with the keepkey from another that would transmit signed transactions similar to https://signer.parity.io/ .

I think at least setup with an outdated bootloader & firmware is possible now, as well as for sure an updated device can be used to generate a new seed & configure to use (or not) a password. But the only way I am able to see the accounts of the keepkey is by luck in the stdout of running the AppImage happens to emit some of these (default) accounts 😮‍💨 - offline has no functional way to interact with the wallet past PIN & password entry:

image

@nuke-web3
Copy link
Author

I see that there is maybe a clunky way to interact with device via the bridge using POSTs to http://localhost:1646/spec/swagger.json defined endpoints from:

basePath: 'http://localhost:1646/spec/swagger.json',

But I get a API key needed to access the device I cannot quite locate.
Really here I think I am going down the wrong path to basically bypassing the app here in favor of direct https://github.com/keepkey/keepkey-sdk requests... I would love an offline GUI but if CLI commands would work now I would be willing to suffer it to get at air-gaped KK management simply of accounts.

@BitHighlander
Copy link
Collaborator

BitHighlander commented Jun 21, 2023

let config = {
    apiKey: process.env['SERVICE_KEY'] || 'test-123',
    pairingInfo: {
        name: process.env['SERVICE_NAME'] || 'KeepKey SDK Demo App',
        imageUrl: process.env['SERVICE_IMAGE_URL'] || 'https://github.com/BitHighlander/keepkey-desktop/raw/master/electron/icon.png',
        basePath: spec
    }
};

// init
const sdk = await SDK.KeepKeySdk.create(config);
console.log(config.apiKey);

The API key is returned from the SDK on pairing, as you can see from the logging. Applications are required to save this key locally.

Command-line interfaces (CLIs) also require no internet access. Building an app that can function offline is not far-fetched.

For reference, you can check out this Medium article: Creating a DApp for the KeepKey Desktop.

Alternatively, you can use Electrum for this purpose. They have a more developed flow for online/offline key exporting and sign transaction flows. You can find more information in the Electrum documentation.

Overall, KeepKey is air-gapped, so air-gapping an air-gapped computer may seem a bit silly. However, building a desktop application that only uses the public key (pubkey) might be something worth considering. We are actively exploring ways to ensure KeepKey users can access their funds even if Shapeshift's DNS goes down. Bundling apps within the native desktop client offline is on our roadmap, and an offline-only app could be a good starting point.

@nuke-web3
Copy link
Author

Thank you very much for the reply 😁 I own keepkeys and use more networks than Electrum supports.

Overall, KeepKey is air-gapped, so air-gapping an air-gapped computer may seem a bit silly... KeepKey users can [not at this time] access their funds if Shapeshift's DNS goes down.

A product holding air-gaped keys that I must be granted access to via a remote 3rd party (to me and my keys) centralized server for even basic GUI local-only key access seems far more "silly" to me. I can see it's possible in the logs, just so far not supported in any way in this app as it is now.

Did those mentioned explorations to remove the requirement for active DNS find some (even basic) methods to allow offline key reading and account access? (No transactions or anything even if not possible).

I do note that was possible in previous KeepKey official applications, now deprecated. A simple interface without any embedded browser for simple operations was around for sure ~2017-2019 timeframe. I would be quite happy to use that for simple offline access to my keys.

https://shapeshift.com/library/keepkeys-integration-with-myetherwallet for example I would hope works for this purpose for the technically savvy: https://github.com/MyEtherWallet/MyEtherWallet#getting-started it's possible to build and run the wallet offline. But sadly is not supported either: MyEtherWallet/MyEtherWallet#4529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants