Skip to content

Commit 508a0ea

Browse files
luismarquesAlexJones0
authored andcommitted
[ot] hw/opentitan: ot_present: fix ot_present_decrypt
Signed-off-by: Luís Marques <[email protected]>
1 parent 81955d4 commit 508a0ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/opentitan/ot_present.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ void ot_present_decrypt(const OtPresentState *ps, uint64_t src, uint64_t *dst)
217217

218218
for (unsigned round = OT_PRESENT_ROUND - 1u; round > 0; round--) {
219219
state = add_round_key(state, ps->keys[round]);
220-
state = sbox_inv_layer(state);
221220
state = perm_inv_layer(state);
221+
state = sbox_inv_layer(state);
222222
}
223223
state = add_round_key(state, ps->keys[0]);
224224

0 commit comments

Comments
 (0)