/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/standard/ |
H A D | huks_adapter_diff_impl.c | 40 if (res != HAL_SUCCESS || pointBlob.size != SHA256_LEN) { in HashToPointX25519()
|
/base/security/device_auth/services/mk_agree/src/ |
H A D | key_manager.c | 99 uint8_t hashValue[SHA256_LEN] = { 0 }; in GenerateDevKeyAlias() 100 Uint8Buff keyAliasHash = { hashValue, SHA256_LEN }; in GenerateDevKeyAlias() 117 uint8_t hashValue[SHA256_LEN] = { 0 }; in GenerateMkAlias() 118 Uint8Buff keyAliasHash = { hashValue, SHA256_LEN }; in GenerateMkAlias() 133 uint8_t hashValue[SHA256_LEN] = { 0 }; in GeneratePseudonymPskAlias() 134 Uint8Buff keyAliasHash = { hashValue, SHA256_LEN }; in GeneratePseudonymPskAlias()
|
/base/security/device_auth/test/fuzztest/group_manage/groupoperationcommon_fuzzer/ |
H A D | groupoperationcommon_fuzzer.cpp | 409 (void)GetHashResult(nullptr, SHA256_LEN, hash, SHA256_LEN); in GroupOperationTest61() 415 (void)GetHashResult(info, SHA256_LEN, nullptr, SHA256_LEN); in GroupOperationTest62()
|
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/protocol_lib/ |
H A D | dl_speke_protocol.c | 192 if (InitUint8Buff(¶ms->kcfDataPeer, SHA256_LEN) != HC_SUCCESS) { in GetKcfDataPeerFromInput() 425 uint8_t sidSelfVal[SHA256_LEN] = { 0 }; in CalSid() 426 uint8_t sidPeerVal[SHA256_LEN] = { 0 }; in CalSid() 427 Uint8Buff sidSelf = { sidSelfVal, SHA256_LEN }; in CalSid() 428 Uint8Buff sidPeer = { sidPeerVal, SHA256_LEN }; in CalSid() 490 // sid is composed of client sid and server sid, so need twice SHA256_LEN in GenerateSharedSecretMsg() 491 uint8_t sidVal[SHA256_LEN * 2] = { 0 }; in GenerateSharedSecretMsg() 492 Uint8Buff sid = { sidVal, SHA256_LEN * 2 }; in GenerateSharedSecretMsg() 506 uint32_t sharedSecretMsgLen = SHA256_LEN * 2 + params->innerKeyLen + HcStrlen(SHARED_SECRET_DERIVED_FACTOR); in CalSharedSecret() 517 if (InitUint8Buff(¶ms->sharedSecret, SHA256_LEN)) { in CalSharedSecret() [all...] |
H A D | ec_speke_protocol.c | 167 if (InitUint8Buff(¶ms->kcfDataPeer, SHA256_LEN) != HC_SUCCESS) { in GetKcfDataPeerFromInput() 397 uint8_t sidSelfVal[SHA256_LEN] = { 0 }; in CalSid() 398 uint8_t sidPeerVal[SHA256_LEN] = { 0 }; in CalSid() 399 Uint8Buff sidSelf = { sidSelfVal, SHA256_LEN }; in CalSid() 400 Uint8Buff sidPeer = { sidPeerVal, SHA256_LEN }; in CalSid() 462 // sid is composed of client sid and server sid, so need twice SHA256_LEN in GenerateSharedSecretMsg() 463 uint8_t sidVal[SHA256_LEN * 2] = { 0 }; in GenerateSharedSecretMsg() 464 Uint8Buff sid = { sidVal, SHA256_LEN * 2 }; in GenerateSharedSecretMsg() 490 uint32_t sharedSecretMsgLen = SHA256_LEN * 2 + EC_SPEKE_EC_KEY_LEN + HcStrlen(SHARED_SECRET_DERIVED_FACTOR); in CalSharedSecret() 501 if (InitUint8Buff(¶ms->sharedSecret, SHA256_LEN)) { in CalSharedSecret() [all...] |
H A D | iso_protocol.c | 362 uint8_t tokenValS[SHA256_LEN] = { 0 }; in ServerGenTokenProcEvent() 363 Uint8Buff tokenS = { tokenValS, SHA256_LEN }; in ServerGenTokenProcEvent() 468 uint8_t tokenValS[SHA256_LEN] = { 0 }; in ClientGenTokenProcEvent() 469 Uint8Buff tokenS = { tokenValS, SHA256_LEN }; in ClientGenTokenProcEvent() 480 uint8_t tokenValC[SHA256_LEN] = { 0 }; in ClientGenTokenProcEvent() 481 Uint8Buff tokenC = { tokenValC, SHA256_LEN }; in ClientGenTokenProcEvent() 545 uint8_t tokenValC[SHA256_LEN] = { 0 }; in ServerGenSessKeyProcEvent() 546 Uint8Buff tokenC = { tokenValC, SHA256_LEN }; in ServerGenSessKeyProcEvent() 557 uint8_t authResultMacVal[SHA256_LEN] = { 0 }; in ServerGenSessKeyProcEvent() 558 Uint8Buff authResultMac = { authResultMacVal, SHA256_LEN }; in ServerGenSessKeyProcEvent() [all...] |
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/ |
H A D | das_task_common.c | 292 if (outKeyAlias->length != SHA256_LEN) { in CombineKeyAliasForIso() 307 Uint8Buff keyAliasHash = { NULL, SHA256_LEN }; in CombineKeyAliasForPake() 309 if (outKeyAlias->length != SHA256_LEN * BYTE_TO_HEX_OPER_LENGTH) { in CombineKeyAliasForPake() 369 Uint8Buff serviceId = { NULL, SHA256_LEN }; in GenerateKeyAlias() 412 if (outKeyAlias->length != SHA256_LEN * BYTE_TO_HEX_OPER_LENGTH) { in CheckGeneratePskParams() 426 Uint8Buff keyAliasHash = { NULL, SHA256_LEN }; in GeneratePseudonymPskAlias()
|
/base/security/device_auth/services/identity_manager/src/ |
H A D | cert_operation.c | 257 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in VerifyPeerCertInfo() 262 Uint8Buff keyAlias = { .val = keyAliasValue, .length = SHA256_LEN }; in VerifyPeerCertInfo() 313 uint8_t *priAliasVal = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GetSharedSecretForAccountInPake() 318 Uint8Buff aliasBuff = { priAliasVal, SHA256_LEN }; in GetSharedSecretForAccountInPake() 479 uint8_t keyAliasVal[SHA256_LEN] = { 0 }; in GenerateAuthTokenForAccessory() 480 Uint8Buff keyAlias = { keyAliasVal, SHA256_LEN }; in GenerateAuthTokenForAccessory() 521 authTokenAlias->val = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GenerateTokenAliasForController() 527 authTokenAlias->length = SHA256_LEN; in GenerateTokenAliasForController()
|
H A D | credential_operator.c | 109 Uint8Buff keyAliasHash = { NULL, SHA256_LEN }; in CombineKeyAliasForPake() 111 if (outKeyAlias->length != SHA256_LEN * BYTE_TO_HEX_OPER_LENGTH) { in CombineKeyAliasForPake() 180 uint8_t serviceId[SHA256_LEN] = { 0 }; in GenerateKeyAliasInner() 181 Uint8Buff serviceIdBuff = { serviceId, SHA256_LEN }; in GenerateKeyAliasInner() 336 char returnPkHexStr[SHA256_LEN * BYTE_TO_HEX_OPER_LENGTH + 1] = { 0 }; in PackPublicKeyToJson()
|
/base/security/asset/frameworks/utils/src/ |
H A D | hasher.rs | 21 const SHA256_LEN: usize = 32; consts 126 let mut ret = [0; SHA256_LEN];
|
/base/security/device_auth/test/unittest/deviceauth/unit_test/source/ |
H A D | key_management_test.cpp | 72 uint8_t hashData[SHA256_LEN] = { 0 }; in HWTEST_F() 74 Uint8Buff hashBuffer = { hashData, SHA256_LEN }; in HWTEST_F()
|
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/ |
H A D | pake_v2_protocol_common.c | 81 params->sharedSecret.length = SHA256_LEN;
in AllocDefaultParams() 278 Uint8Buff sidSelf = { NULL, SHA256_LEN };
in ComputeSid() 279 Uint8Buff sidPeer = { NULL, SHA256_LEN };
in ComputeSid() 385 Uint8Buff sid = { NULL, SHA256_LEN * 2 }; // sid is composed of client sid and server sid, so need twice SHA256_LEN
in GenerateSharedSecret() 546 uint8_t tmpKcfDataVal[SHA256_LEN] = { 0 };
in VerifyProof() 547 Uint8Buff tmpKcfData = { tmpKcfDataVal, SHA256_LEN };
in VerifyProof()
|
/base/security/device_auth/services/session_manager/src/session/v2/expand_sub_session/expand_process_lib/ |
H A D | pub_key_exchange.c | 177 uint8_t serviceIdVal[SHA256_LEN] = { 0 }; in GenerateKeyAlias() 178 Uint8Buff serviceId = { serviceIdVal, SHA256_LEN }; in GenerateKeyAlias() 195 uint8_t keyAliasByteVal[SHA256_LEN] = { 0 }; in GenerateKeyAlias() 196 Uint8Buff keyAliasByte = { keyAliasByteVal, SHA256_LEN }; in GenerateKeyAlias() 202 uint32_t keyAliasHexStrLen = SHA256_LEN * BYTE_TO_HEX_OPER_LENGTH + 1; in GenerateKeyAlias() 203 char keyAliasHexStr[SHA256_LEN * BYTE_TO_HEX_OPER_LENGTH + 1] = { 0 }; in GenerateKeyAlias()
|
H A D | auth_code_import.c | 177 uint8_t serviceIdVal[SHA256_LEN] = { 0 }; in GenerateKeyAlias() 178 Uint8Buff serviceId = { serviceIdVal, SHA256_LEN }; in GenerateKeyAlias()
|
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/include/ |
H A D | dlp_crypt.h | 39 SHA256_LEN = 32, enumerator
|
/base/security/device_auth/services/legacy/authenticators/src/account_related/creds_manager/ |
H A D | sym_token_manager.c | 374 uint8_t *keyAliasVal = (uint8_t *)HcMalloc(SHA256_LEN, 0); in ImportSymTokenToKeyManager() 381 .length = SHA256_LEN in ImportSymTokenToKeyManager() 413 uint8_t *keyAliasVal = (uint8_t *)HcMalloc(SHA256_LEN, 0); in DeleteSymTokenFromKeyManager() 420 .length = SHA256_LEN in DeleteSymTokenFromKeyManager()
|
H A D | asy_token_manager.c | 460 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in DoImportServerPkAndVerify() 467 .length = SHA256_LEN in DoImportServerPkAndVerify() 726 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in CheckDevicePk() 734 .length = SHA256_LEN in CheckDevicePk() 841 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GetRegisterProof() 848 .length = SHA256_LEN in GetRegisterProof() 878 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in DeleteKeyPair() 885 .length = SHA256_LEN in DeleteKeyPair()
|
/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/pake_v2_auth_task/ |
H A D | pake_v2_auth_task_common.c | 58 uint8_t *serverPkAlias = (uint8_t *)HcMalloc(SHA256_LEN, 0); in VerifyPkSignPeer() 65 .length = SHA256_LEN in VerifyPkSignPeer() 95 uint8_t *priAliasVal = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GenerateEcdhSharedKey() 102 .length = SHA256_LEN in GenerateEcdhSharedKey()
|
/base/security/device_auth/test/unittest/deviceauth/source/ |
H A D | group_operation_common_test.cpp | 496 int32_t ret = GetHashResult(nullptr, SHA256_LEN, hash, SHA256_LEN); in HWTEST_F() 503 int32_t ret = GetHashResult(info, SHA256_LEN, nullptr, SHA256_LEN); in HWTEST_F()
|
/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/iso_auth_task/ |
H A D | iso_auth_task_common.c | 144 uint8_t keyAliasVal[SHA256_LEN] = { 0 }; in GenerateAuthTokenForAccessory() 145 Uint8Buff keyAlias = { keyAliasVal, SHA256_LEN }; in GenerateAuthTokenForAccessory() 172 int32_t res = InitSingleParam(authTokenAlias, SHA256_LEN); in GenerateTokenAliasForController()
|
/base/security/device_auth/services/protocol/src/iso_protocol/ |
H A D | iso_protocol_common.c | 266 uint8_t hmacPeer[SHA256_LEN] = { 0 }; in IsoClientCheckAndGenToken() 301 uint8_t hmacSelf[SHA256_LEN] = { 0 }; in IsoClientGenSessionKey() 362 uint8_t hmacPeer[SHA256_LEN] = { 0 }; in IsoServerGenSessionKeyAndCalToken()
|
/base/security/device_auth/deps_adapter/key_management_adapter/interfaces/ |
H A D | alg_defs.h | 22 #define SHA256_LEN 32 macro
|
/base/security/crypto_framework/test/unittest/src/ |
H A D | crypto_md_test.cpp | 41 constexpr uint32_t SHA256_LEN = 32; member 298 EXPECT_EQ(len, SHA256_LEN); in HWTEST_F()
|
H A D | crypto_mac_test.cpp | 43 constexpr uint32_t SHA256_LEN = 32; member 503 EXPECT_EQ(len, SHA256_LEN); in HWTEST_F() 610 EXPECT_EQ(len, SHA256_LEN); in HWTEST_F() 703 EXPECT_EQ(len, SHA256_LEN); in HWTEST_F()
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/ |
H A D | huks_adapter.c | 123 CHECK_LEN_EQUAL_RETURN(hash->length, SHA256_LEN, "hash->length"); in Sha256() 141 if (res != HKS_SUCCESS || hashBlob.size != SHA256_LEN) { in Sha256() 1142 CHECK_LEN_EQUAL_RETURN(hash->length, SHA256_LEN, "hash->length"); in HashToPoint() 1155 CHECK_LEN_EQUAL_RETURN(outEcPoint->length, SHA256_LEN, "outEcPoint->length"); in HashToPoint() 1820 uint8_t messageHashVal[SHA256_LEN] = { 0 }; in Sign() 1821 Uint8Buff messageHash = { messageHashVal, SHA256_LEN }; in Sign() 1913 uint8_t messageHashVal[SHA256_LEN] = { 0 }; in Verify() 1914 Uint8Buff messageHash = { messageHashVal, SHA256_LEN }; in Verify()
|