/base/security/device_auth/services/protocol/src/iso_protocol/ |
H A D | iso_protocol_common.c | 78 (void)memset_s(params->psk, sizeof(params->psk), 0, PSK_LEN); in DestroyIsoBaseParams() 128 Uint8Buff pskBuf = { (uint8_t *)params->psk, sizeof(params->psk) }; in IsoCalSelfToken() 175 Uint8Buff pskBuf = { (uint8_t *)params->psk, sizeof(params->psk) }; in IsoCalPeerToken() 249 (void)memset_s(params->psk, sizeof(params->psk), 0, PSK_LEN); in IsoClientGenRandom() 262 (void)memset_s(params->psk, sizeof(params->psk), in IsoClientCheckAndGenToken() [all...] |
/base/security/device_auth/services/protocol/src/pake_protocol/ |
H A D | pake_common.c | 25 FreeAndCleanKey(¶ms->psk); in CleanPakeSensitiveKeys()
|
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/ |
H A D | auth_sub_session.c | 93 static int32_t SetPsk(AuthSubSession *self, const Uint8Buff *psk) in SetPsk() argument 95 if ((self == NULL) || (psk == NULL)) { in SetPsk() 100 return impl->instance->setPsk(impl->instance, psk); in SetPsk()
|
/base/security/device_auth/services/protocol/inc/pake_protocol/ |
H A D | pake_defs.h | 51 Uint8Buff psk; member
|
/base/security/device_auth/services/protocol/inc/iso_protocol/ |
H A D | iso_protocol_common.h | 35 uint8_t psk[PSK_LEN]; member
|
/base/security/device_auth/services/session_manager/inc/session/v2/auth_sub_session/ |
H A D | auth_sub_session.h | 34 int32_t (*setPsk)(AuthSubSession *self, const Uint8Buff *psk);
|
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v1_protocol/ |
H A D | pake_v1_protocol_common.c | 123 params->psk.val = NULL; in FillDefaultValue() 124 params->psk.length = 0; in FillDefaultValue() 198 KeyParams keyParams = { { params->psk.val, params->psk.length, false }, false, params->osAccountId }; in GeneratePakeParams() 200 PRINT_SENSITIVE_DATA("pskValue", (char *)params->psk.val); in GeneratePakeParams() 203 LOGE("Derive secret from psk failed, res: %x.", res); in GeneratePakeParams() 206 FreeAndCleanKey(¶ms->psk); in GeneratePakeParams()
|
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/ |
H A D | pake_task_common.c | 125 int res = InitSingleParam(&(params->baseParams.psk), HcStrlen(pinString)); in FillPskWithPin() 127 LOGE("InitSingleParam for psk failed, res: %d.", res); in FillPskWithPin() 130 if (memcpy_s(params->baseParams.psk.val, params->baseParams.psk.length, in FillPskWithPin() 133 FreeAndCleanKey(¶ms->baseParams.psk); in FillPskWithPin()
|
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/protocol_lib/ |
H A D | iso_protocol.c | 51 Uint8Buff psk; member 174 KeyParams keyParams = { { params->psk.val, params->psk.length, false }, false, params->osAccountId }; in IsoCalToken() 229 .keyBuff = { impl->params.psk.val, impl->params.psk.length, false }, in IsoGenSessionKey() 252 KeyParams keyParams = { { params->psk.val, params->psk.length, false }, false, params->osAccountId }; in IsoGenAuthResultMac() 768 static int32_t SetIsoPsk(BaseProtocol *self, const Uint8Buff *psk) in SetIsoPsk() argument 770 if ((self == NULL) || (psk == NULL) || (psk in SetIsoPsk() [all...] |
H A D | ec_speke_protocol.c | 58 Uint8Buff psk; member 209 KeyParams keyParams = { { params->psk.val, params->psk.length, false }, false, params->osAccountId }; in CalSecret() 212 LOGE("Derive secret from psk failed, res: %x.", res); in CalSecret() 216 ClearFreeUint8Buff(¶ms->psk); in CalSecret() 1024 static int32_t SetEcSpekePsk(BaseProtocol *self, const Uint8Buff *psk) in SetEcSpekePsk() argument 1026 if ((self == NULL) || (psk == NULL) || (psk->val == NULL) || (psk->length == 0)) { in SetEcSpekePsk() 1031 if (DeepCopyUint8Buff(psk, in SetEcSpekePsk() [all...] |
H A D | dl_speke_protocol.c | 76 Uint8Buff psk; member 259 KeyParams keyParams = { { params->psk.val, params->psk.length, false }, false, params->osAccountId }; in CalSecret() 262 LOGE("Derive secret from psk failed, res: %x.", res); in CalSecret() 265 ClearFreeUint8Buff(¶ms->psk); in CalSecret() 1029 static int32_t SetDlSpekePsk(BaseProtocol *self, const Uint8Buff *psk) in SetDlSpekePsk() argument 1031 if ((self == NULL) || (psk == NULL) || (psk->val == NULL) || (psk->length == 0)) { in SetDlSpekePsk() 1036 if (DeepCopyUint8Buff(psk, in SetDlSpekePsk() [all...] |
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_task_common/ |
H A D | iso_task_common.c | 282 LOGE("Failed to convert psk alias to lower case!"); in GenerateKeyAliasForIso() 588 Uint8Buff pskBuf = { params->baseParams.psk, sizeof(params->baseParams.psk) }; in AuthGeneratePsk() 601 Uint8Buff pskBuf = { params->baseParams.psk, sizeof(params->baseParams.psk) }; in AuthGeneratePskUsePin() 651 LOGE("Generate psk failed, res: %x.", res); in GeneratePsk() 656 (void)memset_s(params->baseParams.psk, sizeof(params->baseParams.psk), 0, sizeof(params->baseParams.psk)); in GeneratePsk()
|
/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/pake_v2_auth_task/ |
H A D | pake_v2_auth_task_common.c | 111 params->pakeParams.psk.val = (uint8_t *)HcMalloc(sharedKeyAliasLen, 0); in GenerateEcdhSharedKey() 112 if (params->pakeParams.psk.val == NULL) { in GenerateEcdhSharedKey() 113 LOGE("Failed to malloc for psk alias."); in GenerateEcdhSharedKey() 117 params->pakeParams.psk.length = sharedKeyAliasLen; in GenerateEcdhSharedKey() 118 (void)memcpy_s(params->pakeParams.psk.val, sharedKeyAliasLen, SHARED_KEY_ALIAS, sharedKeyAliasLen); in GenerateEcdhSharedKey() 122 P256, P256_SHARED_SECRET_KEY_SIZE, &(params->pakeParams.psk)); in GenerateEcdhSharedKey()
|
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/ |
H A D | pake_v1_protocol_task_common.c | 246 int res = InitSingleParam(&(params->baseParams.psk), PAKE_PSK_LEN * BYTE_TO_HEX_OPER_LENGTH + 1); in ConvertPakeV1Psk() 248 LOGE("InitSingleParam for psk failed, res: %d.", res); in ConvertPakeV1Psk() 252 if (ByteToHexString(srcPsk->val, srcPsk->length, (char *)params->baseParams.psk.val, in ConvertPakeV1Psk() 253 params->baseParams.psk.length) != HC_SUCCESS) { in ConvertPakeV1Psk() 254 LOGE("Convert psk from byte to hex string failed."); in ConvertPakeV1Psk() 257 params->baseParams.psk.length = params->baseParams.psk.length - 1; // do not need include '\0' when using psk in ConvertPakeV1Psk() 258 (void)UpperToLowercase(&(params->baseParams.psk)); in ConvertPakeV1Psk() 260 PRINT_SENSITIVE_DATA("pskValue", (char *)params->baseParams.psk in ConvertPakeV1Psk() [all...] |
/base/security/device_auth/services/key_agree_sdk/src/ |
H A D | key_agree_session.c | 404 int32_t res = InitSingleParam(&(spekeSession->baseParam.psk), spekeSession->sharedSecret.length); in FillPskAndDeviceId() 406 LOGE("InitSingleParam for psk failed, res: %d.", res); in FillPskAndDeviceId() 409 if (memcpy_s(spekeSession->baseParam.psk.val, spekeSession->baseParam.psk.length, in FillPskAndDeviceId() 411 LOGE("Memcpy for psk failed."); in FillPskAndDeviceId() 412 FreeAndCleanKey(&spekeSession->baseParam.psk); in FillPskAndDeviceId() 419 FreeAndCleanKey(&spekeSession->baseParam.psk); in FillPskAndDeviceId() 425 FreeAndCleanKey(&spekeSession->baseParam.psk); in FillPskAndDeviceId()
|
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/ |
H A D | pake_v2_protocol_common.c | 113 params->psk.val = NULL;
in FillDefaultValue() 114 params->psk.length = 0;
in FillDefaultValue() 184 KeyParams keyParams = { { params->psk.val, params->psk.length, false }, false, params->osAccountId };
in GeneratePakeParams() 187 LOGE("Derive secret from psk failed, res: %x.", res);
in GeneratePakeParams() 190 FreeAndCleanKey(¶ms->psk);
in GeneratePakeParams()
|
/base/security/device_auth/services/session_manager/src/session/v2/ |
H A D | dev_session_v2.c | 1431 static int32_t GetSharedSecret(SessionImpl *impl, const CJson *inputData, IdentityInfo *selfCred, Uint8Buff *psk) in GetSharedSecret() argument 1435 impl->protocolEntity.protocolType, psk); in GetSharedSecret() 1446 res = GetSharedSecretByPeerCert(impl->context, &peerCert, impl->protocolEntity.protocolType, psk); in GetSharedSecret() 1697 Uint8Buff psk; in SetAuthPsk() local 1698 int32_t res = GetSharedSecret(impl, inputData, cred, &psk); in SetAuthPsk() 1700 LOGE("get psk fail. [Res]: %d", res); in SetAuthPsk() 1703 res = curAuthSubSession->setPsk(curAuthSubSession, &psk); in SetAuthPsk() 1704 ClearFreeUint8Buff(&psk); in SetAuthPsk() 1706 LOGE("set psk fail."); in SetAuthPsk()
|
/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/iso_auth_task/ |
H A D | iso_auth_task_common.c | 204 Uint8Buff pskBuf = { params->isoBaseParams.psk, PSK_SIZE }; in AccountAuthGeneratePsk() 214 LOGE("ComputeHmac for psk failed, res: %d.", res); in AccountAuthGeneratePsk()
|