1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-19 22:40:58 +00:00
Commit Graph

253 Commits

Author SHA1 Message Date
Andrew Kozlik
9052133fca fix(core): Ensure user is warned about non-standard paths. 2021-11-23 14:57:25 +01:00
Andrew Kozlik
221977ad9d chore(core): Convert SIGHASH_* consts to SigHashType enum. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
ae35086bb9 refactor(core): Rename Hash143 to SigHasher and replace preimage_hash() with two functions. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
398cea8f40 test(core): Add unit tests for BIP-341 signature hash. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
56ac799626 feat(core): Support external inputs in TxWeightCalculator. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
f9f0b517e2 feat(core): Support Taproot in TxWeightCalculator. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
a635876807 test(core): Add multisig unit tests for TxWeightCalculator. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
9b579094c0 fix(core): Fix TxWeightCalculator.
- Refactor TxWeightCalculator to count inputs and outputs itself.
- Fix witness data weight by adding the weight of the witness stack item count
  for each input in segwit transactions and removing the weight of the
  nonsensical extra inputs count.
- Get multisig pubkey count from multisig.nodes or multisig.pubkeys like in
  multisig_get_pubkeys().
- Fix size of multisig script length encoding in segwit (varint vs. OP_PUSH).
- Improve comments.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
381e8bc85a feat(core): Implement the BIP-341 common signature message computation. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
99e4ed6f42 chore(core): Support script_pubkey parameter for Bitcoin inputs. 2021-11-13 13:33:46 +01:00
matejcik
72924a016f tests(core): add unit tests for Icarus and Icarus-Trezor, fix failing tests 2021-11-10 13:57:57 +01:00
grdddj
73238135d6 feat(core/ethereum): EIP-712
Based on original contribution by Max Kupriianov <xlab@hey.com>

Implemented EIP-712 typed data signatures in Ethereum app.

Add eth_abi into pyproject deps

device test for EIP 712

fixed hex decoding for address

fixup! fixed hex decoding for address

code quality, more pythonic code, removing unused imports

running black and isort on changed files

trezorctl file input for EIP 712 data signing

fixup! code quality, more pythonic code, removing unused imports

fixup! fixup! code quality, more pythonic code, removing unused imports

necessary changes after rebase to master

unit tests for sign_typed_data.py

new protobuf messages, working for nonarray types

simplified and verified solution for our simple data

support for simple arrays, without their confirmation

reverting protobuf value messages to bytes, appropriate changes

showing arrays in Trezor, code quality improvements

data validation on Trezor, minor improvements

using custom types for storing type data instead of dicts, addressing feedback from review

moving helper functions to its own file, tests for decode_data

additional overall tests

support for arrays of structs

adding support for metamask_v4_compat variable

using HashWriter object to collect the final hash continously

minor improvements in code quality

validate_field_type function

streaming values from client without saving them, missing UI

prototype of streamed UI using confirm_properties

accounting for bytes in data, more data types in integration tests

rebase on master, using f-strings

minor fixes and improvements from code review

StructHasher class for the whole hashing process

mypy and style changes

asking users whether to show structs and arrays

protobuf descriptions to fix make defs_check

unifying comments, mypy fix

unit tests for StructHasher class

UI fixtures, skipping device tests for T1

addressing majority of code review comments about code quality and structure

changing file structure - layouts, helpers, sign_typed_data

decode_data renaming and docstring, renaming unit test file

using tuples instead of lists in elifs

layout improvements

excluding core/src/apps/common/confirm.py file from the PR

True/False returning layout with Show more button

code review layout improvements

