1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-09 06:50:58 +00:00
Commit Graph

7182 Commits

Author SHA1 Message Date
Pavol Rusnak
04cdb68ed2
build: unify build-docker.sh and build-docker.gcc_source.sh 2018-10-12 13:57:27 +02:00
matejcik
eb2b58e1f4 cosi: tests for new verify_m_of_n method 2018-10-12 12:58:49 +02:00
matejcik
ba365b5486 cosi: replace slow djb implementation of ed25519 with an optimized one
from https://github.com/pyca/ed25519

This makes the calculations several orders of magnitude faster, which
allows us to run the CoSi test in Travis. It also doesn't stop firmware
update for several seconds while we validate the CoSi signatures.

It's still essentially the same insecure implementation, fallible to all
the same timing attacks, and it shouldn't be used for anything except
validating public signatures of public data. But now it also takes about
as much time as it should on modern hardware.
2018-10-12 12:58:44 +02:00
Pavol Rusnak
3d5fa7a2f6
tests: refactor test_msg_resetdevice_skipbackup 2018-10-11 17:26:20 +02:00
Milan Rossa
fc9bc85ea3
unix: user profiles support for emulator 2018-10-11 16:51:04 +02:00
Milan Rossa
32fe5d20af
unix: emulator debug build options 2018-10-11 16:33:45 +02:00
Pavol Rusnak
84b53e5813
travis: remove TREZOR_MODEL=1 target for now 2018-10-11 16:14:00 +02:00
Pavol Rusnak
16d9d58ee1
tests: add test in resetdevice for combination of display_random and skip_backup 2018-10-11 15:29:30 +02:00
Pavol Rusnak
13fa7d22b9
src/apps/management/reset_device: don't show internal entropy when skip_backup is set 2018-10-11 15:27:42 +02:00
Pavol Rusnak
9730471a73
reset: wording 2018-10-11 15:27:03 +02:00
Pavol Rusnak
96cf9e9065
reset: don't show internal entropy when skip_backup is set 2018-10-11 15:24:40 +02:00
matejcik
b0e879b30e docker: update build scripts and instructions to fix Docker emulator (#419)
fixes #417
2018-10-11 14:58:22 +02:00
Pavol Rusnak
addbdd8937
src/apps/common: refactor address_n_to_str into apps.common.layout 2018-10-10 17:58:26 +02:00
Pavol Rusnak
cc25069064
src/apps/debug: don't erase storage on debug in emulator 2018-10-10 16:07:57 +02:00
Pavol Rusnak
9ddb1b9280
src/apps/common: update coininfo.py.mako 2018-10-10 14:45:59 +02:00
Pavol Rusnak
7ab36d57ab
docker: quick fix of Dockerfiles 2018-10-10 14:19:59 +02:00
Pavol Rusnak
a1ba9db744
tests: re-enable Decred test for T2 2018-10-10 13:44:36 +02:00
Pavol Rusnak
4a26870fcc
src/trezor/crypto: refactor {blake256,sha256}_ripemd160_digest to trezor.crypto.scripts 2018-10-10 13:40:55 +02:00
Matheus Degiovani
688e885903 decred: Add sign message tests (#318) 2018-10-10 13:35:31 +02:00
matejcik
88988172b9 bridge: perform HTTP request in read, not write
This allows us to return early from a `write`, which we need in cases
where we want to perform an operation inbetween `read` and `write` -
namely, callback for ButtonRequest should technically be invoked after
returning ButtonAck but before waiting for device's response.

Of course that doesn't really work. The callback will actually be
invoked _before_ ButtonAck, so there's still the condition that it must
return immediately or the device gets stuck with a black screen.

But doing this allows us to write code *as if* it worked, which lets the
other transports run free and wild, by which I mean, do the Right Thing
2018-10-10 13:15:28 +02:00
matejcik
ca7cbad1cf trezorctl: variable referenced before assignment (fixes #313) 2018-10-10 13:15:28 +02:00
matejcik
2b02af1126 trezorctl: bad call to click.echo (fixes #304) 2018-10-10 13:15:28 +02:00
matejcik
2d7c74c535 switch to click 7.0 2018-10-10 13:15:28 +02:00
matejcik
8618f44272 tests: fix signature of device.recover in expect-to-fail tests 2018-10-10 13:15:28 +02:00
matejcik
1d3fa77ab6 debuglink: allow with-block without expected_responses 2018-10-10 13:15:28 +02:00
matejcik
ffff11a462 style: isort & autopep 2018-10-10 13:15:28 +02:00
matejcik
886d4f18f4 device_tests: sample usage of input_flow 2018-10-10 13:15:28 +02:00
matejcik
0f7f694914 debug: fix test_msg_applysettings 2018-10-10 13:15:28 +02:00
matejcik
c37bc9c38e debug: improve infrastructure and expected message reporting 2018-10-10 13:15:28 +02:00
matejcik
fc7a76e2f3 tests: use stdlib mock instead of the third-party one 2018-10-10 13:15:28 +02:00
matejcik
a5abd70619 trezorlib: drop TrezorClientDebugLink from client.py 2018-10-10 13:15:28 +02:00
matejcik
06927e003e trezorlib: get rid of TextUIMixin
This also moves DebugLinkMixin to debuglink.py and converts the mixin to
a subclass of TrezorClient (which is finally becoming a
reasonable-looking class). This takes advantage of the new UI protocol
and is ready for further improvements, namely, queuing input for tests
that require swipes.

The ui.py module contains a Click-based implementation of the UI
protocol. Use of callback_* methods has been limited and will probably
be cleaned up further (The contract has changed so we'll try to make
third party code fail noisily. It is unclear whether a backwards
compatible approach will be possible).

Furthermore, device.recovery() now takes a callback as an argument. This
way we can get rid of WordRequest callbacks, which are only used in the
recovery flow.
2018-10-10 13:15:28 +02:00
Pavol Rusnak
2277a9c754
src/apps/wallet/sign_tx: re-enable Decred 2018-10-10 13:00:36 +02:00
Matheus Degiovani
6d9157c4a5 decred: Return tree and version in insight api (#319) 2018-10-10 12:44:54 +02:00
Pavol Rusnak
4f18d53219
nix: add shell.nix 2018-10-08 15:56:16 +02:00
Pavol Rusnak
00ebbbb1f3
tests: add test in resetdevice for combination of display_random and no_backup 2018-10-08 15:54:28 +02:00
Pavol Rusnak
de12ad705c
src/apps/management/reset_device: don't show internal entropy when no_backup is set 2018-10-08 15:42:35 +02:00
Pavol Rusnak
3a4660ede2
reset: don't show internal entropy when no_backup is set 2018-10-08 15:39:55 +02:00
Pavol Rusnak
cd006026dd
Revert "tests: enable Decred tests for T2"
This reverts commit d49a38d80f.
2018-10-08 14:34:26 +02:00
Pavol Rusnak
0d68711e47
Revert "src/apps/wallet/sign_tx: add support for Decred"
This reverts commit 7834d06aac.
This reverts commit 335504ce5c.
2018-10-08 14:29:59 +02:00
Pavol Rusnak
c395501d2d
trezorctl: add no-backup option to reset-device 2018-10-08 14:17:07 +02:00
matejcik
8341251064 tools: fix cointool.py dump that relied on a Click bug 2018-10-08 13:57:42 +02:00
Samad Sajanlal
4a9a517a7d add GameCredits (#213) 2018-10-07 12:32:03 +02:00
Pavol Rusnak
335504ce5c
src/apps/wallet/sign_tx: small fixes to decred 2018-10-06 15:17:42 +02:00
Pavol Rusnak
d49a38d80f
tests: enable Decred tests for T2 2018-10-06 13:50:37 +02:00
Pavol Rusnak
6bced8bb54
style: fix F841 local variable is assigned to but never used 2018-10-06 13:38:30 +02:00
Matheus Degiovani
7834d06aac
src/apps/wallet/sign_tx: add support for Decred 2018-10-06 13:24:01 +02:00
Jonathan Cross
ed633dcbb5 Fixing typo in firmware_update (#317) 2018-10-05 13:19:47 +02:00
Pavol Rusnak
cb9182166e
reset: fix setting of needs_backup flag 2018-10-04 18:36:36 +02:00
Pavol Rusnak
9e3ae93796
src/apps/management: fix storage.load_mnemonic calls 2018-10-04 18:15:03 +02:00