mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-26 01:42:34 +00:00
legacy(feature): disable bitcoin-like transaction signing anti-exfil
protocol [no changelog]
This commit is contained in:
parent
98c317c34d
commit
c58f1e6ec1
@ -3144,6 +3144,13 @@ static void signing_hash_decred(const TxInputType *txinput,
|
|||||||
|
|
||||||
static bool signing_sign_ecdsa(TxInputType *txinput, const uint8_t *private_key,
|
static bool signing_sign_ecdsa(TxInputType *txinput, const uint8_t *private_key,
|
||||||
const uint8_t *public_key, const uint8_t *hash) {
|
const uint8_t *public_key, const uint8_t *hash) {
|
||||||
|
if (txinput->has_entropy_commitment) {
|
||||||
|
fsm_sendFailure(FailureType_Failure_ProcessError,
|
||||||
|
_("Anti-exfil not supported"));
|
||||||
|
signing_abort();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
resp.has_serialized = true;
|
resp.has_serialized = true;
|
||||||
resp.serialized.has_signature_index = true;
|
resp.serialized.has_signature_index = true;
|
||||||
resp.serialized.signature_index = idx1;
|
resp.serialized.signature_index = idx1;
|
||||||
@ -3188,8 +3195,16 @@ static bool signing_sign_ecdsa(TxInputType *txinput, const uint8_t *private_key,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool signing_sign_bip340(const uint8_t *private_key,
|
static bool signing_sign_bip340(TxInputType *txinput,
|
||||||
|
const uint8_t *private_key,
|
||||||
const uint8_t *hash) {
|
const uint8_t *hash) {
|
||||||
|
if (txinput->has_entropy_commitment) {
|
||||||
|
fsm_sendFailure(FailureType_Failure_ProcessError,
|
||||||
|
_("Anti-exfil not supported"));
|
||||||
|
signing_abort();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
resp.has_serialized = true;
|
resp.has_serialized = true;
|
||||||
resp.serialized.has_signature_index = true;
|
resp.serialized.has_signature_index = true;
|
||||||
resp.serialized.signature_index = idx1;
|
resp.serialized.signature_index = idx1;
|
||||||
@ -3240,7 +3255,7 @@ static bool signing_sign_segwit_input(TxInputType *txinput) {
|
|||||||
|
|
||||||
if (!input_validate_path(txinput) || !tx_info_check_input(&info, txinput) ||
|
if (!input_validate_path(txinput) || !tx_info_check_input(&info, txinput) ||
|
||||||
!input_derive_node(txinput) ||
|
!input_derive_node(txinput) ||
|
||||||
!signing_sign_bip340(node.private_key, hash)) {
|
!signing_sign_bip340(txinput, node.private_key, hash)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user