forgotten br_type argument to should_show_more
2021-11-02 14:27:01 +01:00
grdddj
082b7ecd91 feat(core): plural function supports "key/keys" string
Previously function did not work for words ending with "y" and vowel before that
2021-11-02 14:27:01 +01:00
grdddj
b1a3618c17 refactor(core/ethereum): rename address.py to helpers.py 2021-11-02 14:27:01 +01:00
matejcik
1d72085b5c feat(core): implement conversion from timestamp to datetime 2021-10-29 11:00:30 +02:00
Pavol Rusnak
7e64ccbaf9 feat(core): add BIP-350 test cases to test_trezor.crypto.bech32 2021-10-18 13:36:05 +02:00
Pavol Rusnak
a45e103875 fix(core): remove 3 BIP-173 test cases from test_trezor.crypto.bech32
because they encode segwit program > 0 and these should no longer
be encoded with Bech32 but rather with Bech32m
2021-10-18 13:36:05 +02:00
Pavol Rusnak
9aa07c7f96 feat(core): update bech32.py to support Bech32m 2021-10-18 13:36:05 +02:00
amadejpapez
85ba7c12ba style(all): use f-strings for formatting
[no changelog]
2021-10-13 11:53:17 +02:00
gabrielkerekes
1f33ab420d feat(cardano): update transaction signing for multisig 2021-10-11 15:16:24 +02:00
gabrielkerekes
21281d7cf4 feat(cardano): add support for script addresses derivation 2021-10-11 15:16:24 +02:00
gabrielkerekes
dd9652cd07 feat(cardano): add get-native-script-hash call 2021-10-11 15:16:24 +02:00
matejcik
b666895303 feat(core/rust): catch, handle and propagate uPy exceptions 2021-09-21 12:43:31 +02:00
matejcik
e80077e0a4 feat(core/ethereum): enable type-checking for Ethereum app 2021-09-10 15:09:03 +02:00
matejcik
0c2863fc8d feat(core/ethereum): use TokenInfo object instead of tuples 2021-09-10 15:09:03 +02:00
matejcik
96ed53cc1c refactor(core,legacy): remove Wanchain special handling
now that Wanchain has proper chainID and we don't need to detect it by
magic.

[no changelog]
2021-09-10 15:09:03 +02:00
matejcik
639406b01f feat(all): make chain_id mandatory 2021-09-10 15:09:03 +02:00
Martin Milata
f37ca13f1a refactor(core): disable SD, SBU, fatfs for T1 build 2021-08-20 12:22:13 +02:00
gabrielkerekes
28f0f60295 feat(cardano): update tests for streamed tx signing 2021-08-20 11:50:13 +02:00
gabrielkerekes
b0c8590f00 feat(cardano): streamed transaction signing 2021-08-20 11:50:13 +02:00
Martin Milata
574dcbc8a3 refactor(core): convert apps.common to layouts 2021-08-04 15:03:11 +02:00
Pavol Rusnak
f740515c85 fix(core,crypto): add more test cases from bip-173 2021-07-21 11:20:11 +02:00
matejcik
cf15dce326 refactor(core/ethereum): improve API of the rlp module 2021-07-19 13:59:28 +02:00
Andrew Kozlik
3e9f8a32ac fix(core): Fix insufficient BIP-32 path checks.
- Disable testnet coins from accessing Bitcoin paths.

- Restrict BIP-45 paths to Bitcoin and coins with strong replay protection.
2021-06-30 18:25:58 +02:00
gabrielkerekes
3cd2182b69 feat(core): introduce OrderedMap into CBOR serialisation
Items of an OrderedMap are included in CBOR as they come without sorting them in any way.
2021-06-24 08:22:39 +02:00
matejcik
3c4eb04346 feat(core/monero): cache Monero testing chain between runs 2021-06-23 11:51:18 +02:00
matejcik
52c34c7364 fix(core): allow caching empty values (fixes #1659) 2021-06-11 12:32:13 +02:00
gabrielkerekes
597402eab8 refactor(core/cardano): decouple address parameters validation 2021-06-08 15:02:24 +02:00
matejcik
1382246977 fix(core/tests): fix equality testing for new message types 2021-06-08 09:55:19 +02:00
Jan Pochyla
a8623c4b59 refactor(core): fix imports and use new protobuf API in apps 2021-06-08 09:55:19 +02:00
Jan Pochyla
02aa14fc04 refactor(core): Switch to new Protobuf API 2021-06-08 09:55:19 +02:00
matejcik
f1a54f2108 refactor(core): remove more global imports 2021-05-06 13:14:21 +02:00
matejcik
b5c1b37a56 chore(core/tests): bump heap size for core unit tests 2021-05-06 13:14:21 +02:00
matejcik
aaa3ce6117 fix(core/bitcoin): fix CoinJoin authorization with new cache 2021-05-06 13:14:21 +02:00
matejcik
f3db4f2dd3 refactor(core): defragment PathSchema memory usage 2021-05-06 13:14:21 +02:00
matejcik
3cdb09c294 refactor(core): modify cache to preallocate all its data
also get rid of expensive "wire" import
2021-05-06 13:14:21 +02:00
Martin Milata
720eaa3abd ci: run monero tests on hardware 2021-04-06 22:06:12 +02:00
Rafael Korbas
a9b8b0e119 feat(core/cardano): chunked serialization of signed transaction 2021-03-26 11:15:19 +01:00
Andrew Kozlik
25411e22c9 test(core): Add unit test for modtrezorconfig counter. 2021-03-26 10:54:56 +01:00
Andrew Kozlik
2836bfc64c fix(core): Improve error handling and range checking in modtrezorconfig. 2021-03-26 10:54:56 +01:00