diff --git a/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h b/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h index bf877e8e99..02cc1c3552 100644 --- a/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h +++ b/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h @@ -517,7 +517,7 @@ STATIC mp_obj_t mod_trezorcrypto_bip32_from_mnemonic_cardano(mp_obj_t mnemonic) mp_raise_ValueError("Invalid mnemonic"); } - const int res = hdnode_from_seed_cardano(entropy, entropy_len / 8, &hdnode); + const int res = hdnode_from_seed_cardano((const uint8_t *)"", 0, entropy, entropy_len / 8, &hdnode); if (!res) { mp_raise_ValueError("Secret key generation from mnemonic is looping forever"); }else if(res == -1){ diff --git a/embed/extmod/modtrezorcrypto/modtrezorcrypto-pbkdf2.h b/embed/extmod/modtrezorcrypto/modtrezorcrypto-pbkdf2.h index eb678189db..ae406c37a9 100644 --- a/embed/extmod/modtrezorcrypto/modtrezorcrypto-pbkdf2.h +++ b/embed/extmod/modtrezorcrypto/modtrezorcrypto-pbkdf2.h @@ -62,11 +62,11 @@ STATIC mp_obj_t mod_trezorcrypto_Pbkdf2_make_new(const mp_obj_type_t *type, size o->prf = 0; if (prf.len == 11 && memcmp(prf.buf, "hmac-sha256", prf.len) == 0) { - pbkdf2_hmac_sha256_Init(&(o->ctx256), password.buf, password.len, salt.buf, salt.len); + pbkdf2_hmac_sha256_Init(&(o->ctx256), password.buf, password.len, salt.buf, salt.len, 1); o->prf = 256; } else if (prf.len == 11 && memcmp(prf.buf, "hmac-sha512", prf.len) == 0) { - pbkdf2_hmac_sha512_Init(&(o->ctx512), password.buf, password.len, salt.buf, salt.len); + pbkdf2_hmac_sha512_Init(&(o->ctx512), password.buf, password.len, salt.buf, salt.len, 1); o->prf = 512; } else if (o->prf == 0) { diff --git a/vendor/trezor-crypto b/vendor/trezor-crypto index d454a48b51..a59742817f 160000 --- a/vendor/trezor-crypto +++ b/vendor/trezor-crypto @@ -1 +1 @@ -Subproject commit d454a48b5169fddacd169e6ca4124b69449501c9 +Subproject commit a59742817f8ef89ab02b8093d4f57c3ded770a42