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
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
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
b754ee8cf6
embed/trezorhal: collect HW entropy before MPU kicks in
2019-02-15 12:39:18 +01:00
andrew
92faa9f958
Fix parameter count for config.delete().
2019-02-15 12:39:17 +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
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
Jan Pochyla
7630201a57
debug: do not rely on mp_optimise_value
...
Reflects micropython commit 3f420c0c27bd6daa5af39517925be55b9b9a9ab3
Replaces usage of mp_optimise_value with calls from python code.
2018-06-19 18:26:43 +02:00
Jan Pochyla
bf7729ab9f
embed/extmod: use trezor_obj_get_uint{8} where it makes sense
2018-05-24 17:59:03 +02:00
Pavol Rusnak
20f1644ef9
src/apps/management: fix change_pin behaviour
2018-02-26 23:02:44 +01:00
Pavol Rusnak
14b0d4439a
embed: add GPLv3 source code headers
2018-02-26 14:07:37 +01:00
Pavol Rusnak
94fc0f7ac0
extmod: if debug build is used, disable LoadDevice, wipe storage on start, draw red square in corner
2018-02-01 15:46:32 +01:00
Pavol Rusnak
27d9abe883
trezor.config: add public values (readable without unlock)
...
They are indicated via MSB bit of appid
2018-01-13 16:09:22 +01:00
Pavol Rusnak
4a7592d470
trezor.crypto: remove vstr usage, refactor mp_obj_new_str_from_vstr into mp_obj_new_bytes and mp_obj_new_str
2018-01-03 21:53:58 +01:00
Jochen Hoenicke
c0cd252c83
Store pin as integer
...
- New module trezor.pin (add timeout here)
- Convert pin to integer by adding a '1' (to detect leading 0s)
- pin is still limited to 9 digits.
2017-12-15 20:37:03 +01:00
Pavol Rusnak
e8f70ed4af
pin: implement graphics pin timeout
2017-12-14 19:01:41 +01:00
Jochen Hoenicke
87f7054e46
Added callback for PIN timeout
...
When PIN is entered or changed and their were failed tries the function
waits for time (exponential slow down). For every second it waits, it
now calls back into python to give it the chance to show a message.
GUI still needs to be implemented
2017-12-14 17:19:51 +01:00
Pavol Rusnak
b7444ac13e
modtrezorconfig: fix wipe error
2017-12-14 16:27:18 +01:00
Pavol Rusnak
6ab0f03ec4
embed: norcow_init, storage_init and flash_init don't return secbool, they halt using ensure if something goes wrong
2017-12-09 14:48:49 +01:00
Jan Pochyla
5e643e9195
modtrezorconfig: fix has_pin
2017-11-06 17:26:25 +01:00
Pavol Rusnak
30363305f4
modtrezorconfig: use secbool, not bool
2017-11-05 23:32:32 +01:00
Jan Pochyla
418f035811
storage: add has_pin and change_pin
...
TODO: finish change_pin
2017-11-05 20:46:59 +01:00
Jan Pochyla
f07b4dda0b
modtrezorconfig: extract pin & unlocking to storage.c
2017-11-05 20:46:11 +01:00
Jan Pochyla
fdc2f6a39d
modtrezorconfig: use new flash API
2017-11-05 20:46:11 +01:00
Jan Pochyla
4cabe40220
storage: pin checking in c proof of concept
...
TODO: move out of modtrezorconfig
TODO: flash unix mock
2017-11-05 20:46:11 +01:00
Jan Pochyla
55bd4a0806
rename /micropython to /embed
2017-07-28 16:23:45 +02:00