1
0
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:
Pavol Rusnak 2018-09-05 17:09:43 +02:00
parent b296d627fa
commit 1013cc9185
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 4 additions and 4 deletions

View File

@ -517,7 +517,7 @@ STATIC mp_obj_t mod_trezorcrypto_bip32_from_mnemonic_cardano(mp_obj_t mnemonic)
mp_raise_ValueError("Invalid 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) { if (!res) {
mp_raise_ValueError("Secret key generation from mnemonic is looping forever"); mp_raise_ValueError("Secret key generation from mnemonic is looping forever");
}else if(res == -1){ }else if(res == -1){

View File

@ -62,11 +62,11 @@ STATIC mp_obj_t mod_trezorcrypto_Pbkdf2_make_new(const mp_obj_type_t *type, size
o->prf = 0; o->prf = 0;
if (prf.len == 11 && memcmp(prf.buf, "hmac-sha256", prf.len) == 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; o->prf = 256;
} else } else
if (prf.len == 11 && memcmp(prf.buf, "hmac-sha512", prf.len) == 0) { 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; o->prf = 512;
} else } else
if (o->prf == 0) { if (o->prf == 0) {

@ -1 +1 @@
Subproject commit d454a48b5169fddacd169e6ca4124b69449501c9 Subproject commit a59742817f8ef89ab02b8093d4f57c3ded770a42