/base/security/huks/test/reliability/src/ |
D | api_pressure_test.cpp | 466 void ImportKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet); 467 void ExportPublicKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet); 469 void GetKeyParamSetTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet); 470 void KeyExistTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet); 472 …void SignTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, const struct Hks… 473 …void VerifyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, const struct H… 475 void EncryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet); 476 void DecryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, 478 void AgreeKeyTest(const struct HksBlob *authId); 479 void DeriveKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet); [all …]
|
D | pressure_test.cpp | 66 …int32_t LocalHksGenerate(const uint32_t keyLen, const struct HksBlob *authId, const struct HksPara… 70 int32_t PressureTest::LocalHksGenerate(const uint32_t keyLen, const struct HksBlob *authId, in LocalHksGenerate() argument 86 if (HksGenerateKey(authId, paramSetIn, paramOutSet) != HKS_SUCCESS) { in LocalHksGenerate() 176 struct HksBlob authId = { strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable 196 int32_t ret = HksGenerateKey(&authId, paramInSet, NULL); 201 HksDeleteKey(&authId, paramInSet); 215 struct HksBlob authId = { strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable 233 HksGenerateKey(&authId, paramInSet, NULL); 237 HksExportPublicKey(&authId, paramInSet, &pubKey); 248 HksDeleteKey(&authId, paramInSet); [all …]
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/ |
D | hks_export_test_mt.cpp | 39 struct HksBlob authId = { strlen(keyAliasString), (uint8_t *)keyAliasString }; variable 50 ret = HksGenerateKey(&authId, paramInSet, nullptr); in RunTestCase() 98 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS); 113 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS); 126 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS); 141 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS); 159 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS); 175 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS); 188 EXPECT_EQ(HksExportPublicKey(&authId, nullptr, &publicKey), HKS_ERROR_INSUFFICIENT_DATA); 190 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS); [all …]
|
/base/security/device_auth/services/authenticators/src/account_unrelated/ |
D | das_module.c | 31 …sterDasLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in RegisterDasLocalIdentity() argument 33 return RegisterLocalIdentityInTask(pkgName, serviceType, authId, userType); in RegisterDasLocalIdentity() 36 …sterDasLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in UnregisterDasLocalIdentity() argument 38 return UnregisterLocalIdentityInTask(pkgName, serviceType, authId, userType); in UnregisterDasLocalIdentity() 41 …eleteDasPeerAuthInfo(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in DeleteDasPeerAuthInfo() argument 43 return DeletePeerAuthInfoInTask(pkgName, serviceType, authId, userType); in DeleteDasPeerAuthInfo() 46 static int32_t GetDasPublicKey(const char *pkgName, const char *serviceType, Uint8Buff *authId, int… in GetDasPublicKey() argument 49 return GetPublicKeyInTask(pkgName, serviceType, authId, userType, returnPk); in GetDasPublicKey()
|
D | das_task_common.c | 204 const Uint8Buff *authId, Uint8Buff *keyAliasHash) in CombineKeyAlias() argument 208 keyAliasBuff.length = serviceId->length + authId->length + keyType->length; in CombineKeyAlias() 231 …if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, authId->val, authId->length) != EOK) { in CombineKeyAlias() 248 const Uint8Buff *authId, Uint8Buff *outKeyAlias) in CombineKeyAliasForIso() argument 253 int32_t res = CombineKeyAlias(serviceId, keyType, authId, outKeyAlias); in CombineKeyAliasForIso() 262 const Uint8Buff *authId, Uint8Buff *outKeyAlias) in CombineKeyAliasForPake() argument 277 res = CombineKeyAlias(serviceId, keyType, authId, &keyAliasHash); in CombineKeyAliasForPake() 301 const KeyAliasType keyType, const Uint8Buff *authId, Uint8Buff *outKeyAlias) in GenerateKeyAlias() argument 307 CHECK_PTR_RETURN_ERROR_CODE(authId, "authId"); in GenerateKeyAlias() 308 CHECK_PTR_RETURN_ERROR_CODE(authId->val, "authId->val"); in GenerateKeyAlias() [all …]
|
/base/security/device_auth/services/frameworks/src/module/ |
D | dev_auth_module_manager.c | 45 …ol IsParamsForDasTokenManagerValid(const char *pkgName, const char *serviceType, Uint8Buff *authId, in IsParamsForDasTokenManagerValid() argument 52 if (pkgName == NULL || serviceType == NULL || authId == NULL || authId->val == NULL) { in IsParamsForDasTokenManagerValid() 57 if (HcStrlen(pkgName) == 0 || HcStrlen(serviceType) == 0 || authId->length == 0) { in IsParamsForDasTokenManagerValid() 68 int32_t RegisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int … in RegisterLocalIdentity() argument 71 if (!IsParamsForDasTokenManagerValid(pkgName, serviceType, authId, userType, moduleType)) { in RegisterLocalIdentity() 81 int32_t res = dasModule->registerLocalIdentity(pkgName, serviceType, authId, userType); in RegisterLocalIdentity() 89 int32_t UnregisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, in… in UnregisterLocalIdentity() argument 92 if (!IsParamsForDasTokenManagerValid(pkgName, serviceType, authId, userType, moduleType)) { in UnregisterLocalIdentity() 102 int32_t res = dasModule->unregisterLocalIdentity(pkgName, serviceType, authId, userType); in UnregisterLocalIdentity() 110 int32_t DeletePeerAuthInfo(const char *pkgName, const char *serviceType, Uint8Buff *authId, int use… in DeletePeerAuthInfo() argument [all …]
|
/base/security/device_auth/services/frameworks/inc/module/ |
D | dev_auth_module_manager.h | 39 Uint8Buff *authId; member 55 int32_t RegisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int … 57 int32_t UnregisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, in… 59 int32_t DeletePeerAuthInfo(const char *pkgName, const char *serviceType, Uint8Buff *authId, int use…
|
/base/security/huks/services/huks_standard/huks_engine/main/core/include/ |
D | hks_auth.h | 41 int32_t HksAuth(uint32_t authId, const struct HksKeyNode *keyNode, const struct HksParamSet *paramS… 43 int32_t HksThreeStageAuth(uint32_t authId, const struct HuksKeyNode *keyNode);
|
/base/security/device_auth/test/unittest/deviceauth/source/ |
D | standard_exchange_task_test.cpp | 74 uint8_t authId[AUTH_ID_LENGTH] = { 0 }; variable 75 (void)memcpy_s(authId, AUTH_ID_LENGTH, TEST_AUTH_ID.c_str(), AUTH_ID_LENGTH); 76 pakeParams.baseParams.idSelf.val = authId; 126 uint8_t authId[AUTH_ID_LENGTH] = { 0 }; variable 127 (void)memcpy_s(authId, AUTH_ID_LENGTH, TEST_AUTH_ID.c_str(), AUTH_ID_LENGTH); 128 pakeParams.baseParams.idSelf.val = authId;
|
/base/security/huks/services/huks_standard/huks_engine/main/core/src/ |
D | hks_auth.c | 27 uint32_t authId; member 155 int32_t HksAuth(uint32_t authId, const struct HksKeyNode *keyNode, const struct HksParamSet *paramS… in HksAuth() argument 170 if (authId == g_authPolicyList[i].authId) { in HksAuth() 177 int32_t HksThreeStageAuth(uint32_t authId, const struct HuksKeyNode *keyNode) in HksThreeStageAuth() argument 180 if (authId == g_authPolicyList[i].authId) { in HksThreeStageAuth()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/ |
D | pake_task_common.c | 137 const char *authId = GetStringFromJson(in, FIELD_SELF_AUTH_ID); in FillAuthId() local 138 if (authId == NULL) { in FillAuthId() 142 uint32_t authIdLen = strlen(authId); in FillAuthId() 153 …(params->baseParams.idSelf.val, params->baseParams.idSelf.length, authId, strlen(authId)) != EOK) { in FillAuthId() 159 authId = GetStringFromJson(in, FIELD_PEER_AUTH_ID); in FillAuthId() 160 if (authId == NULL) { in FillAuthId() 164 authIdLen = strlen(authId); in FillAuthId() 175 …(params->baseParams.idPeer.val, params->baseParams.idPeer.length, authId, strlen(authId)) != EOK) { in FillAuthId()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/standard_exchange_task/ |
D | das_standard_token_manager.c | 21 …egisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in RegisterLocalIdentity() argument 29 int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, keyType, authId, &keyAliasBuff); in RegisterLocalIdentity() 41 …ExtraInfo exInfo = { *authId, -1, -1 }; /* UserType and pairType are not required when generating … in RegisterLocalIdentity() 52 …egisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in UnregisterLocalIdentity() argument 60 …int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, keyType, authId, &pakeKeyAliasBuff); in UnregisterLocalIdentity() 175 static int32_t GetPublicKey(const char *pkgName, const char *serviceType, Uint8Buff *authId, int us… in GetPublicKey() argument 184 int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, keyType, authId, &keyAliasBuff); in GetPublicKey()
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/ |
D | compatible_bind_sub_session_common.c | 131 …kAuthIdAndUserTypeValid(int32_t osAccountId, int userType, const char *groupId, const char *authId) in CheckAuthIdAndUserTypeValid() argument 153 const char *oriAuthId = StringGet(&deviceInfo->authId); in CheckAuthIdAndUserTypeValid() 154 …if ((deviceInfo->devType != userType) || ((oriAuthId != NULL) && (strcmp(oriAuthId, authId) != 0))… in CheckAuthIdAndUserTypeValid() 172 const char *authId = GetStringFromJson(jsonParams, FIELD_DEVICE_ID); in AddAuthIdAndUserTypeIfValidOrDefault() local 174 if (authId == NULL) { in AddAuthIdAndUserTypeIfValidOrDefault() 181 authId = udid; in AddAuthIdAndUserTypeIfValidOrDefault() 183 int32_t result = CheckAuthIdAndUserTypeValid(osAccountId, userType, groupId, authId); in AddAuthIdAndUserTypeIfValidOrDefault() 191 if (AddStringToJson(params, FIELD_AUTH_ID, authId) != HC_SUCCESS) { in AddAuthIdAndUserTypeIfValidOrDefault() 284 if (AddStringToJson(params, FIELD_AUTH_ID, StringGet(&devAuthParams->authId)) != HC_SUCCESS) { in AddDevInfoToParams() 373 const char *authId = GetStringFromJson(session->params, FIELD_AUTH_ID); in AddGroupAndDevInfoToParams() local [all …]
|
/base/security/device_auth/services/authenticators/inc/account_unrelated/ |
D | das_task_main.h | 43 int32_t RegisterLocalIdentityInTask(const char *pkgName, const char *serviceType, Uint8Buff *authId… 44 …LocalIdentityInTask(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType);
|
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/ |
D | iso_task_common.c | 294 const char *authId = GetStringFromJson(in, FIELD_SELF_AUTH_ID); in FillAuthId() local 295 if (authId == NULL) { in FillAuthId() 299 uint32_t authIdLen = strlen(authId); in FillAuthId() 311 authId, strlen(authId)) != EOK) { in FillAuthId() 320 authId = GetStringFromJson(in, FIELD_PEER_AUTH_ID); in FillAuthId() 321 if (authId == NULL) { in FillAuthId() 325 authIdLen = strlen(authId); in FillAuthId() 337 authId, strlen(authId)) != EOK) { in FillAuthId() 538 Uint8Buff authId = { NULL, 0 }; in GenerateKeyAliasInIso() local 540 authId.val = params->baseParams.authIdPeer.val; in GenerateKeyAliasInIso() [all …]
|
/base/security/device_auth/services/creds_manager/src/account_related/ |
D | account_related_creds_manager.c | 136 static int32_t GetSharedSecretForAccountInPake(const char *userId, const char *authId, in GetSharedSecretForAccountInPake() argument 145 int32_t ret = GetAccountAuthTokenManager()->generateKeyAlias(userId, authId, &aliasBuff, false); in GetSharedSecretForAccountInPake() 218 static int32_t GetCertInfo(int32_t osAccountId, const char *userId, const char *authId, CertInfo *c… in GetCertInfo() argument 225 int32_t ret = GetAccountAuthTokenManager()->getToken(osAccountId, token, userId, authId); in GetCertInfo() 241 …tic int32_t GetAccountAsymIdentityInfo(int32_t osAccountId, const char *userId, const char *authId, in GetAccountAsymIdentityInfo() argument 244 int32_t ret = GetCertInfo(osAccountId, userId, authId, &info->proof.certInfo); in GetAccountAsymIdentityInfo() 311 const char *devIdSelf = StringGet(&deviceEntry->authId); in GenerateAuthTokenForAccessory() 361 const char *devIdPeer = StringGet(&deviceEntry->authId); in GenerateTokenAliasForController() 417 const char *authId = StringGet(&deviceEntry->authId); in GetSelfAccountIdentityInfo() local 418 ret = GetAccountAsymIdentityInfo(osAccountId, userId, authId, info, isNeedGeneratePdid); in GetSelfAccountIdentityInfo() [all …]
|
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/ |
D | hks_rsa_common_mt.cpp | 166 struct HksBlob authId = { in EncryptServiceTestCase() local 202 EXPECT_EQ(HksImportKey(&authId, paramInSet, &x509Key), HKS_SUCCESS); in EncryptServiceTestCase() 206 … EXPECT_EQ(HksEncrypt(&authId, paramInSet, &plainText, &cipherText), testCaseParams.encryptResult); in EncryptServiceTestCase() 221 (void)HksDeleteKey(&authId, nullptr); in EncryptServiceTestCase() 294 struct HksBlob authId = { in DecryptServiceTestCase() local 309 EXPECT_EQ(HksGenerateKey(&authId, paramInSet, paramSetOut), HKS_SUCCESS); in DecryptServiceTestCase() 313 EXPECT_EQ(HksExportPublicKey(&authId, paramInSet, &opensslRsaKeyInfo), HKS_SUCCESS); in DecryptServiceTestCase() 338 …EXPECT_EQ(HksDecrypt(&authId, paramInSet, &cipherText, &decryptedText), testCaseParams.decryptResu… in DecryptServiceTestCase() 346 (void)HksDeleteKey(&authId, nullptr); in DecryptServiceTestCase() 419 struct HksBlob authId = { .size = testCaseParams.alias.length(), in SignServiceTestCase() local [all …]
|
D | hks_hmac_mt.cpp | 291 …void LocalHmacScenario(int32_t scenario, struct HksBlob *authId, const TestCaseParams &testCasePar… in LocalHmacScenario() argument 310 … EXPECT_EQ(HksGenerateKey(authId, paramInSet, paramOutSet), testCaseParams.generateKeyResult); in LocalHmacScenario() 312 EXPECT_EQ(HmacGenerateKey(HMAC_KEY_SIZE, authId), testCaseParams.generateKeyResult); in LocalHmacScenario() 329 HksFree(authId->data); in LocalHmacScenario() 340 struct HksBlob authId = { (uint32_t)strlen(HMAC_KEY), (uint8_t *)HMAC_KEY }; in RunTestCase() local 357 LocalHmacScenario(scenario, &authId, testCaseParams, &macForHuks, &message); in RunTestCase() 359 EXPECT_EQ(HksGenerateKey(&authId, paramInSet, NULL), testCaseParams.generateKeyResult); in RunTestCase() 360 … EXPECT_EQ(HksMac(&authId, paramInSet, &message, &macForHuks), testCaseParams.hmacResult); in RunTestCase() 363 (void)HksDeleteKey(&authId, nullptr); in RunTestCase()
|
/base/security/device_auth/services/session_manager/inc/session/v2/auth_sub_session/protocol_lib/ |
D | iso_protocol.h | 24 Uint8Buff authId; member
|
D | ec_speke_protocol.h | 30 Uint8Buff authId; member
|
/base/security/device_auth/services/group_manager/src/group_operation/ |
D | group_operation_common.c | 82 params.authId = deviceId; in GetTrustedDeviceEntryById() 269 params.authId = peerDeviceId; in GetRelatedGroups() 417 const char *authId = StringGet(&deviceInfo->authId); in AddAuthIdToReturn() local 418 if (authId == NULL) { in AddAuthIdToReturn() 422 if (AddStringToJson(json, FIELD_AUTH_ID, authId) != HC_SUCCESS) { in AddAuthIdToReturn() 741 const char *authId = GetStringFromJson(jsonParams, FIELD_DEVICE_ID); in AddAuthIdToParamsOrDefault() local 743 if (authId == NULL) { in AddAuthIdToParamsOrDefault() 750 authId = udid; in AddAuthIdToParamsOrDefault() 752 if (!StringSetPointer(&devParams->authId, authId)) { in AddAuthIdToParamsOrDefault() 761 const char *authId = GetStringFromJson(jsonParams, FIELD_DEVICE_ID); in AddAuthIdToParams() local [all …]
|
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/lite_exchange_task/ |
D | das_lite_token_manager.c | 22 …egisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in UnregisterLocalIdentity() argument 31 …int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, KEY_ALIAS_AUTH_TOKEN, authId, &isoK… in UnregisterLocalIdentity()
|
/base/security/device_auth/services/session_manager/inc/session/v2/expand_sub_session/expand_process_lib/ |
D | pub_key_exchange.h | 27 Uint8Buff authId; member
|
D | auth_code_import.h | 27 Uint8Buff authId; member
|
D | save_trusted_info.h | 30 const char *authId; member
|