1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00
Commit Graph

186 Commits

Author SHA1 Message Date
Pavol Rusnak
6052e71bbb fix(core): fix build with FEATURE_FLAGS.SECP256K1_ZKP=False
[no changelog]
2022-03-18 12:03:41 +01:00
matejcik
390411098a build(core): enable ui_debug for non-frozen emulator 2022-02-18 11:27:23 +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
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
Martin Milata
e3541997f0 ci(core): run nightly device tests with AddressSanitizer
[no changelog]
2022-01-19 15:22:03 +01:00
Martin Milata
e9fd1fc49f build(core/emulator): build with -fPIE
Otherwise "cargo test" fails with errors like:

   Compiling trezor_lib v0.1.0 (embed/rust)
error: linking with `cc` failed: exit status: 1
  |
  = note: ld: build/unix/rust/debug/build/trezor_lib-a046f8e3db087595/out/libcore_lib.a(obj.o): relocation R_X86_64_32S against `.rodata.types.1' can not be used when making a PIE object; recompile with -fPIE
2021-12-06 16:25:59 +01:00
Martin Milata
4d60c10330 feat(core/rust): add support for T1 UI
[no changelog]
2021-11-24 15:36:34 +01:00
Ondřej Vejpustek
3612620268 build(crypto,core): make secp256k1-zkp context as small as possible 2021-11-18 19:05:40 +01:00
Andrew Kozlik
aaceb5bcc6 chore(core): Remove USE_SECP256K1_ZKP_BIP340 build option. 2021-11-13 13:33:46 +01:00
Andrew Kozlik
ae41f7dec8 fix(core): Fix bip340 module build. 2021-11-13 13:33:46 +01:00
matejcik
387466e073 refactor(core): separate Cardano cryptography into its own module 2021-11-10 13:57:57 +01:00
matejcik
1d72085b5c feat(core): implement conversion from timestamp to datetime 2021-10-29 11:00:30 +02:00
Ondřej Vejpustek
dbfc7d241f chore(vendor,crypto): bump version of secp256k1-zkp 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
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
d505edaaa0 fix(core): set ECMULT_GEN_PREC_BITS = 4 for secp256k1_zkp
the setting configures size of precomputed static context

size = 64 * (1 << ECMULT_GEN_PREC_BITS) * (256 / ECMULT_GEN_PREC_BITS)

for ECMULT_GEN_PREC_BITS == 2 the size is 64 * 512 == 32 KB
for ECMULT_GEN_PREC_BITS == 4 the size is 64 * 1024 == 64 KB
for ECMULT_GEN_PREC_BITS == 8 the size is 64 * 8192 == 512 KB
2021-10-25 14:41:28 +02:00
Pavol Rusnak
0d6bc43fd5 feat(core): enable secp256k1-zkp 2021-10-25 14:41:28 +02:00
Pavol Rusnak
47e17aab4d fix(core): fix build on aarch64
by adding nlraarch64.c to SConscript.unix
2021-10-22 14:15:21 +02:00
Jan Pochyla
2703d714c2 feat(core): add Rust UI components, layouts, text rendering
[no changelog]
2021-10-07 15:01:55 +02:00
Ondrej Mikle
b905ac04ef fix(core/emulator): Use -Og instead of -O0 in debug emulator builds to avoid segfault
[no changelog]
2021-10-05 14:10:47 +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
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
f37ca13f1a refactor(core): disable SD, SBU, fatfs for T1 build 2021-08-20 12:22:13 +02:00
matejcik
d33d61d84e chore(core): remove Lisk 2021-08-19 10:25:41 +02:00
Martin Milata
2a91052b02 refactor(core/ui): move altcoin and webauthn layouts to separate file
Also fix types.
2021-08-04 15:03:11 +02:00
Martin Milata
312876ab67 refactor(core): convert apps.management.reset_device to layouts 2021-08-04 15:03:11 +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
matejcik
c06a93cba5 feat(core/rust): propagate bitcoin_only flag to Rust build 2021-06-08 09:55:19 +02:00
Martin Milata
72557614c4 build(core): update build process for new protobuf
- properly exclude in the trezor/enums folder
- generate Rust protobuf blobs in scons

Split from "tools: Generate special Protobuf blobs for the Rust codec"
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
Ondřej Vejpustek
8ee17f69b3 refactor(core): move wait_random and rdi into separate file 2021-05-21 13:42:53 +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
Pavol Rusnak
4649b80b44
feat(core): allow secp256k1-zkp for bitcoin-only build
(but keep it disabled)
2021-03-18 15:42:52 +01:00
Martin Milata
f38abf9d89 refactor(core): introduce layouts
Layouts can be used by the application code to interact with user using
small number of dialogs or other groups of UI components. Each layout is
identified by name and takes some parameters. Most layouts will have an
implementation for each hardware model, mechanism is provided to import
the correct version so that application code can be oblivious to the
model.

This commit introduces the layout concept and converts a couple of
dialogs to use it.
2021-02-10 13:57:19 +01:00
Martin Milata
f1382bf892 refactor(core): model-dependent UI component directories
They now live under trezor.ui.components.tt. Later
trezor.ui.components.t1 will be added and application code will be
rewritten to not use them directly in order to work on both TT and T1.
2021-02-10 13:57:19 +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
Martin Milata
c89a8b7bd5 ci(core): add memory profiler job 2020-11-02 14:14:00 +01:00
Pavol Rusnak
ded61a4ccf
chore(vendor): update micropython to v1.13 2020-10-16 14:19:35 +02:00
Martin Milata
c7934116ec
core: introduce TREZOR_MODEL flag (#1233) 2020-08-28 14:50:38 +02:00
Pavol Rusnak
efc5ccdaf0
core: remove src1 2020-08-03 15:59:57 +02:00
Pavol Rusnak
063aba910d core: rename emulator to trezor-emu-core 2020-07-30 15:27:34 +02:00
Pavol Rusnak
9a673db647
core: fix build on T1
file src/apps/base.py was added unconditionally breaking the T1 build
2020-07-28 12:12:53 +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
179645e3ad core: unify usage of TREZOR_MODEL 2020-06-06 21:06:15 +02:00
matejcik
2cedc687e6 core: disable trezor-crypto BIP32 cache 2020-06-04 16:18:46 +02:00
matejcik
d5e45c02bb core: move base functions from "homescreen" app to "base" 2020-06-04 16:18:46 +02:00
Tomas Susanka
445f56d387 core/bitcoin: finalize bitcoin refactor
- core/bitcoin: move common files to the app's root
- core/bitcoin: use require_confirm instead of confirm
- core: move bitcoin unrelated functions from 'bitcoin' to a new 'misc' app
- core/bitcoin: use relative imports inside the app
- core: rename wallet app to bitcoin
- core/wallet: replace SigningErrors and the other exception classes with wire.Errors
2020-05-18 14:31:51 +02:00
Ondřej Vejpustek
d5bfe6b32f crypto: add chacha_drbg 2020-04-16 11:51:28 +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
Pavol Rusnak
500156b9ba
core/embed: don't use local copy of inflate 2020-01-18 17:09:52 +01:00
Milan Rossa
33b7e378c2
core/ci: add coverage target, introduce posttest stage 2020-01-09 15:26:40 +01:00
Milan Rossa
42f1af3aa4
core: add build target for debug unix build 2020-01-09 13:44:46 +01:00
Jan Pochyla
5aca68e50c core: generate moduledefs.h for micropython 2020-01-07 20:52:42 +01:00
matejcik
c9fca25531 core: add storage module to frozen build 2019-11-11 15:52:46 +01:00
Pavol Rusnak
76eefd026f
all: let's use -Wno-missing-braces because clang does not respect
initialization of structs with = {0};
2019-10-11 09:59:32 +02:00
Pavol Rusnak
9d5bac50fd
core: alphabetically order files in SConscript files 2019-09-03 18:15:47 +02:00
Pavol Rusnak
854045c019
build: fix file order in SConscript.unix 2019-09-03 16:24:33 +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
dbef93a30d
core: enable firmware build without SDL2 installed
SConstruct includes SConscript.unix even for the firmware builds,
which resuls in error if SDL2 is not installed.
This commit workarounds the issue.

Is there a better way how to NOT include SConscript.unix via
SConstruct for firmware only builds?
2019-08-29 12:35:16 +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
07ef01f3e4
core: introduce BITCOIN_ONLY flag 2019-08-23 13:52:10 +02:00
Pavol Rusnak
132c841752
core: preparations for bitcoin-only firmware 2019-08-21 18:53:08 +02:00
Pavol Rusnak
76719bab65
core: split handling of messages in the build script 2019-08-21 18:45:07 +02:00
Pavol Rusnak
632a29ea8c
core: fix typo 2019-08-21 18:09:56 +02:00
Pavol Rusnak
2c646a61b7
core: refactor FROZEN variable in SConscript.unix 2019-08-21 17:50:09 +02:00
Pavol Rusnak
b8726e74c8
core: add possibility to pass PYOPT to emulator frozen build 2019-08-21 17:46:30 +02:00
Pavol Rusnak
f51f9d9be1
core: one more change to previous commit 2019-08-21 11:33:04 +02:00
Pavol Rusnak
f8ebd4fa0b
core: fix last commit 2019-08-21 11:28:28 +02:00
Pavol Rusnak
c4e745a0d6
core: update build scripts to list python source more explicitly 2019-08-21 11:24:16 +02:00
Tomas Susanka
49d6a35249 core: add slip39 keyboard 2019-06-23 21:33:58 +02:00
Andrew Kozlik
1d9e125fd4 crypto/rfc6979: Use the new HMAC DRBG implementation in rfc6979.c. Remove code duplication between rfc6979.c and ecdsa.c. 2019-06-11 11:41:40 +02:00
Pavol Rusnak
daf0d77923
core: remove raspi makefile target
Raspi build is still available when ENV variable is set,
but no need to bloat the Makefile/SConscript file
2019-05-26 21:57:47 +02:00
Pavol Rusnak
f7d41cbbd7
core+legacy: drop NOUI and HEADLESS, SDL_VIDEODRIVER works fine 2019-05-16 17:06:14 +02:00
matejcik
2e578572dd add EOS support
Squashed commit of the following:

commit 060563458fbc3b4a17f4d77ba5cd62d0c265c806
Author: matejcik <ja@matejcik.cz>
Date:   Fri May 10 16:16:19 2019 +0200

    skip t1 in eos test

commit f759089fef29501467b62bf1540715132a72c4cf
Author: matejcik <ja@matejcik.cz>
Date:   Fri May 10 15:55:20 2019 +0200

    make style

commit 3ecdd5f77b331d7a6e5a46a10c79d80f214f31bd
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Thu May 9 22:05:41 2019 +0300

    Refinements in asset to to string conversion function according to code review and test cases for amounts less than 1

commit 72e44a35bada76abdd94ab866c2113a6d9d85191
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Wed May 8 00:27:45 2019 +0300

    Moved to input_flow rest of the tests, cleanup and styling

commit 92f9acbabcbef44a6912b074a309393450f0c8de
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Tue May 7 21:47:12 2019 +0300

    Fix for amounts less then 1

commit 8a0154f7432ab78e69a123202a97194d34c2a3cb
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Mon May 6 23:26:24 2019 +0300

    removed unnecessary peace of code

commit b25c15de3eb1df863760e81ca69f09094349c26e
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Mon May 6 23:16:57 2019 +0300

    Fixed validate path parameters

commit f0f6e7036a8b88d9c5c6b702a8d851e9a9bd3378
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Mon May 6 23:04:58 2019 +0300

    Fixes

commit 0c64d3814300df86d452975b2bd46fea13f512d2
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Mon May 6 22:19:51 2019 +0300

    Fixed styling

commit 41d1e77231e7da78fade9b2efa1b7d1980f0d3a8
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Mon May 6 22:13:58 2019 +0300

    Changes to core, added CURVE to path validation

commit c045b4554ee8e058dbfe35f715b003d0d85ab1d4
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Mon May 6 22:07:37 2019 +0300

    Changes according to review

commit 3f0e6cfd40e7d87dc3287bc3a0b2b9db5dea5377
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Mon Apr 29 21:37:16 2019 +0300

    Added change to make expiration date timezone agnostic

commit efdf44c326cc3f3137c447e798db5439b57c91fa
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Thu Apr 18 00:14:30 2019 +0300

    changes according to code review

commit 3b3723da8f8f536c7c370a14236ea81aac25080a
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Tue Apr 16 23:44:50 2019 +0300

    Merged python to monorepo

commit da6b0c683c29388e15c889ecea6e7f7471961a19
Author: Andriy Tkachyshyn <atkachyshyn@gmail.com>
Date:   Tue Apr 16 23:13:42 2019 +0300

    Merged core to monorepo
2019-05-10 16:23:18 +02:00
Andrew Kozlik
28c85dee8e
Merge pull request #85 from trezor/andrewkozlik/slip0039
Implement SLIP-0039 primitives in MicroPython and C.
2019-05-06 13:34:27 +02:00
Pavol Rusnak
87f14965c4
core: finish frozen modules support 2019-05-04 22:15:20 +02:00
Andrew Kozlik
0a99ad3f13 Merge remote-tracking branch 'origin/master' into andrewkozlik/slip0039 2019-05-02 15:08:43 +02:00
Pavol Rusnak
6e6ff78ce0
core: re-enable frozen modules in the emulator build 2019-05-01 13:41:23 +02:00
Andrew Kozlik
0d21bca288 crypto: Move Shamir secret sharing to trezor-crypto. 2019-04-17 11:26:16 +02:00
Andrew Kozlik
d2a399debf Merge remote-tracking branch 'core-local/andrewkozlik/slip0039' into andrewkozlik/slip0039 2019-04-17 10:53:00 +02:00
matejcik
e5670856a2 MONOREPO CREATE FROM trezor-core 2019-04-15 19:14:40 +02:00