1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 12:08:59 +00:00
Commit Graph

460 Commits

Author SHA1 Message Date
grdddj
b9858f00c5 chore(tools): simplify build_protobuf file sources creation 2022-03-04 11:42:51 +01:00
grdddj
3d505874aa feat(ci): create pyright tool and include it in CI
[no changelog]
2022-03-02 15:43:50 +01:00
Pavol Rusnak
c6667fa0c2 feat(core): verify bip340 pubkeys used in p2tr addresses
Co-Authored-By: Ondřej Vejpustek <ondrej.vejpustek@satoshilabs.com>
2022-02-16 10:25:15 +01:00
Pavol Rusnak
b9bbd5fcd7 chore: update dependencies
[no changelog]

Co-Authored-By: Martin Milata <martin@martinmilata.cz>
2022-02-15 13:28:03 +01:00
Martin Milata
f2b8822d76 refactor(core): improve build-time option for old/new UI
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
8fb28e4af5 feat(core/rust): impl Paginate for Paragraphs
[no changelog]
2022-02-08 15:40:37 +01:00
Martin Milata
7271606ca2 feat(core): smaller debug square on T1
[no changelog]
2022-02-08 15:40:37 +01:00
matejcik
c236dfc814 style(core): type object doesn't have __slots__ 2022-02-08 14:27:23 +01:00
Jan Pochyla
3dd3d7f87b feat(core): Add HoldToConfirm example, improve Loader and animation frame support 2022-02-01 10:51:02 +01:00
Andrew Kozlik
83686d1be2 chore(core): Add HashContextInitable protocol class. 2022-01-31 18:00:22 +01:00
Andrew Kozlik
0e58218f5f feat(core): Implement Bitcoin payment requests. 2022-01-31 18:00:22 +01:00
Andrew Kozlik
d0c3a6a2fa chore(core): Add mac field to Address message.
[no changelog]
2022-01-31 18:00:22 +01:00
Andrew Kozlik
0959947a88 chore(common): Add GetNonce, Nonce and TxAckPaymentRequest message.
[no changelog]
2022-01-31 18:00:22 +01:00
grdddj
8524f4b6ba feat(ui): InfoConfirm layout accepting DebugLinkDecision
[no changelog]
2022-01-27 13:15:04 +01:00
Andrew Kozlik
ba4f046d6f feat(common): Add INFO button to DebugLinkDecision.
[no changelog]
2022-01-27 13:15:04 +01:00
Alois Klink
5c4703c9bb fix(core,legacy): Fix domain-only ethTypedData
When doing Ethereum signTypedData, and the primaryType="EIP712Domain",
we completely ignore the "message" part and only sign the domain.

According to the community, this is technically allowed by the spec,
and may be used by ETH smart contracts to save on gas.

Test case generated by @MetaMask/eth-sig-util's library.

See: https://ethereum-magicians.org/t/eip-712-standards-clarification-primarytype-as-domaintype/3286
2022-01-14 14:22:46 +01:00
matejcik
e20879189f style(core): remove old-style annotations (Set, Tuple, Union) 2022-01-07 21:41:17 +01:00
matejcik
5e1dce35b3 style(core): remove unused type:ignore comments 2022-01-07 21:41:17 +01:00
matejcik
80f6463799 style(core): define obj_eq and obj_repr so that they pass type-check 2022-01-07 21:41:17 +01:00
matejcik
228c4db646 style(core): improve types in rlp.py 2022-01-07 21:41:17 +01:00
matejcik
dec89ea59e refactor(core): convert if/elif chains to if-chains
This way AST parsers won't get stack exceeded (because an elif counts as
an else { if {}} to an AST parser apparently?) and so automated tools
will like tokens.py and friends.
2022-01-07 21:41:17 +01:00
matejcik
c3f2db3be5 refactor(core): improve type signature of bech32.convertbits 2022-01-07 21:41:17 +01:00
grdddj
9fc5bb546b style(core): full pyright-based type-checking
Changes many fields to required -- as far as we were able to figure out,
signing would fail if these fields aren't provided anyway, so this
should not pose a compatibility problem.

