Home
last modified time | relevance | path

Searched refs:hmac (Results 1 - 21 of 21) sorted by relevance

/base/security/device_auth/frameworks/deviceauth_lite/inc/key_agreement/
H A Dpake_server.h107 struct hmac kcf_data;
111 struct hmac kcf_data;
H A Dpake_client.h44 struct hmac kcf_data;
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_protocol_task/
H A Diso_client_protocol_task.c215 uint8_t *hmac = (uint8_t *)HcMalloc(HMAC_LEN, 0); in GenerateSessionKey() local
216 if (hmac == NULL) { in GenerateSessionKey()
217 LOGE("Malloc for hmac failed."); in GenerateSessionKey()
221 if (GetByteFromJson(in, FIELD_RETURN_CODE_MAC, hmac, HMAC_LEN) != 0) { in GenerateSessionKey()
222 LOGE("Get hmac from json failed."); in GenerateSessionKey()
228 res = IsoClientGenSessionKey(&params->baseParams, 0, hmac, HMAC_LEN); in GenerateSessionKey()
237 HcFree(hmac); in GenerateSessionKey()
/base/security/device_auth/frameworks/deviceauth_lite/source/struct/
H A Dpake_server_confirm.c41 int32_t result = byte_convert(obj, FIELD_KCF_DATA, pake_server_confirm->kcf_data.hmac, in parse_pake_server_confirm()
H A Dpake_client_confirm.c38 uint8_t *tmp_kcf_data_hex = raw_byte_to_hex_string(pake_client_confirm->kcf_data.hmac, in make_pake_client_confirm()
/base/security/device_auth/frameworks/deviceauth_lite/inc/base/
H A Dbase.h206 struct hmac { struct
208 uint8_t hmac[HC_HMAC_LEN]; member
/base/security/device_auth/services/protocol/inc/iso_protocol/
H A Diso_protocol_common.h49 int IsoClientGenSessionKey(IsoBaseParams *params, int returnResult, const uint8_t *hmac, uint32_t hmacLen);
/base/security/device_auth/frameworks/deviceauth_lite/source/key_agreement/
H A Dpake_client.c247 static struct hmac generate_proof(struct pake_client *pake_client);
278 static bool verify_proof_is_ok(struct pake_client *pake_client, struct hmac *kcf_data);
336 static struct hmac generate_proof(struct pake_client *pake_client) in generate_proof()
338 struct hmac proof = { 0, {0} }; in generate_proof()
360 LOGE("Object %u generate proof hmac failed, error code is %d.", pake_client_sn(pake_client), ret); in generate_proof()
367 static bool verify_proof_is_ok(struct pake_client *pake_client, struct hmac *kcf_data) in verify_proof_is_ok()
382 struct hmac verify_proof = { 0, {0} }; in verify_proof_is_ok()
388 LOGE("Object %u verify proof hmac failed, error code is %d", pake_client_sn(pake_client), ret); in verify_proof_is_ok()
393 LOGI("Object %u verify proof hmac result is %d", pake_client_sn(pake_client), ret); in verify_proof_is_ok()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
H A Dopenssl_hmac_helper.c21 #include <openssl/hmac.h>
/base/security/device_auth/services/protocol/src/iso_protocol/
H A Diso_protocol_common.c275 LOGE("Compare hmac token failed."); in IsoClientCheckAndGenToken()
287 int IsoClientGenSessionKey(IsoBaseParams *params, int returnResult, const uint8_t *hmac, uint32_t hmacLen) in IsoClientGenSessionKey() argument
293 if (hmac == NULL) { in IsoClientGenSessionKey()
310 if (memcmp(outHmacBuf.val, hmac, hmacLen) != 0) { in IsoClientGenSessionKey()
311 LOGE("Compare hmac result failed."); in IsoClientGenSessionKey()
371 LOGE("Compare hmac token failed."); in IsoServerGenSessionKeyAndCalToken()
389 LOGE("Compute hmac for returnCode failed, res: %x.", res); in IsoServerGenSessionKeyAndCalToken()
/base/security/device_auth/frameworks/deviceauth_lite/inc/huks_adapter/
H A Dhuks_adapter.h245 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac);
/base/security/device_auth/frameworks/deviceauth_lite/test/unittest/
H A Dhuks_adapter_test.h249 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac);
H A Dhuks_adapter_test.cpp869 struct hmac out_hamc = {0, {0}}; in HWTEST_F()
887 struct hmac out_hamc; in HWTEST_F()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
H A Dhks_openssl_hmac.c27 #include <openssl/hmac.h>
105 HKS_IF_NULL_LOGE_RETURN(opensslAlg, HKS_ERROR_CRYPTO_ENGINE_ERROR, "hmac get openssl algorithm failed") in HksOpensslHmac()
108 HKS_IF_NULL_LOGE_RETURN(hmacData, HKS_ERROR_CRYPTO_ENGINE_ERROR, "hmac process failed.") in HksOpensslHmac()
140 HKS_LOG_E("openssl hmac init failed."); in HksOpensslHmacInit()
173 HKS_LOG_E("hmac update failed."); in HksOpensslHmacUpdate()
209 HKS_LOG_E("hmac final update failed."); in HksOpensslHmacFinal()
217 HKS_LOG_E("hmac final failed."); in HksOpensslHmacFinal()
229 HKS_LOG_E("Openssl hmac free ctx is null"); in HksOpensslHmacHalFreeCtx()
/base/security/huks/interfaces/inner_api/huks_standard/main/include/
H A Dhks_type.h303 uint8_t hmac[HKS_HMAC_DIGEST_SHA512_LEN]; member
/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/
H A Dhks_storage_lite.c116 struct HksBlob mac = { HKS_HMAC_DIGEST_SHA512_LEN, keyInfoHead->hmac }; in InitImageBuffer()
208 if (HksMemCmp(mac.data, keyInfoHead->hmac, HKS_HMAC_DIGEST_SHA512_LEN) != 0) { in CheckKeyInfoHeaderValid()
209 HKS_LOG_E("hmac value not match"); in CheckKeyInfoHeaderValid()
218 struct HksBlob mac = { HKS_HMAC_DIGEST_SHA512_LEN, keyInfoHead->hmac }; in RefreshKeyInfoHeaderHmac()
321 * KeyInfoHeader: | version | keyCount | totalLen | sealingAlg | salt | hmac |
527 /* 2. calc temp hmac */ in StoreKeyBlob()
640 /* 2. calc tmp header hmac */ in HksStoreDeleteKeyBlob()
/base/security/crypto_framework/plugin/openssl_plugin/common/inc/
H A Dopenssl_adapter.h24 #include <openssl/hmac.h>
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/src/
H A Ddlp_crypt.cpp21 #include <openssl/hmac.h>
/base/security/device_auth/frameworks/deviceauth_lite/source/huks_adapter/
H A Dhuks_adapter.c396 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac) in compute_hmac()
404 struct HksBlob output = { HC_HMAC_LEN, out_hmac->hmac }; in compute_hmac()
437 /* make hmac */ in compute_hmac()
440 LOGE("Huks hmac failed, status: %d", status); in compute_hmac()
/base/security/device_auth/frameworks/deviceauth_lite/test/unittest/unittest_mock/
H A Dhuks_adapter_mock_for_pake.c369 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac) in compute_hmac()
377 struct HksBlob output = { HC_HMAC_LEN, out_hmac->hmac }; in compute_hmac()
398 /* make hmac */ in compute_hmac()
401 LOGE("Huks hmac failed, status: %d", status); in compute_hmac()
H A Dhuks_adapter_mock.c369 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac) in compute_hmac()
377 struct HksBlob output = { HC_HMAC_LEN, out_hmac->hmac }; in compute_hmac()
398 /* make hmac */ in compute_hmac()
401 LOGE("Huks hmac failed, status: %d", status); in compute_hmac()

Completed in 19 milliseconds