I have try to add SSP_CCM_Auth_Encrypt in my application.Flowing TI-MAC's MSA example,I fill param as " TRUE, 0, nonce, M, M-length,A,A-length,key,MAC,0". after SSP_CCM_Auth_Encrypt finish,with M is string "0123456789ABCDEF" and M-Length is 16 and key is "0123456789ABCDEF",the output A has not been written.
what value should A-length been written?
uint8 status = FAILURE; uint8 nonce[13]; uint8 key[16]; uint8* m = vcom_data + 13 + 16; uint16 m_len = vcom_len - (13 + 16); osal_memcpy( nonce, vcom_data, 13 ); osal_memcpy( key, vcom_data + 13, 16 ); //status = SSP_CCM_Auth_Encrypt (TRUE, Mval, Nonce, M, len_m, A, len_a, AesKey, MAC, ccmLVal); if(aesOut == NULL) { aesOut = osal_mem_alloc( m_len + 32 ); if( aesOut ) { osal_memset( aesOut, 0, m_len + 32 ); aesLen = m_len + 32; ssp_HW_KeyInit( key ); pSspAesEncrypt = sspAesEncryptHW; status = SSP_CCM_Auth_Encrypt (TRUE, 0, nonce, m, m_len, aesOut + 16, 128, key, aesOut, 0 ); } } return status;