Jochen Hoenicke
c9113fd3f5
firmware: fix message processing, typos in recovery
2018-06-22 15:26:14 +02:00
Pavol Rusnak
dac7efadb8
firmware: move storage_update for applyFlags
2018-06-22 09:50:21 +02:00
Pavol Rusnak
783f1c0323
storage: refactor default/minimum lock storage, change default values
2018-04-10 23:46:41 +02:00
Pavol Rusnak
399706ae22
storage: implement unfinished_backup flag
2018-04-04 12:42:52 +02:00
Roman Zeyde
987b686f63
storage: allow auto-lock delay configuration
2018-04-04 01:06:26 +02:00
Jochen Hoenicke
ed7a8bfa6c
Fixes for emulator
2018-03-29 01:30:40 +02:00
Jochen Hoenicke
25e824aaa3
Supervisor Calls
...
Add Supervise interrupts to allow to do privileged operations like
flashing from application code.
2018-03-29 01:30:40 +02:00
Jochen Hoenicke
0127c1a374
Add function storage_getPinWait
2018-03-29 01:16:46 +02:00
Jochen Hoenicke
c09590b54d
Cleaner flash handling using FLASH_PTR
...
Use `FLASH_PTR` macro to convert a flash address to a const pointer.
For real hardware it is just a cast, for emulator we subtract the
`FLASH_ORIGIN` and use it as index into the memory mapped flash file.
Make write access to flash with volatile pointers
Also use FLASH_PTR in DebugMemory* for now. This allows for reading and
writing the flash in the emulator or just crash it by reading outside
the flash...
2018-03-29 01:16:46 +02:00
Pavol Rusnak
95dd254094
util: use shutdown from trezor-core instead of system_halt
2018-03-21 12:18:36 +01:00
Pavol Rusnak
5ae04c17c5
firmware: set version to 1.6.1
2018-03-19 15:18:54 +01:00
Roman Zeyde
e444dadbb2
storage: next firmware version would be 1.7.0
2018-03-13 21:49:29 +01:00
Pavol Rusnak
e460c4fe17
session: rework get_state
2018-03-03 22:22:45 +01:00
Pavol Rusnak
7fa8ae136f
firmware: implement behaviour of state (still missing in PassphraseAck)
2018-02-24 17:26:57 +01:00
Pavol Rusnak
bd660655ee
introduce and use memzero instead of explicit_bzero
2018-01-18 15:21:48 +01:00
Pavol Rusnak
4a2d68acb9
use explicit_bzero where possible; update trezor-crypto
2018-01-16 19:49:47 +01:00
Pavol Rusnak
c4e3596803
update trezor-crypto, adapt firmware to to changes
2018-01-13 15:20:10 +01:00
Saleem Rashid
6a2b92c49e
storage: Fix for Clang
2017-12-20 15:04:43 +01:00
Saleem Rashid
045ef22d98
storage: Do not use Nanopb
2017-12-19 14:11:51 +01:00
Saleem Rashid
ba5b44d0c5
emulator: Initial commit
2017-12-18 20:09:59 +01:00
Jochen Hoenicke
ded41c484c
storage: Padding to multiple of 4 bytes
2017-12-15 14:22:17 +01:00
Saleem Rashid
cfc5fda603
storage: Compact old_storage_size logic
2017-12-15 14:22:17 +01:00
Saleem Rashid
a304b76d34
storage: Clean up old_storage_size
...
Note that OLD_STORAGE_SIZE(imported) != 460, because
OLD_STORAGE_SIZE does not include end padding
2017-12-15 14:22:17 +01:00
Jochen Hoenicke
5812f9865d
Fix size of version 9 storage
2017-12-14 19:31:29 +01:00
Pavol Rusnak
106642bd44
fix last commit
2017-12-13 17:56:46 +01:00
Jochen Hoenicke
73edc7cb74
Added U2F root key to storage.
...
Fixes #251 .
2017-12-13 17:54:27 +01:00
Jochen Hoenicke
88563ebaa5
Fix compile problem, fix clearing single byte
2017-12-12 19:36:34 +01:00
Pavol Rusnak
f22c849767
storage: rework storage_commit into storage_update
2017-12-12 16:28:42 +01:00
Pavol Rusnak
70843c9059
storage: introduce storageRam and storageRom
2017-12-12 16:28:42 +01:00
Pavol Rusnak
57bbcc754a
storage: make storage accessible only via functions
...
add calls also for debug build and use them in fsm
2017-12-12 16:28:42 +01:00
Pavol Rusnak
18d8cb3c56
add project website (trezor.io) to license header
2017-11-05 17:47:23 +01:00
Jochen Hoenicke
98e617d874
startup: use custom reset_handler
...
+ group confidential data in one place
+ zero all SRAM where needed
2017-08-16 13:52:01 +02:00
Pavol Rusnak
a01ba51a2a
storage: copy only required bytes from old storage, bump storage version
...
+ backup_device: ask for pin, always use correct number of words
2017-08-16 13:11:31 +02:00
Pavol Rusnak
f0d2e7a371
storage: bump version
2017-07-31 22:43:28 +02:00
Pavol Rusnak
c778d7b9c3
storage: wipe storage after 15 wrong pins
2017-07-31 02:26:28 +02:00
Pavol Rusnak
3d7d0f0734
use C99 for loop where possible
2017-07-23 22:20:51 +02:00
Pavol Rusnak
cf04279774
implement Storage.flags and related stuff
2017-07-17 18:36:09 +02:00
Pavol Rusnak
ccb0cd82b6
firmware: add changelog, bump version to 1.5.1
2017-07-12 14:19:05 +02:00
Pavol Rusnak
97fa33de46
reset: show needs backup signed when storage is not backed up
2017-06-29 14:14:20 +02:00
Pavol Rusnak
73708aa47e
refactor recovery.is_same_mnemonic function to storage_containsMnemonic
2017-06-26 15:44:01 +02:00
Pavol Rusnak
c6fd70b471
gettext: mark localizable strings as proof-of-concept
2017-06-18 22:47:32 +02:00
Saleem Rashid
25b9bfd97b
timer: Use Cortex-M3 SysTick timers
...
Removed `usbDelay(uint32_t cycles)`, added `usbSleep(uint32_t millis)`
The same method signature could cause silent code breakage at runtime,
as opposed to noisy code breakage at compile time which is the better
kind.
2016-11-17 02:07:46 +01:00
Jochen Hoenicke
9287dd7e04
Poll USB during BIP39 derivation.
...
This patch adds calls to usbPoll in the progress callback. This
should address #98 .
We call usbDelay instead of Poll, to call usbd_poll several times.
Otherwise it would only handle one event instead of handling all
events that were pending so far. The ugly magic number 5 is a guess.
Note that we also need to set usbTiny, so that we don't recursively
process messages. Since we don't know whether usbTiny is set, we
need to store the old value (especially true for u2f).
This fix also relies on another fix in libopencm3.
2016-11-09 16:17:50 +01:00
Pavol Rusnak
4ce4cc5605
halt the device when encountered an invalid mnemonic (skip if device loaded or recovered without enforced wordlist)
2016-11-09 16:06:50 +01:00
Pavol Rusnak
71890e4edf
implement u2f_counter in LoadDevice, Recoverydevice and ResetDevice messages
2016-10-31 16:20:15 +01:00
Jochen Hoenicke
6d65551b82
More alignment fixes
2016-08-30 12:39:37 +02:00
Jochen Hoenicke
ae4dff6e5f
Only compute pubkey on demand.
...
Changed all hdnode callers to call hdnode_fill_public_key if
they need the public key.
2016-06-27 10:13:18 +02:00
Jochen Hoenicke
120cfc148f
new message SetU2FCounter
2016-06-12 23:44:36 +02:00
Pavol Rusnak
b1e3c52b08
remove DialogIcon enum, use bitmap structure directly
2016-06-08 19:20:07 +02:00
Jochen Hoenicke
c4e8bd0d0e
More robust storage recycle sector
...
Clear storage marker first before clearing the second sector to prevent
leaving a state where only PIN failures have been cleared but storage is
still present.
2016-05-27 14:03:20 +02:00