Skip to main content
Associate III
December 20, 2025
Solved

AES in CTR Mode: IV not saved to IOC file

  • December 20, 2025
  • 2 replies
  • 369 views

Hello,

I'm facing an issue in CubeMX with the AES IV in CTR Mode

The IV is not saved in the IOC file and is discarded from the generated code, replaced with a full 0 value.

The AES content inside the IOC file:

AES.Algorithm=CRYP_AES_CTR
AES.DataType=CRYP_DATATYPE_8B
AES.DataWidthUnit=CRYP_DATAWIDTHUNIT_BYTE
AES.IPParameters=KeySize,DataType,DataWidthUnit,pKey,Algorithm
AES.KeySize=CRYP_KEYSIZE_256B
AES.pKey=-------- -------- -------- -------- -------- -------- -------- --------

MCU: STM32F423VHT

CubeMX: Latest version 6.16.1

AES Settings

Algorithm
Data encryption type AES CTR
Parameters
Data type 8b(byte swapping)
KeySize 256b
Encryption/Decryption key -------- -------- -------- -------- -------- -------- -------- --------
Initialization vector E467824C 805348FF 4CE1DF70 566ED4A9
Data width unit Byte
Key and IV configuration skip Always

 

Best answer by Mahmoud Ben Romdhane

Hello @zeboss49 ,

 

The behavior described was not reproduced by my side, knowing that I am using STM32CubeMX 6.16.1.

MahmoudBenRomdhane_1-1766395878707.png

 

MahmoudBenRomdhane_0-1766395790955.png

I will be waiting for your feedback.

 

Thanks.

Mahmoud

2 replies

zeboss49Author
Associate III
December 20, 2025

Hello,

thanks for the change :)
You're right, the previous title was a rubbish.

Technical Moderator
December 22, 2025

Hello @zeboss49 ,

 

Let me thank you for posting.

I am currently checking this behavior, and I will get back to ASAP.

 

Thanks.

Mahmoud

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Technical Moderator
December 22, 2025

Hello @zeboss49 ,

 

The behavior described was not reproduced by my side, knowing that I am using STM32CubeMX 6.16.1.

MahmoudBenRomdhane_1-1766395878707.png

 

MahmoudBenRomdhane_0-1766395790955.png

I will be waiting for your feedback.

 

Thanks.

Mahmoud

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
zeboss49Author
Associate III
December 22, 2025

Hello,

the issue no longer exists with CubeMX 6.16.1.

I upgraded recently and did not check the issue after upgrading.

Sorry for the inconvenience.

 

Thanks

Didier