1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 11:39:03 +00:00
Commit Graph

514 Commits

Author SHA1 Message Date
matejcik
38a36a131f chore: rename BIP39_WORDS to BIP39_WORD_COUNT 2022-06-01 16:35:33 +02:00
matejcik
6319a5a9d0 feat(core/rust): BIP-39 wordlist operations in Rust 2022-06-01 16:35:33 +02:00
Ondrej Mikle
60db3e3e52 fix(core/bootloader): do not wait for touch if we know we are staying in bootloader 2022-06-01 14:50:59 +02:00
Ondrej Mikle
49462dc283 chore(core/bootloader): bump over unreleased version 2022-06-01 14:50:59 +02:00
Ondrej Mikle
c563c987e1 feat(core): jump back and stay in bootloader for TT via reverse SVC call trampoline 2022-06-01 14:50:59 +02:00
matejcik
187ca8ad50 feat(core/rust): List::from_iter
[no changelog]
2022-05-17 15:56:26 +02:00
matejcik
b3b3e0efa4 tests(core/rust): ability to set up MicroPython env for testing
warning: super hacky!
[no changelog]
2022-05-17 15:56:26 +02:00
Ondřej Vejpustek
db0da196a8 chore(vendor): update secp256k1-zkp to latest 2022-05-16 16:23:18 +02:00
Martin Milata
c257a8a687 fix(core/ui/rust): painting of overlapping Maybe<T> components
[no changelog]
2022-05-16 13:54:43 +02:00
Martin Milata
b5dfda6a1d fix(core/rust/ui): support longer PIN
[no changelog]
2022-05-16 13:54:43 +02:00
Martin Milata
31e63f688e fix(core/rust/ui): implement warning for PIN dialog
[no changelog]
2022-05-16 13:54:43 +02:00
Martin Milata
3dcdffe203 refactor(core/rust/ui): emit event when component tree is initialized
[no changelog]
2022-05-16 13:54:43 +02:00
Martin Milata
7b5c618576 refactor(core/rust/ui): erase button clears PIN after 2s
[no changelog]
2022-05-16 13:54:43 +02:00
Martin Milata
e58736f746 feat(core/rust/ui): show PIN digits when touched
[no changelog]
2022-05-16 13:54:43 +02:00
Dusan Klinec
14e08ca9db fix(xmr): remove 8192B from firmware image so it can fit to the memory
- old BP GI, HI constants are shortened to reduce firmware size
2022-05-16 12:37:24 +02:00
Dusan Klinec
25d32a8144 feat(xmr): implement bp+, refactor, code cleanup
- implement BulletProof plus verifier and prover
- use bulletproof exception to signalize proof generation failed and should be tried again. More robust, fixes bug that was not triggered yet (return tuple did not work properly in all situations)
- precomputed 2**i vector is removed as it can be easily computed
- BP code cleanup, minor optimizations, comments
2022-05-16 12:37:24 +02:00
Dusan Klinec
33c174491f refactor(core/monero): Monero code cleanup
* remove support for HF12 and below
* remove MLSAG support
* clean up monero cryptography naming
* get rid of "optional first argument" pattern, in favor of mandatory argument that is allowed to be None
  (and fix several bugs related to this feature)

Co-authored-by: grdddj <jiri.musil06@seznam.cz>
Co-authored-by: Martin Milata <martin@martinmilata.cz>
Co-authored-by: matejcik <ja@matejcik.cz>
2022-05-16 12:37:24 +02:00
matejcik
99c817bad4 fix(core/emulator): make sure SDL keyboard and quit events are always processed
fixes #973
2022-05-16 10:59:48 +02:00
grdddj
feb96c84b0 chore(core/rust): use clippy for all features 2022-05-16 10:49:04 +02:00
tychovrahe
8a092bde21 feat(core): add smaller loader for model R 2022-05-10 16:49:23 +02:00
tychovrahe
bd476769cc feat(core): add reset state on display clear on model R. Added to rest of the models as noop. 2022-05-10 16:49:23 +02:00
tychovrahe
58041036f5 feat(core): set colors for monochromatic displays 2022-05-10 16:49:23 +02:00
tychovrahe
0e778cf16d fix(core): fix display_icon function - incorrect boundaries checks 2022-05-10 16:49:23 +02:00
tychovrahe
f7a3aad9bd feat(core): initial Model R display implementation with framebuffer 2022-05-10 16:49:23 +02:00
tychovrahe
936c84bac6 feat(core): added button support for Model R 2022-05-10 16:49:23 +02:00
grdddj
7804893179 feat(core/rust): create model_tr feature
Make event.rs shared among all features, under src/ui/event.rs.

[no changelog]
2022-05-06 11:44:52 +02:00
grdddj
12da7f301d feat(core): allow for model R in firmware build
As model R will run on the same computational hardware as model T,
memory_R.ld is just a symbolic link to memory_T.ld.

