mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-10-22 08:22:23 +08:00
fix(util): Fix unaligned access to the flash if some LUT is type of "uint8_t" or "uint16_t"
Make the "uint8_t" or "uint16_t" LTU 4-byte-align.
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
/*
|
||||
* Forward S-box
|
||||
*/
|
||||
static const uint8_t s_aes_fsb[256] __attribute__((aligned(4))) =
|
||||
static const uint8_t s_aes_fsb[256] ESP_IBUS_ATTR =
|
||||
{
|
||||
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5,
|
||||
0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
|
||||
@@ -219,7 +219,7 @@ static const uint32_t s_aes_ft3[256] = { FT };
|
||||
/*
|
||||
* Reverse S-box
|
||||
*/
|
||||
static const uint8_t s_aes_rsb[256] __attribute__((aligned(4))) =
|
||||
static const uint8_t s_aes_rsb[256] ESP_IBUS_ATTR =
|
||||
{
|
||||
0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38,
|
||||
0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB,
|
||||
|
Reference in New Issue
Block a user