Skip to content

Commit 1f7308d

Browse files
committed
review: add additional RSA PSS test and bench coverage
1 parent c28aae3 commit 1f7308d

8 files changed

Lines changed: 96 additions & 0 deletions

.github/workflows/test-renode-fastmath-smallstack.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ jobs:
5050
run: ./tools/renode/docker-test.sh "SIGN=RSA4096 WOLFBOOT_SMALL_STACK=1 SPMATH=0"
5151

5252

53+
# RSAPSS2048 TEST
54+
- name: Renode Tests RSAPSS2048
55+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS2048 WOLFBOOT_SMALL_STACK=1 SPMATH=0"
56+
57+
58+
# RSAPSS3072 TEST
59+
- name: Renode Tests RSAPSS3072
60+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS3072 WOLFBOOT_SMALL_STACK=1 SPMATH=0"
61+
62+
63+
# RSAPSS4096 TEST
64+
- name: Renode Tests RSAPSS4096
65+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS4096 WOLFBOOT_SMALL_STACK=1 SPMATH=0"
66+
67+
5368
- name: Upload Output Dir
5469
uses: actions/upload-artifact@v4
5570
with:

.github/workflows/test-renode-fastmath.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,12 @@ jobs:
5252
# RSA4096 TEST: RSA with TFM requires the possibility to allocate
5353
# large amount of stack space (about 70KB) which are not available
5454
# on the renode target. This test has been disabled.
55+
56+
57+
# RSAPSS2048 TEST
58+
- name: Renode Tests RSAPSS2048
59+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS2048 SPMATH=0"
60+
61+
62+
# RSAPSS3072/RSAPSS4096 TEST: same TFM stack constraint as RSA3072/RSA4096
63+
# above. These tests are disabled.

.github/workflows/test-renode-noasm-smallstack.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ jobs:
5151
run: ./tools/renode/docker-test.sh "SIGN=RSA4096 WOLFBOOT_SMALL_STACK=1 NO_ASM=1"
5252

5353

54+
# RSAPSS2048 TEST
55+
- name: Renode Tests RSAPSS2048
56+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS2048 WOLFBOOT_SMALL_STACK=1 NO_ASM=1"
57+
58+
59+
# RSAPSS3072 TEST
60+
- name: Renode Tests RSAPSS3072
61+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS3072 WOLFBOOT_SMALL_STACK=1 NO_ASM=1"
62+
63+
64+
# RSAPSS4096 TEST
65+
- name: Renode Tests RSAPSS4096
66+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS4096 WOLFBOOT_SMALL_STACK=1 NO_ASM=1"
67+
68+
5469
- name: Upload Output Dir
5570
uses: actions/upload-artifact@v4
5671
with:

.github/workflows/test-renode-noasm.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ jobs:
6060
run: ./tools/renode/docker-test.sh "SIGN=RSA4096 NO_ASM=1"
6161

6262

63+
# RSAPSS2048 TEST
64+
- name: Renode Tests RSAPSS2048
65+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS2048 NO_ASM=1"
66+
67+
68+
# RSAPSS3072 TEST
69+
- name: Renode Tests RSAPSS3072
70+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS3072 NO_ASM=1"
71+
72+
73+
# RSAPSS4096 TEST
74+
- name: Renode Tests RSAPSS4096
75+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS4096 NO_ASM=1"
76+
77+
6378
- name: Upload Output Dir
6479
uses: actions/upload-artifact@v4
6580
with:

.github/workflows/test-renode-smallstack.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ jobs:
6666
run: ./tools/renode/docker-test.sh "SIGN=RSA4096 WOLFBOOT_SMALL_STACK=1"
6767

6868

69+
# RSAPSS2048 TEST
70+
- name: Renode Tests RSAPSS2048
71+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS2048 WOLFBOOT_SMALL_STACK=1"
72+
73+
74+
# RSAPSS3072 TEST
75+
- name: Renode Tests RSAPSS3072
76+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS3072 WOLFBOOT_SMALL_STACK=1"
77+
78+
79+
# RSAPSS4096 TEST
80+
- name: Renode Tests RSAPSS4096
81+
run: ./tools/renode/docker-test.sh "SIGN=RSAPSS4096 WOLFBOOT_SMALL_STACK=1"
82+
83+
6984
- name: Upload Output Dir
7085
uses: actions/upload-artifact@v4
7186
with:

tools/scripts/benchmark.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ set_benchmark "rsa2048" SIGN=RSA2048
5757
set_benchmark "rsa3072" SIGN=RSA3072
5858
set_benchmark "rsa4096" SIGN=RSA4096
5959
set_benchmark "rsa4096 with sha384" SIGN=RSA4096 HASH=SHA384
60+
set_benchmark "rsapss2048" SIGN=RSAPSS2048
61+
set_benchmark "rsapss3072" SIGN=RSAPSS3072
62+
set_benchmark "rsapss4096" SIGN=RSAPSS4096
6063
set_benchmark "ecdsa256" SIGN=ECC256
6164
set_benchmark "ecdsa384" SIGN=ECC384
6265
set_benchmark "ecdsa521" SIGN=ECC521

tools/test-renode.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ ifeq ($(SIGN),RSA4096)
8686
SIGN_ARGS+= --rsa4096
8787
endif
8888

89+
ifeq ($(SIGN),RSAPSS2048)
90+
SIGN_ARGS+= --rsapss2048
91+
endif
92+
93+
ifeq ($(SIGN),RSAPSS3072)
94+
SIGN_ARGS+= --rsapss3072
95+
endif
96+
97+
ifeq ($(SIGN),RSAPSS4096)
98+
SIGN_ARGS+= --rsapss4096
99+
endif
100+
89101
ifeq ($(SIGN),LMS)
90102
SIGN_ARGS+= --lms
91103
endif

tools/test.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,18 @@ test-size-all:
12111211
make clean
12121212
make test-size SIGN=RSA3072 NO_ASM=1 LIMIT=12600 NO_ARM_ASM=1
12131213
make keysclean
1214+
make test-size SIGN=RSAPSS2048 LIMIT=13670 NO_ARM_ASM=1
1215+
make clean
1216+
make test-size SIGN=RSAPSS2048 NO_ASM=1 LIMIT=14230 NO_ARM_ASM=1
1217+
make keysclean
1218+
make test-size SIGN=RSAPSS3072 LIMIT=13840 NO_ARM_ASM=1
1219+
make clean
1220+
make test-size SIGN=RSAPSS3072 NO_ASM=1 LIMIT=14360 NO_ARM_ASM=1
1221+
make keysclean
1222+
make test-size SIGN=RSAPSS4096 LIMIT=14010 NO_ARM_ASM=1
1223+
make clean
1224+
make test-size SIGN=RSAPSS4096 NO_ASM=1 LIMIT=14550 NO_ARM_ASM=1
1225+
make keysclean
12141226
make test-size SIGN=LMS LMS_LEVELS=2 LMS_HEIGHT=5 LMS_WINTERNITZ=8 \
12151227
WOLFBOOT_SMALL_STACK=0 IMAGE_SIGNATURE_SIZE=2644 \
12161228
IMAGE_HEADER_SIZE?=5288 LIMIT=7798 NO_ARM_ASM=1

0 commit comments

Comments
 (0)