Jochen Hoenicke
059555039c
cashaddr: Don't show coin prefix on the display.
...
While technically part of the address, the coin prefix, e.g., bitcoincash:
is implicit and doesn't need to be checked by the user. We still
include it in the QR-code though.
Also set case-insensitive flag for QR-code.
2018-04-05 11:28:06 +02:00
Jochen Hoenicke
e1ad1512d0
Avoid division by zero.
...
Check that there is no overflow in `inputs_count + outputs_count`.
Check that previous transaction contains at least the spent output.
2018-04-05 09:23:23 +02:00
Pavol Rusnak
399706ae22
storage: implement unfinished_backup flag
2018-04-04 12:42:52 +02:00
Pavol Rusnak
3a908d7c7d
fsm: update storage after ApplyFlags
2018-04-04 01:08:39 +02:00
Roman Zeyde
159df8d24f
fsm: allow auto-lock delay configuration
2018-04-04 01:06:47 +02:00
Saleem Rashid
3f51bc3628
signing: Use SignTx in signing_init
2018-04-03 18:40:41 +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
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
Jochen Hoenicke
c4e1c5953e
Fix shift overflow
...
Avoid undefined behavior by casting uint8_t to uint32_t before shifting
by 24 bits.
2018-03-27 15:00:25 +02:00
Pavol Rusnak
559a700fb0
fsm: add for button before Recovery device
2018-03-20 15:41:16 +01:00
Pavol Rusnak
2a4a298d58
firmware: refactor fsm_getDerivedNode to include fingerprint
2018-03-07 14:04:37 +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
fc7189f801
use Failure_PinMismatch where it makes sense (ChangePin, ResetDevice, RecoveryDevice)
2018-02-20 17:48:19 +01:00
Saleem Rashid
e019ab5557
fsm: Abort layoutAddress on Initialize or Cancel
...
Fixes #247
2018-02-20 17:19:41 +01:00
Wampum
2391beb6f4
expand description of multisig label ( #294 )
2018-01-31 17:12:52 +01:00
Pavol Rusnak
c4e3596803
update trezor-crypto, adapt firmware to to changes
2018-01-13 15:20:10 +01:00
Pavol Rusnak
94fcc8c9a4
add bip84 (native segwit)
2018-01-04 22:30:40 +01:00
Saleem Rashid
045ef22d98
storage: Do not use Nanopb
2017-12-19 14:11:51 +01:00
Saleem Rashid
b92a0d24b0
fsm: Include file and line in fsm_sendFailure for DEBUG_LINK
2017-12-18 20:13:00 +01:00
Saleem Rashid
ba5b44d0c5
emulator: Initial commit
2017-12-18 20:09:59 +01:00
Saleem Rashid
f17a0a85e0
fsm: Add NEMDecryptMessage
2017-12-16 21:26:32 +01:00
Jochen Hoenicke
810443f197
Fix NULL pointer access
...
Fixes #269
2017-12-16 15:26:25 +01:00
Pavol Rusnak
f22c849767
storage: rework storage_commit into storage_update
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
14d15dab99
fsm: refactor path checking code into path_mismatch function
2017-12-12 01:48:07 +01:00
Saleem Rashid
7cd9945905
fsm: Use coin->curve_name
2017-12-10 20:53:44 +01:00
Pavol Rusnak
bc7c66aa76
add Features.model field (set to "1")
2017-12-04 22:30:11 +01:00
Pavol Rusnak
723cf295a7
device label -> device name
2017-11-16 20:03:26 +01:00
Pavol Rusnak
3386b16a1c
GetAddress: detect mismatched coin and path, show warning
2017-11-16 19:22:55 +01:00
Pavol Rusnak
de3b78bd0b
layout: print bip32 path in GetAddress dialog
2017-11-14 17:53:17 +01:00
Saleem Rashid
c6246b5fba
coins: Add force_bip143
2017-11-13 22:20:08 +01:00
Pavol Rusnak
892bb8501a
fsm: ignore case for NEM addresses
2017-11-05 19:30:33 +01:00
Jochen Hoenicke
bbf6b1b097
Implemented VerifyMessage for bech32
2017-11-05 19:28:07 +01:00
Jochen Hoenicke
97581928de
Enable Segwit Bech32 addresses
...
Increase the size of the addresses in protobuf.
Fix layout2.c to handle longer addresses.
Add a field bech32_prefix to coins.h
Adapted the coins-gen script.
Added bech32 support in signing.c and transaction.c
2017-11-05 19:28:07 +01:00
Jochen Hoenicke
cf3dc6051c
Omit leading space in shortcut in GetFeatures
2017-11-05 19:23:34 +01:00
Jochen Hoenicke
1566631023
Improved backwards compatibility of GetFeatures
...
Set all CoinType fields except signed_message_header.
Move static assert into the function where it is needed.
2017-11-05 19:23:34 +01:00
Jochen Hoenicke
b5fa8a266a
New CoinInfo separated from protobuf structures
...
Having CoinType using the protobuf structures has several disadvantages.
- We always need to change trezor-common if we need a new field (like
bech32 prefix)
- Every time Trezor initializes it sends all this information out and
nobody cares.
- The protobuf structures add storage overhead due to their fixed size.
I also removed most of the `has_` fields except for forkid:
- `has_segwit` was merged with segwit
- `has_coin_shortcut` can be replaced by test for NULL if necessary.
The fields were reordered for better padding.
2017-11-05 19:23:34 +01:00
Pavol Rusnak
18d8cb3c56
add project website (trezor.io) to license header
2017-11-05 17:47:23 +01:00
Pavol Rusnak
b56da1e4b4
layout: show path for CoSi commit/sign if following SLIP-0018
2017-10-09 21:16:39 +02:00
Saleem Rashid
12c541f872
nem2: Handle Importance Transfer transactions
2017-10-07 22:07:56 +01:00
Pavol Rusnak
83db3c098f
fsm: implement CoSi messages
2017-10-03 13:26:38 +02:00
Saleem Rashid
1d83eee3b3
nem2: Canonicalize mosaics in transfer transactions
...
NIS deserializes then serializes transactions in order to verify the
signature. This means that transactions must be serialized canonically,
otherwise the signature will not match. Due to [1], mosaics are sorted
and deduplicated in transfer transactions.
[1]: 4231550ddf
2017-10-01 13:24:13 +01:00
Saleem Rashid
2aeeb3f978
nem2: Handle Aggregate Modification transactions
2017-10-01 13:24:13 +01:00
Saleem Rashid
a10e131ecd
nem2: Handle Mosaic Supply Change transactions
2017-10-01 13:24:13 +01:00
Saleem Rashid
17e33d5517
nem2: Handle Mosaic Definition Creation transactions
2017-10-01 13:24:13 +01:00
Saleem Rashid
4a55dd89e6
nem2: Handle Provision Namespace transactions
2017-10-01 13:24:13 +01:00
Saleem Rashid
b559e5fb6d
fsm: Add NEM_CHECK_PARAM macros
2017-10-01 13:24:13 +01:00
Saleem Rashid
563723a55f
nem2: Handle multisig transactions
2017-10-01 13:24:13 +01:00
Saleem Rashid
19033a459d
fsm: Add NEMSignTx
2017-10-01 13:24:13 +01:00