Test Specification for Hal Crypto Chibios Hal Crypto Test Suite. Test suite for ChibiOS Crypto Hal. The purpose of this suite is to perform unit tests on the Hal Crypto and to converge to 100% code coverage through successive improvements. cry_ > 8u ) | ( (v & 0xff000000) >> 24u ); } #endif void cryptoTest_setStream(BaseSequentialStream * s) { ts = s; } void cryptoTest_printArray(const uint8_t *a,size_t len) { #if CRYPTO_LOG_LEVEL == 1 for(size_t i=0;i Internal Tests AES ECB AES ECB #include "ref_aes.h" static const CRYConfig config_Polling = { TRANSFER_POLLING, AES_CFBS_128, //cfbs 0 }; static const CRYConfig config_DMA = { TRANSFER_DMA, AES_CFBS_128, //cfbs 0 }; ]]> AES ECB Polling testing AES ECB with various Keys loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt loading the key with 32 byte size Encrypt Decrypt AES ECB DMA testing AES ECB with various Keys loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt loading the key with 32 byte size Encrypt Decrypt Internal Tests AES CFB AES CFB #include "ref_aes.h" static const CRYConfig config_Polling = { TRANSFER_POLLING, AES_CFBS_128, //cfbs 0 }; static const CRYConfig config_DMA = { TRANSFER_DMA, AES_CFBS_128, //cfbs 0 }; ]]> AES CFB Polling testing AES CFB with various Keys loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt loading the key with 32 byte size Encrypt Decrypt AES CFB DMA testing AES CFB with various Keys loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt loading the key with 32 byte size Encrypt Decrypt Internal Tests AES CBC AES CBC #include "ref_aes.h" static const CRYConfig config_Polling = { TRANSFER_POLLING, AES_CFBS_128, //cfbs 0 }; static const CRYConfig config_DMA = { TRANSFER_DMA, AES_CFBS_128, //cfbs 0 }; ]]> AES CBC Polling testing AES CBC with various Keys loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt loading the key with 32 byte size Encrypt Decrypt AES CBC DMA testing AES CBC with various Keys loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt loading the key with 32 byte size Encrypt Decrypt Internal Tests (T)DES (T)DES testing #include "ref_des.h" static const CRYConfig configDES_Polling= { TRANSFER_POLLING, 0, TDES_ALGO_SINGLE }; static const CRYConfig configTDES_Polling= { TRANSFER_POLLING, 0, TDES_ALGO_TRIPLE }; static const CRYConfig configTDES_DMA= { TRANSFER_DMA, 0, TDES_ALGO_TRIPLE }; ]]> DES Polling testing DES in polled mode loading the key with 8 byte size Encrypt Decrypt TDES CBC Polling testing TDES CBC in polled mode loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt TDES ECB Polling testing TDES ECB in polling mode loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt TDES CBC DMA testing TDES CBC in polled mode loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt TDES ECB DMA testing TDES ECB in DMA mode loading the key with 16 byte size Encrypt Decrypt loading the key with 24 byte size Encrypt Decrypt