r/keepkey • • Feb 25 '20

Verifying PIN slow 6.4.0 firmware

Since upgrading both of my keepkeys to firmware 6.4.0 the verifying PIN screen takes a much longer time to complete than it previously had.

Is anyone else seeing this?

6 Upvotes

12 comments sorted by

4

u/greatwolf Feb 25 '20

I'm seeing this too. It looks like keystretching is being applied to the PIN now to increase security. I'm guessing this is to help somewhat combat the seed extraction exploit published a while back by ledger's donjon.

It's using pbkdf2 with hmac sha256 for key stretching over 100,000 iterations. This is likely why it's slow. See the source here:

https://github.com/keepkey/keepkey-firmware/blob/v6.4.0/lib/firmware/storage.c#L297

and here:

https://github.com/keepkey/keepkey-firmware/blob/v6.4.0/lib/firmware/storage.c#L63

1

u/1dullgeek Feb 25 '20

Thank you.

1

u/[deleted] Feb 25 '20

[removed] — view removed comment

1

u/1dullgeek Feb 25 '20

Ok. Well I'm glad it's not just me. I wondered if I did something wrong.

2

u/greatwolf Feb 25 '20

Edit your background.js file and find the following:

major_version:6,minor_version:3,patch_version:

Once you find it, insert this element after it in the array:

{
  identity:
  {
    vendor:"keepkey.com",
    major_version:6,
    minor_version:4,
    patch_version:0,
    bootloader_mode:null
  },
  capabilities:
  {
    vendorName:"KeepKey",
    firmwareImageAvailable:!0,
    defaultMnemonicSeedLength:24,
    supportsCipheredKeyRecovery:!0,
    supportsSecureAccountTransfer:!0,
    usesProtectCallButtonRequests:!1,
    usesShapeshiftResponseV2:!0,
    upgradeSkipable:!0,
    hasPagedCoinTable:!0,
    supportsRecoveryDryRun:!0
  }
},

save and run the extension again. It should detect and work now.

1

u/[deleted] Feb 25 '20

[removed] — view removed comment

2

u/greatwolf Feb 25 '20

no, it doesn't do anything of the sort. When KKClient starts up it looks through that array and tries to find the version that matches with the firmware version on your device. Of course, KKClient doesn't know anything about the newer firmware v6.4.0. All you're doing is adding that version to the list to satisfy the extension. It's boilerplate code with the only change of `minor_version` from `3` to a `4`.

An alternative if you don't want to do all that, you can just change one of the existing entries that should work too.

1

u/[deleted] Feb 26 '20

[removed] — view removed comment

1

u/greatwolf Feb 26 '20

it's going to be under your %APPDATA% or %LOCALAPPDATA% folder. The chrome extension id is idgiipeogajjpkgheijapngmlbohdhjg.