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

v7.8.0 is not reproducible #342

Open
mohammadrafigh opened this issue May 22, 2023 · 1 comment
Open

v7.8.0 is not reproducible #342

mohammadrafigh opened this issue May 22, 2023 · 1 comment

Comments

@mohammadrafigh
Copy link

mohammadrafigh commented May 22, 2023

I followed the build process but received 2 different hashes from the binary in repo and what I built:

github: b0fc047c7789bee9fba72e5720fb5c8129c9a32f94f7fe9dca4f4675c8d3ddc2
built binary: aa5d303ae15d2b5dd3ace06ad4d8665c644efbfba1946c25aa5e25d6d17ed917

to see the differences, I transformed binaries to hex formatted files:

$ xxd bin/firmware.keepkey.bin > built-bin.hex
$ xxd firmware.keepkey.bin > github-bin.hex

then got a diff excluding signature part:

18563,18566c18563,18566
< 00048820: 3a00 556e 6b6e 6f77 6e00 3036 3834 3465  :.Unknown.06844e
< 00048830: 6239 3761 3765 3563 3430 6366 6161 3835  b97a7e5c40cfaa85
< 00048840: 3232 3935 3437 6163 3534 6235 3734 6536  229547ac54b574e6
< 00048850: 3339 004e 6f74 2069 6e20 626f 6f74 6c6f  39.Not in bootlo
---
> 00048820: 3a00 556e 6b6e 6f77 6e00 3737 3933 6539  :.Unknown.7793e9
> 00048830: 3236 3938 3863 3063 3364 6164 3664 3062  26988c0c3dad6d0b
> 00048840: 3762 6639 3937 3235 3734 6139 3232 3864  7bf9972574a9228d
> 00048850: 6131 004e 6f74 2069 6e20 626f 6f74 6c6f  a1.Not in bootlo
@Giszmo
Copy link

Giszmo commented Jul 13, 2023

For more context, our full review can be found here.

We tested 7.8.0 with hash 31c1cdd945a7331e01b3cced866cb28add5b49eef87c2bbc08370e5aa7daf9bf

Our test script:

#!/bin/bash

### provide this script with the version without "v" and the published buildHash

version=$1
buildHash=$2

cd /tmp
git clone https://github.com/keepkey/keepkey-firmware
cd keepkey-firmware
git checkout v${version}
git submodule update --init --recursive
# rm deps/python-keepkey/keepkeylib/eth/ethereum-lists/src/tokens/eth/0x45804880de22913dafe09f4980848ece6ecbaf78.json
./scripts/build/docker/device/release.sh
wget https://github.com/keepkey/keepkey-firmware/releases/download/v${version}/firmware.keepkey.bin
sha256sum firmware.keepkey.bin
tail -c +257 firmware.keepkey.bin | sha256sum
tail -c +257 ./bin/firmware.keepkey.bin | sha256sum

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