Skip to content

Commit 250cfee

Browse files
committed
[cryptotest] Allow longer RSA signatures
Some tests in the wycheproof test vector set are error tests. In one of these error tests, a larger signature (514 instead of 512-bytes) is sent to the DUT. However, we currently limit the signature payload to 512- bytes, letting the test fail. The solution to this is simple, increase the max. number of signature bytes to 512-bytes. The CL now gets this 514-byte signature and internally fails, as expected by the test. Signed-off-by: Pascal Nasahl <[email protected]>
1 parent 9b8de49 commit 250cfee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sw/device/tests/crypto/cryptotest/json/rsa_commands.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ extern "C" {
1313

1414
#define RSA_CMD_MAX_MESSAGE_BYTES 512
1515
#define RSA_CMD_MAX_N_BYTES 512
16-
#define RSA_CMD_MAX_SIGNATURE_BYTES 512
16+
// There are some error test cases that send larger signatures than 512 bytes.
17+
// The cryptolib should detect this and abort with an error.
18+
// Accomodate for these additional bytes.
19+
#define RSA_CMD_MAX_SIGNATURE_BYTES 514
1720

1821
// clang-format off
1922

0 commit comments

Comments
 (0)