matejcik
c15519f707
core/sign_tx: modify get_tx_header to avoid writing unchecked bytes
2020-03-20 14:19:31 +00:00
matejcik
9cab61fbd3
core/sign_tx: remove write_bytes_unchecked where appropriate
2020-03-20 14:19:31 +00:00
matejcik
27f6306e1d
core: introduce safer write_bytes functions
2020-03-20 14:19:30 +00:00
matejcik
9a5f6b025a
core/tezos: factor out writing Michelson instructions
2020-03-20 14:19:30 +00:00
matejcik
694f714719
core/ripple: rename write_bytes to avoid name collision
2020-03-20 14:19:30 +00:00
Tomas Susanka
64584e271c
legacy, core: add and unify validation checks
2020-03-20 14:19:30 +00:00
matejcik
ffdb299c61
all: drop Capricoin support [NO BACKPORT]
2020-03-20 14:19:30 +00:00
matejcik
adea7d6b35
all: make timestamp mandatory on timestamp-enabled coins
2020-03-20 14:19:07 +00:00
matejcik
e2035b4972
all: drop Horizen and BIP-115 support [NO BACKPORT]
2020-03-20 14:19:07 +00:00
matejcik
6f9c6361ea
core: remove negative_fee and cashaddr_prefix from bitcoin-only fw
2020-03-20 14:18:27 +00:00
matejcik
7d5771911c
core: flip condition for force_bip143
...
this should be equivalent because Bitcoin does not have force_bip143 set
2020-03-20 14:18:27 +00:00
matejcik
ed464f3d47
all: ensure expiry, timestamp and extra_data are blocked as appropriate
2020-03-20 14:18:27 +00:00
matejcik
27803ee8c1
all: drop overwintered field from transaction
2020-03-20 14:18:27 +00:00
matejcik
c9fd3f77a5
all: add overwintered field to coin specification
2020-03-20 14:18:27 +00:00
Pavol Rusnak
817b922850
all: add extra_data and timestamp fields to coin specification
2020-03-20 14:18:27 +00:00
matejcik
136307bcae
core: propagate coin info to all sanitize functions
2020-03-20 14:17:44 +00:00
matejcik
303c05aba7
core/sign_tx: check if prev_tx has enough outputs to match prev_index
2020-03-20 14:17:44 +00:00
Andrew Kozlik
a34637c0f2
core/sign_tx: Check multisig fingerprint before signing inputs.
2020-03-20 14:17:44 +00:00
Tomas Susanka
163220e4b7
core/wallet: properly check decred input
2020-03-20 14:17:44 +00:00
Ondřej Vejpustek
6274cfdf8b
core: remove unreachable zcash code
2020-03-20 14:17:44 +00:00
Ondřej Vejpustek
d61181d7e8
core: fix transaction header for mixed segwit inputs
2020-03-20 14:17:44 +00:00
Tomas Susanka
f0a39df75d
core/wallet: check inputs and outputs right after receiving them
2020-03-20 14:17:44 +00:00
Tomas Susanka
0903159d9b
core, legacy: make sure OPRETURN ouput is not marked as change
2020-03-20 14:17:44 +00:00
Tomas Susanka
4af9aa547e
core: forbid unnecessary fields in OPRETURN output
2020-03-20 14:17:44 +00:00
Andrew Kozlik
d800fcbf9f
core/sign_tx: If there is a non-multisig input, then change output cannot be multisig.
...
(cherry picked from commit 8eb6ce0899
)
2020-03-20 14:17:44 +00:00
Andrew Kozlik
b3cd760df0
core/webauthn: Disable CTAPHID_WINK function.
2020-03-20 15:07:06 +01:00
Andrew Kozlik
e5008eb332
core/webauthn: Remove indistinguishable credentials from the allow list.
2020-03-20 15:07:06 +01:00
Andrew Kozlik
cda9de8dd1
core/webauthn: Add maxCredentialCountInList and maxCredentialIdLength to authenticatorGetInfo response.
2020-03-20 15:07:06 +01:00
Andrew Kozlik
0af0e06d5b
core/webauthn: Truncate names in credential data to at most 100 bytes.
2020-03-20 15:07:06 +01:00
matejcik
f6f041e269
core/sdcard: also catch OSError in the formatting phase
2020-03-20 14:03:28 +01:00
matejcik
3a71a5a05c
core/sdcard: show "Wrong SD card" when unlocking SD protect with unformatted card
2020-03-20 14:03:28 +01:00
matejcik
3789a3372b
core/sdcard: modify exception handling in fatfs
...
expose ff.c constants, raise them as arguments to FatFSError
introduce NotMounted and NoFilesystem as subclasses of FatFSError with
the appropriate error code set
2020-03-20 14:03:28 +01:00
Andrew Kozlik
8ee0026637
core: Allow PIN entry even when SD protect is enabled and the card is not present.
2020-03-19 15:04:33 +01:00
Konnor Klashinsky
70a1f957ed
Fix BackupDevice layout on 18-word seed wallets
2020-03-13 13:41:04 +13:00
Andrew Kozlik
2f905a1157
core/webauthn: Add algorithm and curve to WebAuthnListResidentCredentials response.
2020-03-12 15:45:26 +01:00
Andrew Kozlik
f610787f8d
core/webauthn: Clean up bytes/bytearray typing around uctypes.
2020-03-12 15:45:26 +01:00
Andrew Kozlik
e378820f7f
core/webauthn: Implement support for Ed25519 signatures in FIDO2.
2020-03-12 15:45:26 +01:00
Dusan Klinec
2658e253fa
xmr/bp: memory optimizations and improvements
...
- different approach to vector manipulation - more on the fly operations. Prepared for fully offloaded operations, BP on Trezor with constant memory.
- memory requirements reduced from (4MN + const) to (2MN + const)
- more raw methods to avoid unnecessary encoding/decoding
- chunking improved, chunk size set as a constant, changed from 64 to 32, missing pieces implemented to cover also BP 16
- proof_v8 support discontinued, old hardfork, not needed anymore
- get_exponent register clash fixed (for large vectors)
- reduced heap fragmentation by removing some temporary allocations
- hashing with len and offset to reduce heap fragmentation by creating a sliced arrays
- use to() wherever possible to avoid allocations and return of mutable private object
- global functions start with _ prefix, reduce import footprint
- use __slots__ in classes to minimize footprint
2020-03-02 12:17:03 +01:00
Tomas Susanka
21676a0662
ore/tezos: better wording in delegation cancel
2020-03-02 08:49:34 +00:00
matejcik
7f91bc571c
core: ensure default task restarts after a passphrase workflow ( fixes #883 )
2020-02-28 15:55:40 +01:00
Tomas Susanka
5ee6e56f56
Merge pull request #880 from trezor/tsusanka/sign-verify-ui
...
Unify sign/verify message dialogs and fix text overflow
2020-02-28 15:47:48 +01:00
matejcik
bd9663af79
common/defs: update token reference, add new tokens to 2.3.0/1.9.0, regenerate coins_details
2020-02-27 19:13:17 +01:00
Tomas Susanka
86b010a18b
Merge pull request #878 from trezor/matejcik/fatfs-corruption
...
FatFS API rework
2020-02-27 15:58:38 +01:00
Tomas Susanka
a8af9feebe
core: fix text overflow in some dialogs
2020-02-27 12:43:33 +00:00
Tomas Susanka
744c32991f
core: unify sign/verify functions
...
The UI records are modified because of two changes:
- Added a coin name to the Sign/Verify screen (ETH/Lisk).
- Unified to use mono.
2020-02-27 12:43:33 +00:00
Tomas Susanka
495a59c282
core: use wire errors instead of ValueErrors where applicable
2020-02-27 10:46:01 +00:00
matejcik
18ac4fc9ca
core: update Python facing APIs
2020-02-27 10:56:23 +01:00
matejcik
d7b9582386
core/sdcard: add ensure_filesystem option ( fixes #868 )
...
It is possible to call `ensure_sdcard` in a way that requires only SD
card be inserted, but not necessarily formatted.
This is useful for SD-protect and possibly other use-cases where the SD
card is read-only, and "not formatted" is identical to "not containing
the right files".
2020-02-24 13:28:44 +01:00
Tomas Susanka
6c47bf8230
core: store multiple sessions/caches at the same time
2020-02-21 14:40:42 +01:00
Pavol Rusnak
562671401e
Merge pull request #860 from trezor/prusnak/multisig-show-yours-others
...
core: show yours/others in get_address for multisig
2020-02-20 13:49:13 +01:00
matejcik
ddee77ecb6
core: add SD clearing via debuglink
2020-02-20 12:51:48 +01:00
matejcik
1e9352b9e0
core: add SD format dialog, generalize sdcard usage
2020-02-20 12:51:48 +01:00
Pavol Rusnak
7944c1a837
core/monero: add confirmation dialog for unlock_time
2020-02-19 14:31:45 +00:00
Pavol Rusnak
a808cc9190
core/apps: await require_confirm should be called without return
2020-02-19 14:31:45 +00:00
Pavol Rusnak
b9486c0b33
core: show yours/others in get_address for multisig
2020-02-18 22:39:55 +00:00
Tomas Susanka
f947fe97cc
core: fix style
2020-02-11 16:41:43 +01:00
Tomas Susanka
0a13f7a441
core: properly limit passphrase to 50 bytes
2020-02-11 15:39:08 +00:00
Tomas Susanka
2c0504ad1c
Merge pull request #803 from trezor/passphrase
...
Passphrase Redesign
2020-02-11 16:01:59 +01:00
matejcik
05a1d6f771
core/debug: add "show arbitrary screen" capability, for easier prototyping
2020-02-11 11:53:34 +01:00
Tomas Susanka
15ed5cd19e
core: do not clear cache on ClearSession
2020-02-07 11:41:03 +00:00
Tomas Susanka
fd0dc8ed66
core/passphrase: merge 'get from user' functions
2020-02-07 11:41:03 +00:00
Tomas Susanka
7d7ffe3b67
cardano: derive the root and then cache
2020-02-07 11:41:02 +00:00
matejcik
938f347514
core: use DUMMY_CONTEXT constant instead of own instance
2020-02-07 11:41:02 +00:00
matejcik
1f50a13edf
core: use cache for Monero live refresh confirmation
2020-02-07 11:41:02 +00:00
Tomas Susanka
b96d7cafbb
core: rework cache and fix cardano caching
2020-02-07 11:41:01 +00:00
Tomas Susanka
aa6988a556
core/ui: introduce draw_simple
2020-02-07 11:41:01 +00:00
Tomas Susanka
d5763d9cab
all: implement code review comments
2020-02-07 11:41:01 +00:00
Tomas Susanka
c65b57affb
core, legacy: remove passphrase_cached
2020-02-07 11:41:00 +00:00
Tomas Susanka
8fa0d8f098
core/passphrase: show dialog to enter the passphrase on host
2020-02-07 11:41:00 +00:00
Tomas Susanka
a3f3d4fcdb
remove ping.passphrase/pin
2020-02-07 11:41:00 +00:00
Tomas Susanka
b5d6aaf77c
tests: test PassphraseAck options
2020-02-07 11:41:00 +00:00
Tomas Susanka
ece351c5e5
core: do not prompt for passphrase if 'always' setting is enabled
2020-02-07 11:40:59 +00:00
Tomas Susanka
466dc4732d
core/passphrase: add button requests
2020-02-07 11:40:59 +00:00
Tomas Susanka
4a0f727f13
core: fix monero
2020-02-07 11:40:59 +00:00
Tomas Susanka
cd09f9ce94
all: modify passphrase source to always on device
2020-02-07 11:40:59 +00:00
Tomas Susanka
eafd57c301
common, core: add passphrase entry capability
2020-02-07 11:40:58 +00:00
Tomas Susanka
90d5cdfd5b
all: rework passphrase
...
The `on_device` field is being moved to PassphraseAck, State messages
are removed. Features newly contain `session_id`.
2020-02-07 11:40:58 +00:00
Tomas Susanka
277e494ffa
core/recovery: end dry run before showing success
...
updates #815
2020-02-03 12:12:49 +00:00
EtherCore Contributor
c03caaf76a
common/defs: switch ERE logo ( #808 )
2020-01-29 10:49:21 +01:00
Tomas Susanka
0053511c66
utils: introduce format_plural and move format functions to strings.py
2020-01-24 16:25:14 +01:00
matejcik
2294fb0453
core: drop unused env variables (TREZOR_TEST, TREZOR_SAVE_SCREEN)
2020-01-23 18:43:20 +01:00
matejcik
29e883ab59
core/monero: fix usage of ctx.wait in pagination
2020-01-23 15:46:09 +01:00
matejcik
a79279115e
core: move confirm_signal evaluation into concrete Layout implementations
...
Apart from making the code more correct for its users in
apps.common.confirm and elsewhere, this fixes a problem where the
confirm_signal would be scheduled before the dialog is rendered.
By making sure that handle_rendering is scheduled (i.e., listed in
create_tasks) before confirm_signal, we can be sure to render at least
once and thus appear in the UI test results.
2020-01-23 15:45:10 +01:00
Pavol Rusnak
8a36ead915
common/defs: add Faceboook to recognized apps
2020-01-16 15:35:45 +00:00
Andrew Kozlik
289d8276eb
core/fido2: check for HID timeout in send_cmd() ( #791 )
2020-01-11 14:33:24 +01:00
Tomas Susanka
7c41b40dff
tests: introduce UI tests for core with diffs ( #784 )
...
tests: introduce UI tests for core with diffs
2020-01-10 20:39:31 +01:00
Tomas Susanka
30858c4969
tests/ui: omit the red square from screenshots
...
except the first one on homescreen because it gets rendered only once
2020-01-10 08:25:12 +00:00
matejcik
f90ba10af3
core: modify function signatures to match python-shamir-mnemonic
2020-01-09 16:00:33 +01:00
Tomas Susanka
51ef963738
tests: introduce UI tests for core
2020-01-03 14:28:27 +00:00
Tomas Susanka
d8e956fc6d
core/recovery: change exceptions types; modifications in tests
2019-12-30 11:35:56 +00:00
Tomas Susanka
7f730cb6f9
core/recovery: refactor to exceptions
2019-12-27 19:02:30 +00:00
Tomas Susanka
f4e11a9176
core/recovery: rework arguments
2019-12-27 18:46:22 +00:00
Tomas Susanka
faa9078c2b
core/recovery: refactor word checks and add a test
2019-12-23 13:40:45 +01:00
Tomas Susanka
6594ee9368
core/recovery: correctly inform about share already entered inside first group
2019-12-19 17:07:44 +00:00
Pavol Rusnak
d6a3725955
common: remove coins with no trezor compatible wallets
2019-12-15 18:19:36 +00:00
Pavol Rusnak
e5bdf0d51b
Merge pull request #742 from trezor/language
...
common: change language field to IETF BCP 47 language tag
2019-12-12 18:07:54 +01:00
Andrew Kozlik
0432f5e801
webauthn: Add use_self_attestation flag to FIDO apps.
2019-12-11 15:29:52 +01:00
Andrew Kozlik
2e9db44434
core/webauthn: Add AAGUID to README.md.
2019-12-10 15:56:41 +01:00
Pavol Rusnak
7646b97dca
common: divisibility -> decimals
2019-12-09 17:43:47 +01:00
matejcik
3a132e594e
core/stellar: make sure function that awaits is async
2019-12-09 16:31:46 +01:00
matejcik
ac6e23fb87
mako: improve local variable name
2019-12-09 16:31:46 +01:00
matejcik
558020be01
common: drop lastpass from FIDO apps
...
as it doesn't actually support FIDO/U2F
2019-12-09 16:31:46 +01:00
matejcik
67b2ba558b
core: auto-generate list of FIDO known apps
...
and improve code for loading icons
2019-12-09 16:31:46 +01:00
matejcik
a46fd6f508
core: auto-generate FIDO icons
2019-12-09 16:31:46 +01:00
Pavol Rusnak
bb8d809a6d
common: change language field to IETF BCP 47 language tag
2019-12-08 11:27:10 +01:00
Tomas Susanka
61430d800e
core/stellar: add screen for timebounds
2019-12-05 14:31:28 +00:00
Pavol Rusnak
3d50bb5ed8
common: add Peercoin, regenerate coins
2019-12-05 09:43:32 +00:00
Pavol Rusnak
5301c03607
common: add coin.divisibility attribute
...
legacy: remove has_address_type/has_address_type_p2sh
2019-12-05 04:30:51 +01:00
Andrew Kozlik
6ca0288092
Merge pull request #720 from trezor/andrewkozlik/wipe-code
...
Implement wipe code feature.
2019-12-04 15:24:49 +01:00
Andrew Kozlik
420a4b8ba7
core/webauthn: Close U2F confirmation screen if browser stops polling for more than 3 seconds.
2019-12-03 14:48:59 +01:00
Andrew Kozlik
0b851d6959
core/webauthn: Reply with ERR_CHANNEL_BUSY once a U2F request has been declined to stop Chrome from polling.
2019-12-03 14:48:59 +01:00
Andrew Kozlik
4d3c634732
core/webauthn: Use different return code when user verification is requested but PIN is not set to get better browser behavior. Related to cf6949332f
.
2019-12-03 14:48:59 +01:00
Andrew Kozlik
a63ff8f9b4
core/webauthn: Add bogus app ID used by Firefox to indicate error in U2F. Figure out which error to display based on past U2F_AUTHENTICATE check-only requests on the same channel.
2019-12-03 14:48:59 +01:00
Andrew Kozlik
a704bfe184
core/webauthn: Allow only one CTAPHID_WINK command at a time on any given channel ID to fix continuous display blinking with Android.
2019-12-03 14:18:43 +01:00
Andrew Kozlik
3a4e9bd25c
core/ui: Ignore any new alert requests if an alert is already in progress in order to avoid multiple alerts overlapping.
2019-12-03 14:18:43 +01:00
Andrew Kozlik
7c39e2f142
core/webauthn: Specify the exception raised by res.load().
2019-11-26 15:44:05 +01:00
Andrew Kozlik
790178a442
fixup! core/webauthn: Allow new workflow to be set after a command response is sent, so that in device tests the next test doesn't fail with ERR_CHANNEL_BUSY while the previous workflow is closing.
2019-11-26 15:18:14 +01:00
Andrew Kozlik
c463069895
core/webauthn: Don't log an exception when a relying party is not listed in knownapps.
2019-11-26 15:18:14 +01:00
Andrew Kozlik
203853faed
core/webauthn: Allow new workflow to be set after a command response is sent, so that in device tests the next test doesn't fail with ERR_CHANNEL_BUSY while the previous workflow is closing.
2019-11-26 15:18:14 +01:00
Andrew Kozlik
1bc8226a50
common, core: Add wipe_code_protection to the Features message.
2019-11-25 12:32:20 +01:00
Andrew Kozlik
a3b608d8dd
storage, core: Reveal the wipe code status after the device is unlocked.
2019-11-25 12:32:20 +01:00
Andrew Kozlik
a168d661cf
core: Add support for ChangeWipeCode message.
2019-11-25 12:32:20 +01:00
Andrew Kozlik
2ae1d9a935
webauthn: Disable signature counter in FIDO2 for dropbox.com, gandi.net, secure.login.gov.
2019-11-21 13:59:45 +01:00
matejcik
1f6cc77dec
upgrade black to 19.10b0
2019-11-20 16:02:47 +01:00
matejcik
34913a328a
all: disallow most RecoveryDevice fields in dry-run ( fixes #666 )
2019-11-20 12:27:57 +01:00
Pavol Rusnak
d029920540
core/webauthn: update metadata
2019-11-16 10:53:10 +00:00
Pavol Rusnak
e1e081fb7a
core/webauthn: fix metadata
2019-11-13 17:16:23 +01:00
matejcik
09962708d3
core: move load_device to the debug app
2019-11-13 16:48:35 +01:00
matejcik
fd8aed6105
all: drop XPRV feature of LoadDevice
2019-11-13 16:48:35 +01:00
Pavol Rusnak
16af7f1353
common: add {needs,no}_backup flags to LoadDevice, make it debug only
2019-11-13 16:48:35 +01:00
Pavol Rusnak
cde944b565
Merge branch 'reorder-usb'
2019-11-13 16:23:07 +01:00
Pavol Rusnak
df273bf836
core/usb: reorder endpoints
2019-11-13 13:21:39 +01:00
Tomas Susanka
a8b82975a1
core/management: get next u2f counter
2019-11-13 10:55:52 +00:00
matejcik
c96d5ab1bc
core/sd_salt: check if sd_salt is enabled before asking for SD card
2019-11-11 16:16:42 +01:00
matejcik
0c4fa03575
core/sd_salt: properly await ensure_sd_card
2019-11-11 16:14:43 +01:00
matejcik
75622d92d2
Merge branch 'master' into matejcik/storage-relocation
2019-11-11 14:39:00 +01:00
matejcik
dee47a06f2
core/sd_salt: ensure ProcessErrors are propagated properly
2019-11-11 14:37:20 +01:00
Tomas Susanka
597277725e
core/recovery: end progress before showing success
...
This fixes #695 . This was the default behaviour but we have changed it
because of Wallet, which was doing the polling. Since Wallet can now
send RecoveryDevice again and acquire Context this is no more needed.
2019-11-11 10:39:07 +00:00
matejcik
18ab677124
core/webauthn: rename storage.webauthn to storage.resident_credentials
2019-11-08 12:47:54 +01:00
matejcik
f03562cca0
core/sd_salt: decorate sd_salt functions to ensure proper finalization and power-off
2019-11-08 12:42:30 +01:00
matejcik
33bd4d3ba9
Merge branch 'master' into matejcik/storage-relocation
2019-11-07 12:51:02 +01:00
matejcik
7cb125d1cb
core/recovery: properly replace homescreens
2019-11-07 11:27:45 +01:00
matejcik
a3930d4bdb
core: rename close_default to a more appropriate kill_default
2019-11-07 11:27:45 +01:00
Tomas Susanka
ca484b2c06
core: remove persistence boot and set recovery as a default workflow
2019-11-07 11:27:45 +01:00
matejcik
28d30ffd2f
core/webauthn: unify signatures of Credential.from_bytes and friends
2019-11-06 13:56:52 +01:00
Pavol Rusnak
0040b916d2
common/defs: remove inactive coins
2019-11-03 10:44:22 +00:00
Pavol Rusnak
2d8f70d49a
common/defs: add mojeid.cz definition to webauthn
2019-11-01 12:54:28 +00:00
apollo
18c926a34b
common/defs: fix zcore signing ( #669 )
2019-11-01 00:18:03 +01:00
matejcik
5c93ecd53a
core: create top-level storage module
...
This is to avoid including app-specific functionality in storage and
avoid circular imports. The following policy is now in effect: modules
from `storage` namespace must not import from `apps` namespace.
In most files, the change only involves changing import paths.
A minor refactor was needed in case of webauthn: basic get/set/delete
functionality was left in storage.webauthn, and more advanced logic on
top of it was moved to apps.webauthn.resident_credentials.
A significant refactor was needed for sd_salt, where application (and
UI) logic was tightly coupled with the IO code. This is now separated,
and storage.sd_salt deals exclusively with the IO side, while the app/UI
logic is implemented on top of it in apps.common.sd_salt and
apps.management.sd_protect.
2019-10-31 16:21:56 +01:00
Pavol Rusnak
39a532c8b1
core/webauthn: increase limit for resident credentials to 100
2019-10-31 14:27:46 +00:00