-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revise mechanism for obtaining secrets from Trezor #1508
Comments
Let's discuss this together with FIDO2 extensions: hmac-secret, txAuthSimple and txAuthGeneric |
In order to make use of translations in the dialogs and to avoid strange prompts, such as "Encrypt value, Enable labeling?", Trezor needs to understand what secret it is being asked to release. We could define a fairly generic message type with an enum to determine the requested secret. Based on the enum value and optional parameters Trezor would:
Three types of secret that could be requested come to mind:
The obvious disadvantage of this system over SLIP-11 is that in order to support a new feature the firmware would need to be updated with a new dialog and processing instructions telling it how to obtain the result. message GetSecret {
optional SecretType secret_type = 1; // The type of secret that Trezor is being asked to release.
enum SecretType {
GetLabelingKey = 1; // The encryption key used for account and transaction labels. Parameters: none. No user confirmation.
GetPasswordDbKey = 2; // The encryption key used for the password database. Parameters: none. No user confirmation.
EncryptPassword = 3; // Encrypt a password. Parameters: service, user name, password. No user confirmation.
DecryptPassword = 4; // Decrypt a password. Parameters: service, user name, password. User confirmation required.
}
repeated bytes parameters = 2;
}
message Secret {
optional bytes secret = 1; // A symmetric key, ciphertext or plaintext, depending on the requested secret type.
}
message GetPrivateKey {
repeated uint32 address_n = 1; // BIP-32 path to derive the key from the master node.
optional string ecdsa_curve_name = 2; // ECDSA curve name to use.
}
message PrivateKey {
optional string xprv = 1; // Extended private key.
} The purpose of this proposal is to define an easily extendable API. At this moment we are only interested in implementing |
@matejcik what do you think about the proposal above? The main advantage over the existing
I personally don't have any preference about whether we should do it now or later. |
If we migrate "labeling" to silent SLIP-11 is more flexible from Suite perspective, so I believe there is zero motivation from our side for SLIP-21 for "labeling". Only if you are sure that we will switch to |
@andrewkozlik I like the array of parameters, but the enum for secret types seems too limiting. Instead we could do a "symbolic name" for the (Then we could grandfather in the old prompts, so that
|
Applications that need to obtain a secret value from Trezor can currently use the
CipherKeyValue
message, see SLIP11. The password manager (SLIP16) uses this to decrypt the file containing the password metadata and to decrypt the individual passwords. TheCipherKeyValue
system uses a very generic confirmation dialog on Trezor and the displayed strings, such as "Unlock encrypted storage?" or "Unlock github.com for user Satoshi Nakamoto?", are involved in the encryption/decryption process. One problem with this is that it is not well suited for translations or, to be more precise, for switching between languages and for changing the message in the future.Another use-case we encountered recently is obtaining private keys for Decred staking, see #1249 (comment). For staking the wallet needs to be online. Since the staking private keys cannot be misused to cause coin loss, a desktop wallet could generate them independently of Trezor. However, it's useful for the keys to be recoverable from the seed, so Trezor could be used as a source of some secret, which is handed over to the desktop application (after user confirmation). The desktop application can then derive the private keys from that secret. In addition it would be useful for Trezor to conduct the same derivation process on the device to derive the corresponding public keys, so that when it's creating a staking ticket it may verify that it owns the voting rights to the ticket.
Let's gather other possible use-cases for the above feature in this issue and decide whether we want to redesign the current mechanism or introduce an additional mechanism for obtaining secret values from Trezor.
The text was updated successfully, but these errors were encountered: