Skip to content

Commit 3b8c672

Browse files
committed
testing/crypto: add keymanagement test cases
Add comprehensive key management test suite covering: - AES key generation (128, 192, 256-bit) - RSA keypair generation with variable key sizes - ECDSA keypair generation on SECP256R1 curve Tests key lifecycle operations and MTD-based persistent storage. Signed-off-by: makejian <makejian@xiaomi.com>
1 parent 5f56d7e commit 3b8c672

File tree

4 files changed

+525
-0
lines changed

4 files changed

+525
-0
lines changed

testing/drivers/crypto/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,18 @@ if(CONFIG_TESTING_CRYPTO)
197197
cmocka)
198198
endif()
199199

200+
if(CONFIG_TESTING_CRYPTO_KEY_MANAGEMENT)
201+
nuttx_add_application(
202+
NAME
203+
keymanagement
204+
PRIORITY
205+
${CONFIG_TESTING_CRYPTO_PRIORITY}
206+
STACKSIZE
207+
${CONFIG_TESTING_CRYPTO_STACKSIZE}
208+
MODULE
209+
${CONFIG_TESTING_CRYPTO}
210+
SRCS
211+
keymanagement.c)
212+
endif()
213+
200214
endif()

testing/drivers/crypto/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ config TESTING_CRYPTO_RSA
6060
bool "rsa crypto test"
6161
default n
6262

63+
config TESTING_CRYPTO_KEY_MANAGEMENT
64+
bool "key management test"
65+
default n
66+
6367
config TESTING_CRYPTO_PRIORITY
6468
int "crypto test task priority"
6569
default 100

testing/drivers/crypto/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ PROGNAME += rsa
7878
MAINSRC += rsa.c
7979
endif
8080

81+
ifeq ($(CONFIG_TESTING_CRYPTO_KEY_MANAGEMENT),y)
82+
PROGNAME += keymanagement
83+
MAINSRC += keymanagement.c
84+
endif
85+
8186
PRIORITY = $(CONFIG_TESTING_CRYPTO_PRIORITY)
8287
STACKSIZE = $(CONFIG_TESTING_CRYPTO_STACKSIZE)
8388
MODULE = $(CONFIG_TESTING_CRYPTO)

0 commit comments

Comments
 (0)