1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-04 13:38:28 +00:00
Commit Graph

298 Commits

Author SHA1 Message Date
Jan Pochyla
64746d01b4
use memoryviews in wire_codec 2016-09-27 17:26:11 +02:00
Pavol Rusnak
f727cab942
rework aes module, add summary to test script 2016-09-27 17:26:09 +02:00
Pavol Rusnak
dd78f83576
update docu strings in aes 2016-09-27 17:26:09 +02:00
Pavol Rusnak
fc05f25255
trezor.crypto.aes work in progres 2016-09-27 17:26:07 +02:00
Jan Pochyla
d5942d664c
add the generated wire type index 2016-09-27 17:26:07 +02:00
Jan Pochyla
6991286f8b
use __iter__ instead of wait 2016-09-27 17:26:06 +02:00
Jan Pochyla
b8dd8ed90c
wire fixes 2016-09-27 17:26:06 +02:00
Jan Pochyla
97d402eba8
unify unimport_func and unimport_gen, asyncify 2016-09-27 17:26:06 +02:00
Jan Pochyla
099767d592
session/workflow overhaul
- lazy loading and importing of protobuf messages
- workflow dispatching through codec pipeline on the first message report

HACK: workflow killing
TODO: cap on concurrent sessions
TODO: ui locking/queuing
TODO: session storage
TODO: tests
2016-09-27 17:26:06 +02:00
Pavol Rusnak
f42b62fa40
use mock config for stmhal, setup hid in boot 2016-09-27 17:26:05 +02:00
Pavol Rusnak
7aa8593941
store config in /var/tmp 2016-09-27 17:26:05 +02:00
Jan Pochyla
312859ba71
add experimental animation with async for 2016-09-27 17:26:03 +02:00
Jan Pochyla
3eaf001eef
add a broken PoC of wire/protobuf stream reading 2016-09-27 17:26:03 +02:00
Jan Pochyla
d6592a48e6
fixes for v2 wire 2016-09-27 17:26:03 +02:00
Jan Pochyla
096f3f898f
move pagination primitives to trezor.ui.scroll 2016-09-27 17:26:03 +02:00
Jan Pochyla
455a436123
autopep8 2016-09-27 17:26:02 +02:00
Jan Pochyla
a4d1b27541
test async/await support in homescreen layout 2016-09-27 17:26:02 +02:00
Jan Pochyla
c8c34c875b
simplify loop.py, add loop.Future, supoort await 2016-09-27 17:26:02 +02:00
Jan Pochyla
3a69524c52
simplify read_wire_msg a bit 2016-09-27 17:26:02 +02:00
Jan Pochyla
cb0f5e2595
switch to v2 wire protocol
- sessions
- crc32 checksum

