Searched refs:sharedSecretMsg (Results 1 – 3 of 3) sorted by relevance
| /base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/ |
| D | pake_v2_protocol_common.c | 332 Uint8Buff sharedSecretMsg = { NULL, 0 }; in ComputeSharedSecret() local 333 …sharedSecretMsg.length = sid->length + params->innerKeyLen + HcStrlen(SHARED_SECRET_DERIVED_FACTOR… in ComputeSharedSecret() 334 sharedSecretMsg.val = (uint8_t *)HcMalloc(sharedSecretMsg.length, 0); in ComputeSharedSecret() 335 if (sharedSecretMsg.val == NULL) { in ComputeSharedSecret() 341 if (memcpy_s(sharedSecretMsg.val, sharedSecretMsg.length, sid->val, sid->length) != EOK) { in ComputeSharedSecret() 347 if (memcpy_s(sharedSecretMsg.val + usedLen, sharedSecretMsg.length - usedLen, in ComputeSharedSecret() 354 if (memcpy_s(sharedSecretMsg.val + usedLen, sharedSecretMsg.length - usedLen, in ComputeSharedSecret() 361 res = params->loader->sha256(&sharedSecretMsg, ¶ms->sharedSecret); in ComputeSharedSecret() 367 FreeAndCleanKey(&sharedSecretMsg); in ComputeSharedSecret()
|
| /base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/protocol_lib/ |
| D | ec_speke_protocol.c | 416 …nt32_t CombineSharedSecretMsg(const Uint8Buff *p, const Uint8Buff *sid, Uint8Buff *sharedSecretMsg) in CombineSharedSecretMsg() argument 419 if (memcpy_s(sharedSecretMsg->val, sharedSecretMsg->length, sid->val, sid->length) != EOK) { in CombineSharedSecretMsg() 425 if (memcpy_s(sharedSecretMsg->val + usedLen, sharedSecretMsg->length - usedLen, in CombineSharedSecretMsg() 431 if (memcpy_s(sharedSecretMsg->val + usedLen, sharedSecretMsg->length - usedLen, in CombineSharedSecretMsg() 439 static int32_t GenerateSharedSecretMsg(EcSpekeParams *params, Uint8Buff *sharedSecretMsg) in GenerateSharedSecretMsg() argument 460 res = CombineSharedSecretMsg(&p, &sid, sharedSecretMsg); in GenerateSharedSecretMsg() 481 Uint8Buff sharedSecretMsg = { NULL, 0 }; in CalSharedSecret() local 482 if (InitUint8Buff(&sharedSecretMsg, sharedSecretMsgLen) != HC_SUCCESS) { in CalSharedSecret() 486 int32_t res = GenerateSharedSecretMsg(params, &sharedSecretMsg); in CalSharedSecret() 488 ClearFreeUint8Buff(&sharedSecretMsg); in CalSharedSecret() [all …]
|
| D | dl_speke_protocol.c | 453 Uint8Buff *sharedSecretMsg) in CombineSharedSecretMsg() argument 456 if (memcpy_s(sharedSecretMsg->val, sharedSecretMsg->length, sid->val, sid->length) != EOK) { in CombineSharedSecretMsg() 462 if (memcpy_s(sharedSecretMsg->val + usedLen, sharedSecretMsg->length - usedLen, in CombineSharedSecretMsg() 468 if (memcpy_s(sharedSecretMsg->val + usedLen, sharedSecretMsg->length - usedLen, in CombineSharedSecretMsg() 476 static int32_t GenerateSharedSecretMsg(DlSpekeParams *params, Uint8Buff *sharedSecretMsg) in GenerateSharedSecretMsg() argument 496 res = CombineSharedSecretMsg(params, &tmpSharedSecret, &sid, sharedSecretMsg); in GenerateSharedSecretMsg() 505 Uint8Buff sharedSecretMsg = { NULL, 0 }; in CalSharedSecret() local 506 if (InitUint8Buff(&sharedSecretMsg, sharedSecretMsgLen) != HC_SUCCESS) { in CalSharedSecret() 510 int32_t res = GenerateSharedSecretMsg(params, &sharedSecretMsg); in CalSharedSecret() 512 ClearFreeUint8Buff(&sharedSecretMsg); in CalSharedSecret() [all …]
|