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:
parent
b296d627fa
commit
1013cc9185
@ -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){
|
||||
|
@ -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) {
|
||||
|
2
vendor/trezor-crypto
vendored
2
vendor/trezor-crypto
vendored
@ -1 +1 @@
|
||||
Subproject commit d454a48b5169fddacd169e6ca4124b69449501c9
|
||||
Subproject commit a59742817f8ef89ab02b8093d4f57c3ded770a42
|
Loading…
Reference in New Issue
Block a user