Transportation, temperature control, and the production of pharmaceuticals all rely on 71 percent of the Earth's surface, which is covered by water. Valuable things, including minerals, metals, corals, and coral reefs, can be identified with the help of the IoUT, among other applications. One of the crucial uses is in preventing damage caused by natural disasters. The IoT boosted concepts for a new undersea network (IoUT). Underwater networks have many drawbacks, including a lack of dependability, limited bandwidth, long propagation delays, high processing demands, high energy costs, and node detection with secure communication. Real-time, secure data communication is a significant area of research for us, along with node identification and dynamic network configuration. IoUT faces severe obstacles in the form of these issues. Our strategy involves a dynamic graph for network design, an AFA algorithm based on AI for node recognition, and ECC for a secure communication mechanism. In order to increase discretion and provide the undersea network with adequate robust security.