/base/security/asset/test/unittest/inner_api_rust/src/ |
D | update.rs | 22 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()
|
D | common.rs | 89 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()
|
D | add.rs | 90 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/ |
D | operation_query.rs | 44 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()
|
D | operation_update.rs | 31 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()
|
D | operation_add.rs | 59 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/ |
D | pake_protocol_ec_common_mock.c | 28 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/ |
D | pake_protocol_dl_common_mock.c | 28 int32_t GenerateDlPakeParams(PakeBaseParams *params, const Uint8Buff *secret) in GenerateDlPakeParams() argument 31 (void)secret; in GenerateDlPakeParams()
|
/base/security/asset/test/unittest/kits_ndk/src/ |
D | asset_add_test.cpp | 103 …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/ |
D | pake_v1_protocol_common.c | 179 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/ |
D | pake_protocol_ec_common.h | 28 int32_t GenerateEcPakeParams(PakeBaseParams *params, Uint8Buff *secret);
|
/base/security/device_auth/services/protocol/inc/pake_protocol/pake_protocol_dl_common/ |
D | pake_protocol_dl_common.h | 28 int32_t GenerateDlPakeParams(PakeBaseParams *params, const Uint8Buff *secret);
|
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/ |
D | pake_v2_protocol_common.c | 173 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/ |
D | pake_client.c | 199 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/ |
D | pake_protocol_ec_common.c | 77 int32_t GenerateEcPakeParams(PakeBaseParams *params, Uint8Buff *secret) in GenerateEcPakeParams() argument 92 res = params->loader->hashToPoint(secret, alg, ¶ms->base); in GenerateEcPakeParams()
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/ |
D | mbedtls_ec_adapter.c | 403 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/ |
D | inner_account_iam_manager.h | 38 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/ |
D | dl_speke_protocol.c | 255 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, ¶ms->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 …]
|
D | ec_speke_protocol.c | 201 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, ¶ms->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/ |
D | pake_protocol_dl_common.c | 125 int32_t GenerateDlPakeParams(PakeBaseParams *params, const Uint8Buff *secret) in GenerateDlPakeParams() argument 141 res = params->loader->bigNumExpMod(secret, &exp, params->largePrimeNumHex, ¶ms->base); in GenerateDlPakeParams()
|
/base/account/os_account/services/accountmgr/src/account_iam/ |
D | account_iam_callback.cpp | 74 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()
|
D | inner_account_iam_manager.cpp | 507 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/ |
D | app_account_control_manager.cpp | 96 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/ |
D | README.md | 30 …: 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/ |
D | account_iam_manager_test.cpp | 222 …tiveUserKey(uint32_t userId, const std::vector<uint8_t> &token, const std::vector<uint8_t> &secret) in ActiveUserKey() argument
|