From 047c8a881b86ad8680fcda15fad8b334598b03a4 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Thu, 21 Mar 2024 11:10:09 +0100 Subject: [PATCH] fix(core): fix order of loading BHK into SAES key register [no changelog] --- core/embed/trezorhal/stm32u5/secure_aes.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/embed/trezorhal/stm32u5/secure_aes.c b/core/embed/trezorhal/stm32u5/secure_aes.c index 9fd964e67..4d6e37600 100644 --- a/core/embed/trezorhal/stm32u5/secure_aes.c +++ b/core/embed/trezorhal/stm32u5/secure_aes.c @@ -40,14 +40,14 @@ secbool secure_aes_init(void) { } static void secure_aes_load_bhk(void) { - TAMP->BKP7R; - TAMP->BKP6R; - TAMP->BKP5R; - TAMP->BKP4R; - TAMP->BKP3R; - TAMP->BKP2R; - TAMP->BKP1R; TAMP->BKP0R; + TAMP->BKP1R; + TAMP->BKP2R; + TAMP->BKP3R; + TAMP->BKP4R; + TAMP->BKP5R; + TAMP->BKP6R; + TAMP->BKP7R; } secbool secure_aes_encrypt(uint32_t* input, size_t size, uint32_t* output) {