Home
last modified time | relevance | path

Searched refs:secret (Results 1 – 25 of 26) sorted by relevance

12

/base/security/asset/test/unittest/inner_api_rust/src/
Dupdate.rs22 let secret = function!().as_bytes(); in update_same_secret() localVariable
23 add_default_asset(alias, secret).unwrap(); in update_same_secret()
29 update.insert_attr(Tag::Secret, secret.to_owned()); in update_same_secret()
39 let secret = function!().as_bytes(); in update_different_secret() localVariable
40 add_default_asset(alias, secret).unwrap(); in update_different_secret()
62 let secret = function!().as_bytes(); in update_attr_normal() localVariable
63 add_default_asset(alias, secret).unwrap(); in update_attr_normal()
Dcommon.rs89 pub(crate) fn add_default_asset(alias: &[u8], secret: &[u8]) -> Result<()> { in add_default_asset()
92 (Tag::Secret, Value::Bytes(secret.to_vec())), in add_default_asset()
97 pub(crate) fn add_default_auth_asset(alias: &[u8], secret: &[u8]) -> Result<()> { in add_default_auth_asset()
100 (Tag::Secret, Value::Bytes(secret.to_vec())), in add_default_auth_asset()
Dadd.rs90 let secret = "中文"; in add_chinese_secret() localVariable
93 attrs.insert_attr(Tag::Secret, secret.as_bytes().to_owned()); in add_chinese_secret()
100 assert_eq!(secret, String::from_utf8(bytes.to_owned()).unwrap()); in add_chinese_secret()
/base/security/asset/services/core_service/src/operations/
Doperation_query.rs44 let secret = db_data.get_bytes_attr(&column::SECRET)?; in upgrade_version() localVariable
46 let cipher = Crypto::encrypt(&secret_key, secret, &common::build_aad(db_data)?)?; in upgrade_version()
63 let secret = db_data.get_bytes_attr(&column::SECRET)?; in decrypt() localVariable
65 let secret = Crypto::decrypt(&secret_key, secret, &common::build_aad(db_data)?)?; in decrypt() localVariable
66 db_data.insert(column::SECRET, Value::Bytes(secret)); in decrypt()
75 let secret = db_data.get_bytes_attr(&column::SECRET)?; in exec_crypto() localVariable
80 let secret = crypto.exec_crypt(secret, &common::build_aad(db_data)?, auth_token)?; in exec_crypto() localVariable
81 db_data.insert(column::SECRET, Value::Bytes(secret)); in exec_crypto()
Doperation_update.rs31 let secret = db_data.get_bytes_attr(&column::SECRET)?; in encrypt() localVariable
32 let cipher = Crypto::encrypt(&secret_key, secret, &common::build_aad(db_data)?)?; in encrypt()
Doperation_add.rs59 let secret = db_data.get_bytes_attr(&column::SECRET)?; in encrypt() localVariable
60 let cipher = Crypto::encrypt(&secret_key, secret, &common::build_aad(db_data)?)?; in encrypt()
/base/security/device_auth/services/protocol/src/pake_protocol/pake_protocol_ec_common_mock/
Dpake_protocol_ec_common_mock.c28 int32_t GenerateEcPakeParams(PakeBaseParams *params, Uint8Buff *secret) in GenerateEcPakeParams() argument
31 (void)secret; in GenerateEcPakeParams()
/base/security/device_auth/services/protocol/src/pake_protocol/pake_protocol_dl_common_mock/
Dpake_protocol_dl_common_mock.c28 int32_t GenerateDlPakeParams(PakeBaseParams *params, const Uint8Buff *secret) in GenerateDlPakeParams() argument
31 (void)secret; in GenerateDlPakeParams()
/base/security/asset/test/unittest/kits_ndk/src/
Dasset_add_test.cpp103 …Asset_Blob secret = { .size = 0, .data = reinterpret_cast<uint8_t*>(const_cast<char*>(__func__)) }; variable
106 { .tag = ASSET_TAG_SECRET, .value.blob = secret },
137 …Asset_Blob secret = { .size = 0, .data = reinterpret_cast<uint8_t*>(const_cast<char*>(__func__)) }; variable
140 { .tag = ASSET_TAG_SECRET, .value.blob = secret },
156 …Asset_Blob secret = { .size = 0, .data = reinterpret_cast<uint8_t*>(const_cast<char*>(__func__)) }; variable
159 { .tag = ASSET_TAG_SECRET, .value.blob = secret },
160 { .tag = ASSET_TAG_REQUIRE_PASSWORD_SET, .value.blob = secret },
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v1_protocol/
Dpake_v1_protocol_common.c179 Uint8Buff secret = { secretVal, PAKE_SECRET_LEN }; in GeneratePakeParams() local
195 res = params->loader->computeHkdf(&(params->psk), &(params->salt), &keyInfo, &secret, false); in GeneratePakeParams()
203 res = GenerateEcPakeParams(params, &secret); in GeneratePakeParams()
205 res = GenerateDlPakeParams(params, &secret); in GeneratePakeParams()
214 (void)memset_s(secret.val, secret.length, 0, secret.length); in GeneratePakeParams()
217 (void)memset_s(secret.val, secret.length, 0, secret.length); in GeneratePakeParams()
/base/security/device_auth/services/protocol/inc/pake_protocol/pake_protocol_ec_common/
Dpake_protocol_ec_common.h28 int32_t GenerateEcPakeParams(PakeBaseParams *params, Uint8Buff *secret);
/base/security/device_auth/services/protocol/inc/pake_protocol/pake_protocol_dl_common/
Dpake_protocol_dl_common.h28 int32_t GenerateDlPakeParams(PakeBaseParams *params, const Uint8Buff *secret);
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/
Dpake_v2_protocol_common.c173 Uint8Buff secret = { secretVal, PAKE_SECRET_LEN }; in GeneratePakeParams() local
183 res = params->loader->computeHkdf(&(params->psk), &(params->salt), &keyInfo, &secret, false); in GeneratePakeParams()
191 res = GenerateEcPakeParams(params, &secret); in GeneratePakeParams()
193 res = GenerateDlPakeParams(params, &secret); in GeneratePakeParams()
201 (void)memset_s(secret.val, secret.length, 0, secret.length); in GeneratePakeParams()
204 (void)memset_s(secret.val, secret.length, 0, secret.length); in GeneratePakeParams()
/base/security/device_auth/frameworks/deviceauth_lite/source/key_agreement/
Dpake_client.c199 struct hkdf secret = { 0, {0} }; in parse_start_response_data() local
201 … HICHAIN_SPEKE_BASE_INFO, HC_HKDF_SECRET_LEN, (struct var_buffer *)&secret); in parse_start_response_data()
211 (void)memset_s(&secret, sizeof(struct hkdf), 0, sizeof(struct hkdf)); in parse_start_response_data()
218 (void)memset_s(&secret, sizeof(struct hkdf), 0, sizeof(struct hkdf)); in parse_start_response_data()
229 …ret = cal_bignum_exp((struct var_buffer *)&secret, (struct var_buffer *)&exp, prime_len, (struct b… in parse_start_response_data()
230 (void)memset_s(&secret, sizeof(struct hkdf), 0, sizeof(struct hkdf)); in parse_start_response_data()
/base/security/device_auth/services/protocol/src/pake_protocol/pake_protocol_ec_common/
Dpake_protocol_ec_common.c77 int32_t GenerateEcPakeParams(PakeBaseParams *params, Uint8Buff *secret) in GenerateEcPakeParams() argument
92 res = params->loader->hashToPoint(secret, alg, &params->base); in GenerateEcPakeParams()
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/
Dmbedtls_ec_adapter.c403 mbedtls_mpi *secret = HcMalloc(sizeof(mbedtls_mpi), 0); in EcKeyAgreement() local
407 if ((secret == NULL) || (keyPair == NULL) || (entropy == NULL) || (ctrDrbg == NULL)) { in EcKeyAgreement()
409 HcFree(secret); in EcKeyAgreement()
415 mbedtls_mpi_init(secret); in EcKeyAgreement()
431 …LOG_AND_GOTO_CLEANUP_IF_FAIL(mbedtls_mpi_copy(secret, &p.MBEDTLS_PRIVATE(X)), "Copy secret failed.… in EcKeyAgreement()
434 mbedtls_mpi_free(secret); in EcKeyAgreement()
439 HcFree(secret); in EcKeyAgreement()
/base/account/os_account/services/accountmgr/include/account_iam/
Dinner_account_iam_manager.h38 std::vector<uint8_t> secret; member
70 …vateUserKey(int32_t userId, const std::vector<uint8_t> &token, const std::vector<uint8_t> &secret);
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/protocol_lib/
Ddl_speke_protocol.c255 static int32_t CalSecret(DlSpekeParams *params, Uint8Buff *secret) in CalSecret() argument
258 …t res = GetLoaderInstance()->computeHkdf(&(params->psk), &(params->salt), &keyInfo, secret, false); in CalSecret()
285 static int32_t DlSpekeCalBase(DlSpekeParams *params, Uint8Buff *secret) in DlSpekeCalBase() argument
295 …int32_t res = GetLoaderInstance()->bigNumExpMod(secret, &exp, params->largePrimeNumHex, &params->b… in DlSpekeCalBase()
671 Uint8Buff secret = { secretVal, DL_SPEKE_SECRET_LEN }; in DlSpekeServerStartRspProcEvent() local
672 res = CalSecret(&impl->params, &secret); in DlSpekeServerStartRspProcEvent()
676 res = DlSpekeCalBase(&impl->params, &secret); in DlSpekeServerStartRspProcEvent()
748 Uint8Buff secret = { secretVal, DL_SPEKE_SECRET_LEN }; in DlSpekeClientFinishReqProcEvent() local
749 int32_t res = CalSecret(&impl->params, &secret); in DlSpekeClientFinishReqProcEvent()
753 res = DlSpekeCalBase(&impl->params, &secret); in DlSpekeClientFinishReqProcEvent()
[all …]
Dec_speke_protocol.c201 static int32_t CalSecret(EcSpekeParams *params, Uint8Buff *secret) in CalSecret() argument
204 …t res = GetLoaderInstance()->computeHkdf(&(params->psk), &(params->salt), &keyInfo, secret, false); in CalSecret()
213 static int32_t EcSpekeCalBase(EcSpekeParams *params, Uint8Buff *secret) in EcSpekeCalBase() argument
232 res = GetLoaderInstance()->hashToPoint(secret, algo, &params->base); in EcSpekeCalBase()
658 Uint8Buff secret = { secretVal, EC_SPEKE_SECRET_LEN }; in EcSpekeServerStartRspProcEvent() local
659 res = CalSecret(&impl->params, &secret); in EcSpekeServerStartRspProcEvent()
663 res = EcSpekeCalBase(&impl->params, &secret); in EcSpekeServerStartRspProcEvent()
735 Uint8Buff secret = { secretVal, EC_SPEKE_SECRET_LEN }; in EcSpekeClientFinishReqProcEvent() local
736 int32_t res = CalSecret(&impl->params, &secret); in EcSpekeClientFinishReqProcEvent()
740 res = EcSpekeCalBase(&impl->params, &secret); in EcSpekeClientFinishReqProcEvent()
[all …]
/base/security/device_auth/services/protocol/src/pake_protocol/pake_protocol_dl_common/
Dpake_protocol_dl_common.c125 int32_t GenerateDlPakeParams(PakeBaseParams *params, const Uint8Buff *secret) in GenerateDlPakeParams() argument
141 res = params->loader->bigNumExpMod(secret, &exp, params->largePrimeNumHex, &params->base); in GenerateDlPakeParams()
/base/account/os_account/services/accountmgr/src/account_iam/
Daccount_iam_callback.cpp74 std::vector<uint8_t> secret; in HandleAuthResult() local
75 extraInfo.GetUint8ArrayValue(Attributes::ATTR_ROOT_SECRET, secret); in HandleAuthResult()
81 ret = InnerAccountIAMManager::GetInstance().ActivateUserKey(userId_, token, secret); in HandleAuthResult()
Dinner_account_iam_manager.cpp507 int32_t userId, const std::vector<uint8_t> &token, const std::vector<uint8_t> &secret) in ActivateUserKey() argument
515 result = storageMgrProxy_->ActiveUserKey(userId, token, secret); in ActivateUserKey()
/base/account/os_account/services/accountmgr/src/appaccount/
Dapp_account_control_manager.cpp96 AssetAttr *secret = AssetParseAttr(resultSet.results, SEC_ASSET_TAG_SECRET); in GetDataFromAsset() local
97 if (secret == nullptr) { in GetDataFromAsset()
101 AssetBlob valueBlob = secret->value.blob; in GetDataFromAsset()
/base/security/device_auth/
DREADME.md30 …: allows two devices to establish a trust relationship based on a shared secret, and exchange a se…
/base/account/os_account/services/accountmgr/test/unittest/account_iam/
Daccount_iam_manager_test.cpp222 …tiveUserKey(uint32_t userId, const std::vector<uint8_t> &token, const std::vector<uint8_t> &secret) in ActiveUserKey() argument

12