/base/useriam/user_auth_framework/test/unittest/services/src/ |
D | user_idm_session_controller_test.cpp | 49 std::vector<uint8_t> challenge; variable 54 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId, challenge)); 62 std::vector<uint8_t> challenge; variable 67 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId1, challenge)); 68 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId2, challenge)); 69 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId3, challenge)); 75 std::vector<uint8_t> challenge; variable 80 EXPECT_EQ(false, UserIdmSessionController::Instance().OpenSession(userId, challenge)); 88 std::vector<uint8_t> challenge; variable 90 auto fillUpChallenge = [&nonce](std::vector<uint8_t> &challenge) { challenge = nonce; }; in __anon08eb12f90102() argument [all …]
|
D | user_auth_service_test.cpp | 576 …eatedly([&context](uint64_t contextId, HdiAuthType authType, const std::vector<uint8_t> &challenge, in MockForIdentifyHdi() 696 authParam.challenge.push_back(1); 697 authParam.challenge.push_back(2); 698 authParam.challenge.push_back(3); 699 authParam.challenge.push_back(4); 715 authParam.challenge.push_back(1); 716 authParam.challenge.push_back(2); 717 authParam.challenge.push_back(3); 718 authParam.challenge.push_back(4); 740 authParam.challenge.push_back(1); [all …]
|
/base/security/device_auth/frameworks/deviceauth_lite/source/key_agreement/ |
D | pake_client.c | 197 pake_client->peer_challenge = receive->challenge; in parse_start_response_data() 257 struct challenge challenge = { 0, {0} }; in build_end_request_data() local 261 challenge.length = rand.length; in build_end_request_data() 262 if (memcpy_s(challenge.challenge, sizeof(challenge.challenge), rand.random_value, in build_end_request_data() 269 pake_client->self_challenge = challenge; in build_end_request_data() 271 send->challenge = challenge; in build_end_request_data() 339 struct uint8_buff challenge = { in generate_proof() local 345 challenge.val = (uint8_t *)MALLOC(challenge.size); in generate_proof() 346 if (challenge.val == NULL) { in generate_proof() 350 (void)memset_s(challenge.val, challenge.size, 0, challenge.size); in generate_proof() [all …]
|
D | pake_server.c | 176 data->challenge = pake_server->self_challenge; in build_start_response_data() 192 pake_server->peer_challenge = data->challenge; in parse_end_request_data() 224 static struct challenge get_challenge(void); 275 static struct challenge get_challenge(void) in get_challenge() 277 struct challenge challenge = { 0, {0} }; in get_challenge() local 281 challenge.length = rand.length; in get_challenge() 282 …(void)memcpy_s(challenge.challenge, sizeof(challenge.challenge), rand.random_value, CHALLENGE_BUFF… in get_challenge() 286 return challenge; in get_challenge() 305 struct uint8_buff challenge = {.size = CHALLENGE_BUFF_LENGTH + CHALLENGE_BUFF_LENGTH}; in verify_proof_is_ok() local 306 challenge.val = (uint8_t *)MALLOC(challenge.size); in verify_proof_is_ok() [all …]
|
D | pake_server.h | 75 struct challenge self_challenge; 76 struct challenge peer_challenge; 99 struct challenge challenge; member 105 struct challenge challenge; member
|
D | sts_server.h | 64 struct challenge challenge; member 82 struct challenge peer_challenge; 83 struct challenge my_challenge; 104 struct challenge challenge; member
|
D | key_agreement.h | 58 struct challenge { struct 60 uint8_t challenge[CHALLENGE_BUFF_LENGTH]; argument
|
/base/security/device_security_level/services/dslm/ |
D | dslm_msg_utils.c | 33 static uint8_t *GenerateSecInfoResponseJson(uint64_t challenge, const DslmCredBuff *cred) in GenerateSecInfoResponseJson() argument 57 …ByteToHexString((uint8_t *)&challenge, sizeof(challenge), (uint8_t *)nonce, CHALLENGE_STRING_LENGT… in GenerateSecInfoResponseJson() 80 static uint8_t *GenerateSecInfoRequestJson(uint64_t challenge) in GenerateSecInfoRequestJson() argument 94 …ByteToHexString((uint8_t *)&challenge, sizeof(challenge), (uint8_t *)nonce, CHALLENGE_STRING_LENGT… in GenerateSecInfoRequestJson() 120 int32_t BuildDeviceSecInfoRequest(uint64_t challenge, MessageBuff **msg) in BuildDeviceSecInfoRequest() argument 132 out->buff = GenerateSecInfoRequestJson(challenge); in BuildDeviceSecInfoRequest() 160 … = HexStringToByte(nonceStr, strlen(nonceStr), (uint8_t *)&obj->challenge, sizeof(obj->challenge)); in ParseDeviceSecInfoRequest() 174 int32_t BuildDeviceSecInfoResponse(uint64_t challenge, const DslmCredBuff *cred, MessageBuff **msg) in BuildDeviceSecInfoResponse() argument 184 out->buff = GenerateSecInfoResponseJson(challenge, cred); in BuildDeviceSecInfoResponse() 195 int32_t ParseDeviceSecInfoResponse(const MessageBuff *msg, uint64_t *challenge, uint32_t *version, … in ParseDeviceSecInfoResponse() argument [all …]
|
D | dslm_msg_utils.h | 34 int32_t BuildDeviceSecInfoRequest(uint64_t challenge, MessageBuff **msg); 36 int32_t BuildDeviceSecInfoResponse(uint64_t challenge, const DslmCredBuff *cred, MessageBuff **msg); 40 int32_t ParseDeviceSecInfoResponse(const MessageBuff *msg, uint64_t *challenge, uint32_t *version, …
|
/base/security/device_security_level/oem_property/ohos/common/ |
D | dslm_ohos_verify.c | 41 uint64_t challenge; member 82 …ToByte(challengeStr, strlen(challengeStr), (uint8_t *)&nonce->challenge, sizeof(nonce->challenge)); in ParseNonceOfCertChain() 154 static int32_t CheckNonceOfCertChain(const struct NonceOfCertChain *nonce, uint64_t challenge, cons… in CheckNonceOfCertChain() argument 156 if (challenge != nonce->challenge) { in CheckNonceOfCertChain() 169 …erifyNonceOfCertChain(const char *jsonStr, const struct DeviceIdentify *device, uint64_t challenge) in VerifyNonceOfCertChain() argument 194 ret = CheckNonceOfCertChain(&nonce, challenge, pkInfoListStr); in VerifyNonceOfCertChain() 231 static int32_t VerifyStandardDslmCred(const DeviceIdentify *device, uint64_t challenge, const DslmC… in VerifyStandardDslmCred() argument 250 ret = VerifyNonceOfCertChain(resultInfo.nonceStr, device, challenge); in VerifyStandardDslmCred() 276 int32_t VerifyOhosDslmCred(const DeviceIdentify *device, uint64_t challenge, const DslmCredBuff *cr… in VerifyOhosDslmCred() argument 289 return VerifyStandardDslmCred(device, challenge, credBuff, credInfo); in VerifyOhosDslmCred()
|
/base/security/device_auth/frameworks/deviceauth_lite/source/struct/ |
D | pake_client_confirm.c | 41 int32_t result = byte_convert(obj, FIELD_CHALLENGE, pake_client_confirm->challenge.challenge, in parse_pake_client_confirm() 42 &pake_client_confirm->challenge.length, CHALLENGE_BUFF_LENGTH); in parse_pake_client_confirm() 86 uint8_t *tmp_cha_data_hex = raw_byte_to_hex_string(pake_client_confirm->challenge.challenge, in make_pake_client_confirm() 87 pake_client_confirm->challenge.length); in make_pake_client_confirm()
|
D | pake_response.c | 41 int32_t result = byte_convert(obj, FIELD_CHALLENGE, pake_response->challenge.challenge, in parse_pake_response() 42 &pake_response->challenge.length, CHALLENGE_BUFF_LENGTH); in parse_pake_response() 87 uint8_t *tmp_cha_data_hex = raw_byte_to_hex_string(pake_response->challenge.challenge, in make_pake_response() 88 pake_response->challenge.length); in make_pake_response()
|
D | auth_start_request.c | 48 int32_t result = byte_convert(obj, FIELD_CHALLENGE, auth_start_request->challenge.challenge, in parse_auth_start_request() 49 &auth_start_request->challenge.length, CHALLENGE_BUFF_LENGTH); in parse_auth_start_request() 131 tmp_hex.tmp_cha_data_hex = raw_byte_to_hex_string(auth_start_request->challenge.challenge, in make_auth_start_request() 132 auth_start_request->challenge.length); in make_auth_start_request()
|
D | auth_start_response.c | 49 result = byte_convert(obj, FIELD_CHALLENGE, auth_start_response->challenge.challenge, in parse_auth_start_response() 50 &auth_start_response->challenge.length, CHALLENGE_BUFF_LENGTH); in parse_auth_start_response() 130 …mp_hex.tmp_cha_data_hex = raw_byte_to_hex_string(as_res->challenge.challenge, as_res->challenge.le… in make_auth_start_response()
|
/base/security/device_auth/frameworks/deviceauth_lite/source/auth_info/ |
D | exchange_auth_info.c | 236 typedef void (*COPY_CHALLENGE)(struct uint8_buff *sign_src_data, const struct challenge *peer_chall… 237 const struct challenge *self_challenge); 240 static void copy_self_peer_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer… 241 const struct challenge *self_challenge); 278 static void copy_peer_self_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer… 279 const struct challenge *self_challenge); 330 static void copy_peer_self_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer… in copy_peer_self_challenge() 331 const struct challenge *self_challenge) in copy_peer_self_challenge() 333 …(void)memcpy_s(sign_src_data->val, sign_src_data->size, peer_challenge->challenge, CHALLENGE_BUFF_… in copy_peer_self_challenge() 336 self_challenge->challenge, CHALLENGE_BUFF_LENGTH); in copy_peer_self_challenge() [all …]
|
D | exchange_auth_info_client.c | 242 typedef void (*COPY_CHALLENGE)(struct uint8_buff *sign_src_data, const struct challenge *peer_chall… 243 const struct challenge *self_challenge); 246 static void copy_peer_self_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer… 247 const struct challenge *self_challenge); 269 static void copy_self_peer_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer… 270 const struct challenge *self_challenge); 337 static void copy_peer_self_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer… in copy_peer_self_challenge() 338 const struct challenge *self_challenge) in copy_peer_self_challenge() 340 …if (memcpy_s(sign_src_data->val, sign_src_data->size, peer_challenge->challenge, CHALLENGE_BUFF_LE… in copy_peer_self_challenge() 347 self_challenge->challenge, CHALLENGE_BUFF_LENGTH) != EOK) { in copy_peer_self_challenge() [all …]
|
/base/useriam/user_auth_framework/test/fuzztest/clients/userauthclient_fuzzer/ |
D | user_auth_client_fuzzer.cpp | 134 std::vector<uint8_t> challenge; in FuzzClientBeginAuthentication001() local 135 Common::FillFuzzUint8Vector(parcel, challenge); in FuzzClientBeginAuthentication001() 139 UserAuthClient::GetInstance().BeginAuthentication(userId, challenge, authType, atl, callback); in FuzzClientBeginAuthentication001() 147 std::vector<uint8_t> challenge; in FuzzClientBeginAuthentication002() local 148 Common::FillFuzzUint8Vector(parcel, challenge); in FuzzClientBeginAuthentication002() 152 …UserAuthClientImpl::Instance().BeginNorthAuthentication(apiVersion, challenge, authType, atl, call… in FuzzClientBeginAuthentication002() 167 std::vector<uint8_t> challenge; in FuzzClientBeginIdentification() local 168 Common::FillFuzzUint8Vector(parcel, challenge); in FuzzClientBeginIdentification() 171 UserAuthClient::GetInstance().BeginIdentification(challenge, authType, callback); in FuzzClientBeginIdentification() 198 Common::FillFuzzUint8Vector(parcel, authParam.challenge); in FuzzBeginWidgetAuth()
|
/base/useriam/user_auth_framework/test/fuzztest/services/userauthservice_fuzzer/ |
D | user_auth_service_fuzzer.cpp | 174 std::vector<uint8_t> challenge; in FuzzAuth() local 175 FillFuzzUint8Vector(parcel, challenge); in FuzzAuth() 182 g_userAuthService.Auth(apiVersion, challenge, authType, authTrustLevel, callback); in FuzzAuth() 190 std::vector<uint8_t> challenge; in FuzzAuthUser() local 191 FillFuzzUint8Vector(parcel, challenge); in FuzzAuthUser() 198 g_userAuthService.AuthUser(userId, challenge, authType, authTrustLevel, callback); in FuzzAuthUser() 205 std::vector<uint8_t> challenge; in FuzzIdentify() local 206 FillFuzzUint8Vector(parcel, challenge); in FuzzIdentify() 212 g_userAuthService.Identify(challenge, authType, callback); in FuzzIdentify() 238 FillFuzzUint8Vector(parcel, authParam.challenge); in FuzzAuthWidget()
|
/base/account/os_account/test/fuzztest/iamaccount/opensession_fuzzer/ |
D | opensession_fuzzer.cpp | 30 std::vector<uint8_t> challenge; in OpenSessionFuzzTest() local 31 int32_t result = AccountIAMClient::GetInstance().OpenSession(userId, challenge); in OpenSessionFuzzTest()
|
/base/useriam/user_auth_framework/frameworks/native/ipc/inc/ |
D | user_auth_proxy.h | 37 uint64_t AuthUser(int32_t userId, const std::vector<uint8_t> &challenge, AuthType authType, 39 uint64_t Auth(int32_t apiVersion, const std::vector<uint8_t> &challenge, AuthType authType, 43 uint64_t Identify(const std::vector<uint8_t> &challenge, AuthType authType, 52 bool WriteAuthParam(MessageParcel &data, const std::vector<uint8_t> &challenge,
|
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/lite_exchange_task/ |
D | iso_server_bind_exchange_task.c | 76 static int DecryptChallenge(const IsoParams *params, const CJson *in, uint8_t *challenge, uint32_t … in DecryptChallenge() argument 101 Uint8Buff challengeBuf = { challenge, CHALLENGE_SIZE }; in DecryptChallenge() 170 static int GenerateAuthCodeAndImport(const IsoParams *params, CJson *out, uint8_t *challenge, uint3… in GenerateAuthCodeAndImport() argument 190 Uint8Buff challengeBuf = { challenge, challengeLen }; in GenerateAuthCodeAndImport() 225 uint8_t *challenge = (uint8_t *)HcMalloc(CHALLENGE_SIZE, 0); in ServerBindExchangeStart() local 226 if (challenge == NULL) { in ServerBindExchangeStart() 230 res = DecryptChallenge(params, in, challenge, CHALLENGE_SIZE); in ServerBindExchangeStart() 235 res = GenerateAuthCodeAndImport(params, out, challenge, CHALLENGE_SIZE); in ServerBindExchangeStart() 243 HcFree(challenge); in ServerBindExchangeStart()
|
/base/useriam/user_auth_framework/services/ipc/inc/ |
D | user_auth_service.h | 45 uint64_t AuthUser(int32_t userId, const std::vector<uint8_t> &challenge, AuthType authType, 47 uint64_t Auth(int32_t apiVersion, const std::vector<uint8_t> &challenge, AuthType authType, 51 uint64_t Identify(const std::vector<uint8_t> &challenge, AuthType authType, 63 …std::shared_ptr<ContextCallback> GetAuthContextCallback(const std::vector<uint8_t> &challenge, Aut…
|
/base/useriam/user_auth_framework/frameworks/native/ipc/common_defines/ |
D | user_auth_interface.h | 43 …virtual uint64_t AuthUser(int32_t userId, const std::vector<uint8_t> &challenge, AuthType authType, 46 …virtual uint64_t Auth(int32_t apiVersion, const std::vector<uint8_t> &challenge, AuthType authType, 52 virtual uint64_t Identify(const std::vector<uint8_t> &challenge, AuthType authType,
|
/base/useriam/user_auth_framework/test/unittest/services/mocks/ |
D | mock_user_auth_service.h | 37 uint64_t(int32_t userId, const std::vector<uint8_t> &challenge, AuthType authType, 41 uint64_t(int32_t apiVersion, const std::vector<uint8_t> &challenge, AuthType authType, 48 …uint64_t(const std::vector<uint8_t> &challenge, AuthType authType, sptr<UserAuthCallbackInterface>…
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
D | hks_access_control_part1_test.cpp | 75 const char *challenge = "AuthToken_Sign_Verify_KeyAliass"; variable 76 struct HksBlob challengeBlob = { TOKEN_CHALLENGE_LEN, (uint8_t *)challenge };
|