I'm trying to decrypt an encryption key using AES-CCM, but I'm facing an issue where the callback does not respond.
Despite this, the return value of AESCCM_oneStepDecrypt was AESCCM_STATUS_SUCCESS.
Could you please provide guidance on resolving this issue?
Although the reason is unclear to me, I have confirmed that the callback responds only when I follow these steps to call AESCCM_oneStepDecrypt:
- Run debug execution with IAR.
- Pause at the line referencing the return value of AESCCM_oneStepDecrypt (set a breakpoint).
- Step over and exit the function that calls AESCCM_oneStepDecrypt.
- The callback responds.
[Parameter Settings Example]
At the time of decryption, I specify the following parameters:
AESCCM_OneStepOperation_init(&stt_operation);
stt_operation.key = Address of key information
stt_operation.aadLength = 0
stt_operation.input = Address of a 38-byte array
stt_operation.output = Address of an array
stt_operation.inputLength = 38
stt_operation.nonce = Array of IV
stt_operation.nonceLength = 16
stt_operation.mac = Array of MAC
stt_operation.macLength = 8
Additionally, I've registered the callback during initialization as follows:
AESCCM_Params_init(&AESCCM_Params);
AESCCM_Params.returnBehavior = AESCCM_RETURN_BEHAVIOR_CALLBACK;
AESCCM_Params.callbackFxn = vos_CryptoIf_AESCCM_Callback;
[Version Information]
- HSM Information: FW Version: 3.0.0
- IAR Embedded Workbench for ARM: 9.60.3.7274