mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-19 03:40:59 +00:00
fix(core): fix storage compilation for U5 models without optiga
[no changelog]
This commit is contained in:
parent
16b89e587d
commit
e30a0e6231
@ -572,9 +572,9 @@ static void stretch_pin(const uint8_t *pin, size_t pin_len,
|
|||||||
ui_progress(PIN_PBKDF2_MS / 10);
|
ui_progress(PIN_PBKDF2_MS / 10);
|
||||||
}
|
}
|
||||||
#ifdef STM32U5
|
#ifdef STM32U5
|
||||||
uint8_t stretched_pin_tmp[OPTIGA_PIN_SECRET_SIZE] = {0};
|
uint8_t stretched_pin_tmp[SHA256_DIGEST_LENGTH] = {0};
|
||||||
pbkdf2_hmac_sha256_Final(&ctx, stretched_pin_tmp);
|
pbkdf2_hmac_sha256_Final(&ctx, stretched_pin_tmp);
|
||||||
ensure(secure_aes_ecb_encrypt_hw(stretched_pin_tmp, OPTIGA_PIN_SECRET_SIZE,
|
ensure(secure_aes_ecb_encrypt_hw(stretched_pin_tmp, SHA256_DIGEST_LENGTH,
|
||||||
stretched_pin, SECURE_AES_KEY_XORK),
|
stretched_pin, SECURE_AES_KEY_XORK),
|
||||||
"secure_aes pin stretch failed");
|
"secure_aes pin stretch failed");
|
||||||
memzero(stretched_pin_tmp, sizeof(stretched_pin_tmp));
|
memzero(stretched_pin_tmp, sizeof(stretched_pin_tmp));
|
||||||
|
Loading…
Reference in New Issue
Block a user