Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 25 of 68) sorted by relevance

123

/base/startup/hvb/tools/
Dreadme.md17 …​ --salt xxxxxxxxxxxxxxxx //…
31 …hash_footer --image boot.img --partition boot --partition_size 31457280 --salt 9f3a79b7f2bad5adb08…
43 …​ --salt xxxxxxxxxxxxxxxx //…
57 …ooter --image system.img --partition system --partition_size 3724541952 --salt 9f3a79b7f2bad5adb08…
67 … ​ --salt xxxxxxxxxxxxxxxxx //盐值
89 …e.g. ./hvbtool.py make_rvt_image --salt 9f3a79b7f2bad5adb086bcb8cf37f991733f2696 --pubkey test_…
/base/security/device_auth/frameworks/deviceauth_lite/source/struct/
Dpake_response.c48 result = byte_convert(obj, FIELD_SALT, pake_response->salt.salt, in parse_pake_response()
49 (uint32_t *)&pake_response->salt.length, HC_SALT_BUFF_LEN); in parse_pake_response()
93 …t *tmp_salt_data_hex = raw_byte_to_hex_string(pake_response->salt.salt, pake_response->salt.length… in make_pake_response()
Dauth_start_response.c57 result = byte_convert(obj, FIELD_SALT, auth_start_response->salt.salt, in parse_auth_start_response()
58 (uint32_t *)&auth_start_response->salt.length, HC_SALT_BUFF_LEN); in parse_auth_start_response()
136 tmp_hex.tmp_salt_data_hex = raw_byte_to_hex_string(as_res->salt.salt, as_res->salt.length); in make_auth_start_response()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_kdf.c46 …5_PBKDF2_HMAC((char *)mainKey->data, mainKey->size, deriveParam->salt.data, deriveParam->salt.size, in HksOpensslPbkdf2()
71 … if (EVP_PKEY_CTX_set1_hkdf_salt(pctx, deriveParam->salt.data, deriveParam->salt.size) <= 0) { in HksOpensslHkdf()
/base/useriam/pin_auth/frameworks/ipc/src/
Dinputer_get_data_stub.cpp45 std::vector<uint8_t> salt; in OnGetDataStub() local
51 if (!data.ReadUInt8Vector(&salt)) { in OnGetDataStub()
66 OnGetData(authSubType, salt, inputerSetData.GetRefPtr()); in OnGetDataStub()
Dinputer_get_data_proxy.cpp25 void InputerGetDataProxy::OnGetData(int32_t authSubType, const std::vector<uint8_t> &salt, in OnGetData() argument
46 if (!data.WriteUInt8Vector(salt)) { in OnGetData()
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_keyblob.c43 uint8_t salt[HKS_KEY_BLOB_DERIVE_SALT_SIZE]; member
83 struct HksBlob *salt) in GetSalt() argument
94 salt->size = appIdParam->blob.size + HKS_KEY_BLOB_DERIVE_SALT_SIZE; in GetSalt()
95 salt->data = (uint8_t *)HksMalloc(salt->size); in GetSalt()
96 HKS_IF_NULL_LOGE_RETURN(salt->data, HKS_ERROR_MALLOC_FAIL, "malloc failed") in GetSalt() local
98 (void)memcpy_s(salt->data, salt->size, appIdParam->blob.data, appIdParam->blob.size); in GetSalt()
100 (void)memcpy_s(salt->data + appIdParam->blob.size, salt->size - appIdParam->blob.size, in GetSalt()
101 keyBlobInfo->salt, HKS_KEY_BLOB_DERIVE_SALT_SIZE); in GetSalt()
108 struct HksBlob salt = { 0, NULL }; in GetDeriveKey() local
109 int32_t ret = GetSalt(paramSet, keyBlobInfo, &salt); in GetDeriveKey()
[all …]
Dhks_keyblob_lite.c45 static int32_t GetSalt(enum DeriveType type, const struct HksBlob *random, struct HksBlob *salt) in GetSalt() argument
56 int32_t ret = HksBlobInit(salt, random->size + tag.size); in GetSalt()
59 if ((memcpy_s(salt->data, salt->size, random->data, random->size) != EOK) || in GetSalt()
60 … (memcpy_s(salt->data + random->size, salt->size - random->size, tag.data, tag.size) != EOK)) { in GetSalt()
61 HKS_FREE_PTR(salt->data); in GetSalt()
75 struct HksBlob salt = { 0, NULL }; in GetDeriveMaterial() local
76 ret = GetSalt(type, random, &salt); in GetDeriveMaterial()
84 .salt = salt, in GetDeriveMaterial()
92 HKS_FREE_BLOB(salt); in GetDeriveMaterial()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_mbedtls_kdf.c55 ret = mbedtls_pkcs5_pbkdf2_hmac(&ctx, mainKey->data, mainKey->size, derParam->salt.data, in DeriveKeyPbkdf2()
56 derParam->salt.size, derParam->iterations, derivedKey->size, derivedKey->data); in DeriveKeyPbkdf2()
72 …int32_t ret = mbedtls_hkdf(info, derParam->salt.data, derParam->salt.size, mainKey->data, mainKey-… in DeriveKeyHkdf()
/base/useriam/pin_auth/frameworks/scrypt/inc/
Dscrypt.h28 explicit Scrypt(std::vector<uint8_t> salt) : salt_(std::move(salt)) {} in Scrypt() argument
/base/useriam/pin_auth/frameworks/client/src/
Dinputer_get_data_service.cpp31 void InputerGetDataService::OnGetData(int32_t authSubType, const std::vector<uint8_t> &salt, in OnGetData() argument
40 …std::shared_ptr<IInputerData> sharedInputerData = Common::MakeShared<InputerDataImpl>(salt, inpute… in OnGetData()
Dinputer_data_impl.cpp30 InputerDataImpl::InputerDataImpl(const std::vector<uint8_t> &salt, const sptr<InputerSetData> &inpu… in InputerDataImpl() argument
31 : salt_(salt), inputerSetData_(inputerSetData) in InputerDataImpl()
/base/security/device_auth/frameworks/deviceauth_lite/source/key_agreement/
Dpake_server.c175 data->salt = pake_server->salt; in build_start_response_data()
229 pake_server->salt = get_salt(); in generate_pake_params()
249 …int32_t ret = compute_hkdf((struct var_buffer *)&pake_server->pin, &pake_server->salt, HICHAIN_SPE… in generate_pake_params()
291 struct hc_salt salt = { 0, {0} }; in get_salt() local
295 salt.length = rand.length; in get_salt()
296 (void)memcpy_s(salt.salt, sizeof(salt.salt), rand.random_value, HC_SALT_BUFF_LEN); in get_salt()
300 return salt; in get_salt()
381 ret = compute_hkdf((struct var_buffer *)&shared_secret, &pake_server->salt, in generate_session_key()
407 int32_t ret = compute_hkdf((struct var_buffer *)&pake_server->session_key, &pake_server->salt, in generate_output_key()
Dsts_server.c189 struct random_value salt = generate_random(CHALLENGE_BUFF_LENGTH); in parse_start_request_data() local
190 if (salt.length == 0) { in parse_start_request_data()
194 …if (memcpy_s(sts_server->salt.salt, sizeof(sts_server->salt.salt), salt.random_value, salt.length)… in parse_start_request_data()
197 sts_server->salt.length = salt.length; in parse_start_request_data()
209 ret = compute_hkdf((struct var_buffer *)&shared_secret, &sts_server->salt, HICHAIN_AUTH_INFO, in parse_start_request_data()
266 auth_start_res->salt = srv->salt; in auth_start_response_fill()
560 …int32_t ret = compute_hkdf((struct var_buffer *)&sts_server->session_key, &sts_server->salt, HICHA… in generate_output_key()
Dpake_server.h72 struct hc_salt salt; member
100 struct hc_salt salt; member
/base/useriam/pin_auth/test/unittest/src/
Dinputer_get_data_stub_test.cpp55 [&testAuthSubType](int32_t authSubType, const std::vector<uint8_t> &salt,
58 EXPECT_THAT(salt, ElementsAre(1, 2, 3, 4, 5)); in __anoneb98dc620102()
60 inputerSetData->OnSetData(authSubType, salt); in __anoneb98dc620102()
Dinputer_get_data_proxy_test.cpp61 …Once([&testAuthSubType, &testInputerSetData](int32_t authSubType, const std::vector<uint8_t> &salt,
65 EXPECT_THAT(salt, ElementsAre(1, 2, 3, 4, 5, 6)); in __anonde02eea60102()
/base/useriam/pin_auth/services/modules/executors/src/
Dpin_auth_executor_callback_hdi.cpp45 int32_t PinAuthExecutorCallbackHdi::OnGetData(uint64_t scheduleId, const std::vector<uint8_t>& salt, in OnGetData() argument
58 inputer->OnGetData(authSubType, salt, iInputerDataImpl); in OnGetData()
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v1_protocol/
Dpake_v1_protocol_common.c37 HcFree(params->salt.val); in DestroyPakeV1BaseParams()
38 params->salt.val = NULL; in DestroyPakeV1BaseParams()
70 params->salt.length = PAKE_SALT_LEN; in AllocDefaultParams()
71 params->salt.val = (uint8_t *)HcMalloc(params->salt.length, 0); in AllocDefaultParams()
72 if (params->salt.val == NULL) { in AllocDefaultParams()
181 res = params->loader->generateRandom(&(params->salt)); in GeneratePakeParams()
195 res = params->loader->computeHkdf(&(params->psk), &(params->salt), &keyInfo, &secret, false); in GeneratePakeParams()
235 …res = params->loader->computeHkdf(&(params->sharedSecret), &(params->salt), &keyInfo, &unionKey, f… in DeriveKeyFromSharedSecret()
/base/useriam/pin_auth/test/fuzztest/pinauthservice_fuzzer/
Dpin_auth_service_fuzzer.cpp42 …void OnGetData(int32_t authSubType, const std::vector<uint8_t> &salt, const sptr<InputerSetData> &… in OnGetData() argument
45 static_cast<void>(salt); in OnGetData()
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/
Dpake_message_util.c85 …res = AddByteToJson(payload, FIELD_SALT, params->baseParams.salt.val, params->baseParams.salt.leng… in PackagePakeResponseData()
132 …_t res = GetByteFromJson(in, FIELD_SALT, params->baseParams.salt.val, params->baseParams.salt.leng… in ParsePakeResponseMessage()
/base/useriam/pin_auth/test/unittest/mocks/
Dmock_inputer_get_data_service.h28 MOCK_METHOD3(OnGetData, void(int32_t authSubType, const std::vector<uint8_t> &salt,
Dmock_inputer_get_data.h29 MOCK_METHOD3(OnGetData, void(int32_t authSubType, const std::vector<uint8_t> &salt,
/base/useriam/pin_auth/frameworks/ipc/common_defines/
Dinputer_get_data.h36 virtual void OnGetData(int32_t authSubType, const std::vector<uint8_t> &salt,
/base/startup/hvb/libhvb/src/crypto/
Dhvb_rsa_verify.c50 uint8_t *salt, uint32_t saltlen, in emsa_pss_calc_m() argument
65 if (saltlen != 0 && salt) { in emsa_pss_calc_m()
66 hvb_memcpy(&m_tmp[PSS_MTMP_PADDING_LEN + digestlen], salt, saltlen); in emsa_pss_calc_m()
212 uint8_t *salt = NULL; in emsa_pss_verify() local
263 salt = &db[db_len - saltlen]; in emsa_pss_verify()
267 ret = emsa_pss_calc_m(pdigest, digestlen, salt, saltlen, &m_tmp); in emsa_pss_verify()

123