/foundation/communication/dsoftbus/core/bus_center/utils/src/ |
H A D | lnn_network_id.c | 101 static int32_t IrkAnonymizePrint(unsigned char *irk) in IrkAnonymizePrint() argument 103 if (irk == NULL) { in IrkAnonymizePrint() 107 if (ConvertBytesToHexString(irkStr, LFINDER_IRK_STR_LEN, irk, LFINDER_IRK_LEN) != SOFTBUS_OK) { in IrkAnonymizePrint() 108 LNN_LOGW(LNN_STATE, "convert irk to string fail"); in IrkAnonymizePrint() 113 LNN_LOGI(LNN_STATE, "get irk success:irk=%{public}s", AnonymizeWrapper(anonyIrk)); in IrkAnonymizePrint() 119 static int32_t EncryptSaveIrk(const char *filePath, unsigned char *irk, uint32_t len) in EncryptSaveIrk() argument 121 if (EncryptStorageData(LNN_ENCRYPT_LEVEL_DE, (uint8_t *)irk, len) != SOFTBUS_OK) { in EncryptSaveIrk() 122 LNN_LOGE(LNN_STATE, "encrypt irk fail"); in EncryptSaveIrk() 125 if (SoftBusWriteFile(filePath, (char *)irk, le in EncryptSaveIrk() 132 GetIrkFromOldFile(const char *irkFilePath, const char *encryptIrkFilePath, unsigned char *irk, uint32_t len) GetIrkFromOldFile() argument 162 GetIrkFromFile(unsigned char *irk, uint32_t len) GetIrkFromFile() argument 194 LnnGenLocalIrk(unsigned char *irk, uint32_t len) LnnGenLocalIrk() argument [all...] |
/foundation/communication/bluetooth_service/services/bluetooth/stack/src/btm/ |
H A D | btm_le_sec.h | 27 int BTM_GetLocalIdentityResolvingKey(BtmKey *irk); 29 int BTM_GetRemoteIdentityResolvingKey(const BtAddr *addr, BtmKey *irk); 35 BtmKey irk; member
|
H A D | btm_le_sec.c | 407 int BTM_GetLocalIdentityResolvingKey(BtmKey *irk) in BTM_GetLocalIdentityResolvingKey() argument 409 if (irk == NULL) { in BTM_GetLocalIdentityResolvingKey() 417 *irk = g_localIdentityResolvingKey; in BTM_GetLocalIdentityResolvingKey() 421 int BTM_GetRemoteIdentityResolvingKey(const BtAddr *addr, BtmKey *irk) in BTM_GetRemoteIdentityResolvingKey() argument 423 if (addr == NULL || irk == NULL) { in BTM_GetRemoteIdentityResolvingKey() 436 *irk = block->pairedInfo.remoteIdentityResolvingKey; in BTM_GetRemoteIdentityResolvingKey() 467 devIrks[index].irk = block->pairedInfo.remoteIdentityResolvingKey; in BTM_GetAllRemoteIdentityResolvingKey()
|
/foundation/communication/bluetooth_service/services/bluetooth/stack/src/smp/ |
H A D | smp_privacy.h | 30 void SMP_SetLocalIrk(const uint8_t *irk, uint8_t size); 32 void SMP_GetLocalIrk(uint8_t *irk, uint8_t size);
|
H A D | smp_privacy.c | 104 void SMP_SetLocalIrk(const uint8_t *irk, uint8_t size) in SMP_SetLocalIrk() argument 106 (void)memcpy_s(g_smpLocalIRK, SMP_IRK_LEN, irk, size); in SMP_SetLocalIrk() 115 void SMP_GetLocalIrk(uint8_t *irk, uint8_t size) in SMP_GetLocalIrk() argument 117 (void)memcpy_s(irk, SMP_IRK_LEN, g_smpLocalIRK, size); in SMP_GetLocalIrk()
|
H A D | smp.h | 180 void (*SMP_CallbackResolveRPAResult)(uint8_t status, bool result, const uint8_t *addr, const uint8_t *irk); 187 * @param irk Local IRK. 190 int SMP_SetIRK(const uint8_t *irk); 204 * @param irk Saved irk. 208 int SMP_ResolveRPA(const uint8_t *addr, const uint8_t *irk); 214 * @param irk Saved irk. 217 int SMP_AsyncResolveRPA(const uint8_t *addr, const uint8_t *irk); 222 * @param irk Loca [all...] |
H A D | smp_def.h | 214 uint8_t irk[SMP_IRK_LEN]; member 223 uint8_t irk[SMP_IRK_LEN]; member 228 uint8_t irk[SMP_IRK_LEN]; member 232 uint8_t irk[SMP_IRK_LEN]; member
|
H A D | smp.c | 809 int SMP_ResolveRPA(const uint8_t *addr, const uint8_t *irk) in SMP_ResolveRPA() argument 816 ret = SMP_Aes128(irk, SMP_IRK_LEN, message, sizeof(message), encryptedData); in SMP_ResolveRPA() 832 int SMP_AsyncResolveRPA(const uint8_t *addr, const uint8_t *irk) in SMP_AsyncResolveRPA() argument 842 (void)memcpy_s(ctx->irk, sizeof(ctx->irk), irk, SMP_IRK_LEN); in SMP_AsyncResolveRPA() 865 (void)memcpy_s(encCmd->key, sizeof(encCmd->key), param->irk, SMP_IRK_LEN); in SMP_AsyncResoRpaTask() 866 (void)memcpy_s(encryptParam.key, sizeof(encryptParam.key), param->irk, sizeof(encryptParam.key)); in SMP_AsyncResoRpaTask() 872 SMP_NotifyCbResoRpa(SMP_RESOLVE_RPA_STATUS_FAILED, false, param->addr, param->irk); in SMP_AsyncResoRpaTask() 878 int SMP_GenerateRPA(const uint8_t *irk) in SMP_GenerateRPA() argument 963 SMP_SetIRK(const uint8_t *irk) SMP_SetIRK() argument 1807 SMP_NotifyCbResoRpa(uint8_t status, bool result, const uint8_t *addr, const uint8_t *irk) SMP_NotifyCbResoRpa() argument [all...] |
H A D | smp_cmd.h | 40 int SMP_SendIdentityInformation(uint16_t handle, const uint8_t *irk, SMP_SendDataCb cb);
|
H A D | smp_common.h | 45 void SMP_NotifyCbResoRpa(uint8_t status, bool result, const uint8_t *addr, const uint8_t *irk);
|
H A D | smp_cmd.c | 260 int SMP_SendIdentityInformation(uint16_t handle, const uint8_t *irk, SMP_SendDataCb cb) in SMP_SendIdentityInformation() argument 272 PacketPayloadWrite(pkt, irk, offset, SMP_IRK_LEN); in SMP_SendIdentityInformation()
|
/foundation/communication/bluetooth_service/services/bluetooth/service/src/ble/ |
H A D | ble_config.cpp | 314 bool BleConfig::SetLocalIrk(const std::string &irk) const in SetLocalIrk() 318 bool ret = config_->SetValue(SECTION_HOST, PROPERTY_BLE_LOCAL_IRK, irk); in SetLocalIrk() 451 bool BleConfig::SetPeerIrk(const std::string §ion, const std::string &irk) const in SetPeerIrk() 455 bool ret = config_->SetValue(SECTION_BLE_PAIRED_LIST, section, PROPERTY_BLE_PEER_IRK, irk); in SetPeerIrk() 457 LOG_ERROR("[BleConfig] %{public}s:%{public}s", __func__, "Set ble peer irk failed!"); in SetPeerIrk() 489 std::string irk; in GetLocalIrk() local 490 bool ret = config_->GetValue(SECTION_HOST, PROPERTY_BLE_LOCAL_IRK, irk); in GetLocalIrk() 492 LOG_DEBUG("[BleConfig] %{public}s:%{public}s", __func__, "Get ble local irk failed!"); in GetLocalIrk() 494 return irk; in GetLocalIrk() 609 std::string irk; in GetPeerIrk() local [all...] |
H A D | ble_config.h | 65 bool SetLocalIrk(const std::string &irk) const; 85 bool SetPeerIrk(const std::string §ion, const std::string &irk) const;
|
H A D | ble_adapter.cpp | 433 std::string irk = BleConfig::GetInstance().GetLocalIrk(); in SetLocalIrkAndIdentityAddrToBtm() local 434 if (irk.empty()) { in SetLocalIrkAndIdentityAddrToBtm() 438 irk = BleUtils::ConvertIntToHexString(key); in SetLocalIrkAndIdentityAddrToBtm() 441 BleUtils::ConvertHexStringToInt(irk, vec); in SetLocalIrkAndIdentityAddrToBtm() 1215 std::string irk = BleConfig::GetInstance().GetPeerIrk(device.GetAddress()); in SavePeerDevices2BTM() local 1216 if (!irk.empty()) { in SavePeerDevices2BTM() 1218 BleUtils::ConvertHexStringToInt(irk, vec); in SavePeerDevices2BTM() 1377 std::string irk = BleConfig::GetInstance().GetPeerIrk(device.GetAddress()); in LePairComplete() local 1378 if (!irk.empty()) { in LePairComplete() 1380 BleUtils::ConvertHexStringToInt(irk, ve in LePairComplete() [all...] |
H A D | ble_security.cpp | 498 std::vector<uint8_t> irk( in SavePeerPairKey() 499 param.lePairKeyNotify_.remoteIdKey.irk, param.lePairKeyNotify_.remoteIdKey.irk + GAP_LTK_SIZE); in SavePeerPairKey() 500 ret &= BleConfig::GetInstance().SetPeerIrk(addr.GetAddress(), BleUtils::ConvertIntToHexString(irk)); in SavePeerPairKey()
|
/foundation/communication/dsoftbus/core/bus_center/utils/include/ |
H A D | lnn_network_id.h | 27 int32_t LnnGenLocalIrk(unsigned char *irk, uint32_t len);
|
/foundation/communication/bluetooth_service/services/bluetooth/stack/src/gap/ |
H A D | gap_sm_receive.c | 73 uint8_t irk[GAP_IRK_SIZE]; member 380 GapResolveRPAResult(param->status, param->result, param->addr, param->irk); in GapResolveRPAResultTask() 383 static void GapRecvResolveRPAResult(uint8_t status, bool result, const uint8_t *addr, const uint8_t *irk) in GapRecvResolveRPAResult() argument 395 (void)memcpy_s(smParam->irk, GAP_IRK_SIZE, irk, GAP_IRK_SIZE); in GapRecvResolveRPAResult()
|
H A D | gap_le_scan.c | 273 const uint8_t *keyPtr = info->IRKList[info->resolveIndex].irk.key; in GapRPAResolveProcess() 287 void GapResolveRPAResult(uint8_t status, bool result, const uint8_t *addr, const uint8_t *irk) in GapResolveRPAResult() argument 301 if (memcmp(info->IRKList[info->resolveIndex].irk.key, irk, GAP_IRK_SIZE)) { in GapResolveRPAResult()
|
H A D | gap_internal.h | 178 void GapResolveRPAResult(uint8_t status, bool result, const uint8_t *addr, const uint8_t *irk);
|
/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/src/ |
H A D | lnn_net_ledger.c | 681 uint8_t irk[LFINDER_IRK_LEN] = {0}; in SoftbusDumpPrintIrk() local 683 (uint8_t *)&irk, LFINDER_IRK_LEN) != SOFTBUS_OK) { in SoftbusDumpPrintIrk() 684 LNN_LOGE(LNN_LEDGER, "LnnGetPrivateNodeKeyInfo irk failed"); in SoftbusDumpPrintIrk() 688 if (ConvertBytesToHexString(peerIrkStr, LFINDER_IRK_STR_LEN, irk, LFINDER_IRK_LEN) != SOFTBUS_OK) { in SoftbusDumpPrintIrk() 689 LNN_LOGE(LNN_LEDGER, "convert irk to string fail."); in SoftbusDumpPrintIrk() 690 (void)memset_s(irk, LFINDER_IRK_LEN, 0, LFINDER_IRK_LEN); in SoftbusDumpPrintIrk() 697 (void)memset_s(irk, LFINDER_IRK_LEN, 0, LFINDER_IRK_LEN); in SoftbusDumpPrintIrk()
|
/foundation/communication/dsoftbus/tests/core/bus_center/lnn/net_builder/src/ |
H A D | lnn_net_builder_deps_mock.cpp | 323 int32_t LnnGenLocalIrk(unsigned char *irk, uint32_t len) in LnnGenLocalIrk() argument 325 return GetNetBuilderDepsInterface()->LnnGenLocalIrk(irk, len); in LnnGenLocalIrk()
|
/foundation/communication/dsoftbus/tests/core/bus_center/lnn/net_builder/mock/ |
H A D | lnn_data_cloud_sync_mock.cpp | 304 int32_t LnnGenLocalIrk(unsigned char *irk, uint32_t len) in LnnGenLocalIrk() argument 306 return GetNetBuilderDepsInterface()->LnnGenLocalIrk(irk, len); in LnnGenLocalIrk()
|
/foundation/communication/dsoftbus/tests/core/bus_center/lnn/net_ledger/ |
H A D | lnn_disctributed_net_ledger_test.cpp | 208 unsigned char irk[LFINDER_IRK_LEN] = {0}; in HWTEST_F() local 209 int32_t ret = LnnGetRemoteByteInfo(nullptr, BYTE_KEY_IRK, irk, LFINDER_IRK_LEN); in HWTEST_F() 213 ret = LnnGetRemoteByteInfo(NODE1_NETWORK_ID, BYTE_KEY_IRK, irk, LFINDER_IRK_LEN); in HWTEST_F()
|
/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/ |
H A D | lnn_net_builder.c | 763 unsigned char irk[LFINDER_IRK_LEN] = { 0 }; in ConifgLocalLedger() local 772 // irk fail should not cause softbus init fail in ConifgLocalLedger() 773 if (LnnGenLocalIrk(irk, LFINDER_IRK_LEN) != SOFTBUS_OK) { in ConifgLocalLedger() 774 LNN_LOGE(LNN_BUILDER, "get local irk fail"); in ConifgLocalLedger() 779 LnnSetLocalByteInfo(BYTE_KEY_IRK, irk, LFINDER_IRK_LEN); in ConifgLocalLedger() 780 (void)memset_s(irk, LFINDER_IRK_LEN, 0, LFINDER_IRK_LEN); in ConifgLocalLedger()
|
/foundation/communication/bluetooth_service/services/bluetooth/stack/include/ |
H A D | gap_le_if.h | 310 uint8_t irk[GAP_IRK_SIZE]; /// Identity Resolving Key member
|