1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

vendor: update trezor-crypto

This commit is contained in:
Pavol Rusnak 2018-09-13 15:02:10 +02:00
parent 7880b67451
commit 11bf37b17c
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);

@ -1 +1 @@
Subproject commit 9c2cfb04704b1419e7d1aebbb21b192fbf49644d
Subproject commit f9523f97df2c965835001d551738bbe1b93b53df