[no changelog]
2022-05-06 11:44:52 +02:00
grdddj
6b5f578d02 feat(core): implement basic R emulator
Can be built by `TREZOR_MODEL=R make build_unix`, `make build_unix_frozen` does not work yet.

All the dialogs are not very pretty, they are just meant to work.
2022-05-06 11:44:52 +02:00
Martin Milata
692ea1415e chore(core): bump version to 2.5.2
[skip_ci]
2022-05-04 12:09:14 +02:00
matejcik
37c61c1381 feat(core): implement firmware dumping 2022-05-03 19:00:04 +02:00
Andrew Kozlik
485ee6e209 feat(core): Show progress in GetFirmwareHash. 2022-05-03 19:00:04 +02:00
Andrew Kozlik
822b1c344f feat(core): Return fw_vendor in firmware Features message. 2022-05-03 19:00:04 +02:00
Andrew Kozlik
1da446a8fb refactor: Move flash_init to emulator main. 2022-05-03 19:00:04 +02:00
Andrew Kozlik
106ab65e21 feat(core): Implement GetFirmwareHash message. 2022-05-03 19:00:04 +02:00
Martin Milata
18c8304339 fix(core): leftover TREZOR_MODEL defines
[no changelog]
2022-04-28 16:47:22 +02:00
TychoVrahe
7912a7d0d3
build(core,storage): fix conditional compilation for different Trezor models
* build(core,storage) - Fix conditional compilation for different trezor models

* build(core) - Rename MODEL_* macro to TREZOR_MODEL_*, remove the original TREZOR_MODEL macro (replaced by conditional compilation for QSTR generation)

* build(core) - fixed missing TREZOR_MODEL to TREZOR_MODEL_x changes

[no changelog]
2022-04-26 13:47:40 +02:00
matejcik
a9b46f0249 fix(core/rust): be more defensive about strings coming in from uPy 2022-04-11 16:49:58 +02:00
matejcik
8dd7a22f8b refactor(core/rust): disallow creating byte buffers from &str 2022-04-11 16:49:58 +02:00
matejcik
32c3320f07 refactor(core/rust): pass around &str instead of [u8] in most places 2022-04-11 16:49:58 +02:00
matejcik
785dc7f4d7 feat(core/rust): introduce StrBuffer
it is a variant of Buffer specifically for accepting python `str`
2022-04-11 16:49:58 +02:00
Martin Milata
1f612580f7 feat(core): enable UI tests for redesigned UI
[no changelog]
2022-04-07 17:58:41 +02:00
Martin Milata
38f4ab0983 feat(core/rust/ui): return Layout results as singleton objects
[no changelog]
2022-04-04 13:32:07 +02:00
Jan Pochyla
36829cfa8f feat(core/rust): Add obj_module! macro
[no changelog]

Co-authored-by: Martin Milata <martin@martinmilata.cz>
2022-04-04 13:32:07 +02:00
Martin Milata
30ec1802f4 chore(core): bump version to 2.5.1
[skip_ci]
2022-03-30 21:57:54 +02:00
Pavol Rusnak
9a8e257619 fix(core): fix SDL2 include path
[no changelog]
2022-03-29 12:22:11 +02:00
Martin Milata
4eefaffac9 fix(core/rust/ui): recovery/passphrase keyboard fixes
[no changelog]
2022-03-23 13:40:45 +01:00
Martin Milata
efe25a6ab4 fix(core/rust/ui): pin keyboard tweaks
[no changelog]
2022-03-23 13:40:45 +01:00
Martin Milata
d51072b8c1 refactor(core/rust/ui): unhardcode screen size
[no changelog]
2022-03-23 13:40:45 +01:00
Jan Pochyla
801679bccf chore(core/rust): Add dynamic place system 2022-03-22 16:08:50 +01:00
Pavol Rusnak
6052e71bbb fix(core): fix build with FEATURE_FLAGS.SECP256K1_ZKP=False
[no changelog]
2022-03-18 12:03:41 +01:00
Jan Pochyla
4c027a688c chore(core/rust): Simplify LayoutObj 2022-02-18 11:27:23 +01:00
Jan Pochyla
2b6f1a4d5c chore(core/rust): Use MultiTapKeyboard in passphrase 2022-02-17 15:17:11 +01:00
Jan Pochyla
3c337723b2 chore(core/rust): Add mnemonic keyboards 2022-02-17 15:17:11 +01:00
Pavol Rusnak
c6667fa0c2 feat(core): verify bip340 pubkeys used in p2tr addresses
Co-Authored-By: Ondřej Vejpustek <ondrej.vejpustek@satoshilabs.com>
2022-02-16 10:25:15 +01:00
Martin Milata
80655747d0 test(core/rust/ui): pagination unit test
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
ab0eef5de0 fix(core/rust/ui): adjust spacing for confirm_action
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
5378492ea9 chore(core/rust): wireframe rendering for ui debugging
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
10650af1fa refactor(core/rust/ui): paragraphs breaking
Also fix corner case.

