Searched refs:hmac_ctx (Results 1 – 6 of 6) sorted by relevance
| /optee_os/core/drivers/crypto/caam/hash/ |
| H A D | caam_hash_mac.c | 129 struct hashctx *hmac_ctx = mac->ctx; in do_hmac_init() local 130 const struct hashalg *alg = hmac_ctx->alg; in do_hmac_init() 136 ret = caam_hash_hmac_init(hmac_ctx); in do_hmac_init() 149 hmac_ctx->key.length = alg->size_key; in do_hmac_init() 181 hmac_ctx->key.length)); in do_hmac_init() 182 caam_desc_add_ptr(desc, hmac_ctx->key.paddr); in do_hmac_init() 186 cache_operation(TEE_CACHEFLUSH, hmac_ctx->key.data, in do_hmac_init() 187 hmac_ctx->key.length); in do_hmac_init() 193 HASH_DUMPBUF("Split Key", hmac_ctx->key.data, in do_hmac_init() 194 hmac_ctx->key.length); in do_hmac_init() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | ssl_cookie.c | 66 mbedtls_md_init(&ctx->hmac_ctx); in mbedtls_ssl_cookie_init() 94 mbedtls_md_free(&ctx->hmac_ctx); in mbedtls_ssl_cookie_free() 142 ret = mbedtls_md_setup(&ctx->hmac_ctx, mbedtls_md_info_from_type(COOKIE_MD), 1); in mbedtls_ssl_cookie_setup() 147 ret = mbedtls_md_hmac_starts(&ctx->hmac_ctx, key, sizeof(key)); in mbedtls_ssl_cookie_setup() 163 static int ssl_cookie_hmac(mbedtls_md_context_t *hmac_ctx, in ssl_cookie_hmac() argument 172 if (mbedtls_md_hmac_reset(hmac_ctx) != 0 || in ssl_cookie_hmac() 173 mbedtls_md_hmac_update(hmac_ctx, time, 4) != 0 || in ssl_cookie_hmac() 174 mbedtls_md_hmac_update(hmac_ctx, cli_id, cli_id_len) != 0 || in ssl_cookie_hmac() 175 mbedtls_md_hmac_finish(hmac_ctx, hmac_out) != 0) { in ssl_cookie_hmac() 254 ret = ssl_cookie_hmac(&ctx->hmac_ctx, *p - 4, in mbedtls_ssl_cookie_write() [all …]
|
| H A D | md.c | 325 if (ctx->hmac_ctx != NULL) { in mbedtls_md_free() 326 mbedtls_zeroize_and_free(ctx->hmac_ctx, in mbedtls_md_free() 406 if (dst->hmac_ctx != NULL && src->hmac_ctx != NULL) in mbedtls_md_clone() 407 memcpy(dst->hmac_ctx, src->hmac_ctx, 2 * src->md_info->block_size); in mbedtls_md_clone() 435 ctx->hmac_ctx = NULL; in mbedtls_md_setup() 501 ctx->hmac_ctx = mbedtls_calloc(2, md_info->block_size); in mbedtls_md_setup() 502 if (ctx->hmac_ctx == NULL) { in mbedtls_md_setup() 978 if (ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL) { in mbedtls_md_hmac_starts() 997 ipad = (unsigned char *) ctx->hmac_ctx; in mbedtls_md_hmac_starts() 998 opad = (unsigned char *) ctx->hmac_ctx + ctx->md_info->block_size; in mbedtls_md_hmac_starts() [all …]
|
| H A D | ssl_msg.c | 213 const unsigned char * const ikey = ctx->hmac_ctx; in mbedtls_ct_hmac()
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | ssl_cookie.h | 49 mbedtls_md_context_t MBEDTLS_PRIVATE(hmac_ctx); /*!< context for the HMAC portion */
|
| H A D | md.h | 136 void *MBEDTLS_PRIVATE(hmac_ctx);
|