From c051dfde9d7c96532a7fe75174e0c076e7c0ce4c Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 30 Oct 2014 01:38:40 +0100 Subject: [PATCH] update trezor-crypto --- demo/demo.c | 2 +- firmware/storage.c | 2 +- trezor-crypto | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/demo.c b/demo/demo.c index ff3b9b7f0a..0682e7ca7b 100644 --- a/demo/demo.c +++ b/demo/demo.c @@ -265,7 +265,7 @@ int main(void) switch (state) { case 1: layoutProgress("WORKING", frame % 41 * 25, frame % 4); - pbkdf2(pass, passlen, salt, saltlen, 100, seed, 64, NULL); + pbkdf2_hmac_sha512(pass, passlen, salt, saltlen, 100, seed, 64, NULL); usbd_ep_write_packet(usbd_dev, 0x81, seed, 64); break; } diff --git a/firmware/storage.c b/firmware/storage.c index a2e95f83d5..7524741214 100644 --- a/firmware/storage.c +++ b/firmware/storage.c @@ -229,7 +229,7 @@ bool storage_getRootNode(HDNode *node) // decrypt hd node uint8_t secret[64]; layoutProgressSwipe("Waking up", 0, 0); - pbkdf2((const uint8_t *)sessionPassphrase, strlen(sessionPassphrase), (uint8_t *)"TREZORHD", 8, BIP39_PBKDF2_ROUNDS, secret, 64, get_root_node_callback); + pbkdf2_hmac_sha512((const uint8_t *)sessionPassphrase, strlen(sessionPassphrase), (uint8_t *)"TREZORHD", 8, BIP39_PBKDF2_ROUNDS, secret, 64, get_root_node_callback); aes_decrypt_ctx ctx; aes_decrypt_key256(secret, &ctx); aes_cbc_decrypt(sessionRootNode.chain_code, sessionRootNode.chain_code, 32, secret + 32, &ctx); diff --git a/trezor-crypto b/trezor-crypto index ad8e618ed2..f6560c7d13 160000 --- a/trezor-crypto +++ b/trezor-crypto @@ -1 +1 @@ -Subproject commit ad8e618ed28f4dca108461a9afdbbaadeb26746c +Subproject commit f6560c7d1303a50d215cffab87acc7fc8c8964a4