mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-15 01:40:57 +00:00
fix bug in unoptimized branch of code
This commit is contained in:
parent
019d779a94
commit
eec5f7df15
2
ecdsa.c
2
ecdsa.c
@ -155,11 +155,11 @@ void scalar_multiply(const bignum256 *k, curve_point *res)
|
||||
point_add(&curr, res);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if ! USE_PRECOMPUTED_CP
|
||||
point_double(&curr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
bn_mod(&(res->x), &prime256k1);
|
||||
bn_mod(&(res->y), &prime256k1);
|
||||
}
|
||||
|
2
tests.c
2
tests.c
@ -325,7 +325,7 @@ START_TEST(test_bip32_compare)
|
||||
int i, r;
|
||||
hdnode_from_seed(fromhex("301133282ad079cbeb59bc446ad39d333928f74c46997d3609cd3e2801ca69d62788f9f174429946ff4e9be89f67c22fae28cb296a9b37734f75e73d1477af19"), 64, &node1);
|
||||
hdnode_from_seed(fromhex("301133282ad079cbeb59bc446ad39d333928f74c46997d3609cd3e2801ca69d62788f9f174429946ff4e9be89f67c22fae28cb296a9b37734f75e73d1477af19"), 64, &node2);
|
||||
for (i = 0; i < 300; i++) {
|
||||
for (i = 0; i < 100; i++) {
|
||||
memcpy(&node3, &node1, sizeof(HDNode));
|
||||
r = hdnode_private_ckd(&node1, i); ck_assert_int_eq(r, 1);
|
||||
r = hdnode_public_ckd(&node2, i); ck_assert_int_eq(r, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user