###### Abstract  
A smart city has a complex hierarchical communication system with various components. It must meet the requirements of fast connection, reliability, and security without data compromise. Internet of Things technology is widely used to provide connectivity and control solutions for smart sensors and other devices using heterogeneous networking technologies. In this paper, we propose a routing solution for Wireless Sensor Networks (WSN) and Mobile Ad hoc NETworks (MANET) with increasing speed, reliability, and sufficient security. Many routing protocols have been proposed for WSNs and MANETs. We combine the Secret Sharing Schemes (SSS) and Redundant Residual Number Systems (RRNS) to provide an efficient mechanism for a Distributed dynamic heterogeneous network Transmission (DT) with new security and reliability routing protocol (DT-RRNS). We analyze the concept of data transmission based on RRNS that divides data into smaller encoded shares and transmits them in parallel, protecting them from attacks on routes by adaptive multipath secured transmission and providing self-correcting properties that improve the reliability and fault tolerance of the entire system. s 2023233738 2  
Let us consider the main hardware components of the smart city network. It consists of many elements, including video surveillance, emergency call systems, biometric systems, city and banking services, intelligent transport, and IoT solutions (Radio Frequency Identification [2; 3], sensors for measuring temperature, humidity, illumination, pressure, etc.). Smart sensor networks play a substantial role in IoT. Their components include sensing, data collection, heterogeneous connectivity, data processing, etc. [3; 4; 5]. Large-scale data sharing in a distributed environment is fraught with data security and privacy issues, as data being compromised can harm people and the entire system. Another important aspect is reliability [3]. Failures can delay the response of emergency systems, medical, and rescue services. Thus, when building a smart city communication infrastructure, design methods that provide data security at the required level while having high reliability and speed are very important. In [6], we propose combining the Secret Sharing Schemes (SSS) and Redundant Residual Number Systems (RRNS) as an efficient security mechanism for a smart city dynamic heterogeneous network and show how RRNS increases communication reliability through effective correcting management. This paper presents a more extensive and in-depth study of data transmission in the proposed DT-RRNS protocol. We propose a routing solution for the Wireless Sensor Network (WSN) and Mobile Ad hoc NETwork (MANET) and present a methodology for ensuring the security and reliability of data transmission. The method is based on Node-Disjoint Multipath Routing [5], which allows to exchange and manage data between smart things, ensuring privacy by the threshold SSSs and Redundant Residue Number System (RRNS). We describe details of the generation of parameters that overcome the limitations of the well-known Mignotte scheme, data partitioning, and data recovery and provide a theoretical analysis of reliability and security bounds. We consider the network as a distributed infrastructure rather than a centralized system. It is well known that for large networks, centralized data processing imposes a large load on the central computing bottleneck slowing down the entire system. More detailed arguments about the positive and negative properties of a decentralized network can be seen in [7; 8; 9]. SSS is a cryptographic technique that splits a secret into several shares \(s=\{s_{1},s_{2},\ldots,s_{n}\}\) and distributes them among participants. In the most used \((k,n)\) threshold SSS, a combination of \(k\) shares from \(n\) is needed to recover the secret, where \(k\leq n\).