X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-aes-test.c;h=107d30e5ee68b64c664af42c6b07331c85e818a7;hb=7390f9235d6bc08b7fe34a5f43a04bd3b58f6ea6;hp=8b0f67ef9708e30d37c8606d949c85e2dc670ab6;hpb=3f2f2071c47e2e424af71cc85697f3eb26c24277;p=arm-crypto-lib.git diff --git a/test_src/main-aes-test.c b/test_src/main-aes-test.c index 8b0f67e..107d30e 100644 --- a/test_src/main-aes-test.c +++ b/test_src/main-aes-test.c @@ -30,7 +30,7 @@ #include "sysclock.h" #include "hw_gptm.h" -#include "aes/aes.h" +#include "aes.h" #include "nessie_bc_test.h" #include "performance_test.h" @@ -196,6 +196,18 @@ void testrun_testkey_aes256(void){ } } +void crypto_test(void){ + uint8_t test_data[16], test_key[32]; + aes256_ctx_t ctx; + memset(test_key, 0xA5, 32); + memset(test_data, 0, 16); + aes256_init(test_key, &ctx); + aes256_enc(test_data, &ctx); + cli_putstr("\r\ncrypto test data:\r\n"); + cli_hexdump_block(test_data, 16, 4, 8); +} + + void testrun_testkey_aes(void){ testrun_testkey_aes128(); testrun_testkey_aes192(); @@ -698,6 +710,7 @@ const cmdlist_entry_t cmdlist[] = { { "testcmac72", NULL, testrun_aes128_cmac72 }, { "testcmac0", NULL, testrun_aes192_cmac0 }, { "testeax", NULL, testrun_aes128_eax }, + { "quick-test", NULL, crypto_test }, { "cmacvs_list", NULL, cmacvs_listalgos }, { "cmacvs_set", (void*)1, (void_fpt)cmacvs_setalgo }, { "cmacvs_test1", NULL, cmacvs_test1 },