Tim Ruffing
52d34955e7
embed/extmod/modtrezorcrypto: add secp256k1_zkp module
...
This includes the https://github.com/ElementsProject/secp256k1-zkp library
(which is a fork from sipa/secp256k1 used in Bitcoin Core) as a module. It
is currently not used in any app.
This commit the first step towards integrating Liquid (tracking issue #282 ).
Note that this creates a new 64 kiB read-only data section in .flash2 for
pre-computed tables (secp256k1_ecmult_static_context) which speed up
signature creation and related private key operations.
Co-authored-by: Roman Zeyde <me@romanzey.de>
Co-authored-by: Andrew Poelstra <apoelstra@wpsoftware.net>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2019-04-15 17:24:55 +02:00
Jan Pochyla
22759ca95f
unix: enable micropython uos extmod
2019-04-10 16:34:31 +02:00
Andrew Kozlik
388fc2ae77
recovery: Verify the return value of config.has_pin() in dry run recovery. Improve UI messages. Remove code duplication in modtrezorconfig.c.
2019-04-04 16:25:02 +02:00
Jan Pochyla
e89699817f
modtrezorui: Display.save skips identical screens ( #530 )
2019-04-02 15:26:34 +02:00
Pavol Rusnak
0b7dbc12cb
format: start using clang-format with style=Google
2019-03-29 16:35:27 +01:00
Pavol Rusnak
2311465fdd
firmware: update embedded bootloader
2019-02-24 17:22:10 +01:00
Andrew Kozlik
456a2c68d6
pin: change show_pin_timeout() to display arbitrary message
...
Don't pre-check old PIN when removing PIN protection.
2019-02-23 17:50:20 +01:00
Pavol Rusnak
3d82cca381
trezorhal: refactor erasing sectors
2019-02-22 17:22:46 +01:00
Pavol Rusnak
62c0e91dd0
firmware: bundle new bootloader 2.0.3
2019-02-21 21:44:11 +01:00
Pavol Rusnak
5d645ef61b
bootloader: refactor mpu settings
2019-02-21 19:39:50 +01:00
Pavol Rusnak
828ba7b5b0
bootloader: enable MPU, introduce delays to USB stack
2019-02-21 16:53:17 +01:00
Pavol Rusnak
3a467e756c
embed/trezorhal: move lowlevel.{c,h} from boardloader to trezorhal
2019-02-19 18:30:45 +01:00
Pavol Rusnak
85a482acf2
firmware/bl_check: remove unused macro
2019-02-19 13:58:36 +01:00
Pavol Rusnak
b24c062a3d
firmware: bundle latest bootloader, replace it when needed
2019-02-19 13:21:34 +01:00
Pavol Rusnak
6233cc0720
firmware: fix last commit - lock randomness block after set
2019-02-18 17:43:01 +01:00
Pavol Rusnak
ee3e313230
firmware: use OTP block 3 for storing randomness
2019-02-18 17:28:40 +01:00
Pavol Rusnak
4f28093d2e
vendor: replace vendor/trezor-qrenc with vendor/QR-Code-generator
2019-02-16 17:36:08 +01:00
Andrew Kozlik
06ef27a718
config: Erase HW_ENTROPY_DATA when no longer needed. This assumes that config.init() is called only once in production. For the emulator tests config.init() can be called repeatedly, since HW_ENTROPY_DATA is null-initialized to begin with.
2019-02-15 12:43:54 +01:00
andrew
52c7f0eb93
config: Use efficient implementation of U2F counter from trezor-storage.
2019-02-15 12:41:55 +01:00
andrew
8b78e6710a
common.c: Add error_shutdown().
...
Upon fatal error display 'Contact TREZOR support'.
2019-02-15 12:41:43 +01:00
andrew
36f354714d
modtrezorconfig: Chenge ui_wait_callback() to return secbool.
2019-02-15 12:39:18 +01:00
andrew
55e030dbae
Add config.lock().
2019-02-15 12:39:18 +01:00
Pavol Rusnak
8832c6e63b
embed/trezorhal: rename flash functions
...
flash_erase_sector -> flash_erase
flash_lock -> flash_lock_write
flash_unlock -> flash_unlock_write
2019-02-15 12:39:18 +01:00
Pavol Rusnak
b754ee8cf6
embed/trezorhal: collect HW entropy before MPU kicks in
2019-02-15 12:39:18 +01:00
Pavol Rusnak
c0317e1aff
embed/trezorhal: add more checks to flash write functions
2019-02-15 12:39:18 +01:00
Pavol Rusnak
434a9c2084
storage: add norcow_config.h, reorganize storage sources in SConscript files
2019-02-15 12:39:17 +01:00
andrew
92faa9f958
Fix parameter count for config.delete().
2019-02-15 12:39:17 +01:00
andrew
1c0946f562
Fix typo in include.
2019-02-15 12:39:16 +01:00
andrew
97a4cdb68e
Use only unique device ID as salt to storage_init(). Update storage submodule.
2019-02-15 12:39:16 +01:00
andrew
fa339bbe06
Add config.delete(key) method.
2019-02-15 12:39:15 +01:00
andrew
5f94b6a6d2
Add CPUID, flash size and unique device ID as salt to storage_init().
2019-02-15 12:39:15 +01:00
andrew
9f75d342a4
Add trezor-storage submodule. Update modtrezorconfig to work with the new storage_get() interface. Update tests to expect None instead of bytes(), when the value is not found in the storage.
2019-02-15 12:39:14 +01:00
Pavol Rusnak
0617fe540f
embed/firmware: next version will be 2.1.0
2019-02-15 02:00:46 +01:00
Pavol Rusnak
4dc8110b31
embed/trezorhal: add touch_sensitivity function
2019-02-12 14:40:38 +01:00
Pavol Rusnak
1f61f82f63
embed: include files from vendor/micropython/ports/stm32 explicitly
2019-01-24 21:25:20 +01:00
Jan Pochyla
cfad075dcf
sdl: allow HIDPI window
...
Prevents rendering issues on some retina setups.
2019-01-24 16:09:46 +01:00
Pavol Rusnak
ba3b958612
embed/extmod/modtrezorio: add missing secbool conversion in sbu
2019-01-24 00:20:08 +01:00
Pavol Rusnak
2de0eac7dc
embed/extmod/modtrezorcrypto: use mnemonic_clear where needed
2019-01-23 18:37:56 +01:00
Pavol Rusnak
806805e296
replace all usage of memset(_, 0, _) with memzero
2019-01-23 17:16:46 +01:00
Jan Pochyla
d2aef38bd8
seed: add progress callback to bip39.from_seed, draw loader
2019-01-14 17:53:40 +01:00
Jan Pochyla
a0df8c74d5
modtrezorcrypto: add explicit __del__ to HDNode
2018-12-13 15:47:05 +01:00
Pavol Rusnak
312c252bc1
embed/extmod/modtrezorcrypto: add missing assignment to zero
2018-12-12 16:52:56 +01:00
Pavol Rusnak
587efeafa7
embed: update changelog, bump versions
2018-12-05 12:26:45 +01:00
Pavol Rusnak
8120ee91f6
boardloader+bootloader: bump versions
2018-12-04 14:20:16 +01:00
Jan Pochyla
faa665a80b
unix: fix SDL issues in MacOS Mojave
2018-11-27 14:49:59 +01:00
matejcik
c3112fd83d
embed/trezorhal: only poll CTPM when touch is detected
...
Because CTPM dislikes being polled when no touches are seen, keeps
resetting, and maybe freezes once in a while. This is very likely a fix
for #334 .
Before, we would simply read the touch registers on every loop. Now we
first check whether the interrupt line is down, which indicates that the
CTPM has data to tell us.
Tracking the `touching` flag is necessary, as sometimes we don't poll
frequently enough to catch the TOUCH_END event before interrupt line
goes up again.
The `last_packet` handling miiight not be necessary - AFAICT, the CTPM
has some sort of buffer and always returns TOUCH_START at first and
TOUCH_END at last. Still, better safe than sorry.
2018-11-26 14:47:06 +01:00
Pavol Rusnak
b3e668db8b
embed/extmod/modtrezorconfig: small refactor to storage
2018-11-14 16:25:36 +01:00
Pavol Rusnak
113a557f17
embed/trezorhal+unix: small refactor to flash.c
2018-11-14 15:12:19 +01:00
Pavol Rusnak
0ff7034e37
embed/extmod/modtrezorconfig: refactor PIN UI wait callback ( #398 )
...
This commit accomplishes several goals:
1) it removes any upy dependencies from storage.c/storage.h
2) ui wait callback is set during config_init and storage_init,
which allows to simplify the code dramatically
2018-11-08 15:55:47 +01:00
Pavol Rusnak
b4894c3431
unix: add raspi target
2018-11-07 00:31:44 +01:00