[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
b5da6dc911 refactor(core/rust): geometry/display API improvements
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
f2b8822d76 refactor(core): improve build-time option for old/new UI
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
b64c69c3ff feat(core/rust/ui): implement confirm_action
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
6d1227d839 feat(core/rust/ui): SwipePage: add buttons, auto-disable scrolling
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
695d80bf54 refactor(core/rust/ui): uPy buffer support for TT buttons
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
f167a2bef2 feat(core/rust/ui): add model T title bar
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
c7b33e2bc0 feat(core/rust/ui): add new icons
[no changelog]
2022-02-10 14:57:42 +01:00
Martin Milata
b46901bc8b feat(core): add TT Hoves fonts, introduce medium variant
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>

[no changelog]
2022-02-10 14:57:42 +01:00
Jan Pochyla
d979efc3ca chore(core/rust): Try to simplify pagination a bit
[no changelog]
2022-02-08 15:40:37 +01:00
Martin Milata
8fb28e4af5 feat(core/rust): impl Paginate for Paragraphs
[no changelog]
2022-02-08 15:40:37 +01:00
Martin Milata
f29ccf6009 fix(core/rust): UI tweaks
[no changelog]
2022-02-08 15:40:37 +01:00
Martin Milata
48f29ee0b9 refactor(core/rust): return bounding box after laying out text
[no changelog]
2022-02-08 15:40:37 +01:00
Martin Milata
bea696dfc9 feat(core/rust): Paginated for T1
[no changelog]
2022-02-08 15:40:37 +01:00
Martin Milata
19b2358084 refactor(core/rust): T1 title bar
[no changelog]
2022-02-08 15:40:37 +01:00
Martin Milata
7f224ab36d refactor(core/rust): model-agnostic Paginated
[no changelog]
2022-02-08 15:40:37 +01:00
Jan Pochyla
a3c79bf4f7 feat(core/rust): Add Paginated component 2022-02-01 10:51:02 +01:00
Jan Pochyla
a7a305d34d fix(core/rust): Fix request_complete_repaint for components without any Child descendants 2022-02-01 10:51:02 +01:00
Jan Pochyla
129363f080 feat(core/rust): Add Trace to Paragraph[s], improve size calculation 2022-02-01 10:51:02 +01:00
Jan Pochyla
d2c8c66385 feat(core/rust): First shot at Paragraphs API 2022-02-01 10:51:02 +01:00
Jan Pochyla
8c47b94b79 feat(core/rust): Add experimental LinearLayout 2022-02-01 10:51:02 +01:00
Jan Pochyla
3dd3d7f87b feat(core): Add HoldToConfirm example, improve Loader and animation frame support 2022-02-01 10:51:02 +01:00
Jan Pochyla
117a0bd518 feat(core): Add preliminary anim frame support 2022-02-01 10:51:02 +01:00
Jan Pochyla
be3e99b96d feat(core): Add WiP Loader & generic Animation type 2022-02-01 10:51:02 +01:00
matejcik
87a7e94f5c feat(core/rust): add saturating multiplication by f32 to Duration 2022-02-01 10:51:02 +01:00
Jan Pochyla
baffe8fdf3 chore(core/rust): Add int variant to tracing 2022-01-28 09:58:49 +01:00
Jan Pochyla
5b0686f09a chore(core/rust): Forbid unsafe in components
To be expanded to other modules.
2022-01-28 09:58:49 +01:00
Jan Pochyla
12deedf3f6 chore(core/rust): Add backlight fading fn 2022-01-28 09:58:49 +01:00
Jan Pochyla
a54ca9cb05 chore(core/rust): Add micropython::time::sleep 2022-01-28 09:58:49 +01:00
Jan Pochyla
334a143b76 chore(core/rust): Split FormattedText into separate mod 2022-01-28 09:58:49 +01:00
Jan Pochyla
d5a74a8614 chore(core/rust): Rename Text to FormattedText 2022-01-28 09:58:49 +01:00
Jan Pochyla
39263144b7 chore(core): Various little improvements in Rust UI 2022-01-28 09:58:49 +01:00
Jan Pochyla
998210d569 feat(core): Add Instant and Duration types 2022-01-28 09:58:49 +01:00
Pavol Rusnak
37bd121394 chore(core/embed): check for negative values in trezor_get_uint
[no changelog]
2022-01-26 16:22:50 +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
Pavol Rusnak
4a71d15b1d chore(core/embed): refactor trezor_obj_get_uint64 into trezorobj.h
[no changelog]
2022-01-19 11:16:47 +01:00
matejcik
45787307ca style(core): support AnyStr in all hash function arguments 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
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
Pavol Rusnak
56f0e2c5de
fix(core): add missing include
we were using `FILE` and `fprintf` without including the stdio header
2021-12-14 19:57:21 +01:00
Pavol Rusnak
30a77a76bc
chore(legacy): rename MEMORY_PROTECT flag to PRODUCTION to match core naming (#2003) 2021-12-12 15:45:10 +01:00