Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xtest: add asymmetric cipher algorithm perf test #691

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ srcs += adbg/src/adbg_case.c \
adbg/src/adbg_run.c \
adbg/src/security_utils_hex.c \
aes_perf.c \
asym_cipher_perf.c \
benchmark_1000.c \
benchmark_2000.c \
clear_storage.c \
Expand Down Expand Up @@ -108,8 +109,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/host/xtest \
$(LOCAL_PATH)/ta/storage_benchmark/include \
$(LOCAL_PATH)/ta/concurrent/include \
$(LOCAL_PATH)/ta/concurrent_large/include \
$(LOCAL_PATH)/ta/hash_perf/include \
$(LOCAL_PATH)/ta/aes_perf/include \
$(LOCAL_PATH)/ta/crypto_perf/include \
$(LOCAL_PATH)/ta/socket/include \
$(LOCAL_PATH)/ta/sdp_basic/include \
$(LOCAL_PATH)/ta/tpm_log_test/include \
Expand Down
1 change: 1 addition & 0 deletions host/xtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ set (SRC
regression_8000.c
regression_8100.c
hash_perf.c
asym_cipher_perf.c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

stats.c
xtest_helpers.c
xtest_main.c
Expand Down
4 changes: 2 additions & 2 deletions host/xtest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ srcs += adbg/src/adbg_case.c \
adbg/src/adbg_run.c \
adbg/src/security_utils_hex.c \
aes_perf.c \
asym_cipher_perf.c \
benchmark_1000.c \
benchmark_2000.c \
clear_storage.c \
Expand Down Expand Up @@ -120,8 +121,7 @@ CFLAGS += -I../../ta/sims_keepalive/include
CFLAGS += -I../../ta/storage_benchmark/include
CFLAGS += -I../../ta/concurrent/include
CFLAGS += -I../../ta/concurrent_large/include
CFLAGS += -I../../ta/hash_perf/include
CFLAGS += -I../../ta/aes_perf/include
CFLAGS += -I../../ta/crypto_perf/include
CFLAGS += -I../../ta/socket/include
CFLAGS += -I../../ta/sdp_basic/include
CFLAGS += -I../../ta/tpm_log_test/include
Expand Down
10 changes: 5 additions & 5 deletions host/xtest/aes_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <ta_aes_perf.h>
#include <ta_crypto_perf.h>
#include <tee_client_api.h>
#include <tee_client_api_extensions.h>
#include <time.h>
Expand Down Expand Up @@ -109,7 +109,7 @@ static void check_res(TEEC_Result res, const char *errmsg, uint32_t *orig)
static void open_ta(void)
{
TEEC_Result res = TEEC_ERROR_GENERIC;
TEEC_UUID uuid = TA_AES_PERF_UUID;
TEEC_UUID uuid = TA_CRYPTO_PERF_UUID;
uint32_t err_origin = 0;

res = TEEC_InitializeContext(NULL, &ctx);
Expand Down Expand Up @@ -354,7 +354,7 @@ static void prepare_key(int decrypt, int keysize, int mode)
TEEC_Result res = TEEC_ERROR_GENERIC;
uint32_t ret_origin = 0;
TEEC_Operation op = TEEC_OPERATION_INITIALIZER;
uint32_t cmd = TA_AES_PERF_CMD_PREPARE_KEY;
uint32_t cmd = TA_CRYPTO_PERF_CMD_CIPHER_PREPARE_KEY;

op.paramTypes = TEEC_PARAM_TYPES(TEEC_VALUE_INPUT, TEEC_VALUE_INPUT,
TEEC_NONE, TEEC_NONE);
Expand Down Expand Up @@ -432,8 +432,8 @@ void aes_perf_run_test(int mode, int keysize, int decrypt, size_t size, size_t u
TEEC_Operation op = TEEC_OPERATION_INITIALIZER;
int n0 = n;
double sd = 0;
uint32_t cmd = is_sdp_test ? TA_AES_PERF_CMD_PROCESS_SDP :
TA_AES_PERF_CMD_PROCESS;
uint32_t cmd = is_sdp_test ? TA_CRYPTO_PERF_CMD_CIPHER_PROCESS_SDP :
TA_CRYPTO_PERF_CMD_CIPHER_PROCESS;

if (input_buffer == BUFFER_UNSPECIFIED)
input_buffer = BUFFER_SHM_ALLOCATED;
Expand Down
Loading