1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 10:39:00 +00:00
Commit Graph

204 Commits

Author SHA1 Message Date
Pavol Rusnak
4ed714ba47 common/defs: add xpub_magic_multisig_segwit_{native,p2sh} fields to coins 2021-01-21 23:46:29 +01:00
matejcik
fd502f122f feat(core): implement pagination for sign/verify 2021-01-11 16:47:59 +01:00
matejcik
bbef9c650b refactor(core): improve render_text behavior
* use less memory due to copy-less rendering
* implement linebreaking on embedded \n
2021-01-11 16:47:59 +01:00
Pavol Rusnak
5728f54b78 core: return root_fingerprint in PublicKey 2021-01-08 14:17:09 +01:00
Pavol Rusnak
1e8673bf5f style(core/apps): use new syntax for typing 2020-12-01 15:52:29 +01:00
Pavol Rusnak
952adc5961
style(core): use PEP515 Underscores in Numeric Literals 2020-11-23 14:30:16 +01:00
Pavol Rusnak
c6e78e525a
fix: remove PIVX (#1359) 2020-11-20 12:12:42 +01:00
matejcik
e6a1bf840f fix(core): do not subclass range
micropython on real hw dislikes it for some reason

also it's completely unnecessary
2020-11-13 16:01:35 +01:00
matejcik
50e648636f doc(core): add references to schema specifications, add Purpose48 document 2020-11-05 14:30:11 +01:00
matejcik
7fe5c804ff feat(core): implement BIP-32 path schemas 2020-11-05 14:30:11 +01:00
Pavol Rusnak
d8534b5ee6
perf(core/extmod): replace HMAC Python implementation with C
We keep Python implementation of HMAC for Monero in
core/src/apps/monero/xmr/crypto/__init__.py
2020-10-12 16:33:13 +02:00
matejcik
e4785d47e0 style: apply black 20.8b1 2020-09-29 11:30:40 +02:00
matejcik
244b264b47 chore(core): fix typing and kwargs usage 2020-09-23 16:00:10 +02:00
matejcik
6ba08526e1 fix(core): fix type annotations on CoinInfo 2020-09-23 16:00:10 +02:00
Martin Milata
cff4955f93 core: implement SafetyChecks.PromptTemporarily
Also reword safety checks confirmation dialogs.
2020-09-18 09:02:40 +02:00
Martin Milata
df5421e7d6 common/defs: update maxfee_kb to 10USD/tx
Except bitcoin.

(cherry picked from commit f51fac3410)
2020-08-25 18:06:54 +02:00
Pavol Rusnak
41f5237967
common/defs: enable extra_data for FLO
(cherry picked from commit 534695313c)
2020-08-24 11:08:02 +02:00
Pavol Rusnak
cdf0f68bb0 core: show passphrase on device 2020-08-21 21:30:15 +02:00
Alexis Hernandez
96c38315df
common/defs: enable extra_data for XSN (#1208) 2020-08-20 20:40:30 +02:00
Pavol Rusnak
c3ce9de3ea core: regenerate coins+tokens 2020-08-19 19:29:18 +02:00
Martin Milata
3f21e8f400 core: display coin name when signing message
Also when verifying message.
2020-08-18 13:45:49 +02:00
Tomas Susanka
16827c3135 core: make templates 2020-08-05 13:55:36 +02:00
gabrielkerekes
0438f318b4 Bring back cbor.Raw - to be used for metadata 2020-07-30 17:17:03 +02:00
gabrielkerekes
e1615e60ec Update Cardano to support Shelley era 1/3
Update protobuf

- Previous transactions don't need to be sent anymore, because fee is
  included in the transaction now. Thus transactions_count can be
  removed from CardanoSignTx message and the CardanoTxAck and
  CardanoTxRequest messages can be removed altogether.
- CardanoTxInputType.type is unused so remove it

Add NULL (None type) serialisation to CBOR

- Transaction metada must either have a valid structure or CBOR NULL
  must be used (if metadata is empty) - it can't be simply left out.

Add protocol_magics file

- Just to have a nicer way of representing protocol magics

Update transaction signing

- Previous transactions no longer need to be requested
- Output building is simplified, since fee doesn't need to be calculated
- Remove transaction class since it is no longer needed (only functions
  remained)
- Reorder functions so it reads top to bottom

Add protocol magic to byron address on testnet

- This has always been a part of the spec, but it hasn't been
  implemented before, because it wasn't really needed.

Update trezorlib

Update tests

- Transaction messages are no longer required
- Expected values are different since tx format changed
- Common values in test cases have been extracted

Remove unused file

- Progress was used when receiving previous transactions

Add CRC check to output address validation
2020-07-27 13:04:49 +02:00
matejcik
fd8cb0e061 core/keychain: differentiate error message for ed25519 derivation 2020-07-24 16:37:58 +02:00
matejcik
ff4ec2185e core: refactor keychain to only support one curve at a time
also make a cleaner distinction between keychain, seed, path

This enables using `unsafe_prompts`, because with the original code, if
there was no namespace match, we wouldn't know which curve to use.

For ease of implementation, we use a LRU cache for derived keys,
instead of the original design "one cache entry per namespace".

SLIP21 is now treated completely separately, via `slip21_namespaces` and
`derive_slip21` method.
If more slip21-like things come in the future, we can instead hang them
on the keychain: put a per-curve Keychain object accessible by
`keychain[curve_name].derive()`, and the majority usecase will just pass
around `keychain[curve_name]` instead of having to specify the curve in
every `derive()` call.

Or alternately we'll just specify the curve in every `derive()` call,
whichever seems more appropriate.
2020-07-24 16:37:58 +02:00
matejcik
5e7fd3aea6 core: use utils.BufferReader instead of apps.common.BytearrayReader 2020-07-24 14:09:31 +02:00
Andrew Kozlik
9459c5a5c2 core/common: Add BytearrayReader and basic reader functions. 2020-07-03 11:17:19 +02:00
Tomas Susanka
0f9a2459d3 core: make QR code smaller for Monero 2020-07-01 17:20:04 +00:00
Tomas Susanka
a6acefbdf5 core: wipe before reset and recovery; introduce 'intialized' field 2020-06-16 11:31:29 +02:00
Andrey
1eeaa1e5cf Enable extra_data for Zcoin. Changed coininfo.py 2020-06-15 09:53:00 +02:00
Tomas Susanka
981d079d7f core/signverify: add failsafe for an empty message header 2020-06-11 09:08:50 +02:00
Tomas Susanka
56fe5adcfc Merge branch 'release/2020-06' 2020-06-10 06:51:18 +00:00
matejcik
f32c2f9e23 core: replace workflow.kill_default with workflow.close_others 2020-06-04 16:18:46 +02:00
matejcik
01832d5ae9 core: call close_others() in place of ButtonRequest
this makes sense, really: close_others() requests UI exclusivity, and
that is something that generally happens at the same places we emit a
ButtonRequest
2020-06-04 16:18:46 +02:00
matejcik
5d823ff5ea core: use ButtonRequestType.PinEntry for PIN entry 2020-06-04 16:18:46 +02:00
Andrew Kozlik
5469acfabf core/webauthn: Cache user verification for 3 minutes. 2020-06-04 16:18:46 +02:00
matejcik
246998910a core: refactor usage of input_signals
this prevents a certain class of UI test failure. It also localizes the
use of debuglink signals into the layout classes instead of call sites,
which is a design we were already using for confirm_signals
2020-06-04 16:18:46 +02:00
matejcik
9197623d83 core: factor out the decision whether to lock the device 2020-06-04 16:18:46 +02:00
matejcik
32fcc4ad9c core: make verify_user_pin accept a Context argument 2020-06-04 16:18:46 +02:00
matejcik
8ca7ffc3b8 core: use wire.PinCancelled/PinInvalid instead of custom versions
also refactor show_pin_invalid and its usages so that it raises directly

note that we are now using PinCancelled instead of ActionCancelled where
appropriate
2020-06-04 16:18:46 +02:00
matejcik
eabfcab9b9 core: add default messages to some error codes 2020-06-04 16:18:46 +02:00
matejcik
d59ffe553f make gen 2020-05-25 16:14:05 +02:00
matejcik
72ef86d79a all: enable extra_data for komodo 2020-05-24 14:36:37 +00:00
Tomas Susanka
3084ee1eed core/bitcoin: move write_bitcoin_varint to common writers 2020-05-18 14:31:51 +02:00
Tomas Susanka
445f56d387 core/bitcoin: finalize bitcoin refactor
- core/bitcoin: move common files to the app's root
- core/bitcoin: use require_confirm instead of confirm
- core: move bitcoin unrelated functions from 'bitcoin' to a new 'misc' app
- core/bitcoin: use relative imports inside the app
- core: rename wallet app to bitcoin
- core/wallet: replace SigningErrors and the other exception classes with wire.Errors
2020-05-18 14:31:51 +02:00
matejcik
7541d529a3 core: refactor keychain API, introduce SLIP44 decorator 2020-05-15 14:08:29 +02:00
matejcik
5885978c83 Merge branch 'release/2020-04' 2020-04-15 15:00:23 +02:00
jagdeep sidhu
e58c5f63d5
common/defs: update SYS (#928) 2020-04-02 00:22:47 +02:00
Tomas Susanka
bf20537f41 core: add option to omit cancel button in HoldToConfirm; add it to reset 2020-03-30 16:00:12 +00:00