trezor / trezor-mcu

:lock: Don't use this repo, use the new monorepo instead:
https://github.com/trezor/trezor-firmware
GNU Lesser General Public License v3.0
318 stars 255 forks source link

mixing segwit/non-segwit inputs is broken #226

Closed prusnak closed 6 years ago

prusnak commented 7 years ago

... because of how we hangle bip44/bip49 paths in extract_input_bip32_path/check_change_bip32_path of signing.c

jhoenicke commented 7 years ago

Actually I'm working on this, see https://github.com/trezor/trezor-mcu/compare/master...jhoenicke:changefix

The problem is really a signed/unsigned problem of unsigned in_address_n_count and using the value -1 for mismatch. I just have to adapt the unit tests in python-trezor and maybe write some new ones for mixed input signing.

prusnak commented 7 years ago

Looks great, thanks!