matejcik
f6f52445bd
feat(core/cardano): support Icarus, Icarus-Trezor, and Ledger derivations
2021-11-10 13:57:57 +01:00
matejcik
387466e073
refactor(core): separate Cardano cryptography into its own module
2021-11-10 13:57:57 +01:00
Pavol Rusnak
a3b83685ef
fix(core): fix emulator build on Apple Silicon
...
[no changelog]
2021-11-08 11:00:04 +01:00
Andrew Kozlik
eb90efd914
chore(crypto,core,legacy): Add return code to hdnode_fill_public_key().
...
[no changelog]
2021-11-01 16:39:53 +01:00
Andrew Kozlik
34621a6b6d
fix(crypto,core,legacy): Check private key validity when deriving public key.
...
[no changelog]
2021-11-01 16:39:53 +01:00
matejcik
1d72085b5c
feat(core): implement conversion from timestamp to datetime
2021-10-29 11:00:30 +02:00
Ondřej Vejpustek
a924bd4dc6
build(core): do not link gen_context.o to trezor_lib
2021-10-25 14:41:28 +02:00
Ondřej Vejpustek
29ce860d46
refactor(core,crypto): rename schnorr to BIP340
2021-10-25 14:41:28 +02:00
Ondřej Vejpustek
15bb085509
refactor(core,crypto): make public key derivation functions return
...
status
2021-10-25 14:41:28 +02:00
Ondřej Vejpustek
172f399b29
style(core): fix style
2021-10-25 14:41:28 +02:00
Ondřej Vejpustek
7ac0bdd215
feat(core): make core use Schnorr signatures
2021-10-25 14:41:28 +02:00
Ondřej Vejpustek
26463eb3ce
feat(core): make core use ecdsa from secp256k1_zkp wherever possible
2021-10-25 14:41:28 +02:00
Pavol Rusnak
9e0cfa6783
fix(core): we don't need separate linker script for zkp
2021-10-25 14:41:28 +02:00
matejcik
32be2c09b9
feat(core): enable f-strings for micropython
...
[no changelog]
2021-10-13 11:53:17 +02:00
Jan Pochyla
901580817d
chore(core/rust): fixes and formatting
...
[no changelog]
2021-10-07 15:01:55 +02:00
Jan Pochyla
5eefcffc7c
chore(core): prepare for fuzzing targets
...
First, we change the Protobuf definition includes to use an exact path relative to our crate's directory, instead of the OUT_DIR. This fixes build when a combination of stable and nightly toolchains is used (nightly is needed for the fuzzing targets).
Another change is a slight fix in the panic handler conditional compilation. Fuzzing is using the crate with `features = ["test"]`, but doesn't turn on the `test` cfg.
[no changelog]
2021-10-07 15:01:55 +02:00
Jan Pochyla
2703d714c2
feat(core): add Rust UI components, layouts, text rendering
...
[no changelog]
2021-10-07 15:01:55 +02:00
Pavol Rusnak
b03b688f2d
fix(core): avoid accidental build with broken stack protector (boardloader)
2021-09-29 12:48:31 +02:00
Ondrej Mikle
a85d2483ff
chore(legacy & core): changelogs added
2021-09-27 15:42:29 +02:00
Ondrej Mikle
0b077fea8a
fix(core & legacy): explicit compiler versions
2021-09-27 15:42:29 +02:00
Ondrej Mikle
e982181148
style(core & legacy): buggy compiler checks
2021-09-27 15:42:29 +02:00
Ondrej Mikle
6ea4b7b211
fix(core & legacy): better styled compiler checks
2021-09-27 15:42:29 +02:00
Ondrej Mikle
6b849b1d4d
fix(core & legacy): avoid accidental build with broken stack protector
2021-09-27 15:42:29 +02:00
Martin Milata
81e66cb024
style(core/rust): enable clippy lints
...
[no changelog]
2021-09-23 14:22:40 +02:00
Martin Milata
bd005e33df
refactor(core): decouple T1 button handling from touch
...
[no changelog]
2021-09-23 12:30:13 +02:00
Jan Pochyla
2c8dec93a6
feat(core): Split unix main, link core obj into Rust test target
2021-09-21 12:43:31 +02:00
matejcik
7a17124b43
refactor(core/rust): do not rely too much on new_exception helpers
2021-09-21 12:43:31 +02:00
matejcik
5e452dc57c
refactor(core/rust): propagate unsafety of raise_exception
2021-09-21 12:43:31 +02:00
matejcik
806beb77d2
feat(core/rust): improve catch_exception, make use of Rust 1.55
2021-09-21 12:43:31 +02:00
matejcik
795ed2d339
fix(core/rust): fix "unnecessary unsafe" warning
...
[no changelog]
2021-09-21 12:43:31 +02:00
matejcik
31de21718f
feat(core/rust): introduce Obj.is_null()
...
[no changelog]
2021-09-21 12:43:31 +02:00
matejcik
b666895303
feat(core/rust): catch, handle and propagate uPy exceptions
2021-09-21 12:43:31 +02:00
matejcik
8abcb6f8cc
chore(core/rust): allow unused macros
...
[no changelog]
2021-09-21 12:43:31 +02:00
Jan Pochyla
7c65f0357a
feat(core/rust): Implement exception catching in Rust
...
chore(core): Add test for Rust exc catching
chore(core): Document exception catching in Rust
[no changelog]
2021-09-21 12:43:31 +02:00
Martin Milata
aace875fef
chore(vendor): bump micropython to 1.17
...
Relevant micropython commits:
d1bfb271d7686708fe8711a177629c8bf6e7f6a6 lib/uzlib: Move uzlib code from extmod to lib.
4d546713ec8858cbf908de45de11cbfc46a20971 shared: Introduce new top-level dir and move 1st party lib code there.
ca920f72184c50f61002aa9d5cd01555b1e28b7b py/mpstate: Make exceptions thread-local.
2021-09-17 11:18:14 +02:00
Martin Milata
b062b95348
chore(vendor): bump micropython to 1.15
...
Relevant micropython commits:
ad4656b861f94277bed9647ca176e662ce5119e3 all: Rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD.
9fef1c0bde2f9642d383bd56aa112447384a84ba py: Rename remaining object types to be of the form mp_type_xxx.
5fdf351178df9a18df624ae0f5947d8a5a6bce40 py/gc: Don't include mpconfig.h and misc.h in gc.h.
2021-09-17 11:18:14 +02:00
Martin Milata
d69b23e3c5
chore(core/emulator): ignore MICROPY_UNIX_COVERAGE
...
Seems to be micropython internal flag that hasn't been working in our
emulator for some time.
Relevant micropython commits:
b9a35bebf75be53a817bf6341af14b882093e345 py/qstr.h: Remove QSTR_FROM_STR_STATIC macro.
[no changelog]
2021-09-17 11:18:14 +02:00
Pavol Rusnak
d153082c9c
chore(vendor): bump micropython to 1.14
...
Relevant micropython commits:
4559bcb4679e04e0a5e24030675676ff6a9803f2 unix: Make mp_hal_delay_ms run MICROPY_EVENT_POLL_HOOK.
2021-09-17 11:18:14 +02:00
Martin Milata
a007e062ab
style(core): apply rustfmt
...
[no changelog]
2021-09-16 14:57:06 +02:00
Tomas Susanka
cec1f39a90
chore(core, legacy): bump versions
...
[no changelog]
2021-08-31 12:55:37 +02:00
Martin Milata
f37ca13f1a
refactor(core): disable SD, SBU, fatfs for T1 build
2021-08-20 12:22:13 +02:00
Martin Milata
582e1318c4
feat(core/emulator): support protobuf messages in memory dumps
...
[no changelog]
2021-07-22 13:31:11 +02:00
Martin Milata
412d06fdfe
docs(core+legacy): use towncrier for generating CHANGELOG.md
...
core/embed/boardloader/CHANGELOG.md
core/embed/bootloader/CHANGELOG.md
core/embed/bootloader_ci/CHANGELOG.md
legacy/intermediate_fw/CHANGELOG.md
2021-07-21 14:27:20 +02:00
Pavol Rusnak
d35071d732
docs(core+legacy): update changelogs to new format
2021-07-21 14:27:20 +02:00
Martin Milata
ceaf4da617
fix(core): explicitly refresh display on T1
...
[no changelog]
2021-07-20 22:00:42 +02:00
Pavol Rusnak
3d69ca1b1b
chore(vendor): update nanopb to 0.4.5
2021-07-14 17:34:12 +02:00
matejcik
b41d4c71f0
feat(core/emulator): JSON memory map dump
...
use `trezor.utils.mem_dump("somefile.json")` in a key place, then
`analyze.py src/somefile.json` to look at what is going on
2021-07-14 13:50:24 +02:00
matejcik
fe6c131b14
feat(core/emulator): build emulator with -DSTATIC=
...
This is perhaps a cleaner way to expose all relevant structures for
memory analysis.
2021-07-14 13:50:24 +02:00
Martin Milata
81869fc4b0
chore(core): bump version to 2.4.2
...
[skip_ci]
2021-07-08 13:38:29 +02:00
Martin Milata
f06a57237b
style(core): trezorhal/random_delays.c
2021-07-07 14:39:24 +02:00
Pavol Rusnak
8cfa5da1ce
docs: fix typos in comments
...
[skip_ci]
2021-06-30 15:41:55 +02:00
Ondřej Vejpustek
24200e7424
fixup! fix(legacy): make RDI work on T1
2021-06-24 17:34:24 +02:00
Ondrej Mikle
daa94ac941
fix(legacy): make RDI work on T1
2021-06-24 17:34:24 +02:00
Ondřej Vejpustek
b8b0ae09d9
fix(core): use unprivileged shutdown where needed
2021-06-23 16:40:45 +02:00
Ondřej Vejpustek
5984fd6ad7
feat(core): jump to unprivileged mode after shutdown
2021-06-23 16:40:45 +02:00
Ondřej Vejpustek
40b4f679f9
feat(core): implement wrapper for svc_shutdown
2021-06-23 16:40:45 +02:00
Ondřej Vejpustek
311288407e
docs(core): document shutdown_privileged
2021-06-23 16:40:45 +02:00
Ondřej Vejpustek
4968d7da53
feat(core): implement svc shutdown
2021-06-23 16:40:45 +02:00
Ondřej Vejpustek
cca9d4b1c4
refactor(core): rename shutdown to shutdown_privileged
2021-06-23 16:40:45 +02:00
Ondřej Vejpustek
7686eb355a
fix(core): fix import of random delays
2021-06-23 16:40:45 +02:00
Pavol Rusnak
69d1465e08
refactor(core): pass invert_colors to send_init_seq_ST7789V as argument
...
to make the call more flexible
2021-06-19 19:57:42 +02:00
Pavol Rusnak
18e103bb94
style(core): refactor style of display-stm32_T
2021-06-19 19:54:19 +02:00
matejcik
c06a93cba5
feat(core/rust): propagate bitcoin_only flag to Rust build
2021-06-08 09:55:19 +02:00
Jan Pochyla
8a21e3fc73
feat(core): Add Rust Protobuf codec
2021-06-08 09:55:19 +02:00
Pavol Rusnak
23aa69caea
fix(core): unify Features.revision reporting with legacy
2021-06-04 12:50:49 +02:00
Martin Milata
ca836b2e45
chore(core): bump version to 2.4.1
2021-06-02 12:50:22 +02:00
Martin Milata
8c6b93e0bd
build(core): account for ARM unwinding info in memory layout
...
Currently the 8-byte section is inserted under semi-random name like
.ARM.exidx.text._ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17h79ccbc4bdfe3f200E.
This makes it hard to include it in _codelen that is later baked into
firmware header. This change adds new section because including it in
.flash causes linker error due to mixing "ordered" and "unordered"
sections.
By renaming .exidx to /DISCARD/ we'd drop this info, there may also
exist compiler flag to do that.
2021-05-21 13:49:42 +02:00
Martin Milata
20fe8552ca
build(core/rust): use correct architecture for T1
...
TT is Cortex-M4 is Armv7E-M while T1 is Cortex-M3 is Armv7-M:
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/armv6-m-vs-armv7-m---unpacking-the-microcontrollers
2021-05-21 13:49:42 +02:00
Ondřej Vejpustek
6fd4739c5c
feat(core): make random delays use chacha_drbg
2021-05-21 13:42:53 +02:00
Ondřej Vejpustek
e1a5f42c81
feat(core): make chacha_drbg more robust
2021-05-21 13:42:53 +02:00
Ondřej Vejpustek
8ee17f69b3
refactor(core): move wait_random and rdi into separate file
2021-05-21 13:42:53 +02:00
matejcik
e015bc0856
build(core/rust): disable nightly-only features
...
When we need them, we will re-enable.
2021-05-21 13:42:10 +02:00
matejcik
5f4240d93c
feat(core): preallocate sys.modules to an appropriate size
2021-05-06 13:14:21 +02:00
matejcik
391976bcda
refactor(core/usb): do not require serial number on instantiaton of USB
...
On a cleanly wiped device, storage must be unlocked in order to create
and retrieve the serial number. However, storage unlocking happens in
boot.py, which is imported _after_ usb.py
We must therefore sidestep asking for the serial number.
2021-05-06 13:14:21 +02:00
Jan Pochyla
6257584951
feat(core): Add Rust bindings to MicroPython and trezorhal
...
core: Remove dangling module decls
core: Use new Cargo feature resolver, use external MacOS debug info
core: Rust docs improvements
core: Upgrade bindgen
core: Add test target to Rust
ci: build rust sources
build(core): .ARM.exidx.text.__aeabi_ui2f in t1 firmware size
It's an unwind table for softfloat function inserted by rustc, probably
can be removed to save 8 bytes:
599c58db70/link.x.in (L175-L182)
scons: Remove dead code
core: Move Rust target to build/rust
core: Replace extern with a FFI version
core: Add some explanatory Rust comments
core: Use correct path for the Rust lib
core: Remove Buffer::as_mut()
Mutable buffer access needs MP_BUFFER_WRITE flag. TBD in the Protobuf PR.
core: Improve docs for micropython::Buffer
core: Minor Rust docs changes
core: Rewrite trezor_obj_get_ll_checked
core: Fix incorrect doc comment
core: Remove cc from deps
fixup! core: Rewrite trezor_obj_get_ll_checked
core: update safety comments
2021-05-05 16:00:21 +02:00
mcudev
e3539b0a73
core/embed/usb: add back usb fs code for t1 and redo fifo sizing
2021-04-14 23:03:29 +02:00
mcudev
6137a55b06
core/embed/usb: use all available usb endpoints and update the usb fifo sizing
2021-04-09 12:50:40 +02:00
Martin Milata
ac711fb8ee
style(core): use more recent type annotation syntax
...
https://www.python.org/dev/peps/pep-0585/ - Type Hinting Generics In Standard Collections
https://www.python.org/dev/peps/pep-0604/ - Allow writing union types as X | Y
2021-04-01 11:12:30 +02:00
Martin Milata
8b3ac659a0
style(core): mypy: disable implicit Optional for function arguments
...
https://www.python.org/dev/peps/pep-0484/#union-types
2021-04-01 11:12:30 +02:00
Andrew Kozlik
2836bfc64c
fix(core): Improve error handling and range checking in modtrezorconfig.
2021-03-26 10:54:56 +01:00
Andrew Kozlik
66823e2893
chore(core,legacy): Bump FIX_VERSIONs due to upgrade to storage version 3.
2021-03-25 14:24:41 +01:00
Andrew Kozlik
3084d1196d
feat(core): Support 50 digit PIN and wipe code.
2021-03-25 14:24:41 +01:00
Pavol Rusnak
4649b80b44
feat(core): allow secp256k1-zkp for bitcoin-only build
...
(but keep it disabled)
2021-03-18 15:42:52 +01:00
Pavol Rusnak
d211e3af07
fix(core): switch define to invert display colors into const volatile
...
using define causes compiler to over-optimize the code in display_init_seq
leading to larger differences in the resulting binaries when the flag changes
we want to keep the difference to minimum (1 byte) and using const volatile
instead of define achieves that
2021-03-11 12:29:00 +01:00
Pavol Rusnak
e7966cc804
refactor(core): rework color definitions in bootloader
2021-03-10 18:33:00 +01:00
Pavol Rusnak
3294a49cec
fix(core): don't assert reset flags to allow "reboot to bootloader"
2021-03-10 18:31:51 +01:00
Pavol Rusnak
1e2bb337a9
refactor(core): drop buttons argument for ui_screen_firmware_info
2021-03-10 17:42:52 +01:00
Pavol Rusnak
814db111b2
feat(core): add define to invert display colors on ST7789V
2021-03-10 16:06:18 +01:00
Pavol Rusnak
5cff6ac964
doc(core): update comments around UDP emulator
...
drop unused define
2021-03-09 16:19:03 +01:00
Andrew Kozlik
a8c500bffd
feat(core): Ensure that WebAuthn runs on port 21326 by default for both production and debug emulator.
2021-03-09 16:13:21 +01:00
Pavol Rusnak
ebfd51d818
fix(core): stay_in_bootloader should default to false, not true
2021-03-06 20:09:56 +01:00
Pavol Rusnak
efac5d56f5
fix(core): change touch i2c clock speed to 200 kHz
...
fixes #1519
2021-03-06 20:02:11 +01:00
Martin Milata
7c1d72c254
style(core): fix bootloader formatting
2021-03-04 19:21:56 +01:00
Pavol Rusnak
29a3e91f09
feat(core): refactor display_init_seq from display_init
2021-03-04 17:04:35 +01:00
Pavol Rusnak
5dd3d73d00
fix(core): remove unused stuff from bootloader_ci
...
plus minor ui function renames
2021-03-04 17:01:01 +01:00
Ondrej Mikle
a4ba24645b
feat(core): remove connect to host dialog in the bootloader
2021-03-04 16:34:30 +01:00
Pavol Rusnak
f3ae3615c7
fix(core): unify bootloader_ci with bootloader
2021-03-04 15:59:25 +01:00
Pavol Rusnak
b074404dcf
fix(core): small secbool refactor for bootloader_ci
2021-03-04 12:14:26 +01:00
Pavol Rusnak
2dc094bd3e
fix(core): small secbool refactors
2021-03-04 11:59:38 +01:00
Martin Milata
48627b7f0f
fix(core): bootloader_ci build
...
See also f46380147f
.
2021-02-15 20:55:54 +01:00
Pavol Rusnak
5395c542c1
chore(core): update changelog, bump version to 2.3.7
2021-02-13 11:16:11 +01:00
Pavol Rusnak
f46380147f
fix(core): update sync protobuf messages in bootloader
2021-02-10 10:56:52 +01:00
matejcik
ccd241fe55
feat(core/cardano): enable typing for Cardano app
2021-02-10 10:56:52 +01:00
Ondrej Mikle
22d01b6ff4
chore(core): bootloader_ci - decouple file links from original bootloader
2021-01-27 23:43:38 +01:00
Pavol Rusnak
a11cb11ba3
chore(core): rework SYSTEMVIEW_DEST_SYSTEMVIEW
...
to work with ifdef instead of if
2021-01-26 20:53:38 +01:00
Ondrej Mikle
d99127771c
chore(core): reorder includes
2021-01-26 20:53:38 +01:00
Ondrej Mikle
a628b9a92d
chore(core): remove unneeded include
2021-01-26 20:53:38 +01:00
Ondrej Mikle
4cf91b128d
style(core): systemview editorconfig reformat
2021-01-26 20:53:38 +01:00
Ondrej Mikle
9411756c42
style(core): systemview reformat
2021-01-26 20:53:38 +01:00
Ondrej Mikle
550216354b
chore(core): more systematic systemview function definitions
2021-01-26 20:53:38 +01:00
Ondrej Mikle
869cfbbd1c
style(core): style for systemview
2021-01-26 20:53:38 +01:00
Ondrej Mikle
0abcb57840
feat(core): place systemview buffers into CCMRAM
2021-01-26 20:53:38 +01:00
Ondrej Mikle
5a4166ea93
feat(core): increase systemview buffers
2021-01-26 20:53:38 +01:00
Ondrej Mikle
f591ce6789
feat(core): update systemview sources to 3.20
2021-01-26 20:53:38 +01:00
Ondrej Mikle
8fa3745838
feat(core): define RTT locking by enabling/disabling interrupts
2021-01-26 20:53:38 +01:00
Ondrej Mikle
ce3a6b649c
feat(core): systemview header
2021-01-26 20:53:38 +01:00
Ondrej Mikle
4a692cc63b
feat(core): segger dependencies
2021-01-26 20:53:38 +01:00
Ondrej Mikle
5f837e12b9
feat(core): send messaged through systemview
2021-01-26 20:53:38 +01:00
Ondrej Mikle
60e4e06aa5
feat(core): measure systick with systemview
2021-01-26 20:53:38 +01:00
Ondrej Mikle
c5e986b1ba
feat(core): enable SystemView at firmware start
2021-01-26 20:53:38 +01:00
Martin Milata
c293b52bd6
feat(core): bootloader_ci: do not ui_fadein/ui_fadeout
2021-01-26 17:21:16 +01:00
Martin Milata
2643ee2ab8
feat(core): bootloader_ci: wipe device without confirmation
2021-01-26 17:21:16 +01:00
Tomas Susanka
1006c8a0f1
chore(core,legacy): change versions to 1.9.5 and 2.3.6
...
This reverts commit 92535dc090
.
2021-01-22 15:42:55 +01:00
Pavol Rusnak
92535dc090
chore(core,legacy): change versions back to 1.9.4 and 2.3.5
...
[skip_ci]
2021-01-22 14:23:11 +01:00
Pavol Rusnak
43ed13b323
feat(core): disable SECP256K1_ZKP feature flag
2021-01-22 14:06:29 +01:00
Pavol Rusnak
f3d5de15ef
refactor(core): turn SECP256K1_ZKP into a firmware feature flag
2021-01-22 14:06:29 +01:00
Jan Pochyla
f3a64435f1
fix(core): root ui callback for trezorconfig mod ( #1412 )
...
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2021-01-19 14:17:16 +01:00
Martin Milata
db5b65a420
perf(core): enable rendering of substrings to avoid slicing
2021-01-11 16:47:59 +01:00
Pavol Rusnak
93215ae3c7
style: reformat with clang-format 11
2021-01-04 14:40:16 +01:00
Rafael Korbas
edf9b4ee85
Refactor mnemonic_to_entropy to not (misleadingly) return checksum
2020-12-19 20:17:16 +01:00
Tomas Susanka
d2e3269ede
chore(core): bump version to 2.3.6
2020-12-18 19:36:25 +01:00
Andrew Kozlik
aeb021b159
chore(core): Improve naming of SLIP39's T9 mask lookup.
2020-12-15 13:41:42 +01:00
Andrew Kozlik
7fc1851279
fix(crypto): Improve naming and robustness of SLIP39's T9 mask lookup.
2020-12-15 13:41:42 +01:00
Pavol Rusnak
0519c8bd13
Revert "chore(core): bump version to 2.3.6"
...
This reverts commit 01d1058048
.
2020-11-26 16:48:47 +01:00
Tomas Susanka
01d1058048
chore(core): bump version to 2.3.6
2020-11-25 20:14:30 +01:00
Pavol Rusnak
b9c0b3969b
legacy+core: unify error codes in bootloaders ( #1347 )
2020-11-18 11:21:57 +01:00
Pavol Rusnak
50fdd183c2
ci: enable editorconfig checks, fix whitespace issues
2020-11-11 14:43:50 +01:00
Pavol Rusnak
ded61a4ccf
chore(vendor): update micropython to v1.13
2020-10-16 14:19:35 +02:00
Andrew Kozlik
c67ecb984b
chore(crypto): Move XPUB_MAXLEN and ADDRESS_MAXLEN from modtrezorcrypto to bip32.h.
2020-10-13 13:13:49 +02:00
Andrew Kozlik
c21ca81a1e
fix(core): Prevent sensitive data from being left on the call stack in modtrezorcrypto.
2020-10-13 13:13:49 +02:00
Pavol Rusnak
d8534b5ee6
perf(core/extmod): replace HMAC Python implementation with C
...
We keep Python implementation of HMAC for Monero in
core/src/apps/monero/xmr/crypto/__init__.py
2020-10-12 16:33:13 +02:00
Pavol Rusnak
649e31cef0
chore(core/bootloader): regenerate messages with nanopb 0.4.3
2020-09-24 10:52:31 +02:00
Tomas Susanka
0317877297
chore(core): bump version to 2.3.5
2020-09-24 10:17:32 +02:00
matejcik
7e5d9e295b
fix(core): help mypy understand micropython's module management
2020-09-23 16:00:10 +02:00
Martin Milata
f3fd98a7ba
core: remove 1px of space on the left of each glyph
...
For PixelOperator (T1) fonts only.
2020-09-01 19:57:46 +02:00
Martin Milata
b8bb63fbef
core: drop unused FONT_SIZE constant
2020-09-01 19:57:46 +02:00
Tomas Susanka
d080464cc5
core, legacy: bump versions (also in changelogs)
2020-08-24 09:31:49 +02:00
Ondrej Mikle
8d3d3be09c
core/bootloader_ic: introduce CI bootloader for TT device tests ( #1182 )
2020-08-21 14:39:56 +02:00
Martin Milata
1b982659c4
core: fix boot loop after uploading invalid homescreen ( #1205 )
2020-08-21 12:00:42 +02:00
Pavol Rusnak
5536fbb98a
python: use stdlib blake2s on python 3.6+
...
commit 6d407c84d7
did not replace everything
2020-08-10 23:35:38 +02:00
Pavol Rusnak
4e11735d22
core/modtrezorui: remove prefill from text functions
...
use display.bar where needed to prefill the areas
2020-08-07 15:08:14 +02:00
matejcik
5385617eda
core: increase address length limit to accomodate CRW ( fixes #1139 )
2020-08-07 12:45:43 +02:00
Ondřej Vejpustek
59002118c0
core/extmod: explicitly initialize automatic variables
2020-08-04 14:50:07 +02:00
Pavol Rusnak
efc5ccdaf0
core: remove src1
2020-08-03 15:59:57 +02:00
Martin Milata
e5bdca655a
core: don't scale emulator background image
...
Makes the emulator look nicer in tiling window managers.
2020-07-31 12:27:43 +02:00
matejcik
8502412dbc
core/emulator: assume -m main
when no arguments are provided
...
fixes #1115
2020-07-30 15:27:34 +02:00
Pavol Rusnak
a6451dad46
core/fonts: update headers
2020-07-28 10:56:41 +02:00
Pavol Rusnak
47e7550423
core/extmod: add font_pixeloperator{,mono}, use this font for T1
2020-07-28 09:40:30 +02:00
Pavol Rusnak
cec87bba50
core: remove mono bold font variant (not used anywhere)
2020-07-27 23:22:34 +02:00
Pavol Rusnak
8bc32d035b
core/extmod: enable display_text* methods for other models than T
2020-07-27 17:24:13 +02:00
Pavol Rusnak
df03534955
core: print inverted question mark for nonprintable characters
2020-07-27 16:29:11 +02:00
Pavol Rusnak
89d701ed08
core+legacy: bump versions (also in changelogs)
2020-07-27 13:59:49 +02:00
Pavol Rusnak
8dacad0782
core/bootloader: update protobuf definitions
2020-07-26 00:00:37 +02:00
matejcik
fa757f4b7f
core: improve type annotation for bip32.derive_path
2020-07-24 16:37:58 +02:00
matejcik
0c3bc53aee
core: clean up types for field caching, fix count_message
2020-07-24 14:09:31 +02:00
matejcik
f723dca7b1
core: enable PYSTACK
2020-07-24 14:09:31 +02:00
matejcik
85d74ece76
core: implement synchronous v1 codec
2020-07-24 14:09:31 +02:00
Andrew Kozlik
4005f4832f
core/embed: Set VCP write timeout to 0.
2020-07-16 09:34:58 +02:00
Ondrej Mikle
33d2bf417b
core: replace bootloader only in production. Fix device for T1 core port JLink upload
2020-07-13 10:45:32 +02:00
Tomas Susanka
f8b2f0bb7b
changelogs: change also bootloader changelogs to the new format
2020-06-11 15:48:38 +00:00
Tomas Susanka
56fe5adcfc
Merge branch 'release/2020-06'
2020-06-10 06:51:18 +00: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
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
2cedc687e6
core: disable trezor-crypto BIP32 cache
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
Tomas Susanka
8859d103f4
core, legacy: bump versions
2020-06-03 15:39:25 +00:00
Ondřej Vejpustek
24ceb0ab6b
crypto/bignum: change limb size to 29, add tests
2020-05-24 14:36:38 +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
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
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
7f2e7b0003
core: add Ethereum constants to mocks
2020-05-15 14:08:29 +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
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
Pavol Rusnak
25cc836660
core/extmod: fix build of modtrezorui when TREZOR_MODEL is set to '1'
2020-04-30 15:07:26 +00:00
Tomas Susanka
47f104bceb
core, legacy: bump versions
2020-04-24 17:12:20 +00:00
Ondřej Vejpustek
c461692f3a
core: implement random delay interrupts
2020-04-16 11:51:28 +02:00
matejcik
2ccebd3175
core: raise SystemExit when exitting emulator (now that sys.exit is removed)
2020-04-14 10:17:37 +02:00
matejcik
4bddeefea0
core: unify mpconfigports for emulator and board
...
Changes in firmware/mpconfigport.h are minimal:
* $VFS_FAT is dropped because it is irrelevant without $VFS
* $REVERSE_SPECIAL_METHODS is added, to push down on code size
* $THREAD is disabled unconditionally
unix/mpconfigport.h is reordered and modified to match
firmware/mpconfigport.h as much as possible, while selectively enabling
some needed features.
Notably, $USE_READLINE is enabled unconditionally
2020-04-14 10:17:37 +02:00
matejcik
d0f709b8cc
core: fix and use MAKEMODULEDEFS instead of explicit registration
2020-04-14 10:17:37 +02:00
matejcik
a6976355c3
core: remove readline from built firmware
2020-04-14 10:17:37 +02:00
Pavol Rusnak
a7806d08d7
core/crypto: remove unused bip32.deserialize function
2020-04-06 18:04:24 +02:00
Pavol Rusnak
1695228d80
core/crypto: remove unused serialize_private function
2020-04-06 15:49:36 +00:00
Pavol Rusnak
f07ff17fad
core/crypto: add missing field to Blake2b constructor
2020-04-06 12:28:36 +00:00
Pavol Rusnak
336a417233
core/bootloader: distinguish between a vendor change and downgrade with wipe
2020-03-25 15:15:12 +01:00
Ondrej Mikle
634ed5aabc
core: commands for flashing via JLink ( #911 )
2020-03-23 10:40:06 +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
bfd834d1de
storage: Add storage_ensure_not_wipe_code().
2020-03-19 15:04:33 +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
86b010a18b
Merge pull request #878 from trezor/matejcik/fatfs-corruption
...
FatFS API rework
2020-02-27 15:58:38 +01:00
matejcik
9ab84d2455
core/tests: thoroughly test modified APIs
2020-02-27 10:56:23 +01:00
matejcik
b24411b900
core/sdcard: unmount instance when powering off sdcard
2020-02-27 10:56:23 +01:00
matejcik
c81be584fb
core/fatfs: ensure functions can only be called on a mounted filesystem
...
ff.c has a lazy-mounting feature, where any filesystem call will mount
the volume if it can. This messes with predictability of the mounted
state, so all (except mount/unmount/mkfs) Python functions will first
check if the fs is mounted.
2020-02-27 10:56:23 +01:00
matejcik
fa746e2990
core/fatfs: rework low-level FatFS API
...
Instead of having possibly multiple FatFS objects, each with its own
`fs` struct, there is one global static fs_instance. This is to match
the mode of operation of ff.c, which assumes a global list of mounts,
and all functions operate on the global based on path.
Methods of FatFS were converted to functions on the fatfs module.
fatfs.unmount() does not call ff.c's unmount, but simply invalidates
fs_instance. This is basically what ff.c would do, except without
messing with ff.c's global list of mounts.
2020-02-26 14:18:41 +01:00
Pavol Rusnak
c896f02eb3
core/boardloader: use SRAM as SD card read buffer
...
because DMA can't access the CCMRAM
2020-02-25 17:59:16 +01:00
Andrew Kozlik
2133f7cf29
core: Prevent data loss when writing to USB VCP.
2020-02-25 12:08:07 +01:00
Pavol Rusnak
39ce100608
Merge pull request #864 from trezor/prusnak/bootloader-text-break
...
core/bootloader: split long vendor string
2020-02-21 18:39:20 +01:00
matejcik
4ed6487a19
core/sdcard: add out-of-bounds checks to emulator
2020-02-20 12:51:48 +01:00
matejcik
d0b1b171f1
core/sdcard: ensure emulator initializes the SD card when first needed
2020-02-20 12:51:48 +01:00
matejcik
5bd8d9b5bb
core/sdcard: make allocating new SD card for emulator fast
2020-02-20 12:51:48 +01:00
matejcik
b2084a19be
core/trezorio: move sdcard functions to a submodule
2020-02-20 12:51:48 +01:00
matejcik
30529d218d
core/sdcard: change SDCard methods to plain functions
2020-02-20 12:51:48 +01:00
matejcik
06b89c57c5
core/sdcard: return proper disk status flags to fatfs
2020-02-20 12:51:48 +01:00
Pavol Rusnak
dc66bbe3d5
core/bootloader: split long vendor string
2020-02-19 21:40:28 +00:00
Pavol Rusnak
74802a107e
core/modtrezorui: add display_text_split
2020-02-19 21:40:28 +00:00
Pavol Rusnak
c4babd3c0b
Merge pull request #846 from trezor/bootloader-read-retry
...
core/bootloader: make read more benevolent and read error more helpful
2020-02-19 19:45:34 +01:00
Pavol Rusnak
581e46ff87
Merge pull request #845 from trezor/prusnak/webusb-popup
...
Don't show WebUSB popup in firmware, in bootloader only if no firmware present
2020-02-19 18:18:01 +01:00
Pavol Rusnak
2958a97c87
Merge pull request #830 from trezor/tsusanka/fw-upgrade
...
FW Update: Request a small chunk first to make the UI smoother
2020-02-15 13:08:33 +01:00
Pavol Rusnak
63dfd6c6ab
core/bootloader: make read more benevolent and read error more helpful
2020-02-12 22:05:29 +01:00
Pavol Rusnak
07cd73ce57
core: show webusb popup only in bootloader and only if firmware is not installed
2020-02-12 20:47:05 +00:00
matejcik
c14429c445
all: shut down emulator on error_shutdown
2020-02-12 13:31:31 +01:00
Tomas Susanka
2c0504ad1c
Merge pull request #803 from trezor/passphrase
...
Passphrase Redesign
2020-02-11 16:01:59 +01:00
Pavol Rusnak
32f8f1cb61
core/embed: update fatfs to 0.14; use upstream version
2020-02-07 15:21:16 +00:00
Pavol Rusnak
73ed2f3450
legacy: small nitpicks related to the new passphrase handling
2020-02-07 11:41:03 +00:00
Tomas Susanka
1343583d21
core: bump version to 2.3.0
2020-02-07 11:41:00 +00:00
Tomas Susanka
a02d7e3daf
core/bootloader: request vendor header first
2020-02-06 12:22:32 +00:00
matejcik
d28e33ef02
core/headertool: support generating vendor headers with explicit size
2020-02-05 12:23:34 +01:00
Pavol Rusnak
6dbed1424f
core+legacy: update nanopb api to version 0.4
2020-02-04 17:18:27 +00:00
Pavol Rusnak
3eb7775659
core/bootloader: regenerate protobuf messages
2020-02-04 17:18:17 +00:00
Pavol Rusnak
4647e7d686
core+legacy: use nanopb generator from pipenv
2020-02-04 17:15:25 +00:00
matejcik
75264a07a8
Emulator launcher scripts ( #796 )
...
Emulator launcher scripts
2020-01-24 16:18:18 +01:00
Pavol Rusnak
3de1b3aa54
core/embed: switch to unprivileged in main.c
2020-01-24 12:29:46 +00:00
Pavol Rusnak
7a2e0c3412
core/embed: don't call functions via supervisor if in privileged mode
2020-01-23 18:18:59 +00:00
matejcik
27c4c2dd50
core: do not let frozen emulator import live files
2020-01-23 15:50:28 +01:00
matejcik
9341f0d584
core: improve building of vendor headers
2020-01-20 17:32:59 +01:00
Pavol Rusnak
500156b9ba
core/embed: don't use local copy of inflate
2020-01-18 17:09:52 +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
Milan Rossa
8b31c6fcf4
core: increase stack size for unix port
2020-01-09 15:26:40 +01:00
Pavol Rusnak
9bc3af08b2
core: update mpconfigport.h from upstream (for both stm32 and unix)
2020-01-09 15:20:22 +01:00
Jan Pochyla
655ec0a70c
core/unix: update main.c from upy 1.12
2020-01-07 20:52:43 +01:00
Jan Pochyla
7deade5a10
core/firmware: PendSV_Handler is defined in pendsv.c
2020-01-07 20:52:43 +01:00
Jan Pochyla
ecc4313a34
core/usb: avoid naks in hid/webusb rx interfaces
2020-01-07 20:52:43 +01:00
Tomas Susanka
51ef963738
tests: introduce UI tests for core
2020-01-03 14:28:27 +00:00
Pavol Rusnak
8572a5a942
core: fix interrupt usage in usbd_conf
2019-12-18 16:30:57 +00:00
Ondrej Mikle
0064fda203
core: check whether USB structures are correct to avoid faults in shutdown
2019-12-18 17:16:36 +01:00
Pavol Rusnak
6198509948
core: bump version to 2.2.1; update changelog
2019-12-16 19:06:33 +01:00
Milan Rossa
6d932a8a1d
core/embed/unix/flash: Don't reopen flash emulation file.
2019-12-15 10:21:29 +01:00
Pavol Rusnak
a9454b216d
core: move delay.c from trezorhal to firmware, fix prodtest build
2019-12-15 08:59:47 +00:00
Pavol Rusnak
a9e5149b95
core: reorganize source code to allow boardloader build
...
(after DMA changes)
2019-12-15 08:43:00 +00:00
Pavol Rusnak
046ff607d3
Merge branch 'sdcard-dma'
2019-12-12 18:00:01 +01:00
Milan Rossa
91007bafe9
core/unix/main: Print memory info (peak memory) when TREZOR_LOG_MEMORY env var is set. Part of #194
2019-12-12 17:58:35 +01:00
Pavol Rusnak
43da0d754a
core/embed: decrease SD card operations timeout to 5s
2019-12-11 17:24:28 +00:00
Pavol Rusnak
b34675401c
core/embed: add explicit fault handlers
2019-12-11 16:40:58 +00:00
Pavol Rusnak
c8c27dcd2f
core/embed: enable/disable SDIO/DMA interrupts via supervisor calls
2019-12-11 15:28:49 +00:00
Pavol Rusnak
990a91cd13
core/embed: enable DMA for SDIO operations
2019-12-11 15:28:49 +00: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
Pavol Rusnak
d761a57689
storage: introduce FLAGS_APPID
2019-11-11 19:47:48 +01:00
Pavol Rusnak
1caae698ca
storage: make FLAG_PUBLIC and FLAGS_WRITE part of public API
2019-11-11 19:47:48 +01:00
Pavol Rusnak
4462fb522c
core/nem: don't use mp_obj_new_str_of_type
2019-11-09 12:06:12 +00:00
Pavol Rusnak
58a865dd05
core/embed/unix: fix sdcard_init behaviour
2019-10-30 14:43:10 +01:00
Pavol Rusnak
c617035a3e
core: bump version to 2.1.9
2019-10-24 09:16:24 +00:00
Pavol Rusnak
5fe2f7e59c
common/protob: remove ButtonRequest.data field
2019-10-24 11:11:43 +02:00
Tomas Susanka
0511cc8b8c
core: add final mypy fixes!
2019-10-22 14:36:25 +00:00
Pavol Rusnak
ab62715606
core: bump version to 2.1.8
2019-10-12 19:13:44 +02:00
Pavol Rusnak
1bdc83838b
legacy+core: properly handle non-printable ascii characters
...
(convert them to '_')
2019-10-10 15:58:26 +00:00
Andrew Kozlik
c25a41aa57
core: Fix mypy warnings in FatFS and SD salt code.
2019-10-09 17:07:25 +02:00
Pavol Rusnak
5f980b50a0
core/monero: refactor bulletproof look-up-tables
2019-10-02 15:43:03 +00:00
Pavol Rusnak
dcff4ade01
core: use set_clr_card_detect to disable SD card pull-up resistor
2019-09-25 12:13:53 +02:00
Pavol Rusnak
7394ecfa77
core: add exist_ok parameter to fatfs.mkdir
2019-09-25 12:13:52 +02:00
Pavol Rusnak
78041d261b
crypto: refactor bip39 api
2019-09-23 17:56:36 +02:00
Tomas Susanka
eca0a719db
core: bump version to 2.1.7
2019-09-20 15:00:34 +02:00
Andrew Kozlik
6350b1c61c
core: Implement SD card protection.
2019-09-18 18:55:58 +02:00
Andrew Kozlik
4f01003637
storage: Add external salt parameter to unlock() and change_pin().
2019-09-18 18:53:42 +02:00
Pavol Rusnak
2711ce2a3d
Merge pull request #394 from trezor/andrewkozlik/fido2-squashed
...
Add FIDO2 support
2019-09-13 11:20:48 +02:00
matejcik
cad297ed36
style: fix weirdness in modtrezorio-fatfs.h
2019-09-12 16:49:51 +02:00
Andrew Kozlik
84674a7463
core/usb: Add write_blocking() to trezor.io.HID.
2019-09-11 15:33:16 +02:00
Andrew Kozlik
2142b37f86
core/usb: Ensure that USB interface is not busy before writing.
2019-09-11 15:33:16 +02:00
Ondrej Mikle
59ee3750d1
core/modtrezorio: raise exception when directory listing fails on disk error or other error
2019-09-03 15:14:35 +02:00
Ondrej Mikle
24359ea074
core/modtrezorio: use upstream's fix of read-after-buffer
2019-09-03 15:14:25 +02:00
Ondrej Mikle
972a96f1a0
core/modtrezorio: raise error when no space left on FAT FS
2019-09-03 15:14:25 +02:00
Pavol Rusnak
743f57afdb
core/modtrezorio: use ff_unifdef.sh preprocessor
...
to reduce the number of lines in ff.c and ffunicode.c
2019-09-03 15:14:25 +02:00
Pavol Rusnak
49a98a5015
core/modtrezorio: enable FatFS.mkfs only in emulator
2019-09-03 15:14:25 +02:00
Pavol Rusnak
d40b7c0385
core/modtrezorio: enable LFN+Unicode in FatFS
2019-09-03 15:14:25 +02:00
Pavol Rusnak
aa8d14c0ea
core/modtrezorio: add FatFS support
2019-09-03 15:14:24 +02:00
Pavol Rusnak
324cb651c6
core+legacy: update bootloader ChangeLogs
2019-08-30 16:15:04 +02:00
Tomas Susanka
f5af4e4fe0
core: bump version to 2.1.6
2019-08-27 14:39:06 +02:00
Pavol Rusnak
908bbfffef
core: remove remaning utility code for Bitcoin only firmware
2019-08-27 12:38:28 +02:00
Pavol Rusnak
c815bc410c
core: remove remaning Decred/Zcash code for Bitcoin only firmware
2019-08-27 12:38:28 +02:00
Pavol Rusnak
4036f2243b
core: introduce linker script for BITCOIN_ONLY
2019-08-23 13:52:14 +02:00
Pavol Rusnak
07ef01f3e4
core: introduce BITCOIN_ONLY flag
2019-08-23 13:52:10 +02:00
Tomas Susanka
0f742bc3a7
core: bump to 2.1.5, add changelog for 2.1.4
2019-08-12 13:48:54 +02:00
Andrew Kozlik
8297b81cd5
core/crypto: Add AES mode constants.
2019-08-09 12:46:08 +02:00
Tomas Susanka
0ac0daf148
core: bump to 2.1.4
2019-08-06 22:06:44 +02:00
Andrew Kozlik
0a594ea1e9
Merge pull request #280 from trezor/andrewkozlik/slip-0021
...
Add SLIP-0021 implementation and tests.
2019-08-06 14:26:34 +02:00