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

15 Commits

Author SHA1 Message Date
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
Tomas Susanka
a6acefbdf5 core: wipe before reset and recovery; introduce 'intialized' field 2020-06-16 11:31:29 +02:00
matejcik
7541d529a3 core: refactor keychain API, introduce SLIP44 decorator 2020-05-15 14:08:29 +02:00
Tomas Susanka
b96d7cafbb
core: rework cache and fix cardano caching 2020-02-07 11:41:01 +00:00
Tomas Susanka
90d5cdfd5b
all: rework passphrase
The `on_device` field is being moved to PassphraseAck, State messages
are removed. Features newly contain `session_id`.
2020-02-07 11:40:58 +00:00
matejcik
5c93ecd53a core: create top-level storage module
This is to avoid including app-specific functionality in storage and
avoid circular imports. The following policy is now in effect: modules
from `storage` namespace must not import from `apps` namespace.

In most files, the change only involves changing import paths.

A minor refactor was needed in case of webauthn: basic get/set/delete
functionality was left in storage.webauthn, and more advanced logic on
top of it was moved to apps.webauthn.resident_credentials.

A significant refactor was needed for sd_salt, where application (and
UI) logic was tightly coupled with the IO code. This is now separated,
and storage.sd_salt deals exclusively with the IO side, while the app/UI
logic is implemented on top of it in apps.common.sd_salt and
apps.management.sd_protect.
2019-10-31 16:21:56 +01:00
Tomas Susanka
0511cc8b8c core: add final mypy fixes! 2019-10-22 14:36:25 +00:00
Andrew Kozlik
ba9eee3b8f core, legacy: Don't allow change_pin if device is not initialized. 2019-10-04 13:54:43 +02:00
Andrew Kozlik
c1f0c642df core: cache seed without passphrase (#478) 2019-09-02 12:09:03 +02:00
Roman Zeyde
680e18a4ba core/seed: add SLIP-0077 derivation to Keychain (#398)
Following #66 and #317, it would allow deriving confidential addresses and
unblinding confidential transactions' outputs.
2019-08-31 19:04:00 +02:00
Andrew Kozlik
58e06ba22c core/seed: Ensure ed25519 paths are hardened in Keychain.derive(). 2019-07-16 14:30:30 +02:00
andrew
5f604b5fea core/seed: Add SLIP-0021 implementation and tests. 2019-07-16 14:30:28 +02:00
Jan Pochyla
758a1a2528 core/typing: add annotations 2019-07-09 12:51:48 +02:00
Jan Pochyla
36534325f0 core: revamp the UI subsystem 2019-05-28 13:12:46 +02:00
matejcik
e5670856a2 MONOREPO CREATE FROM trezor-core 2019-04-15 19:14:40 +02:00