Home
last modified time | relevance | path

Searched refs:cmac_ctx (Results 1 – 4 of 4) sorted by relevance

/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/
Dcmac_alt.c137 mbedtls_cmac_context_t *cmac_ctx = NULL; in mbedtls_cipher_cmac_starts() local
146 cmac_ctx = mbedtls_calloc( 1, sizeof( mbedtls_cmac_private_context_t ) ); in mbedtls_cipher_cmac_starts()
147 if( cmac_ctx == NULL ) { in mbedtls_cipher_cmac_starts()
151 ctx->MBEDTLS_PRIVATE(cmac_ctx) = cmac_ctx; in mbedtls_cipher_cmac_starts()
152 mbedtls_zeroize_internal( ((mbedtls_cmac_private_context_t*)cmac_ctx)->cmac_ctrl_ctx.state, in mbedtls_cipher_cmac_starts()
153 … sizeof( ((mbedtls_cmac_private_context_t*)cmac_ctx)->cmac_ctrl_ctx.state ) ); in mbedtls_cipher_cmac_starts()
156 if( ( retval = cmac_init( &((mbedtls_cmac_private_context_t*)cmac_ctx)->aes_ctx ) ) != 0 ) in mbedtls_cipher_cmac_starts()
163 …if( ( retval = cmac_setkey( &((mbedtls_cmac_private_context_t*)cmac_ctx)->aes_ctx, key, keybits) )… in mbedtls_cipher_cmac_starts()
174 mbedtls_cmac_context_t *cmac_ctx = NULL; in mbedtls_cipher_cmac_update() local
189 ctx->MBEDTLS_PRIVATE(cmac_ctx) == NULL ) in mbedtls_cipher_cmac_update()
[all …]
/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/codesafe/src/psa_driver_api/src/
Dcc3xx_psa_mac.c140 static psa_status_t cmac_update(cc3xx_cipher_operation_t *cmac_ctx, in cmac_update() argument
148 block_size = cmac_ctx->block_size; in cmac_update()
150 if ((cmac_ctx->unprocessed_size > 0) && in cmac_update()
151 (ilen > (block_size - cmac_ctx->unprocessed_size))) { in cmac_update()
153 &(cmac_ctx)->unprocessed_data[cmac_ctx->unprocessed_size], in cmac_update()
154 input, block_size - cmac_ctx->unprocessed_size); in cmac_update()
157 (const uint8_t *)&(cmac_ctx)->unprocessed_data, block_size, in cmac_update()
164 ret = ProcessAesDrv(&(cmac_ctx->ctx.aes), &inBuffInfo, &outBuffInfo, in cmac_update()
172 input += (block_size - cmac_ctx->unprocessed_size); in cmac_update()
173 ilen -= (block_size - cmac_ctx->unprocessed_size); in cmac_update()
[all …]
/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/utils/src/common/
Dcommon_crypto_sym.c364 CMAC_CTX *cmac_ctx = NULL; in CC_CommonAesCmacEncrypt() local
375 cmac_ctx = CMAC_CTX_new(); in CC_CommonAesCmacEncrypt()
376 if (NULL == cmac_ctx) { in CC_CommonAesCmacEncrypt()
382 rc = CMAC_Init(cmac_ctx, pKey, AES_BLOCK_SIZE, EVP_aes_128_cbc(), 0); in CC_CommonAesCmacEncrypt()
384 rc = CMAC_Init(cmac_ctx, pKey, AES_BLOCK_SIZE*2, EVP_aes_256_cbc(), 0); in CC_CommonAesCmacEncrypt()
391 rc = CMAC_Update(cmac_ctx, pDataIn, dataInSize); in CC_CommonAesCmacEncrypt()
397 rc = CMAC_Final(cmac_ctx, pOutput, &tempOutSize); in CC_CommonAesCmacEncrypt()
405 if (cmac_ctx != NULL) { in CC_CommonAesCmacEncrypt()
406 CMAC_CTX_free(cmac_ctx); in CC_CommonAesCmacEncrypt()
/trusted-firmware-m-3.7.0/interface/include/mbedtls/
Dcipher.h354 mbedtls_cmac_context_t *MBEDTLS_PRIVATE(cmac_ctx);