-
Notifications
You must be signed in to change notification settings - Fork 199
App private keys should use longer derivation paths #1367
Comments
This is implemented in feature/long-app-derivation-paths -- depends on the wallet feature branch of |
After discussing this with @shea256, there's another approach we could take -- which is roughly:
The above strategy doesn't change the backwards-compatibility issues or required migration strategy, but it would result in a shorter derivation path (meaning a faster key derivation). Thoughts -- @jcnelson @larrysalibra ? |
This sounds good to me. Faster key derivation is a big plus for mobile. |
I'm in favor of the longer derivation path by default. I think we have determined that derivation performance is a non-issue. |
Me too -- this is from a bias towards "a new cryptographic technique is bad by default"
I don't feel comfortable making that conclusion yet, but would tend towards saying it's not a problem. I set up a "benchmarker" (emphasis on the quotes, there) at (https://aaron.blankstein.com/test.html) -- if you load that page it will use blockstack.js to generate an app private key using the full SHA256 derivation path and tell you how many ms it takes to compute. On an iPhone 8, it took ~200 ms (page takes much longer to load because it downloads blockstack.js). |
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 my Pixel 2 XL, it took 693 ms. On my laptop, it took 340 ms. |
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 hirosystems/stacks.js#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:
The text was updated successfully, but these errors were encountered: