From 44c82424faffa37a9324d627dbf52550c2f5b90f Mon Sep 17 00:00:00 2001 From: Vishal Mhatre <38512878+mhatrevi@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:55:25 -0800 Subject: [PATCH] [fix] Update emulator to copy the HMAC tag to the tag register array in CSR mode. (#1879) --- sw-emulator/lib/periph/src/hmac.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sw-emulator/lib/periph/src/hmac.rs b/sw-emulator/lib/periph/src/hmac.rs index 5067123385..84b61ef26a 100644 --- a/sw-emulator/lib/periph/src/hmac.rs +++ b/sw-emulator/lib/periph/src/hmac.rs @@ -348,8 +348,10 @@ impl HmacSha { let mode512 = self.control.reg.is_set(Control::MODE); // If CSR mode is set, use the pre-defined key. + // Also reset the key_from_kv flag since the key is not read from the key-vault. if self.control.reg.is_set(Control::CSR_MODE) { self.key = self.csr_key; + self.key_from_kv = false; } if self.control.reg.is_set(Control::INIT) {