Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

fsl_shw_return_t fsl_shw_auth_decrypt ( fsl_shw_uco_t user_ctx,
fsl_shw_acco_t auth_ctx,
fsl_shw_sko_t cipher_key_info,
fsl_shw_sko_t auth_key_info,
uint32_t  auth_data_length,
const uint8_t *  auth_data,
uint32_t  payload_length,
const uint8_t *  ct,
const uint8_t *  auth_value,
uint8_t *  payload 

Authenticate and decrypt a (CCM) stream.

user_ctx The user's context
auth_ctx Info on this Auth operation
cipher_key_info Key to encrypt payload
auth_key_info (unused - same key in CCM)
auth_data_length Length in bytes of auth_data
auth_data Any auth-only data
payload_length Length in bytes of payload
ct The encrypted data
auth_value The authentication code to validate
[out] payload The location to store decrypted data
A return code of type fsl_shw_return_t.

Definition at line 2214 of file shw_driver.c.

References add_assoc_preamble(), fsl_shw_acco_t::auth_info, fsl_shw_scco_t::block_size_bytes, block_zeros, fsl_shw_acco_t::CCM_ctx_info, fsl_shw_acco_t::cipher_ctx_info, fsl_shw_scco_t::context, DESC_IN_IN, DESC_IN_KEY, DESC_IN_OUT, DESC_OUT_OUT, fsl_shw_acco_t::flags, fsl_shw_uco_t::flags, FSL_ACC_MODE_CCM, FSL_ACCO_CTX_FINALIZE, FSL_ACCO_CTX_INIT, FSL_ACCO_CTX_LOAD, FSL_ACCO_CTX_SAVE, FSL_RETURN_AUTH_FAILED_S, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_BAD_MODE_S, FSL_RETURN_ERROR_S, FSL_RETURN_OK_S, FSL_UCO_BLOCKING_MODE, fsl_shw_acco_t::mac_length, fsl_shw_acco_t::mode, SAH_HDR_SKHA_ENC_DEC, SAH_HDR_SKHA_READ_CONTEXT_IV, SAH_HDR_SKHA_SET_MODE_ENC_DEC, SAH_HDR_SKHA_SET_MODE_IV_KEY, sah_insert_skha_modulus_128, and fsl_shw_acco_t::unencrypted_mac.

      volatile fsl_shw_return_t status = FSL_RETURN_ERROR_S;

      /* Unused */
      (void)auth_key_info;    /* save compilation warning */

      return status;

Generated by  Doxygen 1.6.0   Back to index