mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
vendor: update trezor-crypto
This commit is contained in:
parent
7880b67451
commit
11bf37b17c
@ -132,7 +132,7 @@ STATIC mp_obj_t mod_trezorcrypto_nist256p1_verify_recover(mp_obj_t signature, mp
|
||||
bool compressed = (recid >= 4);
|
||||
recid &= 3;
|
||||
uint8_t out[65];
|
||||
if (0 == ecdsa_verify_digest_recover(&nist256p1, out, (const uint8_t *)sig.buf + 1, (const uint8_t *)dig.buf, recid)) {
|
||||
if (0 == ecdsa_recover_pub_from_sig(&nist256p1, out, (const uint8_t *)sig.buf + 1, (const uint8_t *)dig.buf, recid)) {
|
||||
if (compressed) {
|
||||
out[0] = 0x02 | (out[64] & 1);
|
||||
return mp_obj_new_bytes(out, 33);
|
||||
|
@ -143,7 +143,7 @@ STATIC mp_obj_t mod_trezorcrypto_secp256k1_verify_recover(mp_obj_t signature, mp
|
||||
bool compressed = (recid >= 4);
|
||||
recid &= 3;
|
||||
uint8_t out[65];
|
||||
if (0 == ecdsa_verify_digest_recover(&secp256k1, out, (const uint8_t *)sig.buf + 1, (const uint8_t *)dig.buf, recid)) {
|
||||
if (0 == ecdsa_recover_pub_from_sig(&secp256k1, out, (const uint8_t *)sig.buf + 1, (const uint8_t *)dig.buf, recid)) {
|
||||
if (compressed) {
|
||||
out[0] = 0x02 | (out[64] & 1);
|
||||
return mp_obj_new_bytes(out, 33);
|
||||
|
2
vendor/trezor-crypto
vendored
2
vendor/trezor-crypto
vendored
@ -1 +1 @@
|
||||
Subproject commit 9c2cfb04704b1419e7d1aebbb21b192fbf49644d
|
||||
Subproject commit f9523f97df2c965835001d551738bbe1b93b53df
|
Loading…
Reference in New Issue
Block a user