Skip to content

Commit dc34cd9

Browse files
committed
[pentest] Add ECC256 Keygen SCA test
This commit adds the ECC256 key generation side-channel penetration test to the codebase. The host code is located in lowRISC/ot-sca#347 Signed-off-by: Pascal Nasahl <[email protected]>
1 parent cedddf9 commit dc34cd9

File tree

10 files changed

+674
-0
lines changed

10 files changed

+674
-0
lines changed

sw/device/tests/penetrationtests/firmware/BUILD

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,47 @@ cc_library(
5151
],
5252
)
5353

54+
cc_library(
55+
name = "ecc256_keygen_sca",
56+
srcs = ["ecc256_keygen_sca.c"],
57+
hdrs = ["ecc256_keygen_sca.h"],
58+
deps = [
59+
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
60+
"//sw/device/lib/base:abs_mmio",
61+
"//sw/device/lib/base:memory",
62+
"//sw/device/lib/crypto/drivers:otbn",
63+
"//sw/device/lib/runtime:ibex",
64+
"//sw/device/lib/runtime:log",
65+
"//sw/device/lib/testing:entropy_testutils",
66+
"//sw/device/lib/testing/test_framework:ottf_main",
67+
"//sw/device/lib/testing/test_framework:ujson_ottf",
68+
"//sw/device/lib/ujson",
69+
"//sw/device/sca/lib:prng",
70+
"//sw/device/sca/lib:sca",
71+
"//sw/device/tests/penetrationtests/json:otbn_sca_commands",
72+
"//sw/otbn/crypto:p256_key_from_seed_sca",
73+
],
74+
)
75+
76+
cc_library(
77+
name = "otbn_sca",
78+
srcs = ["otbn_sca.c"],
79+
hdrs = ["otbn_sca.h"],
80+
deps = [
81+
":ecc256_keygen_sca",
82+
"//sw/device/lib/base:memory",
83+
"//sw/device/lib/base:status",
84+
"//sw/device/lib/crypto/impl:status",
85+
"//sw/device/lib/runtime:log",
86+
"//sw/device/lib/testing/test_framework:ujson_ottf",
87+
"//sw/device/lib/ujson",
88+
"//sw/device/sca/lib:prng",
89+
"//sw/device/sca/lib:sca",
90+
"//sw/device/tests/penetrationtests/firmware:sca_lib",
91+
"//sw/device/tests/penetrationtests/json:otbn_sca_commands",
92+
],
93+
)
94+
5495
cc_library(
5596
name = "ibex_fi",
5697
srcs = [
@@ -227,6 +268,7 @@ FIRMWARE_DEPS = [
227268
":ibex_fi",
228269
":ibex_sca",
229270
":kmac_sca",
271+
":otbn_sca",
230272
":otbn_fi",
231273
":prng_sca",
232274
":sha3_sca",

0 commit comments

Comments
 (0)