Commit Graph

503 Commits (6d98a97f7cbc177b9c2e811142549874b782e0f9)

Author SHA1 Message Date
Pavol Rusnak 08c145c4da
trezorhal: fix winusb
7 years ago
Pavol Rusnak 5e4b632f14
bootloader: firmware: use "Go to" instead of "Open", because that's what Chrome uses :-/
7 years ago
Pavol Rusnak ba8224f598
trezorhal: remove configuration from usb string table
7 years ago
Pavol Rusnak 55d0416641
trezorhal: make usb stack more robust
7 years ago
Pavol Rusnak d6681efff2
trezorhal: update usb maxpower
7 years ago
Pavol Rusnak efd926208d
bootloader: refactor version formatting into format_ver
7 years ago
Pavol Rusnak c0220192d4
tools: fix binctl script
7 years ago
Pavol Rusnak 0d7f486733
bootloader: show different dialogs for firmware upgrade and vendor change
7 years ago
Pavol Rusnak 6e81a68fbe
bootloader: refactor flash erase after first chunk is received
7 years ago
Pavol Rusnak 739e4f2e45
fix release_num values
7 years ago
Pavol Rusnak b785fcce44
bootloader: revert ui color change
7 years ago
Pavol Rusnak a9f5ed9119
trezorhal: remove unnecessary casting for vstr, small ui nitpicks
7 years ago
Pavol Rusnak 1280073c04
trezorhal: remove unnecessary casting for usb strings
7 years ago
Pavol Rusnak d39ceb0d99
bootloader: fix ui_screen_done flicker
7 years ago
Pavol Rusnak d27111472e
bootloader: show fingerprint on info click
7 years ago
Pavol Rusnak 8fc65d7f32
bootloader: small UI nitpicks
7 years ago
Pavol Rusnak 117a3efbe2
bootloader: refactor fadeins/fadeouts
7 years ago
Pavol Rusnak 5538614a79
bootloader: rework onboarding
7 years ago
Pavol Rusnak 2e00c090b6
bootloader: add confirm dialogs for wipe/upgrade
7 years ago
Pavol Rusnak ae94bc95fb
bootloader: add "connect to host" screen
7 years ago
Pavol Rusnak 8ef2098763
trezorhal: unix: refactor touch get/pack functionality
7 years ago
Pavol Rusnak 2f567ee822
bootloader: rework UI
7 years ago
Pavol Rusnak f6f6e8593a
bootloader: don't crash on empty usb queue
7 years ago
Pavol Rusnak 9fcb59c3ca
trezorhal: reply with winusb guid just for interface 0
7 years ago
Pavol Rusnak ca0918dbce
trezorhal: rework winusb
7 years ago
Pavol Rusnak 00c193f5cc
trezorhal, unix: drop flash_write_{byte,word} usage, rename flash_write_{byte,word}_rel to flash_write_{byte,word}
7 years ago
Pavol Rusnak 1e7920435c
bootloader: fix flashing of non-continous firmware areas
7 years ago
Pavol Rusnak 089168209b
trezorhal: fix webusb landing page
7 years ago
Pavol Rusnak 919e2b9c3b
trezorhal: formatting nits in usb
7 years ago
Pavol Rusnak 9f80d5614a
trezorhal: add winusb magic to webusb interface
7 years ago
Pavol Rusnak f50afd2d2a
bootloader: add (optional) WebUSB support
7 years ago
Pavol Rusnak 5ef0967857
trezorhal: small fixes to USB stack
7 years ago
Pavol Rusnak aa8c192040
trezor.io: remove unused fields from WebUSB class
7 years ago
Pavol Rusnak 8bf19b4c92
trezorhal: refactor trezor.io USB stuff into more files, add WebUSB
7 years ago
Pavol Rusnak d927b80b50
trezorhal: more tests in usb
7 years ago
Pavol Rusnak 51db0c4099
fix typo
7 years ago
Pavol Rusnak 311af09236
trezor.io: fix typo in VCP class
7 years ago
Pavol Rusnak 9d10a7a508
trezorhal: more switch formatting
7 years ago
Pavol Rusnak 30ff61b588
trezorhal: add configuration, interface strings to usb descriptors, minor typos
7 years ago
Pavol Rusnak 08376a4a54
fix typo
7 years ago
Pavol Rusnak e92440dfc8
introduce and use memzero instead of explicit_bzero
7 years ago
Pavol Rusnak 3098dc8447
unix: don't use usb_hid_write from usb_hid_read for PING/PONG
7 years ago
Pavol Rusnak fea8d53b85
trezor.io: cleanup usb code
7 years ago
Pavol Rusnak ea116d742a
use explicit_bzero where possible; update trezor-crypto
7 years ago
Jan Pochyla 2c3df7381f unix/usb: fix wur
7 years ago
Jan Pochyla 20c4900df1 modtrezorcrypto/bip39: throw less exceptions
7 years ago
Pavol Rusnak 27d9abe883
trezor.config: add public values (readable without unlock)
7 years ago
Pavol Rusnak 1530afe4ad
vendor: update trezor-crypto, adapt codebase to changes
7 years ago
Pavol Rusnak d11bbde2e1
trezor.crypto: fix sha3-{256,512} argument handling
7 years ago
Pavol Rusnak 7efef68e97
trezor.crypto: add static keyword to crc
7 years ago
Pavol Rusnak ee925f7813
prodtest: draw border on start too
7 years ago
Jan Pochyla 622cb847e5 prodtest: fix touch coordinates
7 years ago
Pavol Rusnak 7537c26c83
trezor.crypto: use mp_obj_new_str_from_vstr where we already have preallocated vstr
7 years ago
Pavol Rusnak 981ec87877
trezor.crypto: put back vstr where it makes sense (= user controlled input)
7 years ago
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
7 years ago
Pavol Rusnak b98a1db6ee
embed: cleanup unused modules
7 years ago
Pavol Rusnak fa95f0a037
trezor.crypto: implement chacha20poly1305 aka rfc7539
7 years ago
Pavol Rusnak b9d5af8c19
modtrezorcrypto: remove ssss (different implementation will be re-added later)
7 years ago
Pavol Rusnak 4cc8a5432d
bootloader: use normal/regular font rather than bold
7 years ago
Pavol Rusnak 94588dd588
modtrezorui: introduce TREZOR_FONT_PREFILL, set it to 0 in bootloader
7 years ago
Pavol Rusnak 424115967f
embed: fix wur for usb functions
7 years ago
Pavol Rusnak f1a75b36f7
vendor: update micropython to 1.9.3 release
7 years ago
Pavol Rusnak d6593e710b
apps.ethereum: implement SignMessage/VerifyMessage
7 years ago
Pavol Rusnak 333c0a633a
trezor.crypto: adopt crc32 function
7 years ago
Pavol Rusnak eff3ce2aa8
unix: use ensure, not (void)
7 years ago
Jan Pochyla 7be96048f8 unix: fix wur in usb
7 years ago
Pavol Rusnak 4b54bfbbf2
modtrezorui: change loader size to 120x120
7 years ago
Pavol Rusnak 63e999ab84
trezor.ui: introduced minwidth to display.text functions; more optimizations
7 years ago
Pavol Rusnak 47f5cba439
flash/sdcard: introduce wur, simplify code
7 years ago
Pavol Rusnak 5e93cca0a9
WIP
7 years ago
Jochen Hoenicke beef9ecfb5 Moved flash_unlock to norcow_update
7 years ago
Pavol Rusnak 6aae87437f
modtrezorui: draw bars under letters
7 years ago
Pavol Rusnak 11a3ff055c
boardloader/bootloader: typo
7 years ago
Pavol Rusnak 4584861385
trezor.ui: introduce ui.SIZE
7 years ago
Pavol Rusnak 79a3f84c3c
modtrezorui: invert FONT macro inclusion logic
7 years ago
Pavol Rusnak 80707f195b
modtrezorui: small cleanup
7 years ago
Pavol Rusnak 7504366a02
bootloader: simplify vtrust code
7 years ago
Jochen Hoenicke c0cd252c83 Store pin as integer
7 years ago
Pavol Rusnak 125ab8471c
trezorhal: store image fingerprint in the image_header structure
7 years ago
Pavol Rusnak be302480fd
modtrezorcrypto: cleanup random
7 years ago
Pavol Rusnak 1a32e46e5d
bootloader: cleanup ui code
7 years ago
Pavol Rusnak 5e476b856e
unix: implement sdcard, add unit test
7 years ago
Pavol Rusnak 48ef409fdb
modtrezorio: remove mocks
7 years ago
Pavol Rusnak b4933f969e
bootloader: don't downgrade firmware below fix_version in the current firmware
7 years ago
Pavol Rusnak 965aa73b63
trezorhal: introduce fix_version in image header (version of last critical bugfix)
7 years ago
Pavol Rusnak e8f70ed4af
pin: implement graphics pin timeout
7 years ago
Jochen Hoenicke 87f7054e46 Added callback for PIN timeout
7 years ago
Jochen Hoenicke 9f2bbb0e1a Removed references to pin fail area
7 years ago
Jochen Hoenicke 497021f2ef storage: New pin fail section inside NORCOW
7 years ago
Pavol Rusnak b7444ac13e
modtrezorconfig: fix wipe error
7 years ago
Pavol Rusnak 2f719526e7
bootloader: implement vendor keys lock
7 years ago
Pavol Rusnak 45c290d24c
trezorhal: introduce vendor_keys_hash, use it in compare_to_current_vendor_header
7 years ago
Pavol Rusnak 70ac202d7a
modtrezorcrypto: add trezor.crypto.hashlib.blake256
7 years ago
Pavol Rusnak 34322d5fb6
firmware: enable stack protector (except nlr stuff)
7 years ago
Pavol Rusnak 1aba175d7d
build: adapt to new trezor-crypto changes
7 years ago
Pavol Rusnak 7b9fcf98ae
drop embed/extmod/modtrezorcrypto/trezor-crypto symlink
7 years ago
Jochen Hoenicke 816bfe387f Bug fix: missing parenthesis in flash_write_word
7 years ago
Pavol Rusnak 20a1326ebb
storage: fix typo
7 years ago
Pavol Rusnak ce3eaba925
trezorhal: use static inline instead of static (gcc 7.2 workaround)
7 years ago
Pavol Rusnak 8a8450d6be
fix build for older compilers
7 years ago
Pavol Rusnak e268aeb8b7
flash: simplify/unify flash_erase_sectors usage
7 years ago
Pavol Rusnak 6ab0f03ec4
embed: norcow_init, storage_init and flash_init don't return secbool, they halt using ensure if something goes wrong
7 years ago
Pavol Rusnak 6b94fd26e4
boardloader: rename reset_flags_init to reset_flags_check
7 years ago
Jan Pochyla 314e6a99c1 modtrezorcrypto/bip32: add HDNode.__init__
7 years ago
Pavol Rusnak 626a8885ce
trezor.config: add compaction test
7 years ago
Pavol Rusnak b39b4a4947
norcow: fix bug
7 years ago
Pavol Rusnak 7f5192701f
unix: use mmap to access flash file
7 years ago
Pavol Rusnak 44a11fa3ef
norcow: introduce NORCOW_MAGIC
7 years ago
Pavol Rusnak 38e3088325
common: don't expose shutdown() via common.h
7 years ago
Pavol Rusnak f88080b904
Merge branch 'pin_fails'
7 years ago
Pavol Rusnak 40104822e8
unix: make SDL failures fatal
7 years ago
Pavol Rusnak 04d980f8f0
add Features.model field (set to "T")
7 years ago
Jan Pochyla 8b85078730
reflash: add new firmware target
7 years ago
Jan Pochyla 09af312789 prodtest: add BORDER command
7 years ago
Pavol Rusnak 679d024df0
display: use CMD2EN: Command 2 Enable
7 years ago
mcudev 6179edde90 touch: reset and usage updates
7 years ago
mcudev 5556c37f6f display: hardware reset updates
7 years ago
mcudev 61ff3b46c5 display: ST7789V porch settings are for RGB interface, not parallel 8080-I
7 years ago
mcudev 30829b281c display: ST7789V remove commands that unnecessarily set default values again
7 years ago
mcudev e62fa345c8 display: minor ILI9341 updates
7 years ago
mcudev a0129e7715 display: orientation, windowing, and config updates
7 years ago
mcudev f53ec3f928 display: update display_unsleep
7 years ago
mcudev 5e867cc092 display: update display_sleep
7 years ago
mcudev 2ea5d102a8 bootloader, firmware: remove unneeded call to display_orientation
7 years ago
Pavol Rusnak 4002ef2a49
firmware, unix: return cpython compatibility (needed for __class__ and __dict__)
7 years ago
Pavol Rusnak ec6c3c2cdc
unix, firmware: more cleanup
7 years ago
Pavol Rusnak d4893add54
firmware, unix: turn off some modules
7 years ago
Jan Pochyla 5bd39c70b0 storage: fix change_pin and small details
7 years ago
Jan Pochyla cf14717d43 unix: add shutdown()
7 years ago
Pavol Rusnak 879a3e85bd
trezorhal: reorder stuff in common.{c,h}; remove unnecessary externs for functions
7 years ago
Pavol Rusnak d9574bf131
trezorhal: enable BOR level 3, PVD level 5, turn off display in PVD handler
7 years ago
Pavol Rusnak e4360a7296
bootloader: change upgrade criteria to vendor keyset comparison
7 years ago
Jan Pochyla 237740de9c storage: implement change_pin
7 years ago
Jan Pochyla 5e643e9195 modtrezorconfig: fix has_pin
7 years ago
Jan Pochyla df77e74988 storage: fix unlock
7 years ago
Pavol Rusnak 3636a5f1b1
bootloader/vendorheader: vtrust is bitmap not scalar
7 years ago
Pavol Rusnak 5444410e04
unix: use return value from fread properly
7 years ago
mcudev 430900ea2c boardloader: ensure check_sdcard fails when read fails
7 years ago
Pavol Rusnak 2e3b8336c2
unix: fix unused-result warning
7 years ago
Pavol Rusnak ee7d260d2f
trezorhal: use const where possible for flash
7 years ago
Pavol Rusnak 30363305f4
modtrezorconfig: use secbool, not bool
7 years ago
Jan Pochyla 1f6cc70480 flash: remove flash_set_option_bytes
7 years ago
Jan Pochyla 0376ff7f48 storage, norcow: use secbool
7 years ago
Jan Pochyla 662cfc1b2c unix/flash: use secbool
7 years ago
Jan Pochyla 418f035811 storage: add has_pin and change_pin
7 years ago
Jan Pochyla c2ec40bebf flash: flash_init returns bool
7 years ago
Jan Pochyla 353883e0f3 storage: rename constant
7 years ago
Jan Pochyla b6ba95625c norcow: port on top of flash.c, remove config
7 years ago
Jan Pochyla 27bfcfe1af norcow: import into tree
7 years ago
Jan Pochyla d4443a4f7f unix/flash: start with 0xff
7 years ago
Jan Pochyla 12708b4987 unix/flash: default FLASH_FILE
7 years ago
Jan Pochyla c78babdc12 flash: add flash_get_address
7 years ago
Jan Pochyla f07b4dda0b modtrezorconfig: extract pin & unlocking to storage.c
7 years ago
Jan Pochyla fdc2f6a39d modtrezorconfig: use new flash API
7 years ago
Jan Pochyla 543e8c5007 flash: add unix/flash.c
7 years ago
Jan Pochyla 4cabe40220 storage: pin checking in c proof of concept
7 years ago
mcudev 2ebd2b1b6b jump_to: clear out before the next stage NMI exception handler can run
7 years ago
mcudev ffc16a98b5 rng: header cleanup, loop codestyle
7 years ago
mcudev cc9aa8c197 cleanup: do not use reserved identifiers for header guards
7 years ago
Pavol Rusnak 77cc62644d
firmware: don't return CYCCNT contents as it is always zero anyway (cycle counter is disabled)
7 years ago
Pavol Rusnak 8190e0909e
boardloader: set BOR level to 2
7 years ago
mcudev 1737f17f43
boardloader: flash option bytes, production changes
7 years ago
mcudev 15bdc59b46 touch: reset touch panel
7 years ago
mcudev d9a64fbb6a touch: app note related updates and exit loop upon detection
7 years ago
mcudev 2ae1c99b06 touch: address simplification
7 years ago
mcudev 6aeccd5ee1 touch: make i2c_handle static and trivial simplification
7 years ago
mcudev d1ed02fb98 touch: use full 12-bit X and Y values
7 years ago
mcudev edd95d9b65 secbool: add unsigned literal suffixes
7 years ago
mcudev 7e01a733a3 shutdown: reorder operations
7 years ago
mcudev 5be5e19f99 clear_otg_hs_memory: remove unpredictable write
7 years ago
Jan Pochyla c632f9450f trezorhal: add spread spectrum clock
7 years ago
Jan Pochyla 6213974b6e prodtest: emulate python impl in OTP READ
7 years ago
Pavol Rusnak 7d0a12c29e
unix: fix build
7 years ago
Pavol Rusnak 311a28242b
boardloader: fix production build, disable reset_flags_init for now
7 years ago
Pavol Rusnak 16f657361c
boardloader: disable BOR protection; fix setting OB flags
7 years ago
Pavol Rusnak a08f18c2ce
boardloader: use PVD level 4
7 years ago
Pavol Rusnak 30ddb53c11
prodtest: fix calls to sdcard functions
7 years ago
Pavol Rusnak 6738796d8b
trezorhal: call shutdown in default_handler
7 years ago
Pavol Rusnak 69c17dae9b
trezorhal: use uint32_t* for sdcard_{read,write}_blocks
7 years ago
Pavol Rusnak fa802e9353
boardloader: fix test for existence of bootloader on sd card
7 years ago
Pavol Rusnak a56da7d7ed
prodtest: fix sdcard test
7 years ago
Pavol Rusnak 5d6d342813
bootloader: erase storage on vendor change
7 years ago
Jan Pochyla 836508657d prodtest: style
7 years ago
Pavol Rusnak 3851404d04
small cosmetic changes to prodtest and others
7 years ago
Pavol Rusnak d0e81edc8f
bootloader: check chunk hash before flashing
7 years ago
Pavol Rusnak 36143033c4
bootloader: check vendor header / image header before flashing
7 years ago
Pavol Rusnak 9690f1abdf
bootloader: load chunk into memory first, then save it to flash
7 years ago
Pavol Rusnak 4d36d0e1c1
trezorhal: use sectrue where possible
7 years ago
Pavol Rusnak efa918a2f9
prodtest: code cleanup, fix build
7 years ago
Jan Pochyla 905e0bc82a
prodtest: codestyle, touch, fixes
7 years ago
Jan Pochyla 51d00e1de7
trezorhal/usb: add Inf timeout to blocking fns
7 years ago
Jan Pochyla 9cb342fcb6
prodtest: implement commands
7 years ago
Jan Pochyla 95965c3ff7
prodtest: add new target
7 years ago
Pavol Rusnak f73eb3effd
trezorhal: introduce secbool/sectrue/secfalse and use it where possible
7 years ago
Pavol Rusnak 7ddfdf69d6
trezorhal: support for non-continous areas in check_image_contents
7 years ago
Pavol Rusnak 89cc35b195
trezorhal: fix hash offset in check_image_contents
7 years ago
Pavol Rusnak 7c891e19e5
boardloader, bootloader: check image contents against hashes in the header
7 years ago
Pavol Rusnak b4ff9deb6b
bootloader: better wording
7 years ago
Pavol Rusnak 63636be0a3
trezorhal: rework header checking to new format
7 years ago
Pavol Rusnak 9e82a4d348
bootloader, firmware: introduce chunk hashes in the image header
7 years ago