LPC43S37 AES ECB mode

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by bin.er on Thu Oct 08 20:59:12 MST 2015
I tried to encode AES 128 ECB test vendor and check the result, and the result is not as expected.
I am wondering the use of AES API of LPC43S37.

Test vector are
uint8_t key[] = {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c};
uint8_t plain_text[]  = {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a};
uint8_t out[] = {0x3a, 0xd7, 0x7b, 0xb4, 0x0d, 0x7a, 0x36, 0x60, 0xa8, 0x9e, 0xca, 0xf3, 0x24, 0x66, 0xef, 0x97};
        uint32_t i = 0;
//Chip_AES_LoadIV_SW(iv);// no initial IV is required as ECB mode
Chip_AES_Operate(&compressed_text, &plain_text, 16); //also 1 was tried as 3rd argument
The compressed_text is not consistent with the expected result, thought it can be decrypted well by AES ECB engine of LPC43S37 ECB mode and recover the plain text.
[5]0x60        0x10000055uint8_t
[12]0x54   0x1000005Cuint8_t