From 2e9e287ff2f96dc3cffbe36e8b6336a93d0ffde7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Marques?= Date: Wed, 22 Oct 2025 14:09:21 +0000 Subject: [PATCH] [ot] hw/opentitan: ot_present: fix ot_present_decrypt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luís Marques --- hw/opentitan/ot_present.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/opentitan/ot_present.c b/hw/opentitan/ot_present.c index db330b766047b..74e5efa8abe80 100644 --- a/hw/opentitan/ot_present.c +++ b/hw/opentitan/ot_present.c @@ -217,8 +217,8 @@ void ot_present_decrypt(const OtPresentState *ps, uint64_t src, uint64_t *dst) for (unsigned round = OT_PRESENT_ROUND - 1u; round > 0; round--) { state = add_round_key(state, ps->keys[round]); - state = sbox_inv_layer(state); state = perm_inv_layer(state); + state = sbox_inv_layer(state); } state = add_round_key(state, ps->keys[0]);