1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00
Commit Graph

1199 Commits

Author SHA1 Message Date
matejcik
2c8e5f527b all: rename changelogs to .md for highlighting 2020-07-08 10:43:40 +02:00
matejcik
a19a9a318a all: improve changelog formatting 2020-07-08 10:43:40 +02:00
matejcik
476cf2ee8f core, legacy: more changelog entries 2020-07-08 10:43:40 +02:00
Pavol Rusnak
57ae902aed
core/monero: don't download test binary even if hash is different 2020-07-03 15:18:38 +02:00
Pavol Rusnak
5d666376f0
core/monero: update tests binary 2020-07-03 15:18:38 +02:00
Andrew Kozlik
37f4dcc7e5 core/bitcoin: Rename witness_p2wsh() to witness_multisig(). 2020-07-03 11:17:19 +02:00
Andrew Kozlik
91b615c217 core: Update changelog. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
9cd600f79e core/bitcoin: Add special confirmation screen for transactions with external inputs. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
64d9350de2 core/bitcoin: Implement GetOwnershipId message. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
533de50588 common/protob: Add GetOwnershipId message. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
712ec68c1b core/bitcoin: Add support for external inputs with proof of non-ownership. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
956ea9a94f common: Add ownership_proof field to TxInputType. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
791ff3fe06 core/tests: Add unit tests for SLIP-0019 proofs of ownership. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
d4317d1536 core/bitcoin: Implement generation and verification of SLIP-0019 proofs of ownership. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
d52de28704 core/bitcoin: Implement BIP-322 SignatureProof container. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
c723c78529 common/protob: Add GetOwnershipProof message. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
d48a372ca7 core/sign_tx: Implement support for signed external inputs. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
78f14d286e core/sign_tx: Factor out get_legacy_tx_digest() from sign_nonsegwit_input(). 2020-07-03 11:17:19 +02:00
Andrew Kozlik
61e2d4d5e5 core/bitcoin: Implement signature verifier. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
5378e12ba2 core/bitcoin: Clarify hash_type vs. sighash_type terminology. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
d1e043f417 core/bitcoin: Implement parsing of scripts and witnesses for signature verification. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
173bb7ed13 core/bitcoin: Replace TxInputType parameter in input_derive_script. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
a901573ea2 core/bitcoin: Move script types from helpers to common. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
3b6c1e5e6b core/crypto: Add functions for verifying DER encoded signatures. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
9459c5a5c2 core/common: Add BytearrayReader and basic reader functions. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
99f01cd316 core/sign_tx: Check script_pubkeys of inputs. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
cc655575c8 common: Add witness field to TxInputType. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
872768928b core/crypto: Fix endianity in DER length encoding. 2020-07-03 11:17:19 +02:00
Andrew Kozlik
e7f230d66e core/sign_tx: Use varint length encoding for witness stack items. 2020-07-03 11:17:19 +02:00
Tomas Susanka
3a3e5739b0 core, legacy: update changelogs 2020-07-02 09:09:34 +00:00
Tomas Susanka
fc9eb63114 core: add previous commit to changelog 2020-07-01 17:37:47 +00:00
Tomas Susanka
0f9a2459d3 core: make QR code smaller for Monero 2020-07-01 17:20:04 +00:00
Tomas Susanka
ca3dd2bfb9 common: skip deprecated fields during generation; deprecate overwintered field in Zcash 2020-06-30 16:02:21 +02:00
matejcik
e6e3043096 all: implement support for pre-overwinter prevtx (fixes #1030) 2020-06-30 15:19:31 +02:00
Andrew Kozlik
f382f77c89 core/ui: Fix repaint bug in QR code rendering #1067. 2020-06-25 12:25:41 +02:00
Tomas Susanka
e534ae3ad7 legacy, core: rename Features.pin_cached to unlocked and unify 2020-06-19 21:26:36 +02:00
Tomas Susanka
b6c8cbc24c core: add 'initialized' to changelog 2020-06-16 11:31:29 +02:00
Tomas Susanka
a6acefbdf5 core: wipe before reset and recovery; introduce 'intialized' field 2020-06-16 11:31:29 +02:00
Andrey
1eeaa1e5cf Enable extra_data for Zcoin. Changed coininfo.py 2020-06-15 09:53:00 +02:00
Tomas Susanka
b67be7dd9e core: forbid all settings if not initialized 2020-06-11 18:47:01 +02:00
Tomas Susanka
f8b2f0bb7b changelogs: change also bootloader changelogs to the new format 2020-06-11 15:48:38 +00:00
Tomas Susanka
9979af3cd2 changelogs: start using more detailed changelog 2020-06-11 17:43:40 +02:00
Tomas Susanka
981d079d7f core/signverify: add failsafe for an empty message header 2020-06-11 09:08:50 +02:00
Tomas Susanka
56fe5adcfc Merge branch 'release/2020-06' 2020-06-10 06:51:18 +00:00
Andrew Kozlik
d1690f4317 core/tools: fix pixel-perfect mode for centered text in dialog-designer 2020-06-09 13:31:42 +02:00
Pavol Rusnak
179645e3ad core: unify usage of TREZOR_MODEL 2020-06-06 21:06:15 +02:00
Ondrej Mikle
c877dc8dd6 core: port storage to T1 2020-06-06 21:06:15 +02:00
Pavol Rusnak
2815b62838
core/tools: implement "pixel-perfect" mode for dialog-designer tool 2020-06-05 14:11:59 +00:00
Pavol Rusnak
5262ef84cf common/defs/fido: add aws and tutanota 2020-06-05 14:53:13 +02:00
Andrew Kozlik
9c61257e8e core: Use the Lock icon in the PIN entry dialog only when the device is actually locked. 2020-06-05 11:52:56 +02:00
Pavol Rusnak
5ed64a0736
core/tools: refactor dialog-designer tool 2020-06-04 21:39:47 +02:00
Pavol Rusnak
d9d5511858
core/tools: add quick'n'dirty dialog-designer tool 2020-06-04 19:56:42 +02:00
matejcik
7579ac5274 core: fix rendering issues in homescreens 2020-06-04 16:18:46 +02:00
matejcik
9df7c84c56 core/ui: lower lockscreen brightness 2020-06-04 16:18:46 +02:00
matejcik
8fa7684a9c core: set a scheduler-safe maximum for autolock 2020-06-04 16:18:46 +02:00
matejcik
872e0fb0e0 core: lower scheduler resolution to milliseconds
This avoids problems with large timeouts causing the scheduler queue to
think the time counter has overflown, and ordering the autolock task before
immediate tasks.

The maximum reasonable time difference is 0x20000000, which in
microseconds is ~8 minutes, but in milliseconds a more reasonable ~6
days.
2020-06-04 16:18:46 +02:00
matejcik
847691798b core: simplify homescreen and lockscreen implementations 2020-06-04 16:18:46 +02:00
matejcik
4bc865794f core: only unlock storage if it is locked (solves determinism issue in tests) 2020-06-04 16:18:46 +02:00
matejcik
ffa7790ed5 core: start USB after booting apps
This prevents a race condition where sometimes an Initialize message
could arrive before the homescreen was fully booted -- and Recovery
homescreen would cancel it as part of its bootup sequence.
2020-06-04 16:18:46 +02:00
matejcik
70f67883c5 core: fix artifacts in click-based UI tests 2020-06-04 16:18:46 +02:00
matejcik
a9d8fd3992 core: debuglink interface avoids workflow management
This will have unintended consequences if you call a wirelink function
on the debulink interface. TT allows this ... and will behave badly.
2020-06-04 16:18:46 +02:00
matejcik
bc9247e18d core: add Cancel to a list of allowed messages while locked 2020-06-04 16:18:46 +02:00
matejcik
f32c2f9e23 core: replace workflow.kill_default with workflow.close_others 2020-06-04 16:18:46 +02:00
matejcik
01832d5ae9 core: call close_others() in place of ButtonRequest
this makes sense, really: close_others() requests UI exclusivity, and
that is something that generally happens at the same places we emit a
ButtonRequest
2020-06-04 16:18:46 +02:00
matejcik
6f53ca0ac6 core: rework wait_layout()
The original wait_layout was unreliable, because there are no guarantees
re order of arrival of the respective events. Still, TT's event handling
is basically deterministic, so as long as the host sent its messages
close enough to each other, the order worked out.

This is no longer the case with the introduction of loop.spawn: TT's
behavior is still deterministic, but now ButtonAck is processed *before*
the corresponding wait_layout, so the waiting side waits forever.

In the new process, the host must first register to receive layout
events, and then receives all of them (so the number of calls to
wait_layout must match the number of layout changes).

DebugLinkWatchLayout message must be version-gated, because of an
unfortunate collection of bugs in previous versions wrt unknown message
handling; and this interests us because upgrade-tests are using
wait_layout feature.
2020-06-04 16:18:46 +02:00
matejcik
5d823ff5ea core: use ButtonRequestType.PinEntry for PIN entry 2020-06-04 16:18:46 +02:00
matejcik
bbfce4e303 common: introduce ButtonRequestType.PinEntry 2020-06-04 16:18:46 +02:00
matejcik
3dbd9c9eca core/loop: prevent finalizers from doing things when task is closed externally 2020-06-04 16:18:46 +02:00
matejcik
42e7c43c7c core: make sure that auto-lock shuts down running workflows 2020-06-04 16:18:46 +02:00
matejcik
2d0206c043 core: replace workflow.on_start/on_close with workflow.spawn 2020-06-04 16:18:46 +02:00
matejcik
02565f3bfb core/loop: introduce spawn syscall 2020-06-04 16:18:46 +02:00
matejcik
a4f47ddd21 core/lockscreen: ignore exception when user taps "unlock" and then cancels 2020-06-04 16:18:46 +02:00
matejcik
7ff1251ee1 core: dim lockscreen (fixes #974) 2020-06-04 16:18:46 +02:00
matejcik
4035aad51b core: implement auto-lock after a configurable timeout (fixes #75) 2020-06-04 16:18:46 +02:00
matejcik
67b723e4ca core: add a global idle timer 2020-06-04 16:18:46 +02:00
Andrew Kozlik
5469acfabf core/webauthn: Cache user verification for 3 minutes. 2020-06-04 16:18:46 +02:00
Andrew Kozlik
b867ac1d01 core/webauthn: Implement FIDO2 unlocking from softlock. 2020-06-04 16:18:46 +02:00
Andrew Kozlik
0f81886c9f core/webauthn: Allow confirm_dialog() to return a new state as an alternative to the user response. 2020-06-04 16:18:46 +02:00
Andrew Kozlik
c8ae5c157e core/webauthn: Implement U2F unlocking from softlock. 2020-06-04 16:18:46 +02:00
matejcik
06aed7135a core: do not prompt for PIN just to lock the device again 2020-06-04 16:18:46 +02:00
matejcik
2cedc687e6 core: disable trezor-crypto BIP32 cache 2020-06-04 16:18:46 +02:00
matejcik
246998910a core: refactor usage of input_signals
this prevents a certain class of UI test failure. It also localizes the
use of debuglink signals into the layout classes instead of call sites,
which is a design we were already using for confirm_signals
2020-06-04 16:18:46 +02:00
matejcik
afeeafd5cd core: hide some fields when softlocked 2020-06-04 16:18:46 +02:00
matejcik
b9bd9ea3d0 core: only softlock when PIN is set 2020-06-04 16:18:46 +02:00
matejcik
a9ddc2a8e2 core/boot: modify initial lockscreen label 2020-06-04 16:18:46 +02:00
matejcik
09af8aed4e core: consider lockscreen to be a separate homescreen
this involves some changes to the workflow defaults:

* workflow.start_default() takes no arguments
* workflow.set_default() (originally replace_default) configures the
  default that will be started by next call to start_default().
  The intended usecase is to set_default() first and then start it
  separately.
* apps.base.set_homescreen() factors out the logic originally in
  main.py, that decides which homescreen should be launched. This uses
  set_default() call. start_default() is then used explicitly in main.py
2020-06-04 16:18:46 +02:00
matejcik
d73480bc9d core: introduce PIN soft-locking 2020-06-04 16:18:46 +02:00
matejcik
04c8b2803d core: refactor homescreen app, include lockscreen in it 2020-06-04 16:18:46 +02:00
matejcik
9197623d83 core: factor out the decision whether to lock the device 2020-06-04 16:18:46 +02:00
matejcik
0600d87c8c common: rename ClearSession to LockDevice, introduce EndSession 2020-06-04 16:18:46 +02:00
matejcik
32fcc4ad9c core: make verify_user_pin accept a Context argument 2020-06-04 16:18:46 +02:00
matejcik
8ca7ffc3b8 core: use wire.PinCancelled/PinInvalid instead of custom versions
also refactor show_pin_invalid and its usages so that it raises directly

note that we are now using PinCancelled instead of ActionCancelled where
appropriate
2020-06-04 16:18:46 +02:00
matejcik
eabfcab9b9 core: add default messages to some error codes 2020-06-04 16:18:46 +02:00
matejcik
341c5b7d10 core/wire: make handler lookup pluggable 2020-06-04 16:18:46 +02:00
matejcik
837c4df61f core: expose storage_is_unlocked() as config.is_unlocked() 2020-06-04 16:18:46 +02:00
matejcik
87433995b0 core: add BITCOIN_ONLY to mock file 2020-06-04 16:18:46 +02:00
matejcik
d5e45c02bb core: move base functions from "homescreen" app to "base" 2020-06-04 16:18:46 +02:00
Tomas Susanka
8859d103f4 core, legacy: bump versions 2020-06-03 15:39:25 +00:00
Tomas Susanka
e2629eb921 core, legacy: update Changelogs to reflect the release 2020-06-03 15:35:30 +00:00
matejcik
bd5b3a3f21 common: drop Theta and VeChain ERC tokens, refresh market caps
fixes #1022
fixes #1023
2020-05-29 12:12:30 +02:00
matejcik
5209804fc3 core: relax path checks on GetPublicKey
(cherry picked from commit 554d8949f5)
2020-05-27 06:58:30 +00:00
matejcik
554d8949f5 core: relax path checks on GetPublicKey 2020-05-27 08:56:50 +02:00
matejcik
d59ffe553f make gen 2020-05-25 16:14:05 +02:00
Ondřej Vejpustek
24ceb0ab6b crypto/bignum: change limb size to 29, add tests 2020-05-24 14:36:38 +00:00
Andrew Kozlik
cb32ae2e4b core/tests: add request_meta queries to unit tests (needed for transaction streaming) 2020-05-24 14:36:38 +00:00
Andrew Kozlik
42eddf8e04 core/sign_tx: validate prevout amount in all cases 2020-05-24 14:36:38 +00:00
Andrew Kozlik
7db3e930d4 core/sign_tx: Add further message sanitization checks. 2020-05-24 14:36:37 +00:00
matejcik
72ef86d79a all: enable extra_data for komodo 2020-05-24 14:36:37 +00:00
matejcik
7a3637d5b0 core/sign_tx: add checks for version_group_id and branch_id fields 2020-05-24 14:36:37 +00:00
Ondrej Mikle
b01b24f090 core: change startup firmware file from .s to .S which enables preprocessing and fixes TT boot 2020-05-24 12:28:38 +02:00
Tomas Susanka
675ff459db core, legacy: update changelogs 2020-05-22 11:55:55 +00:00
Tomas Susanka
9dfc08ca61 core/bitcoin: drop decred_script_version 2020-05-21 19:14:39 +02:00
matejcik
eeb46eabca common: refresh token list 2020-05-21 13:29:13 +02:00
matejcik
2f665c8f84 core: add exception to GetPublicKey for PSBT master fingerprint (fixes #999) 2020-05-21 13:26:53 +02:00
Ondrej Mikle
10f0f107e0 core: Adds T1 core port FW flashing options for for openocd and jlink 2020-05-21 10:05:12 +02:00
Ondrej Mikle
0d65d684f0 core: T1 port can run on T1 bootloader with MEMORY_PROTECT=0 2020-05-21 08:49:59 +02:00
Tomas Susanka
a2f790167d core/bitcoin: fix step 1 and 2 comments in signing 2020-05-19 12:58:45 +00:00
Tomas Susanka
1ac0f60550 core: update isort config to place relative imports last 2020-05-18 14:31:51 +02:00
Tomas Susanka
aa115b6320 core: move decred writers to decred.py 2020-05-18 14:31:51 +02:00
Tomas Susanka
3084ee1eed core/bitcoin: move write_bitcoin_varint to common writers 2020-05-18 14:31:51 +02:00
Tomas Susanka
445f56d387 core/bitcoin: finalize bitcoin refactor
- core/bitcoin: move common files to the app's root
- core/bitcoin: use require_confirm instead of confirm
- core: move bitcoin unrelated functions from 'bitcoin' to a new 'misc' app
- core/bitcoin: use relative imports inside the app
- core: rename wallet app to bitcoin
- core/wallet: replace SigningErrors and the other exception classes with wire.Errors
2020-05-18 14:31:51 +02:00
matejcik
aa52fc3903 core/extmod: drop unused rfc6979 module 2020-05-18 14:31:00 +02:00
matejcik
050936d0d7 core: enable finalizers on extmod classes 2020-05-18 14:31:00 +02:00
matejcik
123b07e3ad core: drop support for pre-registering keychain namespaces 2020-05-15 16:30:41 +02:00
matejcik
3e06f4779a core/tests: add new keychain tests 2020-05-15 14:08:29 +02:00
matejcik
de9e73dcbc core/tests: update unit tests for new keychain API 2020-05-15 14:08:29 +02:00
matejcik
f3f6e2101a core/cardano: explanation about seed derivation 2020-05-15 14:08:29 +02:00
matejcik
a31b2cd1bc core/wallet: implement keychain for apps.wallet 2020-05-15 14:08:29 +02:00
matejcik
0dff3853a7 core/ethereum: introduce custom keychain decorators 2020-05-15 14:08:29 +02:00
matejcik
b594248ac2 core: use new keychain decorators where appropriate 2020-05-15 14:08:29 +02:00
matejcik
fd9e945308 core/cardano: use caching decorators and new Keychain API for Cardano as well 2020-05-15 14:08:29 +02:00
matejcik
7541d529a3 core: refactor keychain API, introduce SLIP44 decorator 2020-05-15 14:08:29 +02:00
matejcik
8c4cb58098 core: introduce caching decorators 2020-05-15 14:08:29 +02:00
matejcik
63dfcb17a7 core: make mypy happy about importing fatfs 2020-05-15 14:08:29 +02:00
matejcik
7f2e7b0003 core: add Ethereum constants to mocks 2020-05-15 14:08:29 +02:00
Pavol Rusnak
6704ed86a1
Merge pull request #995 from trezor/omikle/t1-core-port
core port to Trezor One
2020-05-14 16:48:18 +02:00
Ondrej Mikle
7eddafe487 core: better formatting for common parts of T1 and TT header 2020-05-14 16:10:42 +02:00
Ondrej Mikle
c4c341b3f9 core: setup stack when running core on T1 2020-05-14 12:46:25 +02:00
Dusan Klinec
6b8fc9c894
xmr: major protocol upgrade, CLSAG support added
- CLSAG signature scheme added
  - type hints added

xmr: optimize protocol, send only required data
  - real_out_additional_tx_keys contains only one element as nothing more is needed during signature
  - only src_entr.outputs[index] is HMACed and always present. Other outputs are present only if needed which reduces comm and CPU overhead.
  - getting rid of subaddresses dictionary (memory requirements), now subaddr indices are present per source entry so keys are computed when needed

xmr: prepare for permutation sending removal, specify index
  - specify source entry ordering index prior sorting by key images as original HMAC keys are generated based on these.
  - permutation checked just by valid HMACs, size of the set, key image sort order
  - sending permutation is now deprecated, will be removed in the following protocol versions
  - more strict state transition checks, guard strict check with respect to steps ordering
2020-05-13 11:13:19 +02:00
Tomas Susanka
25d2d130a0 tests: use maxfail option for fido2 tests 2020-05-12 09:48:23 +00:00
Ondrej Mikle
fb5a220b46 core: use legacy sign script for T1 core port binary to be flashable 2020-05-11 18:05:46 +02:00
Ondrej Mikle
e429085e96 core: copy firmware header for T1 port into final binary 2020-05-11 17:33:47 +02:00
Ondrej Mikle
d8115a7992 core: firmware header for T1 port 2020-05-11 15:43:43 +02:00
Tomas Susanka
53c43ac305 core/tests: initialize emu with slip14 before running fido2 test suite 2020-05-06 14:36:04 +00:00
Andrew Kozlik
3de565c33c core/sign_tx: In write_tx_header() rename has_segwit parameter to witness_marker and clarify usage. 2020-05-06 13:18:32 +02:00
Andrew Kozlik
846116a666 core/sign_tx: Improve comments. 2020-05-06 13:18:32 +02:00
Andrew Kozlik
7370077d0c core/sign_tx: Get rid of internal TxOutputBinType messages. 2020-05-06 13:18:32 +02:00
Andrew Kozlik
9f9618944a core/sign_tx: Explicitly pass script to write_tx_input() instead of setting it in txi. 2020-05-06 13:18:32 +02:00
Andrew Kozlik
04bdf1dc6c core/sign_tx: Remove unused index parameters. 2020-05-06 13:18:32 +02:00
Andrew Kozlik
c9814e50ba core/sign_tx: Set decred_script_version to 0 by default for decred coins. 2020-05-06 13:18:32 +02:00