Hello @lukaszadrapa,
Thank you for reply, but i dont use CMD_GENERATE_MAC() function for generate cmac. I use external software to signing my binary code that follow AES-128 CMAC method.
This binary is 7308byte and calculated cmac is (CSEC_BOOT_MAC) {0x16, 0x3c, 0xc5, 0xdc, 0x7b, 0x0f, 0xcd, 0x7e, 0x24, 0x5b, 0x98, 0xa5, 0x9b, 0x30, 0xcd, 0x66}.
Actually my problem is CSEC_DRV_BootDefine() function.
Firstly, i load keys (CSEC_MASTER_ECU, CSEC_BOOT_MAC_KEY and CSEC_BOOT_MAC) in my EVB via RAM_Debug.
After that i load my application code to EVB via FLASH_Debug.
/// 7308 * 8 = 58464
And finally i use CSEC_DRV_BootDefine(58464, CSEC_BOOT_SERIAL); for enable secure boot.
So, should i follow 4.4.3.1 Manually in RM like CSEC_DRV_BootDefine(58464 + 128, CSEC_BOOT_SERIAL);
or should i keep boot_size aligned to 128 bits
Does secure boot operation do automatic 128-bit alignment?
How secure boot handles boot size?
How can i secure boot with external specified boot_mac on my binary file?
Which key is used in boot_mac calculation of secure boot operation? Is the key used csec_boot_mac_key?