2.4.1.1 Crypto_Sym_Aes_Init

crypto_Sym_Status_E Crypto_Sym_Aes_Init(
    st_Crypto_Sym_BlockCtx *ptr_aesCtx_st,
    crypto_HandlerType_E handlerType_en,
    crypto_CipherOper_E cipherOpType_en,
    crypto_Sym_OpModes_E opMode_en,
    uint8_t *ptr_key,
    uint32_t keyLen,
    uint8_t *ptr_initVect,
    uint32_t sessionID
);

Description

This API is used to initiate the AES algorithm parameters for the context.

Parameters

No.Argument TypeArgument NameTypeDescription
1st_Crypto_Sym_BlockCtx*ptr_aesCtx_stInputAES algorithm context.
2crypto_HandlerType_EhandlerType_enInputEnum for crypto operation handler i.e., SW, HW.
3crypto_CipherOper_EcipherOpType_enInputSelection cipher operation is encryption or decryption.
4crypto_Sym_OpModes_EopMode_enInputSelect operation mode. i.e., ECB, CBC, or others.
5uint8_t*ptr_keyInputKey for the Symmetric operation.
6uint32_tkeyLenInputKey length for the Symmetric algorithm in bytes.
7uint8_t*ptr_initVectInputInitialization vector (known as “Nonce” for CTR). Use NULL when ECB mode or XTS mode.
8uint32_tsessionIDInputIt defines the session ID, must be more than zero.

Returns

Return TypeDescription
crypto_Sym_Status_EFunction returns the status of the API.