Co-authored-by: matejcik <ja@matejcik.cz>
2022-01-07 21:41:17 +01:00
Pavol Rusnak
b0e0280465 chore: drop obsolete fw_vendor_keys field from Features
[no changelog]
2022-01-03 14:23:58 +01:00
Alisina Bahadori
77ab865386 feat(legacy): Implement EIP-712 signing 2021-12-19 20:36:30 +01:00
Martin Milata
7cc9f13605 refactor(core/rust): allow model_t1 and model_tt at once
[no changelog]
2021-11-24 15:36:34 +01:00
Martin Milata
afd7cb3b01 feat(core/rust): add example layout for T1
[no changelog]
2021-11-24 15:36:34 +01:00
Martin Milata
4d60c10330 feat(core/rust): add support for T1 UI
[no changelog]
2021-11-24 15:36:34 +01:00
Andrew Kozlik
aaceb5bcc6 chore(core): Remove USE_SECP256K1_ZKP_BIP340 build option. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
bec0634bae feat(core): Improve message signing UI.
- Add "Confirm message" subheader to SignMessage and VerifyMessage.
- Unify font for SignMessage and VerifyMessage to fixed-width font.
- Fix device tests.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
cf14e06aa0 feat(core): Show address confirmation in SignMessage. 2021-11-10 17:35:57 +01:00
Andrew Kozlik
c2f1850abb feat(common): Add no_script_type option to SignMessage. 2021-11-10 17:35:57 +01:00
matejcik
c38efaa9a5 chore: make bitcoin-only checker happy 2021-11-10 13:57:57 +01:00
matejcik
10e338e005 feat(core/cardano): allow derivation type selection 2021-11-10 13:57:57 +01:00
matejcik
387466e073 refactor(core): separate Cardano cryptography into its own module 2021-11-10 13:57:57 +01:00
matejcik
faa807f995 feat(core): show progress for SLIP39 derivation
fixes #1842
2021-11-10 13:57:57 +01:00
matejcik
8caac218ec feat(core/cardano): indicate whether Cardano seed should be derived 2021-11-10 13:57:57 +01:00
matejcik
bc75d05772 chore(common/defs/fido): add coinbase u2f
[no changelog]
2021-11-08 15:55:01 +01:00
Jun Luo
62b649ef5d refactor(common & core & legacy): Stellar, rename StellarCreatePassiveOfferOp to StellarCreatePassiveSellOfferOp. 2021-11-04 13:16:29 +01:00
Jun Luo
d064aae3f9 feat(common & core & legacy): Stellar, add support for StellarPathPaymentStrictSendOp. 2021-11-04 13:16:29 +01:00
Jun Luo
1dcb8e4913 feat(common & core & legacy): Stellar, add support for StellarManageBuyOfferOp. 2021-11-04 13:16:29 +01:00
Jun Luo
3a5768c4bf refactor(common & core & legacy): Stellar, rename StellarManageOfferOp to StellarManageSellOfferOp and rename StellarPathPaymentOp to StellarPathPaymentStrictReceiveOp. 2021-11-04 13:16:29 +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
ecc0f6c445 fear(core/ui): add should_show_more layout function
Also adding `hold` argument into confirm_blob function
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
matejcik
e972839ac7 style(all): fix pylint complaints
[no changelog]
2021-10-27 13:13:15 +02:00
Ondřej Vejpustek
29ce860d46 refactor(core,crypto): rename schnorr to BIP340 2021-10-25 14:41:28 +02:00
Ondřej Vejpustek
7ac0bdd215 feat(core): make core use Schnorr signatures 2021-10-25 14:41:28 +02:00
Ondřej Vejpustek
26463eb3ce feat(core): make core use ecdsa from secp256k1_zkp wherever possible 2021-10-25 14:41:28 +02:00