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

10853 Commits

Author SHA1 Message Date
Martin Milata
af0ae880a1 fix(ci): Fix valgrind crypto test. 2022-01-19 15:22:03 +01:00
Andrew Kozlik
07013d5a0c fix(ci): Fix crypto tests. 2022-01-19 15:22:03 +01:00
Andrew Kozlik
ebc07fd6db ci: Suppress libSDL memory leaks.
[no changelog]
2022-01-19 15:22:03 +01:00
Martin Milata
242b5f956c ci: more AddressSanitizer jobs 2022-01-19 15:22:03 +01:00
Andrew Kozlik
49ae8848db fix(core): Fix memory leaks in emulator.
[no changelog]
2022-01-19 15:22:03 +01:00
Andrew Kozlik
39b64b8569 fix(core): Fix stack-use-after-scope in display.c.
[no changelog]
2022-01-19 15:22:03 +01:00
Martin Milata
b6ed573cf5 ci(legacy): run nightly device tests with AddressSanitizer
[no changelog]
2022-01-19 15:22:03 +01:00
Martin Milata
e3541997f0 ci(core): run nightly device tests with AddressSanitizer
[no changelog]
2022-01-19 15:22:03 +01:00
Andrew Kozlik
56126b75a7 ci: Use address sanitizer in CI.
[no changelog]
2022-01-19 15:22:03 +01:00
Pavol Rusnak
4a71d15b1d chore(core/embed): refactor trezor_obj_get_uint64 into trezorobj.h
[no changelog]
2022-01-19 11:16:47 +01:00
grdddj
e4b5f10223 feat(tests): clicking Info button in (Super)Shamir backup device tests 2022-01-17 12:33:24 +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
b2136e35d4 style(tests): remove class from taproot test 2022-01-13 13:01:17 +01:00
matejcik
8b2e2112bc style(python/btc): better specification of type of prev_txes
[no changelog]
2022-01-13 13:01:17 +01:00
Pavol Rusnak
7f061949f2 feat(ci): add more output to build-docker.sh script 2022-01-12 21:01:34 +01:00
Pavol Rusnak
52a09c320d fix(ci): copy pyright directory in Dockerfile
follow-up to https://github.com/trezor/trezor-firmware/pull/1939
2022-01-12 21:01:34 +01:00
Pavol Rusnak
2880a2fa33
fix(crypto): refactor ethereum_address_checksum to prepend "0x" (#2029)
[no changelog]
2022-01-12 21:00:54 +01:00
grdddj
8bcd52fc1b chore(tests): unifying NEM T1 and TT device tests 2022-01-12 14:53:20 +01:00
grdddj
e3d366e65b feat(python): ScriptUI for trezorctl, reference client implementation 2022-01-12 14:52:01 +01:00
Martin Milata
49a27a0b3c ci: fix nix setup for hardware tests 2022-01-12 13:14:11 +01:00
Andrew Kozlik
8baf1ca79f fix(crypto): Fix out of bounds read in ecdsa_sig_to_der().
[no changelog]
2022-01-11 17:29:53 +01:00
Andrew Kozlik
fc0fa726e4 ci: Allow failure of connect tests. 2022-01-10 11:14:36 +01:00
Andrew Kozlik
44c184061e fix(tests): Fix signatures in ownership proofs. 2022-01-10 11:14:36 +01:00
Andrew Kozlik
cdf2129b73 fix(core): Fix proof of ownership sighash computation. 2022-01-10 11:14:36 +01:00
Andrew Kozlik
88a08e3512 chore(core): Increase maximum CoinJoin coordinator name length to 36 (2 lines). 2022-01-10 11:14:36 +01:00
matejcik
4ab33f0b69 docs(core): add entries to index 2022-01-07 21:41:17 +01:00
matejcik
09732530f6 docs(core): document coding style 2022-01-07 21:41:17 +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
456959545c docs(core): add changelog for type-checking 2022-01-07 21:41:17 +01:00
matejcik
454a7ce301 fix(legacy/nem): remove checks for newly required protobuf attributes
[no changelog]
2022-01-07 21:41:17 +01:00
matejcik
dfab3efb86 style(python): fix typecheck issues
[no changelog]
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
8d8cfd6692 build: fully replace mypy with pyright
[no changelog]
2022-01-07 21:41:17 +01:00
matejcik
45787307ca style(core): support AnyStr in all hash function arguments 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
matejcik
9c5945a888 chore(core): add fake typing module (not included in build) 2022-01-07 21:41:17 +01:00
matejcik
1bfaec10e9 build(core): rewrite build_mocks with pathlib, add symlinks to ../mocks 2022-01-07 21:41:17 +01:00
matejcik
bda1fa9912 build(core): exclude all "from typing" imports from build 2022-01-07 21:41:17 +01:00
Martin Milata
3100961dda ci(nix): update to pyright-1.1.204 2022-01-07 21:41:17 +01:00
Christian Reitter
525bbab165 tests(crypto): update wycheproof testcase source and parsing
The JSON schema of the test cases has slightly changed.
The "curve" field has moved to the "testGroups" level and the X25519 algorithm has been renamed,
which requires adjustments in the parsing code.

A duplicate definition of "ecdh_vectors" has also been removed.
2022-01-07 16:55:24 +01:00
Christian Reitter
176b12762f fix(crypto): fix expected_sig buffer handling 2022-01-07 14:54:52 +01:00
Christian Reitter
64281c69ce fix(crypto): fix incorrect sig buffer size 2022-01-07 14:54:52 +01:00
Andrew Kozlik
4882648dad fix(crypto): Treat point at infinity as an invalid public key in ecdsa_recover_pub_from_sig(). 2022-01-07 14:37:40 +01:00
FujiCoin
33c243be8d
feat(common): enable taproot for Fujicoin, fix xpub versions
* fix fujicoin params

* add test_fujicoin/test_send_p2tr

* fix test

* fix serialized_tx.hex()

* Recreated based on a new transaction

* make gen, some fixes

Co-authored-by: matejcik <ja@matejcik.cz>
2022-01-05 12:43:34 +01:00
Pavol Rusnak
b0e0280465 chore: drop obsolete fw_vendor_keys field from Features
[no changelog]
2022-01-03 14:23:58 +01:00
Pavol Rusnak
35d40cc164 fix(core): change logic of vendor header comparison
Previously we checked whether the current vendor header and
the new vendor header are the same by comparing the embedded keyset.

What originally looked like a good idea is not that good, because
this disallows us from ever changing the vendor header signing keys
without causing erasure of the storage during the version update.

This commit fixes that by changing the logic to comparing just the
vendor string.

Change of function names is purely cosmetic:
* vendor_keys_hash -> vendor_header_hash
* check_vendor_keys_lock -> check_vendor_header_lock
2022-01-03 14:23:58 +01:00