Home
last modified time | relevance | path

Searched refs:pakeParams (Results 1 – 8 of 8) sorted by relevance

/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/standard_exchange_task/
Dcommon_standard_bind_exchange.c91 static int32_t PackageAuthInfo(const PakeParams *pakeParams, StandardBindExchangeParams *exchangePa… in PackageAuthInfo() argument
94 int32_t res = pakeParams->baseParams.loader->checkKeyExist(keyAlias); in PackageAuthInfo()
97 Algorithm alg = (pakeParams->baseParams.curveType == CURVE_256) ? P256 : ED25519; in PackageAuthInfo()
99 ExtraInfo exInfo = { pakeParams->baseParams.idSelf, -1, -1 }; in PackageAuthInfo()
100 …res = pakeParams->baseParams.loader->generateKeyPairWithStorage(keyAlias, PAKE_ED25519_KEY_PAIR_LE… in PackageAuthInfo()
108 res = pakeParams->baseParams.loader->exportPublicKey(keyAlias, &(exchangeParams->pubKeySelf)); in PackageAuthInfo()
116 … GOTO_ERR_AND_SET_RET(AddByteToJson(authInfoJson, FIELD_AUTH_ID, pakeParams->baseParams.idSelf.val, in PackageAuthInfo()
117 pakeParams->baseParams.idSelf.length), res); in PackageAuthInfo()
145 static int32_t GenerateSignInfo(const PakeParams *pakeParams, const StandardBindExchangeParams *exc… in GenerateSignInfo() argument
150 …uint32_t msgInfoLen = pakeParams->baseParams.challengeSelf.length + pakeParams->baseParams.challen… in GenerateSignInfo()
[all …]
Dcommon_standard_unbind_exchange.c74 static int32_t PackageRmvInfo(const PakeParams *pakeParams, StandardUnbindExchangeParams *exchangeP… in PackageRmvInfo() argument
79 GOTO_ERR_AND_SET_RET(AddByteToJson(rmvInfoJson, FIELD_RMV_ID, pakeParams->baseParams.idSelf.val, in PackageRmvInfo()
80 pakeParams->baseParams.idSelf.length), res); in PackageRmvInfo()
81 GOTO_ERR_AND_SET_RET(AddIntToJson(rmvInfoJson, FIELD_RMV_TYPE, pakeParams->userType), res); in PackageRmvInfo()
106 static int32_t EncryptRmvInfo(const PakeParams *pakeParams, StandardUnbindExchangeParams *exchangeP… in EncryptRmvInfo() argument
115 res = pakeParams->baseParams.loader->generateRandom(&(exchangeParams->nonce)); in EncryptRmvInfo()
127 …res = pakeParams->baseParams.loader->aesGcmEncrypt(&(pakeParams->baseParams.sessionKey), &(exchang… in EncryptRmvInfo()
137 static int32_t DecryptRmvInfo(PakeParams *pakeParams, StandardUnbindExchangeParams *exchangeParams) in DecryptRmvInfo() argument
152 res = pakeParams->baseParams.loader->aesGcmDecrypt(&(pakeParams->baseParams.sessionKey), in DecryptRmvInfo()
162 static int32_t ParseRmvInfo(PakeParams *pakeParams, StandardUnbindExchangeParams *exchangeParams) in ParseRmvInfo() argument
[all …]
/base/security/device_auth/services/authenticators/src/account_related/auth/pake_v2_auth_task/
Dpake_v2_auth_task_common.c83 …res = params->pakeParams.loader->verify(&serverPkAliasBuff, &messageBuff, P256, &peerSignBuff, tru… in VerifyPkSignPeer()
120 params->pakeParams.psk.val = (uint8_t *)HcMalloc(sharedKeyAliasLen, 0); in GenerateEcdhSharedKey()
121 if (params->pakeParams.psk.val == NULL) { in GenerateEcdhSharedKey()
126 params->pakeParams.psk.length = sharedKeyAliasLen; in GenerateEcdhSharedKey()
127 …(void)memcpy_s(params->pakeParams.psk.val, sharedKeyAliasLen, SHARED_KEY_ALIAS, sharedKeyAliasLen); in GenerateEcdhSharedKey()
128 res = params->pakeParams.loader->agreeSharedSecretWithStorage(&priAliasKeyBuff, &publicKeyBuff, in GenerateEcdhSharedKey()
129 P256, P256_SHARED_SECRET_KEY_SIZE, &(params->pakeParams.psk)); in GenerateEcdhSharedKey()
154 if (InitCharStringBuff(&params->pakeParams.idPeer, in ExtractPakePeerId()
159 …(void)memcpy_s(params->pakeParams.idPeer.val, params->pakeParams.idPeer.length, params->devIdPeer.… in ExtractPakePeerId()
161 (void)memcpy_s(params->pakeParams.idPeer.val + params->devIdPeer.length, in ExtractPakePeerId()
[all …]
Dpake_v2_auth_client_task.c97 if (ClientConfirmPakeV2Protocol(&task->params.pakeParams)) { in DealAsyStepTwoData()
120 … GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_KCF_DATA, innerTask->params.pakeParams.kcfData.val, in PrepareAsyClientStepTwoData()
121 innerTask->params.pakeParams.kcfData.length), ret); in PrepareAsyClientStepTwoData()
124 GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_EPK, innerTask->params.pakeParams.epkSelf.val, in PrepareAsyClientStepTwoData()
125 innerTask->params.pakeParams.epkSelf.length), ret); in PrepareAsyClientStepTwoData()
160 GOTO_IF_ERR(GetByteFromJson(in, FIELD_SALT, innerTask->params.pakeParams.salt.val, in AsyAuthClientStepTwo()
161 innerTask->params.pakeParams.salt.length)); in AsyAuthClientStepTwo()
162 GOTO_IF_ERR(GetByteFromJson(in, FIELD_EPK, innerTask->params.pakeParams.epkPeer.val, in AsyAuthClientStepTwo()
163 innerTask->params.pakeParams.epkPeer.length)); in AsyAuthClientStepTwo()
179 int32_t res = ClientVerifyConfirmPakeV2Protocol(&params->pakeParams); in DealAsyStepThreeData()
[all …]
Dpake_v2_auth_server_task.c64 res = ServerResponsePakeV2Protocol(&task->params.pakeParams); in DealAsyStepOneData()
103 GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_EPK, innerTask->params.pakeParams.epkSelf.val, in PrepareAsyServerStepOneData()
104 innerTask->params.pakeParams.epkSelf.length), ret); in PrepareAsyServerStepOneData()
105 GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_SALT, innerTask->params.pakeParams.salt.val, in PrepareAsyServerStepOneData()
106 innerTask->params.pakeParams.salt.length), ret); in PrepareAsyServerStepOneData()
157 if (ServerConfirmPakeV2Protocol(&task->params.pakeParams) != HC_SUCCESS) { in DealAsyStepTwoData()
186 task->params.pakeParams.sessionKey.val, task->params.pakeParams.sessionKey.length)); in SendFinalToOut()
195 … FIELD_KCF_DATA, task->params.pakeParams.kcfData.val, task->params.pakeParams.kcfData.length)); in SendFinalToOut()
202 FreeAndCleanKey(&task->params.pakeParams.sessionKey); in SendFinalToOut()
209 FreeAndCleanKey(&task->params.pakeParams.sessionKey); in SendFinalToOut()
[all …]
/base/security/device_auth/services/authenticators/inc/account_unrelated/pake_task/
Dcommon_standard_unbind_exchange.h38 int32_t ClientRequestStandardUnbindExchange(const PakeParams *pakeParams, StandardUnbindExchangePar…
39 int32_t ServerResponseStandardUnbindExchange(PakeParams *pakeParams, StandardUnbindExchangeParams *…
40 int32_t ClientConfirmStandardUnbindExchange(PakeParams *pakeParams, StandardUnbindExchangeParams *e…
Dcommon_standard_bind_exchange.h38 int32_t ClientRequestStandardBindExchange(const PakeParams *pakeParams, StandardBindExchangeParams …
39 int32_t ServerResponseStandardBindExchange(PakeParams *pakeParams, StandardBindExchangeParams *exch…
40 int32_t ClientConfirmStandardBindExchange(PakeParams *pakeParams, StandardBindExchangeParams *excha…
/base/security/device_auth/services/authenticators/inc/account_related/auth/pake_v2_auth_task/
Dpake_v2_auth_task_common.h27 PakeBaseParams pakeParams; member