cancel
Showing results for 
Search instead for 
Did you mean: 

what will be the source file path for x-cube-cryptolib-master for AES256 Encryption . I Used Atollic truestudio for CubeMax gererated code. I Download x-cube-cryptolib-master from ST.com

STAR
Associate II

Not able to access some function definition for AES256 . I am using Atolic true studio for cubeMx generated Code. I used STM32L442KC Microcontroller

I Added crypto library using below steps .

open properties of project and in C/C++ general>Paths and Symbols. In the Include tab add the folder that contains the header files. In the Source Location Tab add folder that contains the source code file. Aplly then OK. Clean and Rebuild the project. Then you can include in the main.c.

1) Not able to access function

AES_ECB_Encrypt_Init(&AESctx, Key, NULL);

definition not found please suggest any

2) It is possible to generate AES256 encryption data without crypto lib. I was downloaded the package In Cube Max, so AES init() function is created

static void MX_AES_Init(void)

{

 /* USER CODE BEGIN AES_Init 0 */

 /* USER CODE END AES_Init 0 */

 /* USER CODE BEGIN AES_Init 1 */

 /* USER CODE END AES_Init 1 */

 hcryp.Instance = AES;

 hcryp.Init.DataType = CRYP_DATATYPE_8B;

 hcryp.Init.KeySize = CRYP_KEYSIZE_256B;

 hcryp.Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT;

 hcryp.Init.ChainingMode = CRYP_CHAINMODE_AES_ECB;

 hcryp.Init.KeyWriteFlag = CRYP_KEY_WRITE_DISABLE;//CRYP_KEY_WRITE_ENABLE;

 hcryp.Init.pKey = (uint8_t *)pKeyAES;

 if (HAL_CRYP_Init(&hcryp) != HAL_OK)

 {

  Error_Handler();

 }

 /* USER CODE BEGIN AES_Init 2 */

 /* USER CODE END AES_Init 2 */

}

if possible then what will be next API to generate AES256 Encryption , please Any Help will be Highly appreciated

Regards

Ashok

  •  

0 REPLIES 0