TODO: tests
TODO: python-trezor implementation
TODO: dispatching
2016-09-27 17:26:01 +02:00
Pavol Rusnak
d4d8729568
add mem constants to debug module 2016-09-27 17:26:01 +02:00
Pavol Rusnak
fbfd9d4b61
split debug (=dangerous) things from trezor.utils to trezor.debug 2016-09-27 17:26:01 +02:00
Jan Pochyla
ae4540c59b
introduce generic swipe container to reset_device
Now its possible to block multiple generators on one interface.
2016-09-27 17:26:00 +02:00
chren
53a6132ed8
tests with UI and minor changes in scroll component 2016-09-27 17:25:59 +02:00
chren
16f81c3264
added dummy scroll down icon with animation 2016-09-27 17:25:59 +02:00
chren
771372adb2
replace scrolling to componenet, added mockup for recovery device layout 2016-09-27 17:25:58 +02:00
Jan Pochyla
4bf7535903
pass kwargs through to ConfirmDialog 2016-09-27 17:25:58 +02:00
chren
3746777628
fix micro bug for pin buttons 2016-09-27 17:25:57 +02:00
Jan Pochyla
43e6bc2f11
raise on registering conflicting message handler 2016-09-27 17:25:56 +02:00
Jan Pochyla
6553d315e6
move 'chunks' to trezor.utils 2016-09-27 17:25:56 +02:00
Jan Pochyla
9f0b27f597
add ResetDevice workflow 2016-09-27 17:25:55 +02:00
Jan Pochyla
961ae90dd2
regenerate messages with __repr__ support 2016-09-27 17:25:55 +02:00
Jan Pochyla
1da27dd558
fix write of empty messages, add loging to wire 2016-09-27 17:25:55 +02:00
Jan Pochyla
cf77aeb029
add icon buttons, make PinMatrix nicer 2016-09-27 17:25:54 +02:00
chren
1e4556d736
added clear input pin button 2016-09-27 17:25:54 +02:00
chren
c6ed52a7c9
added remove input line 2016-09-27 17:25:54 +02:00
Jan Pochyla
c6c69ba8c8
fix ui in PinMatrix 2016-09-27 17:25:53 +02:00
chren
9ca6d61bcc
minor design changes in colors, pin and white border 2016-09-27 17:25:52 +02:00
chren
4852609efb
added clear display to pin dialog 2016-09-27 17:25:52 +02:00
chren
bbfd633f35
visual changes in pin matrix 2016-09-27 17:25:51 +02:00
Pavol Rusnak
8b27cc3b71
trezor.ui.display.backlight works now 2016-09-27 17:25:51 +02:00
Jan Pochyla
377fffa5a5
add wipe, wire.write is a generator, add trezor/workflows 2016-09-27 17:25:50 +02:00
Pavol Rusnak
9f40362482
remove homebrew docu generator, use docstring syntax 2016-09-27 17:25:50 +02:00
Pavol Rusnak
0f24eb2e0e
use python implementation for backlight (for now) 2016-09-27 17:25:50 +02:00
Pavol Rusnak
c08c4cd386
fix trezor.res 2016-09-27 17:25:49 +02:00
Jan Pochyla
9232c77529
PinDialog -> PinMatrix, shuffle digits 2016-09-27 17:25:48 +02:00
Pavol Rusnak
35b26651ba
add trezor.crypto.random 2016-09-27 17:25:47 +02:00
Jan Pochyla
6a647b124d
add management app skeleton and ConfirmDialog
We might rewrite PinDialog as a content for ConfirmDialog in the
future. Also, I'm beginning to hit memory issues on a 64-bit system.
2016-09-27 17:25:47 +02:00
Jan Pochyla
2880be1db6
use == instead of 'is' for scalars, cleanup PinDialog 2016-09-27 17:25:47 +02:00
Pavol Rusnak
67ea7dbd15
add persistance to trezor.config mock 2016-09-27 17:25:46 +02:00
Jan Pochyla
7195e1d12f
dispatch on wire_type instead of message_type 2016-09-27 17:25:45 +02:00
Pavol Rusnak
9dc4813ec7
add trezor.crypto.ssss skeleton 2016-09-27 17:25:45 +02:00
Jan Pochyla
71b89c748a
adapt rest of code to touch changes, example works 2016-09-27 17:25:45 +02:00
Jan Pochyla
421f17bfee
rework events around interfaces, split msg.py to wire.py
Touch events are sent on special interface now.
2016-09-27 17:25:44 +02:00
Jan Pochyla
3677b8142b
add touch event rotation, msg dispatcher, wallet app 2016-09-27 17:25:44 +02:00
Pavol Rusnak
b0a5297aed
fix gitignore filename 2016-09-27 17:24:24 +02:00
Pavol Rusnak
fc528f5733
add collect_res script, load frrom resources.py if provided 2016-09-27 17:24:24 +02:00
Pavol Rusnak
509962abc6
move trezor.gettext.gettext to trezor.res.gettext 2016-09-27 17:24:24 +02:00
Pavol Rusnak
0b54ae9124
introduce trezor.res module 2016-09-27 17:24:24 +02:00
Pavol Rusnak
bf4d1bdea3
add trezor.gettext 2016-09-27 17:24:24 +02:00
Pavol Rusnak
38b66cb6d8
introduce msg.setup proof-of-concept 2016-09-27 17:24:23 +02:00
Pavol Rusnak
bf02fe0ddf
trezor.msg is now iface aware 2016-09-27 17:24:23 +02:00
Pavol Rusnak
c56719ea8c
regenerated messages 2016-09-27 17:24:23 +02:00
Pavol Rusnak
af9d2cf21f
add mock for trezor.config 2016-09-27 17:24:23 +02:00
Pavol Rusnak
2576d9c3a4
trezor.storage -> trezor.config 2016-09-27 17:24:23 +02:00
Pavol Rusnak
0fb6fc05a5
further changes to trezor.storage 2016-09-27 17:24:22 +02:00
Pavol Rusnak
9ed3b24edf
add default value to trezor.storage.get 2016-09-27 17:24:22 +02:00
Pavol Rusnak
ddf6771981
add trezor.storage 2016-09-27 17:24:22 +02:00
Jan Pochyla
8f49a104bf
make msg functions more readable, add pbuf wrappers 2016-09-27 17:24:21 +02:00
Jan Pochyla
87145c2b5f
make the var names in msg.py a bit less similar 2016-09-27 17:24:20 +02:00
Jan Pochyla
4a255e8b77
add write_message 2016-09-27 17:24:20 +02:00
Jan Pochyla
f98fc4c0c8
add reading of logical messages from HID 2016-09-27 17:24:20 +02:00
Pavol Rusnak
627f547fcb
update docu 2016-09-27 17:24:20 +02:00
Jan Pochyla
c0313cc868
put ui.utils back in ui/__init__.py 2016-09-27 17:24:19 +02:00
Jan Pochyla
f3c9715ff3
split ui code in modules 2016-09-27 17:24:19 +02:00
Jan Pochyla
3a5d29848b
Wait supports syscall instead of gens now 2016-09-27 17:24:18 +02:00
Jan Pochyla
412ac2daa7
support multiple event handlers 2016-09-27 17:24:17 +02:00
Pavol Rusnak
910926e25c
add trezor.crypto.bip39 2016-09-27 17:24:17 +02:00
Jan Pochyla
32c7782d89
sleep -> Sleep 2016-09-27 17:24:17 +02:00
Jan Pochyla
97ac6c52f0
syscalls are objects now, make schedule public 2016-09-27 17:24:16 +02:00
Jan Pochyla
ef44e9ded8
add counter to time_queue, kill gens with close() 2016-09-27 17:24:16 +02:00
Pavol Rusnak
55a7bf92ce
fix import _io to uio 2016-09-27 17:24:12 +02:00
Pavol Rusnak
d268cf3b57
document python crypto apis 2016-09-27 17:24:11 +02:00
Pavol Rusnak
15254ffce5
regenerate messages 2016-09-27 17:24:10 +02:00
Pavol Rusnak
3d8f8a659a
rework documentation, proof of concept api docu generator 2016-09-27 17:24:10 +02:00
Jan Pochyla
e382737fda
use friendlier event enums 2016-09-27 17:24:09 +02:00
Jan Pochyla
af482d3da1
experiment with touch event multiplexing
Now we can have 2 buttons!
2016-09-27 17:24:09 +02:00
Jan Pochyla
e8122cc975
__call_at -> __schedule 2016-09-27 17:24:09 +02:00
Jan Pochyla
d612037eda
proof of concept for waiting for events 2016-09-27 17:24:08 +02:00
Pavol Rusnak
0ba9f6b6bb
add autogenerated messages 2016-09-27 17:24:08 +02:00
Pavol Rusnak
588be646c0
move text_center, text_right methods into display class 2016-09-27 17:24:07 +02:00
Pavol Rusnak
6f9edb349c
add fingerprint layout 2016-09-27 17:24:07 +02:00
Jan Pochyla
20dad5a300
style, fix possible exception in run_forever 2016-09-27 17:24:06 +02:00
Jan Pochyla
36dad0137b
fix _Wait 2016-09-27 17:24:06 +02:00
slush0
06515321cf
Reworked wait into class 2016-09-27 17:24:06 +02:00
Pavol Rusnak
b7b57ae53e
new pbkdf2 api with update 2016-09-27 17:24:05 +02:00
Jan Pochyla
c97db79d14
WIP wait fix 2016-09-27 17:24:05 +02:00
slush0
2d75289bf3
__wait_for_event integrated into main loop 2016-09-27 17:24:04 +02:00
slush0
3a7e343a43
Implemented log.exception, improved logging
Removed unused code
2016-09-27 17:24:04 +02:00
slush0
b0d9a4b884
Implemented basic loop.wait() 2016-09-27 17:24:03 +02:00
Pavol Rusnak
6a5f16207c
move log to trezor 2016-09-27 17:24:03 +02:00
Jan Pochyla
29e20e302a
fix log 2016-09-27 17:24:03 +02:00
Jan Pochyla
ac28a41d96
hide loop.call_at, use yield or run_forever 2016-09-27 17:24:03 +02:00
Jan Pochyla
e7bfb64502
rework the event loop 2016-09-27 17:24:02 +02:00
Pavol Rusnak
71496913ba
rework logging 2016-09-27 17:24:02 +02:00
slush0
e13d4ac581
Print mouse move to display 2016-09-27 17:24:02 +02:00
slush0
c66dfee6b9
last_sleep info replaced by ring buffer and delay_avg 2016-09-27 17:24:01 +02:00
Pavol Rusnak
1664a4fc29
replace wait with msg.select 2016-09-27 17:24:00 +02:00
slush0
fa52ecfb79
WIP 2016-09-27 17:24:00 +02:00
Pavol Rusnak
7559207a62
new message handling using msg.select 2016-09-27 17:23:59 +02:00
slush0
ca991fdde6
Main Trezor even loops starts here 2016-09-27 17:23:59 +02:00
slush0
92eeac3612
Handle exceptions in better way, enable to return to main screen many times. 2016-09-27 17:23:59 +02:00
Jan Pochyla
de83114dc7
add ui.blend 2016-09-27 17:23:58 +02:00
Pavol Rusnak
904127f263
remove ui.touch, add utils.select 2016-09-27 17:23:57 +02:00
slush0
767a41cffd
WIP 2016-09-27 17:23:57 +02:00
slush0
07abef7ff4
Added animate_pulse 2016-09-27 17:23:57 +02:00
Pavol Rusnak
4f90848c0a
remove native moduleprotobuf 2016-09-27 17:23:57 +02:00
slush0
cb52fdedc3
New decorators unimport_func, unimport_dec 2016-09-27 17:23:56 +02:00
slush0
66d10668ac
Former uasyncio, now heavily modified for trezor purposes. 2016-09-27 17:23:56 +02:00
slush0
f2703f1af2
Allow parameters to layout functions 2016-09-27 17:23:24 +02:00
slush0
078365f5d9
Updated playground 2016-09-27 17:23:24 +02:00
Pavol Rusnak
ee3614ae6a
cleanup pb2py, add debug to emu.sh 2016-09-27 17:23:23 +02:00
Pavol Rusnak
0a8870f110
add modtrezorutils 2016-09-27 17:23:23 +02:00
Pavol Rusnak
b7013437ee
add nist256p1 and secp256k1 to trezor.crypto.curve 2016-09-27 17:23:22 +02:00
Pavol Rusnak
f3f44b408d
add trezor.crypto.ed25519 2016-09-27 17:23:22 +02:00
slush0
e6df94cbd5
pb2py generator, build_pb2.sh 2016-09-27 17:23:22 +02:00
Pavol Rusnak
b41c1c3e4d
add data size to toi format header 2016-09-27 17:23:18 +02:00
Pavol Rusnak
f8713bad4d
add sha3 2016-09-27 17:22:53 +02:00
Pavol Rusnak
3d3d8e89a5
don't use native base58 2016-09-27 17:22:53 +02:00
Pavol Rusnak
b29ece66ef
use pbkdf2_hmac from mbedtls 2016-09-27 17:22:53 +02:00
Pavol Rusnak
a230d9d294
hashes and pbkdf2 now have api of hashlib 2016-09-27 17:22:53 +02:00
Pavol Rusnak
afbd1b0f22
use api similar to hmac in pbkdf2 module 2016-09-27 17:22:52 +02:00
Pavol Rusnak
5d929fba0e
add trezor.crypto.pbkdf2 2016-09-27 17:22:52 +02:00
Pavol Rusnak
8b9f2a95b3
add trezor.crypto.hmac 2016-09-27 17:22:52 +02:00
Pavol Rusnak
0ab2170cc6
add ripemd160 2016-09-27 17:22:51 +02:00
Pavol Rusnak
60d45a5d34
modify trezor.crypto.hash api to be similar to python api 2016-09-27 17:22:51 +02:00
Pavol Rusnak
7b702314a6
fix last commit 2016-09-27 17:22:51 +02:00
Pavol Rusnak
4eccc55c5c
add unit tests, add t.c.sha512 2016-09-27 17:22:50 +02:00
Pavol Rusnak
e88cd6f20d
add trezor.utils (pure python) 2016-09-27 17:22:50 +02:00
Pavol Rusnak
0d8112f6b4
split trezor.crypto into more modules 2016-09-27 17:22:50 +02:00
Pavol Rusnak
ed39c2001e
remove t.c.base58.*_check functions from module (this is app logic), add t.c.sha256 module 2016-09-27 17:22:49 +02:00
slush0
ee9b9ca351
Polished binding to protobuf, msg. 2016-09-27 17:22:49 +02:00
slush0
456e1fba44
Pipe support & async pipe transport 2016-09-27 17:22:48 +02:00
Pavol Rusnak
0f2670f12e
add trezor.crypto
split modTrezorUi into more files
2016-09-27 17:22:48 +02:00
Pavol Rusnak
a5e861e0aa
introduce trezor.msg and trezor.protobuf 2016-09-27 17:22:48 +02:00
Pavol Rusnak
37a33efc57
refactor color and font definitions to trezor.ui module 2016-09-27 17:21:04 +02:00
Pavol Rusnak
bba9418214
add touch (WIP) 2016-09-27 17:21:03 +02:00
Pavol Rusnak
8493da5f97
introduce trezor module 2016-09-27 17:21:02 +02:00