Skip to content

Commit dc99e83

Browse files
andrea-caforioandreaskurth
authored andcommitted
[kat/rsa] Fix incorrect ordering when comparing RSA-OAEP plaintexts
RSA-OAEP reverses the byte order of its inputs which was not accounted for which causing unwanted test failures. Signed-off-by: Andrea Caforio <[email protected]>
1 parent df6d27c commit dc99e83

File tree

1 file changed

+1
-1
lines changed
  • sw/host/tests/crypto/rsa_kat/src

1 file changed

+1
-1
lines changed

sw/host/tests/crypto/rsa_kat/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ fn run_rsa_testcase(
217217
// Only check plaintext if the response is valid.
218218
assert_eq!(
219219
rsa_decrypt_resp.plaintext[0..test_case.message.len()],
220-
test_case.message[0..test_case.message.len()]
220+
ptx[0..test_case.message.len()]
221221
);
222222
}
223223
}

0 commit comments

Comments
 (0)