question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App private keys should use longer derivation paths

See original GitHub issue

App private keys should use a longer derivation path to take advantage of all the bits of entropy in the SHA256 hash: (see https://github.com/blockstack/blockstack-browser/blob/master/app/js/utils/account-utils.js#L55)

This PR https://github.com/blockstack/blockstack.js/pull/433 adds a function which will generate such a lengthened key, and it includes a function for generating the old derivation as well (using the hashCode function).

To address this in a backwards compatible fashion, we should:

  1. On authentication with multi-player apps, check whether an entry already exists for the app (and uses the legacy derived app key), and if so, use the legacy path, otherwise use the new path.
  2. On authentication with single-player apps, check whether the app is in a whitelisted set of legacy apps (use the current set of single-player apps in the browser as the whitelist) and if so, use the legacy path, otherwise use the new path.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jcnelsoncommented, Jun 22, 2018

I’m in favor of the longer derivation path by default. I think we have determined that derivation performance is a non-issue.

0reactions
jcnelsoncommented, Jun 22, 2018

but would tend towards saying it’s not a problem

That’s what I meant 😃 We could easily add a “loading…” dialog on the sign-in page, or do the key derivation once the user is presented with the login dialog (so it occurs before the user clicks “sign-in”), etc.

On an iPhone 8, it took ~200 ms (page takes much longer to load because it downloads blockstack.js).

On my Pixel 2 XL, it took 693 ms. On my laptop, it took 340 ms.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Journey from Secret Recovery Phrase (Mnemonic Phrase ...
The process of getting private keys from a secret recovery phrase ... This is also known as a derivation path, and is what...
Read more >
how to generate private keys from derivation paths or from ...
To derive a private key from another private key, you can use a key derivation function (KDF) such as PBKDF2 (Password-Based Key Derivation...
Read more >
The Bitcoin Extended Public Key: Explaining The Mystery
You now laugh in the face of leaks exposing your extended child private keys, because you used hardened derivation paths! The xpub your...
Read more >
The Ultimate Guide to Bitcoin Wallets, Seeds, Private Keys ...
Using cryptography, your wallet can derive your private key using your seed ... The apps would show the same wallet activity, balances, ...
Read more >
Derivation Paths - Learn Me A Bitcoin
The cryptocurrency the keys will be used for. Different cryptocurrencies can use the same private keys and public keys derived from a seed....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found