mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-24 00:18:26 +00:00
refactor: Unify secp256k1_zkp usage.
[no changelog]
This commit is contained in:
parent
638ebbc0df
commit
21f4aec8de
@ -22,10 +22,6 @@
|
||||
#include "vendor/trezor-crypto/ecdsa.h"
|
||||
#include "vendor/trezor-crypto/secp256k1.h"
|
||||
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
#include "zkp_ecdsa.h"
|
||||
#endif
|
||||
|
||||
/// package: trezorcrypto.secp256k1
|
||||
|
||||
/// def generate_secret() -> bytes:
|
||||
@ -75,23 +71,12 @@ STATIC mp_obj_t mod_trezorcrypto_secp256k1_publickey(size_t n_args,
|
||||
bool compressed = n_args < 2 || args[1] == mp_const_true;
|
||||
if (compressed) {
|
||||
vstr_init_len(&pk, 33);
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
ret = zkp_ecdsa_get_public_key33(&secp256k1, (const uint8_t *)sk.buf,
|
||||
(uint8_t *)pk.buf);
|
||||
#else
|
||||
ret = ecdsa_get_public_key33(&secp256k1, (const uint8_t *)sk.buf,
|
||||
(uint8_t *)pk.buf);
|
||||
#endif
|
||||
|
||||
} else {
|
||||
vstr_init_len(&pk, 65);
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
ret = zkp_ecdsa_get_public_key65(&secp256k1, (const uint8_t *)sk.buf,
|
||||
(uint8_t *)pk.buf);
|
||||
#else
|
||||
ret = ecdsa_get_public_key65(&secp256k1, (const uint8_t *)sk.buf,
|
||||
(uint8_t *)pk.buf);
|
||||
#endif
|
||||
}
|
||||
if (0 != ret) {
|
||||
vstr_clear(&pk);
|
||||
@ -166,20 +151,9 @@ STATIC mp_obj_t mod_trezorcrypto_secp256k1_sign(size_t n_args,
|
||||
vstr_t sig = {0};
|
||||
vstr_init_len(&sig, 65);
|
||||
uint8_t pby = 0;
|
||||
int ret = 0;
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (!is_canonical) {
|
||||
ret = zkp_ecdsa_sign_digest(&secp256k1, (const uint8_t *)sk.buf,
|
||||
(const uint8_t *)dig.buf,
|
||||
(uint8_t *)sig.buf + 1, &pby, is_canonical);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
ret = ecdsa_sign_digest(&secp256k1, (const uint8_t *)sk.buf,
|
||||
(const uint8_t *)dig.buf, (uint8_t *)sig.buf + 1,
|
||||
&pby, is_canonical);
|
||||
}
|
||||
if (0 != ret) {
|
||||
if (0 != ecdsa_sign_digest(&secp256k1, (const uint8_t *)sk.buf,
|
||||
(const uint8_t *)dig.buf, (uint8_t *)sig.buf + 1,
|
||||
&pby, is_canonical)) {
|
||||
vstr_clear(&sig);
|
||||
mp_raise_ValueError("Signing failed");
|
||||
}
|
||||
@ -212,16 +186,9 @@ STATIC mp_obj_t mod_trezorcrypto_secp256k1_verify(mp_obj_t public_key,
|
||||
if (dig.len != 32) {
|
||||
return mp_const_false;
|
||||
}
|
||||
int ret = 0;
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
ret = zkp_ecdsa_verify_digest(&secp256k1, (const uint8_t *)pk.buf,
|
||||
int ret = ecdsa_verify_digest(&secp256k1, (const uint8_t *)pk.buf,
|
||||
(const uint8_t *)sig.buf + offset,
|
||||
(const uint8_t *)dig.buf);
|
||||
#else
|
||||
ret = ecdsa_verify_digest(&secp256k1, (const uint8_t *)pk.buf,
|
||||
(const uint8_t *)sig.buf + offset,
|
||||
(const uint8_t *)dig.buf);
|
||||
#endif
|
||||
return mp_obj_new_bool(ret == 0);
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_trezorcrypto_secp256k1_verify_obj,
|
||||
@ -251,17 +218,9 @@ STATIC mp_obj_t mod_trezorcrypto_secp256k1_verify_recover(mp_obj_t signature,
|
||||
recid &= 3;
|
||||
vstr_t pk = {0};
|
||||
vstr_init_len(&pk, 65);
|
||||
int ret = 0;
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
ret = zkp_ecdsa_recover_pub_from_sig(&secp256k1, (uint8_t *)pk.buf,
|
||||
(const uint8_t *)sig.buf + 1,
|
||||
(const uint8_t *)dig.buf, recid);
|
||||
#else
|
||||
ret = ecdsa_recover_pub_from_sig(&secp256k1, (uint8_t *)pk.buf,
|
||||
(const uint8_t *)sig.buf + 1,
|
||||
(const uint8_t *)dig.buf, recid);
|
||||
#endif
|
||||
if (ret == 0) {
|
||||
if (ecdsa_recover_pub_from_sig(&secp256k1, (uint8_t *)pk.buf,
|
||||
(const uint8_t *)sig.buf + 1,
|
||||
(const uint8_t *)dig.buf, recid) == 0) {
|
||||
if (compressed) {
|
||||
pk.buf[0] = 0x02 | (pk.buf[64] & 1);
|
||||
pk.len = 33;
|
||||
|
@ -36,6 +36,9 @@
|
||||
#include "rand.h"
|
||||
#include "rfc6979.h"
|
||||
#include "secp256k1.h"
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
#include "zkp_ecdsa.h"
|
||||
#endif
|
||||
|
||||
// Set cp2 = cp1
|
||||
void point_copy(const curve_point *cp1, curve_point *cp2) { *cp2 = *cp1; }
|
||||
@ -676,9 +679,9 @@ int ecdsa_sign(const ecdsa_curve *curve, HasherType hasher_sign,
|
||||
// digest is 32 bytes of digest
|
||||
// is_canonical is an optional function that checks if the signature
|
||||
// conforms to additional coin-specific rules.
|
||||
int ecdsa_sign_digest(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
const uint8_t *digest, uint8_t *sig, uint8_t *pby,
|
||||
int (*is_canonical)(uint8_t by, uint8_t sig[64])) {
|
||||
int tc_ecdsa_sign_digest(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
const uint8_t *digest, uint8_t *sig, uint8_t *pby,
|
||||
int (*is_canonical)(uint8_t by, uint8_t sig[64])) {
|
||||
int i = 0;
|
||||
curve_point R = {0};
|
||||
bignum256 k = {0}, z = {0}, randk = {0};
|
||||
@ -782,8 +785,8 @@ int ecdsa_sign_digest(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
}
|
||||
|
||||
// returns 0 on success
|
||||
int ecdsa_get_public_key33(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key) {
|
||||
int tc_ecdsa_get_public_key33(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key) {
|
||||
curve_point R = {0};
|
||||
bignum256 k = {0};
|
||||
|
||||
@ -807,8 +810,8 @@ int ecdsa_get_public_key33(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
}
|
||||
|
||||
// returns 0 on success
|
||||
int ecdsa_get_public_key65(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key) {
|
||||
int tc_ecdsa_get_public_key65(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key) {
|
||||
curve_point R = {0};
|
||||
bignum256 k = {0};
|
||||
|
||||
@ -1019,9 +1022,9 @@ int ecdsa_verify(const ecdsa_curve *curve, HasherType hasher_sign,
|
||||
|
||||
// Compute public key from signature and recovery id.
|
||||
// returns 0 if the key is successfully recovered
|
||||
int ecdsa_recover_pub_from_sig(const ecdsa_curve *curve, uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest,
|
||||
int recid) {
|
||||
int tc_ecdsa_recover_pub_from_sig(const ecdsa_curve *curve, uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest,
|
||||
int recid) {
|
||||
bignum256 r = {0}, s = {0}, e = {0};
|
||||
curve_point cp = {0}, cp2 = {0};
|
||||
|
||||
@ -1076,8 +1079,8 @@ int ecdsa_recover_pub_from_sig(const ecdsa_curve *curve, uint8_t *pub_key,
|
||||
}
|
||||
|
||||
// returns 0 if verification succeeded
|
||||
int ecdsa_verify_digest(const ecdsa_curve *curve, const uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest) {
|
||||
int tc_ecdsa_verify_digest(const ecdsa_curve *curve, const uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest) {
|
||||
curve_point pub = {0}, res = {0};
|
||||
bignum256 r = {0}, s = {0}, z = {0};
|
||||
int result = 0;
|
||||
@ -1249,3 +1252,56 @@ int ecdsa_sig_from_der(const uint8_t *der, size_t der_len, uint8_t sig[64]) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ecdsa_get_public_key33(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key) {
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (curve == &secp256k1) {
|
||||
return zkp_ecdsa_get_public_key33(curve, priv_key, pub_key);
|
||||
}
|
||||
#endif
|
||||
return tc_ecdsa_get_public_key33(curve, priv_key, pub_key);
|
||||
}
|
||||
|
||||
int ecdsa_get_public_key65(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key) {
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (curve == &secp256k1) {
|
||||
return zkp_ecdsa_get_public_key65(curve, priv_key, pub_key);
|
||||
}
|
||||
#endif
|
||||
return tc_ecdsa_get_public_key65(curve, priv_key, pub_key);
|
||||
}
|
||||
|
||||
int ecdsa_sign_digest(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
const uint8_t *digest, uint8_t *sig, uint8_t *pby,
|
||||
int (*is_canonical)(uint8_t by, uint8_t sig[64])) {
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (curve == &secp256k1 && is_canonical == NULL) {
|
||||
return zkp_ecdsa_sign_digest(curve, priv_key, digest, sig, pby,
|
||||
is_canonical);
|
||||
}
|
||||
#endif
|
||||
return tc_ecdsa_sign_digest(curve, priv_key, digest, sig, pby, is_canonical);
|
||||
}
|
||||
|
||||
int ecdsa_verify_digest(const ecdsa_curve *curve, const uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest) {
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (curve == &secp256k1) {
|
||||
return zkp_ecdsa_verify_digest(curve, pub_key, sig, digest);
|
||||
}
|
||||
#endif
|
||||
return tc_ecdsa_verify_digest(curve, pub_key, sig, digest);
|
||||
}
|
||||
|
||||
int ecdsa_recover_pub_from_sig(const ecdsa_curve *curve, uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest,
|
||||
int recid) {
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (curve == &secp256k1) {
|
||||
return zkp_ecdsa_recover_pub_from_sig(curve, pub_key, sig, digest, recid);
|
||||
}
|
||||
#endif
|
||||
return tc_ecdsa_recover_pub_from_sig(curve, pub_key, sig, digest, recid);
|
||||
}
|
||||
|
43
crypto/ecdsa_internal.h
Normal file
43
crypto/ecdsa_internal.h
Normal file
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Copyright (c) 2022 SatoshiLabs
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
|
||||
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __ECDSA_INTERNAL_H__
|
||||
#define __ECDSA_INTERNAL_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "ecdsa.h"
|
||||
|
||||
// trezor-crypto native implementations
|
||||
int tc_ecdsa_get_public_key33(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key);
|
||||
int tc_ecdsa_get_public_key65(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
uint8_t *pub_key);
|
||||
int tc_ecdsa_sign_digest(const ecdsa_curve *curve, const uint8_t *priv_key,
|
||||
const uint8_t *digest, uint8_t *sig, uint8_t *pby,
|
||||
int (*is_canonical)(uint8_t by, uint8_t sig[64]));
|
||||
int tc_ecdsa_verify_digest(const ecdsa_curve *curve, const uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest);
|
||||
int tc_ecdsa_recover_pub_from_sig(const ecdsa_curve *curve, uint8_t *pub_key,
|
||||
const uint8_t *sig, const uint8_t *digest,
|
||||
int recid);
|
||||
|
||||
#endif
|
@ -41,6 +41,7 @@
|
||||
#include "chacha_drbg.h"
|
||||
#include "curves.h"
|
||||
#include "ecdsa.h"
|
||||
#include "ecdsa_internal.h"
|
||||
#include "ed25519-donna/ed25519-donna.h"
|
||||
#include "ed25519-donna/ed25519-keccak.h"
|
||||
#include "ed25519-donna/ed25519.h"
|
||||
@ -764,7 +765,7 @@ int fuzz_ecdsa_sign_digest_functions(void) {
|
||||
int res = 0;
|
||||
|
||||
// IDEA optionally set a function for is_canonical() callback
|
||||
int res1 = ecdsa_sign_digest(curve, priv_key, digest, sig1, &pby1, NULL);
|
||||
int res1 = tc_ecdsa_sign_digest(curve, priv_key, digest, sig1, &pby1, NULL);
|
||||
|
||||
// the zkp function variant is only defined for a specific curve
|
||||
if (curve == &secp256k1) {
|
||||
@ -785,13 +786,13 @@ int fuzz_ecdsa_sign_digest_functions(void) {
|
||||
// successful signing
|
||||
if (res1 == 0) {
|
||||
uint8_t pub_key[33] = {0};
|
||||
res = ecdsa_get_public_key33(curve, priv_key, pub_key);
|
||||
res = tc_ecdsa_get_public_key33(curve, priv_key, pub_key);
|
||||
if (res != 0) {
|
||||
// pubkey derivation did not succeed
|
||||
crash();
|
||||
}
|
||||
|
||||
res = ecdsa_verify_digest(curve, pub_key, sig1, digest);
|
||||
res = tc_ecdsa_verify_digest(curve, pub_key, sig1, digest);
|
||||
if (res != 0) {
|
||||
// verification did not succeed
|
||||
crash();
|
||||
@ -823,8 +824,9 @@ int fuzz_ecdsa_verify_digest_functions(void) {
|
||||
curve = &nist256p1;
|
||||
}
|
||||
|
||||
int res1 = ecdsa_verify_digest(curve, (const uint8_t *)&pub_key,
|
||||
(const uint8_t *)&sig, (const uint8_t *)&hash);
|
||||
int res1 =
|
||||
tc_ecdsa_verify_digest(curve, (const uint8_t *)&pub_key,
|
||||
(const uint8_t *)&sig, (const uint8_t *)&hash);
|
||||
|
||||
// the zkp_ecdsa* function only accepts the secp256k1 curve
|
||||
if (curve == &secp256k1) {
|
||||
@ -1185,9 +1187,9 @@ int fuzz_ecdsa_get_public_key_functions(void) {
|
||||
}
|
||||
memcpy(privkey, fuzzer_input(sizeof(privkey)), sizeof(privkey));
|
||||
|
||||
int res_33_1 = ecdsa_get_public_key33(curve, privkey, pubkey33_1);
|
||||
int res_33_1 = tc_ecdsa_get_public_key33(curve, privkey, pubkey33_1);
|
||||
int res_33_2 = zkp_ecdsa_get_public_key33(curve, privkey, pubkey33_2);
|
||||
int res_65_1 = ecdsa_get_public_key65(curve, privkey, pubkey65_1);
|
||||
int res_65_1 = tc_ecdsa_get_public_key65(curve, privkey, pubkey65_1);
|
||||
int res_65_2 = zkp_ecdsa_get_public_key65(curve, privkey, pubkey65_2);
|
||||
|
||||
// the function pairs have different return error codes for the same input
|
||||
@ -1234,7 +1236,7 @@ int fuzz_ecdsa_recover_pub_from_sig_functions(void) {
|
||||
recid = recid & 0x03;
|
||||
|
||||
int res1 = zkp_ecdsa_recover_pub_from_sig(curve, pubkey1, sig, digest, recid);
|
||||
int res2 = ecdsa_recover_pub_from_sig(curve, pubkey2, sig, digest, recid);
|
||||
int res2 = tc_ecdsa_recover_pub_from_sig(curve, pubkey2, sig, digest, recid);
|
||||
|
||||
if ((res1 == 0 && res2 != 0) || (res1 != 0 && res2 == 0)) {
|
||||
// result mismatch
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "chacha_drbg.h"
|
||||
#include "curves.h"
|
||||
#include "ecdsa.h"
|
||||
#include "ecdsa_internal.h"
|
||||
#include "ed25519-donna/ed25519-donna.h"
|
||||
#include "ed25519-donna/ed25519-keccak.h"
|
||||
#include "ed25519-donna/ed25519.h"
|
||||
@ -3493,8 +3494,8 @@ static void test_ecdsa_get_public_key33_helper(int (*ecdsa_get_public_key33_fn)(
|
||||
33);
|
||||
}
|
||||
|
||||
START_TEST(test_ecdsa_get_public_key33) {
|
||||
test_ecdsa_get_public_key33_helper(ecdsa_get_public_key33);
|
||||
START_TEST(test_tc_ecdsa_get_public_key33) {
|
||||
test_ecdsa_get_public_key33_helper(tc_ecdsa_get_public_key33);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
@ -3525,8 +3526,8 @@ static void test_ecdsa_get_public_key65_helper(int (*ecdsa_get_public_key65_fn)(
|
||||
65);
|
||||
}
|
||||
|
||||
START_TEST(test_ecdsa_get_public_key65) {
|
||||
test_ecdsa_get_public_key65_helper(ecdsa_get_public_key65);
|
||||
START_TEST(test_tc_ecdsa_get_public_key65) {
|
||||
test_ecdsa_get_public_key65_helper(tc_ecdsa_get_public_key65);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
@ -3733,8 +3734,8 @@ static void test_ecdsa_recover_pub_from_sig_helper(int (
|
||||
ck_assert_int_eq(res, 1);
|
||||
}
|
||||
|
||||
START_TEST(test_ecdsa_recover_pub_from_sig) {
|
||||
test_ecdsa_recover_pub_from_sig_helper(ecdsa_recover_pub_from_sig);
|
||||
START_TEST(test_tc_ecdsa_recover_pub_from_sig) {
|
||||
test_ecdsa_recover_pub_from_sig_helper(tc_ecdsa_recover_pub_from_sig);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
@ -3773,8 +3774,8 @@ static void test_ecdsa_verify_digest_helper(int (*ecdsa_verify_digest_fn)(
|
||||
ck_assert_int_eq(res, 0);
|
||||
}
|
||||
|
||||
START_TEST(test_ecdsa_verify_digest) {
|
||||
test_ecdsa_verify_digest_helper(ecdsa_verify_digest);
|
||||
START_TEST(test_tc_ecdsa_verify_digest) {
|
||||
test_ecdsa_verify_digest_helper(tc_ecdsa_verify_digest);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
@ -3869,8 +3870,8 @@ static void test_ecdsa_sign_digest_deterministic_helper(
|
||||
}
|
||||
}
|
||||
|
||||
START_TEST(test_ecdsa_sign_digest_deterministic) {
|
||||
test_ecdsa_sign_digest_deterministic_helper(ecdsa_sign_digest);
|
||||
START_TEST(test_tc_ecdsa_sign_digest_deterministic) {
|
||||
test_ecdsa_sign_digest_deterministic_helper(tc_ecdsa_sign_digest);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
@ -9525,16 +9526,16 @@ Suite *test_suite(void) {
|
||||
suite_add_tcase(s, tc);
|
||||
|
||||
tc = tcase_create("ecdsa");
|
||||
tcase_add_test(tc, test_ecdsa_get_public_key33);
|
||||
tcase_add_test(tc, test_ecdsa_get_public_key65);
|
||||
tcase_add_test(tc, test_ecdsa_recover_pub_from_sig);
|
||||
tcase_add_test(tc, test_ecdsa_verify_digest);
|
||||
tcase_add_test(tc, test_tc_ecdsa_get_public_key33);
|
||||
tcase_add_test(tc, test_tc_ecdsa_get_public_key65);
|
||||
tcase_add_test(tc, test_tc_ecdsa_recover_pub_from_sig);
|
||||
tcase_add_test(tc, test_tc_ecdsa_verify_digest);
|
||||
tcase_add_test(tc, test_zkp_ecdsa_get_public_key33);
|
||||
tcase_add_test(tc, test_zkp_ecdsa_get_public_key65);
|
||||
tcase_add_test(tc, test_zkp_ecdsa_recover_pub_from_sig);
|
||||
tcase_add_test(tc, test_zkp_ecdsa_verify_digest);
|
||||
#if USE_RFC6979
|
||||
tcase_add_test(tc, test_ecdsa_sign_digest_deterministic);
|
||||
tcase_add_test(tc, test_tc_ecdsa_sign_digest_deterministic);
|
||||
tcase_add_test(tc, test_zkp_ecdsa_sign_digest_deterministic);
|
||||
#endif
|
||||
suite_add_tcase(s, tc);
|
||||
|
@ -290,12 +290,12 @@ def sigdecode(sig, _):
|
||||
return map(bytes2num, [sig[:32], sig[32:]])
|
||||
|
||||
|
||||
def test_sign(curve, r):
|
||||
def test_sign_native(curve, r):
|
||||
priv = r.randbytes(32)
|
||||
digest = r.randbytes(32)
|
||||
sig = r.randbytes(64)
|
||||
|
||||
lib.ecdsa_sign_digest(curve.ptr, priv, digest, sig, c.c_void_p(0), c.c_void_p(0))
|
||||
lib.tc_ecdsa_sign_digest(curve.ptr, priv, digest, sig, c.c_void_p(0), c.c_void_p(0))
|
||||
|
||||
exp = bytes2num(priv)
|
||||
sk = ecdsa.SigningKey.from_secret_exponent(exp, curve, hashfunc=hashlib.sha256)
|
||||
|
@ -36,9 +36,6 @@
|
||||
#include "sha3.h"
|
||||
#include "transaction.h"
|
||||
#include "util.h"
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
#include "zkp_ecdsa.h"
|
||||
#endif
|
||||
|
||||
/* Maximum chain_id which returns the full signature_v (which must fit into an
|
||||
uint32). chain_ids larger than this will only return one bit and the caller must
|
||||
@ -956,15 +953,8 @@ int ethereum_message_verify(const EthereumVerifyMessage *msg) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
int ret = 0;
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
ret = zkp_ecdsa_recover_pub_from_sig(&secp256k1, pubkey, msg->signature.bytes,
|
||||
hash, v);
|
||||
#else
|
||||
ret = ecdsa_recover_pub_from_sig(&secp256k1, pubkey, msg->signature.bytes,
|
||||
hash, v);
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
if (ecdsa_recover_pub_from_sig(&secp256k1, pubkey, msg->signature.bytes, hash,
|
||||
v) != 0) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -31,9 +31,6 @@
|
||||
#include "secp256k1.h"
|
||||
#include "transaction.h"
|
||||
#include "zkp_bip340.h"
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
#include "zkp_ecdsa.h"
|
||||
#endif
|
||||
#if DEBUG_LINK
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
@ -2942,16 +2939,8 @@ static bool signing_verify_orig_nonlegacy_input(TxInputType *orig_input) {
|
||||
signing_hash_bip143(&orig_info, orig_input, hash);
|
||||
}
|
||||
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (coin->curve->params == &secp256k1) {
|
||||
valid = zkp_ecdsa_verify_digest(coin->curve->params, node.public_key, sig,
|
||||
hash) == 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
valid = ecdsa_verify_digest(coin->curve->params, node.public_key, sig,
|
||||
hash) == 0;
|
||||
}
|
||||
valid = ecdsa_verify_digest(coin->curve->params, node.public_key, sig,
|
||||
hash) == 0;
|
||||
}
|
||||
|
||||
if (!valid) {
|
||||
@ -2971,16 +2960,7 @@ static bool signing_verify_orig_legacy_input(void) {
|
||||
uint8_t hash[32] = {0};
|
||||
tx_hash_final(&ti, hash, false);
|
||||
|
||||
bool valid = false;
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (coin->curve->params == &secp256k1) {
|
||||
valid =
|
||||
zkp_ecdsa_verify_digest(coin->curve->params, pubkey, sig, hash) == 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
valid = ecdsa_verify_digest(coin->curve->params, pubkey, sig, hash) == 0;
|
||||
}
|
||||
bool valid = ecdsa_verify_digest(coin->curve->params, pubkey, sig, hash) == 0;
|
||||
|
||||
if (!valid) {
|
||||
fsm_sendFailure(FailureType_Failure_DataError, _("Invalid signature."));
|
||||
|
@ -34,9 +34,6 @@
|
||||
#include "segwit_addr.h"
|
||||
#include "util.h"
|
||||
#include "zkp_bip340.h"
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
#include "zkp_ecdsa.h"
|
||||
#endif
|
||||
|
||||
#if !BITCOIN_ONLY
|
||||
#include "cash_addr.h"
|
||||
@ -514,18 +511,8 @@ uint32_t serialize_p2tr_witness(const uint8_t *signature,
|
||||
|
||||
bool tx_sign_ecdsa(const ecdsa_curve *curve, const uint8_t *private_key,
|
||||
const uint8_t *hash, uint8_t *out, pb_size_t *size) {
|
||||
int ret = 0;
|
||||
uint8_t signature[64] = {0};
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (curve == &secp256k1) {
|
||||
ret =
|
||||
zkp_ecdsa_sign_digest(curve, private_key, hash, signature, NULL, NULL);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
ret = ecdsa_sign_digest(curve, private_key, hash, signature, NULL, NULL);
|
||||
}
|
||||
if (ret != 0) {
|
||||
if (ecdsa_sign_digest(curve, private_key, hash, signature, NULL, NULL) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1306,19 +1293,9 @@ bool tx_input_verify_nonownership(
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef USE_SECP256K1_ZKP_ECDSA
|
||||
if (coin->curve->params == &secp256k1) {
|
||||
if (zkp_ecdsa_verify_digest(coin->curve->params, public_key, signature,
|
||||
digest) != 0) {
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (ecdsa_verify_digest(coin->curve->params, public_key, signature,
|
||||
digest) != 0) {
|
||||
return false;
|
||||
}
|
||||
if (ecdsa_verify_digest(coin->curve->params, public_key, signature,
|
||||
digest) != 0) {
|
||||
return false;
|
||||
}
|
||||
} else if (txinput->script_pubkey.size == 34 &&
|
||||
memcmp(txinput->script_pubkey.bytes, "\x51\x20", 2) == 0) {
|
||||
|
@ -586,7 +586,7 @@
|
||||
"T1_stellar-test_stellar.py::test_sign_tx[timebounds-0-1575234180]": "a92beafd4711e0768f9453c3cf7958882f4f3439d9e14ca1e69db617e00bd790",
|
||||
"T1_stellar-test_stellar.py::test_sign_tx[timebounds-461535181-0]": "da273d8bb839bc1f80ff5af65d4c7f4d67ccc5be41a0a5f7a24452f12f7975d7",
|
||||
"T1_stellar-test_stellar.py::test_sign_tx[timebounds-461535181-1575234180]": "1c8218b025efff40431aa5e468f33475360d40d99fbfe5f4fd8d4607f5857b53",
|
||||
"T1_test_autolock.py::test_apply_auto_lock_delay": "5f289c3212462aca47778a8253ab33eab7931b34aa7404f5893ac02f279cfafd",
|
||||
"T1_test_autolock.py::test_apply_auto_lock_delay": "f7bfdce7fa7579fe43beb0afd9b123114ea873f28da530abe3df8802570012bb",
|
||||
"T1_test_autolock.py::test_apply_auto_lock_delay_out_of_range[0]": "8c78ab77bce7753cd12e8085ca4da375c4882e8c3c8c9df212b2a39a3f9cba3c",
|
||||
"T1_test_autolock.py::test_apply_auto_lock_delay_out_of_range[1]": "8c78ab77bce7753cd12e8085ca4da375c4882e8c3c8c9df212b2a39a3f9cba3c",
|
||||
"T1_test_autolock.py::test_apply_auto_lock_delay_out_of_range[4194304]": "8c78ab77bce7753cd12e8085ca4da375c4882e8c3c8c9df212b2a39a3f9cba3c",
|
||||
@ -633,19 +633,19 @@
|
||||
"T1_test_msg_change_wipe_code_t1.py::test_set_wipe_code_invalid[1204]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_change_wipe_code_t1.py::test_set_wipe_code_invalid[1234567891234567891234567891234-943f94d5": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_change_wipe_code_t1.py::test_set_wipe_code_invalid[]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_change_wipe_code_t1.py::test_set_wipe_code_mismatch": "a09967f995cdfec7877dd43c002ea29fb395dea21b5d5e42386634ba4a106541",
|
||||
"T1_test_msg_change_wipe_code_t1.py::test_set_wipe_code_mismatch": "e64e729d09f856e446c532f24fcb7127af04bee015c5f2636dbd30c7435b9c48",
|
||||
"T1_test_msg_change_wipe_code_t1.py::test_set_wipe_code_to_pin": "2e9a43e4c73ab5a4c013de17effb531bbc3f2eb4c2ef584717cbbb3b66a94e2a",
|
||||
"T1_test_msg_changepin_t1.py::test_change_mismatch": "8f9a0177ef2b66b43e6940c7820809dc1d135d9d410db1898a0e4cbbca5ceb0b",
|
||||
"T1_test_msg_changepin_t1.py::test_change_pin": "4b2218287d5f28d6147aff770b74c056a95703de3a69543b12dd3d9a6c3a45a4",
|
||||
"T1_test_msg_changepin_t1.py::test_change_pin": "8809c4ec33f71e5baa68387d22e2d8516cc645d4db26ab2653e58e0147cbab0a",
|
||||
"T1_test_msg_changepin_t1.py::test_enter_invalid[1204]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_changepin_t1.py::test_enter_invalid[123456789123456789123456789123456789123456789123451]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_changepin_t1.py::test_enter_invalid[]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_changepin_t1.py::test_remove_pin": "11b3fc40c61c472426255e2719c987ec450fc2d6ac7c3291fc8f8acadcb78563",
|
||||
"T1_test_msg_changepin_t1.py::test_remove_pin": "bd74cf9520e364d895b59dfe766e53825be8178274fc222750326b4c603b8b3e",
|
||||
"T1_test_msg_changepin_t1.py::test_set_invalid[1204]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_changepin_t1.py::test_set_invalid[123456789123456789123456789123456789123456789123451]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_changepin_t1.py::test_set_invalid[]": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_msg_changepin_t1.py::test_set_mismatch": "761aaf5f01b16879c37f5656f59d1056354506ec5925adfd0b662c08e7a29bcb",
|
||||
"T1_test_msg_changepin_t1.py::test_set_pin": "0609964befa185e008e1e027defa9076cdaa02d83912ec5dcdc1ee09f7c3c085",
|
||||
"T1_test_msg_changepin_t1.py::test_set_mismatch": "9ac8ffe75bd7a8b7cd56198b0112dda1cba925c1109acaa306f864b4b9e276ad",
|
||||
"T1_test_msg_changepin_t1.py::test_set_pin": "a1a9bb1a5035ff8277120ccdff9cdee1b8875fcaac2a2d279e5a54bfdc38fa81",
|
||||
"T1_test_msg_loaddevice.py::test_load_device_1": "0e92c294292142cbb286b613d40d2fdee8977f18285823ce896f40c2269a3ecd",
|
||||
"T1_test_msg_loaddevice.py::test_load_device_2": "f89f8fcecf250b76dcca3e52a5a678e14ca5eeae105fa59848db41ab514d6614",
|
||||
"T1_test_msg_loaddevice.py::test_load_device_utf": "9523984b9cd124422558fe14ae20aab35338f86f08756d11919db7b2d3b86781",
|
||||
@ -656,23 +656,23 @@
|
||||
"T1_test_pin.py::test_exponential_backoff_t1": "b8e1017505578b2ee34dd13c607d65a2a0d259878b04869dfb1be5b3622d58c7",
|
||||
"T1_test_pin.py::test_incorrect_pin_t1": "8c78ab77bce7753cd12e8085ca4da375c4882e8c3c8c9df212b2a39a3f9cba3c",
|
||||
"T1_test_pin.py::test_no_protection": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_protection_levels.py::test_apply_settings": "af9edc0f8ab95a119d48f8ba3dad120dd95459eb8ec01a7cc8e3e5d8cd615981",
|
||||
"T1_test_protection_levels.py::test_change_pin_t1": "b03b10c08880556b5b5b3909f9d55486b4b27079eb0b56ce339ca020521ab664",
|
||||
"T1_test_protection_levels.py::test_get_address": "5b7419ecda88e49d9a55af9e7c7dc6d96e5992e11515299c7794de6e2e834eef",
|
||||
"T1_test_protection_levels.py::test_get_entropy": "a858148a335093e46872966e6411cd1bf9d0899bba6a3c798d7535e01461273b",
|
||||
"T1_test_protection_levels.py::test_get_public_key": "5b7419ecda88e49d9a55af9e7c7dc6d96e5992e11515299c7794de6e2e834eef",
|
||||
"T1_test_protection_levels.py::test_apply_settings": "0f02ea5b45c4d7337ae59eedf0c91f42fae18f657ebe7f121ffb8160d532a25d",
|
||||
"T1_test_protection_levels.py::test_change_pin_t1": "f6e681d7987267465a082dbe914491004dd2eb517cb1cc8efb14650f5df5ceee",
|
||||
"T1_test_protection_levels.py::test_get_address": "33bc46d7179663c1b72d116b8c0dd1768e89d58c4154bb6a21e750fea83b90dd",
|
||||
"T1_test_protection_levels.py::test_get_entropy": "076d586a9a24e375f970cedc1b9f01a12e97b92bec04652cc5a86d7c50e7c552",
|
||||
"T1_test_protection_levels.py::test_get_public_key": "33bc46d7179663c1b72d116b8c0dd1768e89d58c4154bb6a21e750fea83b90dd",
|
||||
"T1_test_protection_levels.py::test_initialize": "3f4bd58ada8b2be88ceaf45b3653e940bd52f48eb42bd5ee43c0a8c7dd392139",
|
||||
"T1_test_protection_levels.py::test_passphrase_cached": "79a607736c6833a04561231c8db1df8cf6ac186715fc3798be9cc3456a588e24",
|
||||
"T1_test_protection_levels.py::test_ping": "de7fc40b2f35e82fa486f1b97ee3e34a96d0a67412537e8a0fddacc0b0b1649d",
|
||||
"T1_test_protection_levels.py::test_recovery_device": "9bcc413cf3e44af03f2dbb038c4df43bf503805447b71dd5713ab34335f9341b",
|
||||
"T1_test_protection_levels.py::test_reset_device": "b76ab8da407423d61c605a6c1a5851885ea0aa0fe81b23a7bdb6f9f39492aed0",
|
||||
"T1_test_protection_levels.py::test_sign_message": "c0ffb0307822ff7327b23e0e7db6a9396cacca93880afe8960d1b0469978a49d",
|
||||
"T1_test_protection_levels.py::test_signtx": "51fc08e89938813de460d734849fa8172c0db7ee745504c0195075dbe43d6162",
|
||||
"T1_test_protection_levels.py::test_unlocked": "4c32aa18ecc83cd6c642784ff825246e09ed8bc4b17f23a6127dac7c8b36bccf",
|
||||
"T1_test_protection_levels.py::test_sign_message": "c2303075f8b908d6e990b5f00599a4eecfbf0d8725804a48a94a6c18e4b92e10",
|
||||
"T1_test_protection_levels.py::test_signtx": "72f219caffe32ce9db298e62f69bdeb8f51c21deb87d5e543193faa09c265311",
|
||||
"T1_test_protection_levels.py::test_unlocked": "7ebd713447825d40e120916a78439aa4e3fc19ad9e54b4fe622f95a3e669fbd4",
|
||||
"T1_test_protection_levels.py::test_verify_message_t1": "d4f8be1019f13604e2ceec12e65a0eccc8825ed07072479b355dd30e2ea83219",
|
||||
"T1_test_protection_levels.py::test_wipe_device": "71f454265675d5884e5419569ea85cc5fcb579de2dae23630fc3c9877b7e00be",
|
||||
"T1_test_session.py::test_cannot_resume_ended_session": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_session.py::test_clear_session": "43e6ff906945515ce92fd3716265e26942370e59045da527cc36356540f5bde1",
|
||||
"T1_test_session.py::test_clear_session": "c3fb7fced363b08b233802db7145a6a69045518265c02c7cd46342d255c7622a",
|
||||
"T1_test_session.py::test_end_session": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_session.py::test_end_session_only_current": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"T1_test_session.py::test_session_recycling": "d27ed7ff7933fe20c1c40b1d2774f855672b3b5c65e5f11a23f27f6c645820ae",
|
||||
@ -705,7 +705,7 @@
|
||||
"TR_test_autolock.py::test_dryrun_enter_word_slowly": "714c28bd70bf92c5204ce547a532068b2ed8d82ca6a795b711245a2d5a325978",
|
||||
"TR_test_autolock.py::test_dryrun_locks_at_number_of_words": "dcf6b525c057fc9dd3fe20c8f9a91788d0093811078bc01f3b253ceaff96d153",
|
||||
"TR_test_autolock.py::test_dryrun_locks_at_word_entry": "07b8ae7c87ed60c89a124bb79cc97d6d719c79e386da3b66562f41d27aa59f7b",
|
||||
"TR_test_lock.py::test_hold_to_lock": "5c0300c6920ea5b5710b1110402e3d6081f759eb993780a1600e8fcbce599e3f",
|
||||
"TR_test_lock.py::test_hold_to_lock": "0b3eb153e8b2b7be323b56dacd12f2c422786d1fcf49fadb5ee796821cd97d20",
|
||||
"TR_test_passphrase_tr.py::test_cancel": "1b830c930f7ea1af38c105d36f46bf58c90b1d1be85475f9f5fddf78f1c69487",
|
||||
"TR_test_passphrase_tr.py::test_passphrase_delete": "7d99d83eedfcb6154f56afdfd8958f8df469ad29be770bcb1eacc43fda1a08ef",
|
||||
"TR_test_passphrase_tr.py::test_passphrase_input[Y@14lw%p)JN@f54MYvys@zj'g-mnkoxeaMzLgfCxUdDSZW-381132c0": "55b7958dda374d7e346d17d024feabf037ca8fe05b44f31c8a8a15bc714829b1",
|
||||
@ -1743,7 +1743,7 @@
|
||||
"TR_stellar-test_stellar.py::test_sign_tx[timebounds-0-1575234180]": "88b99ee086e2292d6a5e375a4a889309741fa62768740807304a45d0e7168d00",
|
||||
"TR_stellar-test_stellar.py::test_sign_tx[timebounds-461535181-0]": "92b1d7d8b20eba96166e6ec3cc7875bb0cc9f7019471471dbbe77e6717de30ad",
|
||||
"TR_stellar-test_stellar.py::test_sign_tx[timebounds-461535181-1575234180]": "a09a92ac8ce5e576405ef8a597e5e35c24b4bd38043c6390b10c9f8126a2374e",
|
||||
"TR_test_autolock.py::test_apply_auto_lock_delay": "6b592ba079a6bbf5e556faeccfe1a01a822209e983456dce54ae9b4976d4083b",
|
||||
"TR_test_autolock.py::test_apply_auto_lock_delay": "aacdaa1304a57cded04ebec67739c24edd9ad7532a656e43086f6e472acdd08c",
|
||||
"TR_test_autolock.py::test_apply_auto_lock_delay_out_of_range[0]": "075abc8226638333901c65ddd81e8ee48bacca12b9ccf530523f8a68f06ade83",
|
||||
"TR_test_autolock.py::test_apply_auto_lock_delay_out_of_range[1]": "075abc8226638333901c65ddd81e8ee48bacca12b9ccf530523f8a68f06ade83",
|
||||
"TR_test_autolock.py::test_apply_auto_lock_delay_out_of_range[4194304]": "075abc8226638333901c65ddd81e8ee48bacca12b9ccf530523f8a68f06ade83",
|
||||
@ -1795,15 +1795,15 @@
|
||||
"TR_test_msg_backup_device.py::test_no_backup_fails": "804e49b88c36bb401f14d0f9e120f870580ef2a68b5e917b8108524fa1aa4fca",
|
||||
"TR_test_msg_backup_device.py::test_no_backup_show_entropy_fails": "f49c8d846c2d56a575f0ad49463845ba641b02656783e4fcfc67d74e8fa671dd",
|
||||
"TR_test_msg_change_wipe_code_t2.py::test_set_pin_to_wipe_code": "1db31ae62b6ebdcc51caed05c1f6204ccf1ac9f8a07082b43d19fede2f870194",
|
||||
"TR_test_msg_change_wipe_code_t2.py::test_set_remove_wipe_code": "72a9ac0f22d9edb2e86c261e73f9c1c947eeb46999d974f64b88713bec07ed59",
|
||||
"TR_test_msg_change_wipe_code_t2.py::test_set_remove_wipe_code": "99dc7e0cec29cd62fc528c75e7e7292a109ace7e56e63845316b295b0545d8c1",
|
||||
"TR_test_msg_change_wipe_code_t2.py::test_set_wipe_code_mismatch": "3997ed750e31a782b9de80c832e46d0cfcb3e9db0060e829247164f1925e8efe",
|
||||
"TR_test_msg_change_wipe_code_t2.py::test_set_wipe_code_to_pin": "532c90464a31d047f41e7dffac8c228b34ea36383110df316bbe3a16afed5a2e",
|
||||
"TR_test_msg_changepin_t2.py::test_change_failed": "65326cf1ced67946cf195223c7e7384d1450bea70bc68628e309484a3451af00",
|
||||
"TR_test_msg_changepin_t2.py::test_change_invalid_current": "f085f18ca984446061f923d0a0cd5dcbf2360687d8f80472f610a9dd6061eb02",
|
||||
"TR_test_msg_changepin_t2.py::test_change_pin": "ba1168fa7db9b5fe7fbdbb8d6f654f6146ffc605d7f6b5a330dfb607659bf972",
|
||||
"TR_test_msg_changepin_t2.py::test_remove_pin": "42a498d59c63aa5dcea782691d8c6344ed7b1f3210ef39b357fea2619dc7fd47",
|
||||
"TR_test_msg_changepin_t2.py::test_set_failed": "e31e4b732649a50776b0e225884f04da3300fa1f43037be9f98fda7961925a0c",
|
||||
"TR_test_msg_changepin_t2.py::test_set_pin": "7e82834aea10bcc468c1b0f1db776b18f7a66187afb928a892e3a5208430e7a4",
|
||||
"TR_test_msg_change_wipe_code_t2.py::test_set_wipe_code_to_pin": "227222484f42a6acddaab867ec0e41b40b4cdcea00cdbe86d70924568a39ed9a",
|
||||
"TR_test_msg_changepin_t2.py::test_change_failed": "10650a44f0c782d5ed367d7588aa33dcdd46354a8a75f0051743f55c84fa427f",
|
||||
"TR_test_msg_changepin_t2.py::test_change_invalid_current": "180feab26bc629b31b5d24fba69b7a80433319e0af5243c4ba7ba9628400a711",
|
||||
"TR_test_msg_changepin_t2.py::test_change_pin": "6ae0d7ef8a0d62d4c0ffc2fa658211ba0538d11f3998579c929d56e5f5d0c90b",
|
||||
"TR_test_msg_changepin_t2.py::test_remove_pin": "2d052ca5b00b01e19b804f869fa37bd7fba41a0d51369227a07a9ffa003551fc",
|
||||
"TR_test_msg_changepin_t2.py::test_set_failed": "48f284095e8b89498025e86754428a40010eb4cf89eeabe508a5c0c085154ea2",
|
||||
"TR_test_msg_changepin_t2.py::test_set_pin": "fbd2781664429b4cf3187ca1bb02ab5600b98779d34a6ea490fa2eb8bde63ca8",
|
||||
"TR_test_msg_loaddevice.py::test_load_device_1": "21af7a4e0a58f04420e8c1230107ba3703004089481448b7cbe0e7bd15dac12e",
|
||||
"TR_test_msg_loaddevice.py::test_load_device_2": "e2403e5001e17126db2ddd8a726a90523db9dbf57a91283a70d445bac5fdf153",
|
||||
"TR_test_msg_loaddevice.py::test_load_device_slip39_advanced": "21af7a4e0a58f04420e8c1230107ba3703004089481448b7cbe0e7bd15dac12e",
|
||||
@ -1820,23 +1820,23 @@
|
||||
"TR_test_pin.py::test_exponential_backoff_t2": "dfd94694735e69ca4d35a4f60da41895785b6cf808f3c39533eaf4397bdee282",
|
||||
"TR_test_pin.py::test_incorrect_pin_t2": "ea1bb5fa4e2bdee3404b42948e295bfcee146eed6d360c21038adc0a0f4d0281",
|
||||
"TR_test_pin.py::test_no_protection": "57e3aa5a6a55926dcc95ca290bf1b2826bbc86b535e0baa162f7c79b1784c96b",
|
||||
"TR_test_protection_levels.py::test_apply_settings": "571330a120b75a20d1a7803b495bd8656e443d10213969a687022a3169a41ddd",
|
||||
"TR_test_protection_levels.py::test_change_pin_t2": "ea22db3294218b58fe11c90c6753c08e50225a38791902dda6f52cf8bb707f3e",
|
||||
"TR_test_protection_levels.py::test_get_address": "5b8700ddbd28f0da9633a4f185716a7e8499bcfc8facb3999f6c4a4e6ebc2aec",
|
||||
"TR_test_protection_levels.py::test_get_entropy": "3c948b1fc72fc9db2dea0f146359873325c838d3cd5f33b8f18ee14a95dc86ec",
|
||||
"TR_test_protection_levels.py::test_get_public_key": "5b8700ddbd28f0da9633a4f185716a7e8499bcfc8facb3999f6c4a4e6ebc2aec",
|
||||
"TR_test_protection_levels.py::test_apply_settings": "2d2973a92e25151e633d5d68ca82b7598f072a4952936dbfd48a7966d2a14576",
|
||||
"TR_test_protection_levels.py::test_change_pin_t2": "e1b2142d23076223d6543a9ac4d1b3123e35f006de998a5df815813c38cedabe",
|
||||
"TR_test_protection_levels.py::test_get_address": "879dcf51eb413dc9b2932663372345d390e7766a4531c89c370100fed05232fb",
|
||||
"TR_test_protection_levels.py::test_get_entropy": "0242d1bf58eba80129f0452a8b0886ba0508f6e34419b110783042855b5a11fb",
|
||||
"TR_test_protection_levels.py::test_get_public_key": "879dcf51eb413dc9b2932663372345d390e7766a4531c89c370100fed05232fb",
|
||||
"TR_test_protection_levels.py::test_initialize": "1a3776befce091011bc2245d5c6d4438a23d82e01f204d3de59a2d980fe0f5f8",
|
||||
"TR_test_protection_levels.py::test_passphrase_cached": "03df7c123386f0d08cb177b19edeffe1e3f633163881355517abb7643be657ad",
|
||||
"TR_test_protection_levels.py::test_passphrase_reporting[False]": "62c6e6bb9919f871baee9b14e1942aa57a2735b9dc6a8569782c6897dcd4b3d6",
|
||||
"TR_test_protection_levels.py::test_passphrase_reporting[True]": "3155287bacf17dda0c58b434aced9aece59ae52f7452a15089c06a6699b001c6",
|
||||
"TR_test_protection_levels.py::test_ping": "438808dc4acb9bd053eab123460c1fa7521f2aab4e687a8f1532ece66d25c079",
|
||||
"TR_test_protection_levels.py::test_sign_message": "38eb34ab6a7dd5baa027bf01beaa0f43c7fe1bf7aa4d0c4d3107f6637d684582",
|
||||
"TR_test_protection_levels.py::test_signtx": "b0b32d989d6f01543bf1a2485673dbd46c9c3b341f67d105f91ded7fb4ec031f",
|
||||
"TR_test_protection_levels.py::test_unlocked": "bc2c739f6828eb41fb4ebe2a43c6bc6c07ebc151b4e13d1effc3e21391842dff",
|
||||
"TR_test_protection_levels.py::test_verify_message_t2": "70c558038ea89a60a386406d4bfd5e76f2324d897acda2234ed93070da761fe9",
|
||||
"TR_test_protection_levels.py::test_sign_message": "d9c913653be8f06f66a5cf14e1a58ac26f359530b89162ceba00ebc2d6416db0",
|
||||
"TR_test_protection_levels.py::test_signtx": "0967d33985ecbb35a334fb2c965b89a7791e597344b92c390f35bb5f105ff92e",
|
||||
"TR_test_protection_levels.py::test_unlocked": "b26e31f338be25c305d2ed8629d1516d76e4d596d8cd4698625f1006f8b47394",
|
||||
"TR_test_protection_levels.py::test_verify_message_t2": "c2a8db604a16fd068f9ef282c5a218add9ee61e9e1550c7b2131888a0daa3495",
|
||||
"TR_test_protection_levels.py::test_wipe_device": "7db661bec03b1e075d497a39743037f55fe8fb2b6292dd3dcfbe343a97c45883",
|
||||
"TR_test_session.py::test_cannot_resume_ended_session": "57e3aa5a6a55926dcc95ca290bf1b2826bbc86b535e0baa162f7c79b1784c96b",
|
||||
"TR_test_session.py::test_clear_session": "9b4f790c644985868101514482dbad45930b570392d41d91c9128418efabefd6",
|
||||
"TR_test_session.py::test_clear_session": "0c3a11504d47c5ec83b1bbfbf26ed9247383f181a463deaaa8ab251237c9ca76",
|
||||
"TR_test_session.py::test_derive_cardano_empty_session": "57e3aa5a6a55926dcc95ca290bf1b2826bbc86b535e0baa162f7c79b1784c96b",
|
||||
"TR_test_session.py::test_derive_cardano_running_session": "57e3aa5a6a55926dcc95ca290bf1b2826bbc86b535e0baa162f7c79b1784c96b",
|
||||
"TR_test_session.py::test_end_session": "57e3aa5a6a55926dcc95ca290bf1b2826bbc86b535e0baa162f7c79b1784c96b",
|
||||
@ -1851,7 +1851,7 @@
|
||||
"TR_test_session_id_and_passphrase.py::test_passphrase_always_on_device": "1fba3f97d60f4efd5cb2d0f23b4396495140dff32fef387ca791cf070d790c3f",
|
||||
"TR_test_session_id_and_passphrase.py::test_passphrase_length": "c6fd12c621a5cef524012fe332049c704903dc8973a788261dacf826e1ed2f00",
|
||||
"TR_test_session_id_and_passphrase.py::test_passphrase_missing": "03df7c123386f0d08cb177b19edeffe1e3f633163881355517abb7643be657ad",
|
||||
"TR_test_session_id_and_passphrase.py::test_passphrase_on_device": "da89e7d25b113d9396255465f227fe90499408be290047aef67e2812d1769a7f",
|
||||
"TR_test_session_id_and_passphrase.py::test_passphrase_on_device": "c1f62561f2b1c368f179997dd9b75f0c32bcbfe9e1c13d5df43f74f9ed424fa6",
|
||||
"TR_test_session_id_and_passphrase.py::test_session_enable_passphrase": "7895e1955452cdcf9f14661367528fd2b0d43ce367a17a2892daefc49c490a31",
|
||||
"TR_test_session_id_and_passphrase.py::test_session_with_passphrase": "a0cb4011f97210d6d87f3e860379e1c4445d18cb2dbf478820ea15447d3b728d",
|
||||
"TR_tezos-test_getaddress.py::test_tezos_get_address": "a7847a211664fb5cb6cdf315285b87d6812023ec410b1e4c6da4786a44515d0d",
|
||||
@ -1892,7 +1892,7 @@
|
||||
"TT_test_autolock.py::test_dryrun_enter_word_slowly": "5b4d6a3a6658c5ebf6e5e0684a0e9fc2dc964a9e55ed4329b1fffa214bafbbb7",
|
||||
"TT_test_autolock.py::test_dryrun_locks_at_number_of_words": "6465381f3346d278b7bcd209e810902d77c58994a16fb28fce7390fe28c9cf21",
|
||||
"TT_test_autolock.py::test_dryrun_locks_at_word_entry": "1606166879e09980b0c05dd23c1a48f3c36097c16ffb66a77f6c50a2dc269a0f",
|
||||
"TT_test_lock.py::test_hold_to_lock": "93750fa03ea9680ff298e9e55593df6ead868ed0e8181e0da953242c18a1b9b7",
|
||||
"TT_test_lock.py::test_hold_to_lock": "78430939f1bbbd06c847faeefebeaa1afd644566c3884cd90f706ed335c33a80",
|
||||
"TT_test_passphrase_tt.py::test_cycle_through_last_character": "b1158ebd5a40f1a1a243d7067f9b8b8ea124c0de22a3e28b08ca2c406eef4c57",
|
||||
"TT_test_passphrase_tt.py::test_passphrase_click_same_button_many_times": "77e104ef38ce3f4bfee8694d25e25959091782203e012ee02b389f1254ff3b17",
|
||||
"TT_test_passphrase_tt.py::test_passphrase_delete": "ad976ef8c4174ff638d82d9f4e77db022e298c9e864016338c704b0d0a15942c",
|
||||
@ -2938,7 +2938,7 @@
|
||||
"TT_stellar-test_stellar.py::test_sign_tx[timebounds-0-1575234180]": "2b55b4ff796a80273a0e0b1e16ab613368c6a18042d3cbb5bae9f48d8171fbb8",
|
||||
"TT_stellar-test_stellar.py::test_sign_tx[timebounds-461535181-0]": "97b4615818f32c3cbc4e79119c5864a8fa38eda837bd2f8a1d1def928209d466",
|
||||
"TT_stellar-test_stellar.py::test_sign_tx[timebounds-461535181-1575234180]": "ac0afbb9bd128d1ed1d8f4124144fb5203a7c5bc954ad80f86c488668ff96e0b",
|
||||
"TT_test_autolock.py::test_apply_auto_lock_delay": "cb6ad3f98a14009e18a36d8da1e345fa2ef89c94c110c40947d372fbbd580d4b",
|
||||
"TT_test_autolock.py::test_apply_auto_lock_delay": "e4ba6256a04cb0b6710f68b87656219273a24b118fa50f9d351c5127fe1ee54b",
|
||||
"TT_test_autolock.py::test_apply_auto_lock_delay_out_of_range[0]": "ddb5ffc4897d4c1b6135df498f08cebf12502d3cd64b70fd048c0bed310cc375",
|
||||
"TT_test_autolock.py::test_apply_auto_lock_delay_out_of_range[1]": "ddb5ffc4897d4c1b6135df498f08cebf12502d3cd64b70fd048c0bed310cc375",
|
||||
"TT_test_autolock.py::test_apply_auto_lock_delay_out_of_range[4194304]": "ddb5ffc4897d4c1b6135df498f08cebf12502d3cd64b70fd048c0bed310cc375",
|
||||
@ -2988,15 +2988,15 @@
|
||||
"TT_test_msg_backup_device.py::test_no_backup_fails": "fada9d38ec099b3c6a4fd8bf994bb1f3431e40085128b4e0cd9deb8344dec53e",
|
||||
"TT_test_msg_backup_device.py::test_no_backup_show_entropy_fails": "001377ce61dcd189e6a9d17e20dcd71130e951dc3314b40ff26f816bd9355bdd",
|
||||
"TT_test_msg_change_wipe_code_t2.py::test_set_pin_to_wipe_code": "32e28882d253e0f17549bf336c4ff86672462dd361dcd316ece38c2fb1de2acf",
|
||||
"TT_test_msg_change_wipe_code_t2.py::test_set_remove_wipe_code": "4b31396e8dba42fe3d25ed0795563dde5cbcba62afe29ec3032d3d535ad98fc7",
|
||||
"TT_test_msg_change_wipe_code_t2.py::test_set_remove_wipe_code": "09bfb239676d4649ff4a3e93f74e49eb814b3ecac9f4c2cea5f273b661587636",
|
||||
"TT_test_msg_change_wipe_code_t2.py::test_set_wipe_code_mismatch": "18f97459b0d6f50c5004de5b987f3ca88b724dfa27271c8ff182723e06dd0e29",
|
||||
"TT_test_msg_change_wipe_code_t2.py::test_set_wipe_code_to_pin": "021091ff233a7fe03fd7cd9b8aabebc4bf851521fd407aab675fd970ff700196",
|
||||
"TT_test_msg_changepin_t2.py::test_change_failed": "9066ab555de160ce892285b63646cb59fdf16de17e1088c6c8009429df7f6020",
|
||||
"TT_test_msg_changepin_t2.py::test_change_invalid_current": "a4cef143d12760dec47c215aa10d48a0cb5fa97015657726ae415ee355555f51",
|
||||
"TT_test_msg_changepin_t2.py::test_change_pin": "4928f6273ef3e439978758b73592ce2b866edc993932819a3444f1a38e81cfe1",
|
||||
"TT_test_msg_changepin_t2.py::test_remove_pin": "c85e25ad650872286eea533bb699827718adbf353f103d36149141f6c4348164",
|
||||
"TT_test_msg_changepin_t2.py::test_set_failed": "419389ddbe3c20f6c586bdfa6da79cf8834b33189a890b7465cb98a2835faf49",
|
||||
"TT_test_msg_changepin_t2.py::test_set_pin": "c1c3bc8086f2ff5bbb524f0477cdc111b5762bf362cf09f7ea11b6e2bcf24c12",
|
||||
"TT_test_msg_change_wipe_code_t2.py::test_set_wipe_code_to_pin": "0bfdf79ff03d31c3b8bae5dc944909e96c7f57f1451c0c0d33107e4fec522a6f",
|
||||
"TT_test_msg_changepin_t2.py::test_change_failed": "56b2bf2031711b4cc7d57383d2c93a6069f354fa8a39bd13eda7c3d9a15cecac",
|
||||
"TT_test_msg_changepin_t2.py::test_change_invalid_current": "a3ab39c6a12b89553917711139f6c133624d99c49d1e159ec90b090e65616016",
|
||||
"TT_test_msg_changepin_t2.py::test_change_pin": "537306820f818958b5f5343ba1f787fd538b069663357ff11e9cae097da9e99a",
|
||||
"TT_test_msg_changepin_t2.py::test_remove_pin": "94c3054ebeb4188b71c45fe9929a89c57e01914722fb37766c19d36853d20c31",
|
||||
"TT_test_msg_changepin_t2.py::test_set_failed": "51b5e49e7671db3d2fb9920c0b73c71ff7e769180f9849d4796e0e22d2457da3",
|
||||
"TT_test_msg_changepin_t2.py::test_set_pin": "2820b05d3ead7b47a26650d9bed873d18d3817e4f86a3f4f7fb1d416e40cb6aa",
|
||||
"TT_test_msg_loaddevice.py::test_load_device_1": "1d1bdf29f677492956efe2ab29ab2481bbb647ac14cef9cfb5d8f62370133b1a",
|
||||
"TT_test_msg_loaddevice.py::test_load_device_2": "456145e44405fe351151e79c869e6a1aef566ff6b734202e623300272c35a8c2",
|
||||
"TT_test_msg_loaddevice.py::test_load_device_slip39_advanced": "1d1bdf29f677492956efe2ab29ab2481bbb647ac14cef9cfb5d8f62370133b1a",
|
||||
@ -3016,26 +3016,26 @@
|
||||
"TT_test_pin.py::test_exponential_backoff_t2": "4c6bec9f9ec64301e6f4f814ac70abd5bee2f9a4a5c58172e7bf2b30075c351e",
|
||||
"TT_test_pin.py::test_incorrect_pin_t2": "85f2db2dbcba140c04092692028b1e5af81b5e7e4004784e1c3a5ce70a4759a6",
|
||||
"TT_test_pin.py::test_no_protection": "80a6e289138a604cf351a29511cf6f85e2243591317894703152787e1351a1a3",
|
||||
"TT_test_protection_levels.py::test_apply_settings": "f95d83353e56bbef42586ab5816358630297cc6ae8630dea3bebf7f23eb45930",
|
||||
"TT_test_protection_levels.py::test_change_pin_t2": "49f240a67363a60ab9050dcde0a60699a91daa25647c9f4fdd8cd7f3927ca3b4",
|
||||
"TT_test_protection_levels.py::test_get_address": "7fa16edc6f602b3c35a11ff5369ce15fc891f2af2dd2ea74d625e26a4235bd3c",
|
||||
"TT_test_protection_levels.py::test_get_entropy": "e11d439f757c38fc7b930d70012a63e3438927cdc5a7cb01b76ca09b51043ec3",
|
||||
"TT_test_protection_levels.py::test_get_public_key": "7fa16edc6f602b3c35a11ff5369ce15fc891f2af2dd2ea74d625e26a4235bd3c",
|
||||
"TT_test_protection_levels.py::test_apply_settings": "6a7e21b8df3d643bebd14a785e9079b171a7995a045db90943c69d57534ba475",
|
||||
"TT_test_protection_levels.py::test_change_pin_t2": "18fed8649623572d20991c6a7df205fcd851875f318de3f862948456fe54a5bb",
|
||||
"TT_test_protection_levels.py::test_get_address": "b535928dc346fc03ca1bcfb0d838888f3a7466302c0ffed49ac6c3eddfcce6c8",
|
||||
"TT_test_protection_levels.py::test_get_entropy": "2c29a3c2fea178268b1460b6733551fbd306929f1b963c8aa6e2b9689fdb38dc",
|
||||
"TT_test_protection_levels.py::test_get_public_key": "b535928dc346fc03ca1bcfb0d838888f3a7466302c0ffed49ac6c3eddfcce6c8",
|
||||
"TT_test_protection_levels.py::test_initialize": "1d5bd513ee91edf0c692c350623eb01571154e3b624a413f2828edbf9535a07c",
|
||||
"TT_test_protection_levels.py::test_passphrase_cached": "d001f7d2b9cc1e9d56106bc89415021a63f05cbe420e762dd4942a7c158395a2",
|
||||
"TT_test_protection_levels.py::test_passphrase_reporting[False]": "3187efb87ffdbdfba1d5afb0485b57bdcce328a861aabeff7129c65ef0dd7d11",
|
||||
"TT_test_protection_levels.py::test_passphrase_reporting[True]": "c8ddbf7b355fc898078b45e8825b5b0839e8da5154d2375217b32a6fe5ce3a90",
|
||||
"TT_test_protection_levels.py::test_ping": "d702b0f90581cf17e0f77b4d318324a002deec42c2c5cb8860d51f6cb50f5739",
|
||||
"TT_test_protection_levels.py::test_sign_message": "396c5ef6cc1f7d82a876c198653867f85143b506062e8d4b1426c863c0270680",
|
||||
"TT_test_protection_levels.py::test_signtx": "cad825b0080cef49e4d684dbc9968f2d611ba2e9acce9966fcf229e60a6fe3c1",
|
||||
"TT_test_protection_levels.py::test_unlocked": "65f295b367a9f065374b6f8b8ef9e919c20b49c86c0bd91a28476b0174627754",
|
||||
"TT_test_protection_levels.py::test_verify_message_t2": "26dbb6b035495e067a5ab42bc59df1aa73339b23967d1aa7ea2f22f8d5828b1f",
|
||||
"TT_test_protection_levels.py::test_sign_message": "69d20a90c3f69117d3837f69f614b1aff0dd76a682e9aa9a7e33999cde3fab32",
|
||||
"TT_test_protection_levels.py::test_signtx": "dcdbedf067f44f275fa69fce3aef7404dc16c78d8b5da87a3d184456fcdbfdb9",
|
||||
"TT_test_protection_levels.py::test_unlocked": "859859089db6d151813d4f875b4ec8d2cc32e93cab33d7d342392024fb819158",
|
||||
"TT_test_protection_levels.py::test_verify_message_t2": "1544b5d37fab7a307220e2451504f2edde4f72db2223c7ea6fc40715b0a90727",
|
||||
"TT_test_protection_levels.py::test_wipe_device": "986b7a076be9b0f67b6e1e82cece3696118a5e18fb748add143b7efe90210b0b",
|
||||
"TT_test_sdcard.py::test_sd_format": "f452c463dba5f19b684fb7738f2bd110908854a8e5981efbf301c55232f05b92",
|
||||
"TT_test_sdcard.py::test_sd_no_format": "14511e3d3ee535d97287d8ade25101e8c16db17c1dc5d3151b91e5e8eba61ba5",
|
||||
"TT_test_sdcard.py::test_sd_protect_unlock": "6d07d94ad7557596f6dc4701ae3a84c70967659e0262e7e97d55099da9942b63",
|
||||
"TT_test_session.py::test_cannot_resume_ended_session": "80a6e289138a604cf351a29511cf6f85e2243591317894703152787e1351a1a3",
|
||||
"TT_test_session.py::test_clear_session": "c694c9ed79d6463df388d66ce8134281dd6ce992d822c7f0f5277dfc231787be",
|
||||
"TT_test_session.py::test_clear_session": "11ce7109a705d4670995fe2b9d2d5b4ebe55321f2321197f9cb78b4efead4d5c",
|
||||
"TT_test_session.py::test_derive_cardano_empty_session": "80a6e289138a604cf351a29511cf6f85e2243591317894703152787e1351a1a3",
|
||||
"TT_test_session.py::test_derive_cardano_running_session": "80a6e289138a604cf351a29511cf6f85e2243591317894703152787e1351a1a3",
|
||||
"TT_test_session.py::test_end_session": "80a6e289138a604cf351a29511cf6f85e2243591317894703152787e1351a1a3",
|
||||
|
Loading…
Reference in New Issue
Block a user