X-Git-Url: https://git.cryptolib.org/?p=arm-crypto-lib.git;a=blobdiff_plain;f=test_src%2Fmain-aes-test.c;h=107d30e5ee68b64c664af42c6b07331c85e818a7;hp=f5238e21e9a0f2225aa3239bf436272ac3c4ffab;hb=6095187b080b960d111a54f18a3b2da788d2d59d;hpb=f3456452a0f13bfe6d332aaeeada5b626dac2739 diff --git a/test_src/main-aes-test.c b/test_src/main-aes-test.c index f5238e2..107d30e 100644 --- a/test_src/main-aes-test.c +++ b/test_src/main-aes-test.c @@ -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 },